Day 11
Reading Chars
Reading chars is fun. Let's get to it!
DOS Service Function 1
The code:
mov ah,1
int 21h
That code will wait for a key to be pressed, output the char to the screen,
and return the ASCII code of the key in AL.
Keyboard BIOS Service Function 0
You have to use the BIOS (Basic Input Output System) if you need to get input from
a non-ASCII char (like arrow keys). The ASCII code is returned in AL, with the scan code in
AH. You'll know there's a scan code if the ASCII code is zero. This Function does not output
the char to the screen.
Code:
mov ah,0
int 16h ; 16h is BIOS Keyboard Services
This Day In Review
Input, very important!
Until Next Time!,
- Mike
Intro - Day 12
Patater GBAGuy Mirror
Contact