Inputting numbers was asked for recently on the Win32ASM boards, I figured
I should mention it here.
Patater GBAGuy Mirror
We will use INT 21h, Function 1. INT 16h can also be used, it would probably
be better to use INT 16h, because it's a BIOS call (not dependant on DOS), but we'll use
INT 21h anyway...
Here it is:
int 21h ; returns ASCII code in AL
sub al,30h ; '1' the char, -30h will equal 1 (the number)
This Day In Review
Very simple. Although this only works with 1 digit numbers, there's no reason
why you can't write a subroutine to input longer numbers...
Intro - Day 24