when you invoke int 16 the key is stored in the al register. You must save it someplace else if you need it later. The standard keyboard buffer can contain a maximum of 32 characters and its address is at 0x0000:0x041E.
>>perform something similar to a scanf function in assembly
assembly has no such function.
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
well brother look and read for INT 21H with data moving to DX(for output or printf) and AL(for input or scanf) to use scanf and printf as you use in C.. Strings are handled in different way that a simple integer here in assembly. I would recommend you to read this ebook : IBM PC ASSEMBLY LANGUAGE PROGRAMMING.
HAVE A NICE DAY !! (mytime19)
mytime19
Junior Poster in Training
50 posts since Dec 2006
Reputation Points: 10
Solved Threads: 3