Assembly Language/in which format register stores data
Expert: Kimberly Batteau - 10/2/2006
Questionit seems to be a very basic question but i couldn't find an answer anywhere i.e after reading a character((MOV AH,1;INT 21h)) now in which format our input is actually stored in AL, is it in HEX or Binary also while displaying back(MOV AH,02;MOV DL,AL;INT 21h) now what will happen does the assembly prints the register's value as it is or it converts again its format.
I used debug to check it, it displays the input in HEX format but my confusion is, if the data is stored in HEX format then all the bit manipulations we do using shl,and,or etc is it just a logical operation. thanx
AnswerYou didn't specify what platform you are on, but I presume it is Intel. Strictly speaking, it's not my forté, but I can answer in general terms. ALL data are stored in binary, which facilitates the use of logical and bit instructions AND, NOR, SHL, etc.
Hex[adecimal], in the sense that you are using it, is simply a convenient means of reading, writing, and printing data which are represented in binary. It's easier to write FF than 11111111. For a fairly comprehensive explanation see
http://en.wikipedia.org/wiki/Hexadecimal#Mapping_to_binary
HTH