Jim Bishop
2006-05-15 15:52:28 UTC
I'm getting the following error:
Borland Pascal Version 7.0 Copyright (c) 1983,92 Borland International
Invalid switch - /X
when I run the following short program compiled in Real Mode with no
conditionals defined. From a command prompt the "DIR /X >TEST.TXT"
works fine. Any pointers would be appreciated. I'm trying to map long
directory/file names to short directory/file names.
As a side note, when I comment out the SetMemTop lines in FreePascal, it
runs fine; so I don't think it's the command itself.
Jim
PROGRAM test;
USES
DOS, MEMORY;
{===============================================}
PROCEDURE DO_COMMAND(S : STRING);
BEGIN
{$IFNDEF DPMI}
SetMemTop(HeapPtr);
{$ENDIF}
SwapVectors;
Exec(Getenv('comspec'), '/c ' + S);
SwapVectors;
{$IFNDEF DPMI}
SetMemTop(HeapEnd);
{$ENDIF}
END; { DO_COMMAND }
{================================================}
BEGIN {test}
do_command('DIR /X >TEMP.TXT');
END. {test}
Borland Pascal Version 7.0 Copyright (c) 1983,92 Borland International
Invalid switch - /X
when I run the following short program compiled in Real Mode with no
conditionals defined. From a command prompt the "DIR /X >TEST.TXT"
works fine. Any pointers would be appreciated. I'm trying to map long
directory/file names to short directory/file names.
As a side note, when I comment out the SetMemTop lines in FreePascal, it
runs fine; so I don't think it's the command itself.
Jim
PROGRAM test;
USES
DOS, MEMORY;
{===============================================}
PROCEDURE DO_COMMAND(S : STRING);
BEGIN
{$IFNDEF DPMI}
SetMemTop(HeapPtr);
{$ENDIF}
SwapVectors;
Exec(Getenv('comspec'), '/c ' + S);
SwapVectors;
{$IFNDEF DPMI}
SetMemTop(HeapEnd);
{$ENDIF}
END; { DO_COMMAND }
{================================================}
BEGIN {test}
do_command('DIR /X >TEMP.TXT');
END. {test}