Jump command
The jxx command does not affect the flag, but uses the flag (the following table ). Depending on the flag used, 17 commands are divided into four situations:
(1) identify the status of a single flag
(2) Comparison of unsigned numbers
(3) Compare the signed quantity size
(4) determine that the counter CX is 0
A greater (less) must combine the of and SF signs and use the ZF sign to determine equal)
The two numbers are divided into four relationships:
(1) less than (not greater than or equal to): JL (jnge)
(2) Not less than (greater than or equal to): JNL (jge)
(3) less than or equal to (not greater than): jle (jng)
(4) Not less than or equal to (greater than): jnle (JG)
CMP ax, BX; compare ax and BX
JNL next; if Ax is ≥bx, transfer
Xchg ax, BX; If AX <BX, switch
Next :...
Jcxz label
; Cx = 0, transfer: IP subnet IP + 8-bit displacement
; Cx = 0, sequential execution
This is a special command.
CX registers are usually used as counters in programs.
The jcxz command is used to determine whether the count is 0.
Cyclic commands
Loop (CX! = 0)
Loopz/loope (ZF = 1 & CX! = 0)
Loopnz/loopne (ZF = 0 & CX! = 0)
The usage of the loop is as follows:
1. Cx = cx-1
2. Test conditions