(This tutorial was originally written in 2004 and featured in http://asm.inightmare.org/)
One day on IRC I was asked to make little program that reads keypresses from 1 to 9 and outputs the same number of text lines. It was for the university! So I decided to make tutorial for that. And here it goes! :)
Interrupt 16h is used for keyboard handling, function 0 (AH=0) waits for keypress and returns its scancode in AH and ASCII value in AL. In this tutorial I’ll show you the way to get numbers from ASCII values.
Here’s the code:
[ start] |