How compatible were "MS-DOS Compatible" machines?

Jim Leonard trixter at
Fri Feb 8 23:26:55 CST 2008

Chuck Guzis wrote:
> Real programmers don't need no stinkin' user's manual.

I did, trying to code for the aforementioned "PC compatible" project.  I 
was trying to write a keyboard handler and things were just completely 
going south.  I finally dredged up some documentation that showed me 
where the BIOS entry point was for the keyboard routine (I tried 
following the pointer at Int 9 but I got confused because it doesn't 
point directly there), and disassembled it -- turns out I wasn't 
properly acknowledging the keyboard "break" code or something.  So I 
needed the docs, which pointed me to code, which pointed me to the answer.

Something was still screwy, so in the end I ultimately did this:

- Hook INT 9
- read the scancode out of port 60h
- call the old keyboard handler to properly acknowledge the keystroke 
(let the BIOS clean up the mess! Plus I figure this is a way to increase 
my compatibility)
- alter 0040:0017 (or wherever it is, don't have code in front of me) to 
empty the keyboard buffer by setting queue head = queue tail

So far, it's working perfectly (crosses fingers).
Jim Leonard (trixter at  
Help our electronic games project: 
Or check out some trippy MindCandy at
A child borne of the home computer wars:

More information about the cctalk mailing list