Problem: Program does not work for two digit numbers I wrote the following code to substract two single digit numbers
.model small
.stack 100h
.code
main proc
mov bx,9
mov cx,8
sub bx,cx
add bx,48
mov dx,bx
mov ah,2
int 21h
mov ah,4ch
int 21h
main endp
end
It works for the single digit numbers but when I enter two number. It does not work.
Program for subtraction of two digit numbers
.model small
.stack 100h
.code
main proc
mov bx,20
mov cx,10
sub bx,cx
add bx,48
mov dx,bx
mov ah,2
int 21h
mov ah,4ch
int 21h
main endp
end
Tools which I used
- MASM assembler
- DOSBOX emulator
- AMD Processor(64bit)
- Windows 10