I am trying to print decimal numbers by converting them into characters, although I succeeded in splitting the number into two digits, I can't print them and I don't know why.
Here is my code:
.MODEL small
.STACK 64
.DATA
.CODE
MAIN PROC FAR
MOV AX,@DATA
MOV DS,AX
mov ax,15
mov bx,10
div bx
;result in al
;remainder in dl
mov bl,DL
mov bh,al
add bl,'0'
add bh,'0'
MOV AH,02H
MOV DL,bh
INT 21H
MOV AH,02H
MOV DL,bl
INT 21H
hlt
MAIN ENDP
END MAIN
Any idea why my code doesn't print the characters??