Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!husc6!panda!genrad!decvax!tektronix!hplabs!hpcea!hpfcdc!hpcnoe!hpcnof!thj From: thj@hpcnof.UUCP (Thomas Hjellming) Newsgroups: net.micro.pc Subject: Re: Return codes from resident routines on INT 16H Message-ID: <960004@hpcnof.UUCP> Date: Fri, 5-Sep-86 16:06:42 EDT Article-I.D.: hpcnof.960004 Posted: Fri Sep 5 16:06:42 1986 Date-Received: Sun, 7-Sep-86 05:51:06 EDT References: <458@bucsb.bu.edu.UUCP> Organization: HP Colorado Networks Division Lines: 54 > what should a resident routine that >intercepts INT 16H return for registers and flags? I want to make it seem >that no key had been pressed. Jim, You can find this information in Peter Norton's 'Programmers Guide to the IBM PC'. I will summarize the info here. The subfunctions under Int 16h are: AH input value Register outputs Description 0 AH = scan code Inputs the next character (auxiliary byte) from the keyboard. If one is not available, control is AL = character code not returned until a key is (main byte) pressed. 1 ZF = 0 if key is Check to see if a key has available, else 1. been pressed. NOTE: if AH and AL are set a key has been pressed, you according to above can determine what it is if ZF = 0. using the AH & AL settings. However, the character is not cleared out of the keyboard input buffer. i.e. do a Int 16h w/AH=0 to clear it out. 2 AL = shift status. Get current shift status. bit 0 = 1 if right shift is depressed. 1 = 1 if left shift is depressed. 2 = 1 if Ctrl is depressed. 3 = 1 if Alt is depressed. 4 = 1 if Scroll Lock is active 5 = 1 if Num Lock is active 6 = 1 if Caps Lock is active 7 = 1 if Insert state is active There are more AH subfunctions for the PC JR but who cares about the Peanut anyway? I hope this helps you. Tom Hjellming Colorado Networks Division Hewlett-Packard Fort Collins, CO ...!hplabs!hpfcla!thj ( All the normal disclaimers )