Computer Science, asked by dishanidps6908, 1 year ago

Assembly language porgram to find positive or negative and take values from user

Answers

Answered by ramtanu51
0
org 100h
.data
msg1 db 10,13,’Positive Sign$’;
msg2 db 10,13,’Negative Sign$’;
.code
mov ax,@data;
mov ds,ax;
xor ax,ax;
mov ax,15;
cmp ah,0;positive is start with 0 bit and negative by 1 bit in reg
je positive;
mov ah,09h;
mov dx,offset msg2;
int 21h;
jmp exit;
positive:
mov ah,09h;
mov dx,offset msg1;
int 21h;
jmp exit;
exit:
mov ah,04ch;
int 21h
ret
Similar questions