Input

From SizeCoding
Revision as of 01:26, 7 August 2016 by Trixter (talk | contribs) (Created page with "== Checking for ESCAPE == This is fairly easy: Monitor the keyboard scancode port for ESC which is #1, then deal with it: <syntaxhighlight lang=nasm> in al,60h...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Checking for ESCAPE

This is fairly easy: Monitor the keyboard scancode port for ESC which is #1, then deal with it:

        in      al,60h          ;read whatever is at keyboard port; looking for ESC which is #1
        dec     ax              ;if ESC, AX now 0
        jnz     mainloop        ;fall through if 0, do jump somewhere else if otherwise