JG (jump Greater):
Write a program that show use of JG.
Note:
JG and JA is same but JG is use for signed numbers and JA is use for unsigned numbers.
.model small
.data
m1 db "smallar$"
m2 db"Greater$"
.code
mov ax,@data
mov ds,ax
mov bx,45
mov cx,44
cmp bx,cx
jg A //if bx=45 is greater than cx=44 then jump
mov ah,09h
mov dx,offset m1
int 21h
jmp B
A:
mov ah,09h
mov dx,offset m2
int 21h
B:
.exit
end
OUTPUT: