In order to output the number
11
to the display you have to call the interrupt
21h
two times, providing the character
'1'
(that is the value
31h
) as
dl
argument.
Generally speaking, in order to ouput (in decimal representation) the content of a 8bit register you have to:
- divide (integer division) it by
100
, take the quotient, add 30h
, assign to dl
and call int 21h
. - divide the reminder by
10
, take the quotient, add 30h
, assign to dl
and call int 21h
. - Finally, add
30h
to the reminder, assign to dl
and call int 21h
.
(you may also iteratively extract such characters, proceding backwards).