@@sudocpp KEY: in al, 64h ; get status test al, 1 ; outbuffer empty? jz short NOKEY test al, 20h ; byte from PS2-mouse? jnz short NOKEY in al, 60h ; get the key (Make/Break code, not an ASCII) cmp al, 1 ; escape key? = for terminating our application jz short HOME ... .... ..... NOKEY: .... .... jmp KEY ------ HOME:
Disable int 1 and polling the keyboard controller is faster.
Yes it is that for sure. A video explaining I/O ports and using IN and OUT is coming.
@@sudocpp
KEY: in al, 64h ; get status
test al, 1 ; outbuffer empty?
jz short NOKEY
test al, 20h ; byte from PS2-mouse?
jnz short NOKEY
in al, 60h ; get the key (Make/Break code, not an ASCII)
cmp al, 1 ; escape key? = for terminating our application
jz short HOME
...
....
.....
NOKEY:
....
....
jmp KEY
------
HOME: