home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / INFO / TURBOPAS / WAIT.ZIP / WAIT.INC
Encoding:
Text File  |  2008-12-28  |  733 b   |  24 lines

  1. {********************************************************************
  2.  
  3.             Utility for the IBM PC and kompatibles
  4.  
  5.   This small include file waits for any key beeing pressed. ANY key
  6.   means: also the '5' key on the numeric keypad, the DEL or NUM-LOCK
  7.   etc. ANY KEY !
  8.   by Wolfgang Siebeck/Rupert Mohr, 72446,415, Aachen, W.Germany
  9.  
  10. *********************************************************************}
  11.  
  12. procedure wait_for_any_key;
  13.  
  14. var
  15. status : byte;
  16.  
  17. begin
  18.     status := mem[$0000:$0417];
  19.     mem[$0000:$0417] := 32;
  20.     repeat until (keypressed or (mem[$0000:$0417]<>32));
  21.     mem[$0000:$0417] := status;
  22.     mem[$0000:1050] := mem[$0000:1052]; (* empty kbd-buffer *)
  23. end; (* wait_for_any_key *)
  24.