read_kbd: in al,64h ; read status byte and al,01h ; wait for OBF==1 jz read_kbd in al,60h ; read scancode byte ret