home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / PROG / PASCAL / MISCTI10.ZIP / TI182.ASC < prev    next >
Encoding:
Text File  |  1988-04-18  |  1.4 KB  |  46 lines

  1. R 65
  2. PAGEFOOTING
  3. BEGIN PAGEHEADING
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11. PRODUCT : TURBO PASCAL@>( )NUMBER : 101
  12. VERSION : ALL 
  13.      OS : CP/M-80, CP/M-86, MS-DOS, PC-DOS
  14.    DATE : April 7, 1986@>( )PAGE : 1/1
  15. 
  16.   TITLE : COMMAND LINE MANIPULATION
  17. END PAGEHEADING
  18.  
  19. 
  20.  
  21.  
  22. This   program allows access  to the command line buffer on MS-DOS computers.   An  absolute address variable is located atoffset  80 hex  past the start of the code segment.   This is thelocation  of  the  DOS command line buffer.   This program as itstands will only  work  on 16 bit MS-DOS terminals.   In order tomake  this  program  work  with  CPM/80 simply delete the CSEGreserved word out of  the  command line buffer declaration.
  23.  
  24.  
  25.  
  26. program CommandLine;
  27. type  string127  = string[127];
  28.  
  29. var   Buffer     : string127;
  30.       I          : integer;
  31.  
  32.   procedure CmdLine(var Buffer : string127);    {procedure toget}
  33.                                                 {command line}
  34.   var   ParamBuff : string127 absolute cseg:$80;
  35.   begin
  36.     buffer : = ParamBuff;                       {Assign thecommand to}
  37.   end;                                          {the parameterbuffer}
  38.  
  39. begin { Main }
  40.   CmdLine(Buffer);             { Get command line }
  41.   For I := 1 to 6 Do           { Space down the screen 6 lines. }
  42.     writeln;                   { Write the command buffer }
  43.   writeln('l', Buffer,'l');
  44.   Delay(3000);
  45. end.
  46.