+ve/-ve
Fri May 10 2024 02:34:00 GMT+0000 (Coordinated Universal Time)
Saved by
@exam123
title: "number positive/negative"
.model small
.stack 100h
.data
num1 db 80h
positive db "The number is positive $"
negative db "The number is negative $"
zero db "The number is zero $"
.code
mov ax,@data
mov ds,ax
xor ax,ax
mov al,num1
cmp num1,0
jp greater
jl lower
jz zeros
greater: mov ah,09h
lea dx,positive
int 21h
jmp end
lower: mov ah,09h
lea dx,negative
int 21h
jmp end
zeros: mov ah,09h
lea dx,zero
int 21h
end:mov ah,4ch
int 21h
end
content_copyCOPY
Comments