I am using tasm. It is a simple program that reads the inputs from user and add the two numbers up. However, my output is displaying letters according to their letter position
For example, 3+5=h (8)
I want it to display in integer number.
.model small
.stack 100h
.data
input db 13,10,"Enter a number : ","$"
output db 13,10,"The sum is ","$"
.code
main proc
mov ax,@data
mov ds,ax
;INPUT 1
mov ah,9
mov dx, offset input
int 21h
mov ah,1
int 21h
mov bl,al
;INPUT 2
mov ah,9
mov dx, offset input
int 21h
mov ah,1
int 21h
add bl,al
;OUTPUT DISPLAY
mov ah,9
mov dx,offset output
int 21h
mov ah,2
mov dl,bl
int 21h
;END
mov ax,4c00h
int 21h
main endp
end main
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…