This is the code:
push ax
in al, 0x61
or al, 0x80 ; 10000000b
out 0x61, al
and al, 0x7F ; 01111111b
out 0x61, al
mov al, 0x20
out 0x20, al
pop ax
What does it do? I only know its connected to the timer interrupt. What's on 0x61
and 0x20
?
There is probably an in al, 0x60
instruction close by.
Ports 0x60 and 0x61 talk to the keyboard controller in a PC. Port 0x60 contains the key pressed, and 0x61 has status bits.
Toggling the high bit of the status port signals that you have gotten the key and want the next one.
Port 0x20 is the interrupt controller, where you acknowledge that you have processed the interrupt.