home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / os / msdos / programm / 11729 < prev    next >
Encoding:
Text File  |  1992-12-31  |  1.1 KB  |  29 lines

  1. Newsgroups: comp.os.msdos.programmer
  2. Path: sparky!uunet!munnari.oz.au!bruce.cs.monash.edu.au!monu6!giaeb!s1110238
  3. From: s1110238@giaeb.cc.monash.edu.au (Lee Hollingworth)
  4. Subject: Flush keyboard buffer
  5. Message-ID: <s1110238.725854615@giaeb>
  6. Sender: news@monu6.cc.monash.edu.au (Usenet system)
  7. Organization: Monash University, Melb., Australia.
  8. Date: Fri, 1 Jan 1993 02:16:55 GMT
  9. Lines: 18
  10.  
  11. I am writing a screen blanking TSR (yes another one :-) using assembly,
  12. and I am at a loss as to how to flush the keyboard buffer when the user
  13. presses a key to restore the saved screen.
  14.  
  15. I have installed my own ISR to chain the INT16h ROM BIOS keyboard driver.
  16. Therefore the keyboard buffer must be cleared before returning to the
  17. interrupted program, otherwise the keypress remains in the buffer and is
  18. read with the next buffer read.
  19.  
  20. I have an idea that I should be able to read the buffer from Port 60h,
  21. and flush the buffer by reading and writing to Port 61h, but I'm not
  22. sure this is right, or indeed how to do it properly.
  23.  
  24. Any ideas would be greatly appreciated.
  25.  
  26. Lee Hollingworth
  27. s1110238@giaeb.cc.monash.edu.au
  28.  
  29.