Difference between revisions of "Input"

From SizeCoding
Jump to: navigation, search
(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...")
(No difference)

Revision as of 00:26, 7 August 2016

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