1 ; vi:filetype=nasm ts=8 sts=8 sw=8:
7 set_irq_vector KB_IRQ, kbintr
9 ; enable keyboard interrupt
10 mov eax, KB_CMD_GET_CMDBYTE
13 or eax, KB_CCB_KB_INTREN ; set the INTREN flag
15 mov eax, KB_CMD_SET_CMDBYTE
20 ; flush the read buffer
29 ; keyboard interrupt handler
38 ; keystate[keycode] address in ebx
44 ; determine if it's a press or release (high bit set on release)
65 .loop: in al, KB_STATUS_PORT
66 test al, KB_STAT_INBUF_FULL
79 .loop: in al, KB_STATUS_PORT
80 test al, KB_STAT_OUTBUF_FULL
89 ; expects command in al
103 keystate: times 256 db 0