Created
January 6, 2012 16:02
-
-
Save gammy/1571188 to your computer and use it in GitHub Desktop.
16 bit 486 escape key detect
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kb_chk_esc: | |
xor ax, ax | |
mov ah, 1 ; get keystroke status | |
int 0x16 | |
jz kb_chk_end ; no key | |
mov ah, 0 ; get key | |
int 0x16 | |
cmp al, 27 ; is it esc? | |
jne kb_chk_end ; nope | |
call exit ; yup | |
kb_chk_end: | |
ret |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment