I have this program I want to give value that I add the .07, but it does not fai
ID: 1923819 • Letter: I
Question
I have this program I want to give value that I add the .07, but it does not fail when I am waiting for a reply, enclose a copy of the programorg 100h
jmp start ; skip data.
msg1 db 0Dh,0Ah, 'input numbers in this range: [-32768..32767]', 0Dh,0Ah
db 0Dh,0Ah, 'enter first number: $'
msg3 db 0Dh,0Ah, 'the sum is: $'
; declaration of variable:
num dw ?
start:
; print first message
mov dx, offset msg1
mov ah, 9
int 21h
call scan_num
; keep first number:
mov num, cx
; add numbers:
add num, cx
jo overflow
; print the result:
mov dx, offset msg3
mov ah, 9
int 21h
mov ax, num
call print_num
jmp exit
; process overlow error:
overflow:
printn 'we have overflow!'
exit:
; wait for any key press:
mov ah, 0
int 16h
ret ; return control to operating system.
Explanation / Answer
uploaded image