positive or negative

PHOTO EMBED

Sat May 04 2024 09:56:59 GMT+0000 (Coordinated Universal Time)

Saved by @signup

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
   jg 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