A char in assembly is declared as db (one byte), and function 01 of int 21h (MS-DOS) returns a single character ( link here )
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
The "standard/common" lowest element is representing a standard (non-extended) character is the byte.
A byte converts to a char based on its placement in the character map/chart (ASCII if you're using ASCII).
What OS and Compiler are you using?
thines01
Postaholic
2,424 posts since Oct 2009
Reputation Points: 445
Solved Threads: 402
So you are using gnu c compiler? such as gcc or g++? How to do inline assembly with gnu compiler may be a little different than how it would be done in a pure assembly source file with *.asm extension. I don't know how its done with that compiler.
Don't confuse ASCII and db instruction. db declares a single byte of data, which can contain any value between 0 and 255. ascii is a character set that falls within that range. There are other character sets, but ascii is the most common for most of us. See this common ascii chart .
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343