Article View: comp.os.msdos.programmer
Article #6246Flush keyboard buffer
From: Lee Hollingworth
Date: Fri, 01 Jan 1993 02:16
Date: Fri, 01 Jan 1993 02:16
17 lines
1139 bytes
1139 bytes
I am writing a screen blanking TSR (yes another one :-) using assembly, and I am at a loss as to how to flush the keyboard buffer when the user presses a key to restore the saved screen. I have installed my own ISR to chain the INT16h ROM BIOS keyboard driver. Therefore the keyboard buffer must be cleared before returning to the interrupted program, otherwise the keypress remains in the buffer and is read with the next buffer read. I have an idea that I should be able to read the buffer from Port 60h, and flush the buffer by reading and writing to Port 61h, but I'm not sure this is right, or indeed how to do it properly. Any ideas would be greatly appreciated. Lee Hollingworth s1110238@giaeb.cc.monash.edu.au
Technical Details
Message-ID:
<s1110238.725854615@giaeb>Path:
arc1-ca.pugleaf.net!sparky!uunet!munnari.oz.au!bruce.cs.monash.edu.au!monu6!giaeb!s1110238Show Full Headers
Complete Article Headers
Newsgroups: comp.os.msdos.programmer Path: arc1-ca.pugleaf.net!sparky!uunet!munnari.oz.au!bruce.cs.monash.edu.au!monu6!giaeb!s1110238 From: s1110238@giaeb.cc.monash.edu.au (Lee Hollingworth) Subject: Flush keyboard buffer Message-ID: <s1110238.725854615@giaeb> Sender: news@monu6.cc.monash.edu.au (Usenet system) Organization: Monash University, Melb., Australia. Date: Fri, 1 Jan 1993 02:16:55 GMT Lines: 18