I. Status Register
Psw (Program flag) is a 16-bit register consisting of a flag and a control flag, as shown below:
1514131211109876543210 ofdfiftfsfzf af pf cf
Condition code:
① Of (overflow flag) overflow flag. 1 If overflow occurs. Otherwise, 0 is set.
② SF (sign flag) symbol. If the result is negative, set 1; otherwise, set 0.
③ ZF (zero flag) indicates zero. If the calculation result is 0, the ZF position is 1; otherwise, the value is 0.
④ CF (carry flag) carry flag. The carry value is set to 1; otherwise, 0 is set.
⑤ AF (Auxiliary carry flag) indicates the secondary carry mark, which records the 3rd-bit (half-byte) hexadecimal position generated during computation. 1 when there is a bid; otherwise, 0 is set.
⑥ PF (parity flag) Parity mark. If the number of 1 in the result operand is an even number, set it to 1. Otherwise, set it to 0.
Control flag:
7. The direction sign of DF (Direction Flag) controls the direction of information in the string processing command.
Interrupt if (Interrupt flag) interrupt flag.
Trap TF (trap flag) trap sign.
2. Direct sign transfer (8-bit addressing)
Command Format machine code test conditions such as... transfer
JC 72 c = 1 with a forward position
JNC 73 c = 0 without carry
JZ/Je 74 z = 1 0/
Jnz/JNE 75 z = 0 is not zero/
JS 78 s = 1 minus sign
JNS 79 s = 0 positive
Jo 70 o = 1 Overflow
Jno 71 o = 0 No Overflow
Jp/jpe 7A p = 1 parity is even
Jnp/IPO 7b p = 0 odd parity
Iii. Indirect Sign transfer (8-bit addressing)
Use the CMP command to compare and use the following judgment (if one je is missing, it is equal to or equal ):
Command Format: The machine code test format is as follows:
Ja/jnbe () 77 cz = 0>/
Jae/JNB () 73 c = 0> =/
JB/jnae () 72 c = 1 </
Jbe/JNA () 76 cz = 1 <=/
JG/jnle () 7f (SO) z = 0>/
Jge/JNL () 7d so = 0> =/
Jl/jnge () 7C so = 1 </
Jle/jng () 7E (SO) z = 1 <=/