Branch Group:
The branching instructions alter normal sequential program flow, either unconditionally or conditionally. The unconditional branching instructions are as follows:
JMP - Jump
CALL - Call
RET - Return
Conditional branching instructions examine the status of one of four condition flags to determine whether the specified branch is to be executed. The conditions that may be specified are as follows:
NZ - Not Zero (Z = 0)
Z - Zero (Z = 1)
NC - No Carry (C = 0)
C - Carry (C = 1)
PO - Parity Odd (P = 0)
PE - Parity Even (P = 1)
P - Plus (S = 0)
M - Minus (S = 1)
Thus, the conditional branching instructions are specified as follows:
Jumps Calls Returns
C CC RC (Carry)
INC CNC RNC (No Carry)
JZ CZ RZ (Zero)
JNZ CNZ RNZ (Not Zero)
JP CP RP (Plus)
JM CM RM (Minus)
JPE CPE RPE (Parity Even)
JP0 CPO RPO (Parity Odd)
Two other instructions can affect a branch by replacing the contents or the program counter:
PCHL - Move H & L to Program Counter
RST - Special Restart Instruction Used
with Interrupts |