News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Read a key from keyboard by user

Started by daniellam, November 09, 2008, 06:43:04 AM

Previous topic - Next topic

daniellam

Hi,
how to check if the user press the "Page Down" or "Page Up" botton on keyboard by "int 16h"??

Thx!!

Mark Jones

"To deny our impulses... foolish; to revel in them, chaos." MCJ 2003.08

Neil

Here is  a code example ;-


KB:
SUB AH,AH        ;Function wait for
INT 016            ;& get keypress
CMP AL,0          ;Is it extended code?
JNZ KB              ;No, ignore & return to keypress
CMP AH,73        ;'Page up'?
JZ                    ;Yes, do something
CMP AH,81        ;'Page down'?
JZ                     ;Yes, Do something else