Can anyone tell me the purely assembly code for displaying the value in a register in decimal format? Please don’t suggest using the printf hack and then compile with gcc.
Well, I did some research and some experimentation with NASM and figured I could use the printf function from the c library to print an integer. I did so by compiling the object file with the GCC compiler and everything works fair enough.
However, what I want to achieve is to print the value stored in any register in the decimal form.
I did some research and figured the interrupt vector 021h for DOS command line can display strings and characters whilst either 2 or 9 is in the ah register and the data is in the dx.
None of the examples I found showed how to display the content value of a register in decimal form without using the C library’s printf. Does anyone know how to do this in assembly?