home *** CD-ROM | disk | FTP | other *** search
/ Collection of Hack-Phreak Scene Programs / cleanhpvac.zip / cleanhpvac / TP-TSR.ARJ / CPATH.PAS < prev    next >
Pascal/Delphi Source File  |  1989-02-11  |  1KB  |  25 lines

  1. {═══════════════════════════════ CPATH.PAS ═══════════════════════════════}
  2. { ─────────  Turbo 4.0/5.0 stay-resident demonstration program  ───────── }
  3. {                 Copyright (c) 1989  Richard W. Prescott                 }
  4. { This simple resident program displays the current directory at the      }
  5. { command prompt (e.g.  C:\TURBO> ) if the default drive is C or higher.  }
  6. { Avoids directory check delay on floppy drives.  Assumes default PROMPT. }
  7. {═══════════════════════════════ CPATH.PAS ═══════════════════════════════}
  8. {$M $400,0,0}
  9. Uses Dos,Dos21_0A;
  10.  
  11. {$F+} PROCEDURE ServiceProc; {$F-}               {- Force FAR Return -}
  12. {- The Pascal code for the Interrupt Service must be a FAR Procedure -}
  13. Var Directory: STRING[67];
  14. BEGIN
  15.   IF (DefaultDrive >= 'C') AND (User^.Ds = CommandSig) THEN BEGIN
  16.     GetDir(0,Directory);
  17.     WRITE(#8,#8,Directory,'>'); {then chain to normal 0A service}
  18.   END; {IF DefaultDrive >= 'C' THEN }
  19. END; {- Normal Proc Exit provides RETF to caller DOS21_0A.IHook -}
  20.  
  21. BEGIN
  22.   Dos21_0A.PascalCode := @ServiceProc; {- Initialize Pascal Code Pointer -}
  23.   Keep(0);                             {- Terminate and Stay Resident -}
  24. END.
  25.