Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: notesfiles - hp 1.2 08/01/83; site hp-pcd.UUCP Path: utzoo!watmath!clyde!bonnie!akgua!gatech!seismo!harvard!think!mit-eddie!genrad!decvax!tektronix!hplabs!hp-pcd!bill From: bill@hp-pcd.UUCP (bill) Newsgroups: net.micro.pc Subject: Re: Help needed on Shift, control keys Message-ID: <15200004@hpcvlo.UUCP> Date: Mon, 18-Nov-85 12:40:00 EST Article-I.D.: hpcvlo.15200004 Posted: Mon Nov 18 12:40:00 1985 Date-Received: Mon, 9-Dec-85 03:14:01 EST References: <395@ihdev.UUCP> Organization: Hewlett-Packard - Corvallis, OR Lines: 29 Nf-ID: #R:ihdev:-39500:hpcvlo:15200004:000:831 Nf-From: hpcvlo!bill Nov 18 09:40:00 1985 The byte you're looking for is, I believe, at 0040:0017 (hex). Instead of directly reading this byte, however, you probably ought to consider using Int 16h function AH=2, which returns this very byte in AL. Int 16h functionality should be the same for PC, XT, AT, clones, etc; the exact RAM location used (if any) may move around. ... mov ah,2 int 16h ... Returns in AL the current shift status, with each bit defined as follows: INS_state = 80h ;Insert state is active CAPS_state = 40h ;Caps lock has been toggled NUM_state = 20h ;Num lock has been toggled SCROLL_state = 10h ;Scroll lock has been toggled ALT_shift = 08h ;ALT key is depressed CTL_shift = 04h ;CTRL key is depressed LEFT_shift = 02h ;Left SHIFT key is depressed RIGHT_shift = 01h ;Right SHIFT key is depressed bill frolik hp-pcd!bill