home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PASCAL / CMDLINE.ZIP / CMDLN.PAS
Encoding:
Pascal/Delphi Source File  |  1988-06-28  |  896 b   |  31 lines

  1. {$R-,S-,V-}
  2. Unit CmdLn; {By John M. Majkrzak, Arden Hills MN  CIS# 76617,264}
  3.             {More used will be SetCmdLn(). I reinitialize some programs after
  4.              resetting the the CmdLn so it can be read again with its new
  5.              contents. Keep in mind the CmdLn is lost when you return to DOS.}
  6.  
  7. Interface
  8.  
  9. Procedure GetCmdLn(Var St: String);
  10. Procedure SetCmdLn(    St: String);
  11.  
  12. Implementation
  13.                       Type CmdLnSt80 = String[80];
  14. Type            CmdLnBuf= ^CmdLnSt80;
  15. Var   CmdLnPtr: CmdLnBuf;
  16.  
  17. Procedure GetCmdLn(Var St: String);
  18.   Begin
  19.   St:= String(Ptr(PrefixSeg, $80)^);
  20. end;
  21.  
  22. Procedure SetCmdLn(    St: String);
  23.   Var PStr: String[80];
  24.   Begin
  25.   PStr:= St;
  26.   CmdLnPtr^:= PStr;
  27. end;
  28.  
  29. Begin
  30.   CmdLnPtr:= (Ptr(PreFixSeg, $80));
  31. end.