home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PASCAL / TSRTPU.ZIP / TSRDEMO.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1988-02-07  |  1.3 KB  |  46 lines

  1. {$M 2048,0,4096 }
  2. Program TSRDemo;
  3.  
  4. Uses
  5.     CRT,
  6.     DOS,
  7.     TSR;
  8.  
  9. {---------------------------------------------------------------------}
  10. {$F+} PROCEDURE Do_Demo; {$F-}
  11.  
  12. VAR
  13.    CH : Char;
  14.    L  : String;
  15.    I  : Integer;
  16.  
  17. BEGIN
  18.   WriteLn('You are in Do_Demo');
  19.  
  20.   Write('PRESS any key to continue....');
  21.   REPEAT UNTIL KeyPressed;
  22.   CH := ReadKey;
  23.   WriteLn(CH);
  24.  
  25.   Write('Enter your name: ');
  26.   ReadLn(L);
  27.   Writeln('Hi, ', L);
  28.  
  29.   Writeln('Leaving Do_Demo');
  30. END; {Do_Demo}
  31. {---------------------------------------------------------------------}
  32.  
  33. BEGIN                 { Main code of TSRDemo }
  34.   TSRSign := 'Demo';
  35.   InstalledProc := @Do_Demo;          {Give my values to the variables that }
  36.   HotScanCode := $20; { Alt-D }       {are defined in the TSR unit }
  37.  
  38.   Writeln('TSRDemo is running');              {Let the user know its in there}
  39.   Writeln('Type Alt-D to get into Do_demo');
  40.  
  41.   Install_TSR;                                {Redirect the necessary interrupts }
  42.                                               {and end the program while leaving the }
  43.                                               {the code in memory so my hot key can }
  44.                                               {it up.}
  45. END.                          {TSRDemo}
  46.