home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / PROG / PASCAL / MISCTI10.ZIP / TI101.ASC next >
Encoding:
Text File  |  1988-05-12  |  1.3 KB  |  41 lines

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