If Else PDF
If Else PDF
If Else PDF
JXXXX DESTINATION_LABEL
AX = x; BX = y;
if(x>y) x++;
Else y++;
IF:
CMP AX,BX
JNG ELSE
INC AX
JMP EXIT
ELSE:
INC BX
EXIT:
if(x>y) x++;
else if(x==y) y++;
else x=x-2;
IF:
CMP AX,BX
JNG ELSE_IF
INC AX
JMP EXIT
ELSE_IF:
CMP AX,BX
JNE ELSE
INC BX
JMP EXIT
ELSE:
SUB AX,2
EXIT:
if(x>=80 || x<100)
x=x+1;
else
x=x-1;
IF:
CMP AX,80
JGE TASK
CMP AX,100
JL TASK
JMP ELSE
TASK:
INC AX
JMP EXIT
ELSE:
DEC AX
EXIT:
if(x>=80 && x<100)
x=x+1;
else
x=x-1;
IF:
CMP AX,80
JNGE ELSE
CMP AX,100
JNL ELSE
INC AX
JMP EXIT
ELSE:
DEC AX
EXIT: