The MASM Forum Archive 2004 to 2012

Miscellaneous Forums => 16 bit DOS Programming => Topic started by: daniellam on November 09, 2008, 06:43:04 AM

Title: Read a key from keyboard by user
Post by: daniellam on November 09, 2008, 06:43:04 AM
Hi,
how to check if the user press the "Page Down" or "Page Up" botton on keyboard by "int 16h"??

Thx!!
Title: Re: Read a key from keyboard by user
Post by: Mark Jones on November 09, 2008, 03:48:56 PM
Hi, perhaps this will help:

http://www.ctyme.com/rbrown.htm
Title: Re: Read a key from keyboard by user
Post by: Neil on November 09, 2008, 04:12:09 PM
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