Microcomputer Principle-Assembly Language-Control Transfer/Jump Statement Summary (JMP JE...)

Jump instructions are divided into three categories:
1. Unconditional jump, that is, JMP;

2. Jump according to the value of CX and ECX registers:

JCXZ (jump if CX is 0)
JECXZ ( jump if ECX is 0);

3. Jump according to the flag bit of the EFLAGS register
Conditional transfer instruction (JCC) *
According to the state of the flag register after the instruction is executed, it is usually used in combination with the CMP or TEST instruction

The instructions for jumping according to the flag bit are summarized as follows:


JE; jump
if equal to JNE; jump if not equal

JZ; Jump if it is 0
JNZ; Jump if it is not 0

JS; Jump if negative
JNS; Jump if not negative

JC; Jump to
JNC if carry; Jump if not carry

JO; Jump to overflow
JNO; Jump if not overflow

JA; jump to
JNA if unsigned is greater than
; jump to JAE if
unsigned; jump to JNAE if unsigned; jump to JNAE if unsigned is greater than or equal

JG; Jump
if the sign is greater than JNG; Jump if the sign is not greater than
JGE; Jump if the sign is greater than or equal to
JNGE; Jump if the sign is not greater than or equal

JB; Jump to
JNB if unsigned is less than
; Jump JBE if unsigned is not less than JBE; Jump
JNBE if unsigned is less than or equal; Jump if unsigned is not less than or equal

JL; Jump
if signed is less than JNL; if signed is not less than
JLE; if signed is less than or equal to
JNLE; if signed is not less than or equal, jump

JP; Jump to
JNP if parity position bit ; Jump
JPE if parity bit is clear ; Jump
JPO if parity bit is equal; Jump if parity bit is not equal


Guess you like

Origin blog.csdn.net/NikoHsu/article/details/106209107