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
69 .loop: in al, KB_STATUS_PORT
70 test al, KB_STAT_INBUF_FULL
83 .loop: in al, KB_STATUS_PORT
84 test al, KB_STAT_OUTBUF_FULL
93 ; expects command in al
107 keystate: times 256 db 0