Can't understand 8024
Posted: Mon Jul 19, 2010 6:16 am
I have red the documentation, but I still don't get how it works.
There are four registers (input buffer, output buffer, status and command register), but only two ports(0x60 and 0x64) which can be used to access them. Yeah, I could use finished code, but usually I don't write something if I can't fully understand it. So please help.
Input and output ports are registers/pins connected to controller on keyboard?
Both are used to receive/send data, scan codes from the keyboard?
So obviously we need I/O ports to access them, but how do we read status register and how do we send command byte to cmd register?
Auugghh...it's confusing...
OK, say I want to send some command I will wright something like this:
mov al, cmd
out 0x64, cmd
right.... now when I want to read the status I have to use the same I/O port!?
in al, 0x64
But I have to address same I/O port if I want to read output port into al:
mov al, 0xD0
out 0x64, al
???
Please help, I won't go any further until I understand 8024.
There are four registers (input buffer, output buffer, status and command register), but only two ports(0x60 and 0x64) which can be used to access them. Yeah, I could use finished code, but usually I don't write something if I can't fully understand it. So please help.
Input and output ports are registers/pins connected to controller on keyboard?
Both are used to receive/send data, scan codes from the keyboard?
So obviously we need I/O ports to access them, but how do we read status register and how do we send command byte to cmd register?
Auugghh...it's confusing...
OK, say I want to send some command I will wright something like this:
mov al, cmd
out 0x64, cmd
right.... now when I want to read the status I have to use the same I/O port!?
in al, 0x64
But I have to address same I/O port if I want to read output port into al:
mov al, 0xD0
out 0x64, al
???
Please help, I won't go any further until I understand 8024.