-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathposneg.asm
More file actions
41 lines (29 loc) · 1.77 KB
/
Copy pathposneg.asm
File metadata and controls
41 lines (29 loc) · 1.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
data segment
msg1 db 13,10,"Number is positive!$"
msg2 db 13,10,"Number is negative!$"
msg3 db 13,10,"Number is ZERO!$"
no dw -346
data ends
code segment
assume cs:code,ds:data
start: mov ax,data
mov ds,ax
mov ax,no
cmp ax,0
jz L1
js L2
mov dx,offset msg1
mov ah,09h
int 21h
jmp L3
L2: mov dx,offset msg2
mov ah,09h
int 21h
jmp L3
L1: mov dx,offset msg3
mov ah,09h
int 21h
L3: mov ah,4ch
int 21h
code ends
end start