Category : Pascal Source Code
Archive   : PASS_ALL.ZIP
Filename : TI101.ASC

 
Output of file : TI101.ASC contained in archive : PASS_ALL.ZIP









PRODUCT : TURBO PASCAL NUMBER : 101
VERSION : ALL
OS : CP/M-80, CP/M-86, MS-DOS, PC-DOS
DATE : April 7, 1986 PAGE : 1/1
TITLE : COMMAND LINE MANIPULATION




This program allows access to the command line buffer on MS-DOS
computers. An absolute address variable is located at offset 80
hex past the start of the code segment. This is the location of
the DOS command line buffer. This program as it stands will only
work on 16 bit MS-DOS terminals. In order to make this program
work with CPM/80 simply delete the CSEG reserved word out of the
command line buffer declaration.


program CommandLine;
type string127 = string[127];

var Buffer : string127;
I : integer;

procedure CmdLine(var Buffer : string127); {procedure to get}
{command line}
var ParamBuff : string127 absolute cseg:$80;
begin
buffer : = ParamBuff; {Assign the command to}
end; {the parameter buffer}

begin { Main }
CmdLine(Buffer); { Get command line }
For I := 1 to 6 Do { Space down the screen 6 lines. }
writeln; { Write the command buffer }
writeln('l', Buffer,'l');
Delay(3000);
end.