Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Assembly x86 > Re: Accessing t...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 8 Topic 4562 of 4729
Post > Topic >>

Re: Accessing the Speaker of an IBM Model M keyboard

by Dirk Wolfgang Glomp <spamtrap@[EMAIL PROTECTED] > Mar 10, 2008 at 11:33 AM

Am Mon, 10 Mar 2008 03:16:43 +0100 schrieb polemon:

> Hi!
> 
> I found an old IBM Model M keyboard in the dumpster of my university.
> 
> The keyboard works fine, every key still has its legendary click...
> 
> This Keyboard has a speaker, and I'd like to access it.
> 
> I wrote this tiny x86 Assembler program some time ago, to set the LEDs 
> on it:
> 
> section .text
> 	global _start
> 
> _start:

Before you write to the keyboard-controller, it is better to check the
status if the input buffer is empty, otherwise it is possible that the
command won´t progress.

A1: in   al, 64h
    test al, 2
    jnz A1

> 	mov	al, 0EDh	; command to set LEDs to keyboard
> 	out	60h, al		; write command
> 	mov	al, 111b	; set flags
> 	out	60h, al		; write flags
> 
> 	mov	al,1		; system call number (sys_exit)
> 	int	0x80		; call kernel
> 
> 
> I don't know much about I/O-Registers, obviously 60h is for the
keyboard.

> Now I'd like to know two things:
> 
> 1. What is the command code (sequence) to access the speaker of an old 
> IBM Model M (1993 made)

I am not familar with that old modell.

> 2. How can I read keyboard data (what register and how should I access
it)

Here you can also check the status, in this case if the output buffer is
filled with a byte and than check if it recieved from a PS2-mouse.

A2: in   al, 64h
    test al, 1
    jz  A2
    test al, 20h
    jnz A2
    in al, 60h

Additional take a look into Ralf Browns Interrupt List:
RBIL->inter61d.zip->****ts.a->****T 0060-006F

http://www.pobox.com/~ralf
http://www.pobox.com/~ralf/files.html
ftp://ftp.cs.cmu.edu/afs/cs.cmu.edu/user/ralf/pub/

Dirk
 




 8 Posts in Topic:
Accessing the Speaker of an IBM Model M keyboard
polemon <spamtrap@[EM  2008-03-10 03:16:43 
Re: Accessing the Speaker of an IBM Model M keyboard
Dirk Wolfgang Glomp <  2008-03-10 11:33:41 
Re: Accessing the Speaker of an IBM Model M keyboard
Jim Leonard <spamtrap  2008-03-10 06:50:25 
Re: Accessing the Speaker of an IBM Model M keyboard
polemon <spamtrap@[EM  2008-03-18 03:01:44 
Re: Accessing the Speaker of an IBM Model M keyboard
"Wolfgang Kern"  2008-03-11 12:39:44 
Re: Accessing the Speaker of an IBM Model M keyboard
polemon <spamtrap@[EM  2008-03-11 19:17:07 
Re: Accessing the Speaker of an IBM Model M keyboard
Frank Kotler <spamtra  2008-03-11 20:06:32 
Re: Accessing the Speaker of an IBM Model M keyboard
"Wolfgang Kern"  2008-03-12 13:03:32 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Thu Jul 24 15:03:01 CDT 2008.