Article View: comp.os.msdos.programmer
Article #52Re: Keyboard handlers
From: Jerzy Tarasiuk
Date: Fri, 30 Oct 1992 04:31
Date: Fri, 30 Oct 1992 04:31
19 lines
1661 bytes
1661 bytes
>>>>> On 26 Oct 1992 00:13:25 -0600, cbusch@ub.d.umn.edu (Mmmm...) said: Chris> I am trying to write a keyboard handler that will allow me Chris> to know if any two keys are being pressed simultaneously. Chris> What are the ports that i should read? And how do i interpret Chris> the this? Look how it is done in BIOS. In short: must service interrupt 09h (IRQ1). On XT: read scan code from port 60h, read port 61h, write value read ORed with 80h, write original value, write 20h to port 20h (end-of-interrupt), IRET. On AT: should send Keyboard Disable command to port 64h (before sending wait until 8042 input register is empty), read scan code from port 60h, if it says "transmission parity error" can request retransmission, otherwise can send Keyboard Enable (unless want other program to read the scan code and finish interrupt service), write 20h to port 20h, IRET. The scan code shows which key was pressed or released (or is repeating), can also show some special information from Keyboard. Codes <80h means key was pressed, same codes+80h - released. Look your computer Technical Reference for details.
Technical Details
Message-ID:
<JT.92Oct30053135@fizyk1.fuw.edu.pl>Path:
arc1-ca.pugleaf.net!sparky!uunet!gatech!paladin.american.edu!news.univie.ac.at!hp4at!mcsun!sunic!fuw.edu.pl!cocos!jtReferences:
<1cg2a5INNuun@ub.d.umn.edu>Show Full Headers
Complete Article Headers
Newsgroups: comp.os.msdos.programmer Path: arc1-ca.pugleaf.net!sparky!uunet!gatech!paladin.american.edu!news.univie.ac.at!hp4at!mcsun!sunic!fuw.edu.pl!cocos!jt From: jt@fuw.edu.pl (Jerzy Tarasiuk) Subject: Re: Keyboard handlers In-Reply-To: cbusch@ub.d.umn.edu's message of 26 Oct 1992 00:13:25 -0600 Message-ID: <JT.92Oct30053135@fizyk1.fuw.edu.pl> Sender: news@fuw.edu.pl Nntp-Posting-Host: fizyk1 Organization: Warsaw University Physics Dept. References: <1cg2a5INNuun@ub.d.umn.edu> Date: Fri, 30 Oct 1992 04:31:35 GMT Lines: 19