Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!aplcen!uakari.primate.wisc.edu!zaphod.mps.ohio-state.edu!tut.cis.ohio-state.edu!ucbvax!hplabs!hp-pcd!hpcvlx!bill From: bill@hpcvlx.cv.hp.com (Bill Frolik) Newsgroups: comp.binaries.ibm.pc.d Subject: Re: Sys Req - key. Message-ID: <102760025@hpcvlx.cv.hp.com> Date: 18 Dec 89 17:35:27 GMT References: <187@nmtvax.nmt.edu> Organization: Hewlett-Packard Co., Corvallis, OR, USA Lines: 38 >>This is at least partially false. On my machine, an XT clone, the sys-req >>key DOES use int 09. (int 15h is for cassette io). It generates ascii 00, >>... >The SysReq key first appeared on the AT, thus it's operation on the PC, XT, >and clones on them is non-defined. The scan codes don't matter. The BIOS >processes the scan codes, and that is where an AT BIOS would use INT 15h. >(remember, the AT didn't have a cassette port). >... Int 9h is the keyboard HARDWARE interrupt vector -- ALL keys go through it in true PC-compatible systems. On any transition (up or down), the BIOS Int 9h handler retrieves the key's scancode from the keyboard controller, notes whether it was an up or down transition, and performs an appropriate action. Most of the time that means converting the scancode into a keycode if necessary and stuffing the results into a queue, where it can be later read using Int 16h. Int 9h treats some keys special: instead of getting stuffed in the keyqueue, SYS REQ causes the Int 9h handler to turn around and perform an Int 15h, allowing whoever is fielding Int 15h requests to handle the transition. Modifier keys such as Ctrl, Shift, Alt, and CapsLock set/clear flags in the BIOS RAM "shift state" byte, so that subsequent calls to the Int 9h handler will properly convert scancode to keycode. This "shift state" byte can also be read via Int 16h. Ctrl-Alt-Del gets trapped in the Int 9h handler, causing a "warm boot" flag (1234h) to be stuffed into the word at 40:72, generally followed by a far jump to FFFF:0, causing a reboot. If you want to see ALL keyboard activity, you write your own Int 9h handler. If you simply want to WATCH all keyboard activity without changing the way things are currently handled, intercept Int 9h, examine the keyboard registers without doing anything, and then pass the interrupt on to the real Int 9h handler. ________________________________________ Bill Frolik Hewlett-Packard Co. hp-pcd!bill Corvallis, OR