Owner's manual

1.3.6.2 Zero Flag
The Zero flag (PSF.7) is a dynamic flag that reflects the current state of the active accumulator Acc. If all bits in the active accumula-
tor are zero, the Zero flag equals 1. Otherwise, it equals 0.
Since the Zero flag is a dynamic reflection of (Acc = 0), any instruction that changes the value in the active accumulator can poten-
tially change the value of the Zero flag. Also, any instruction that changes which accumulator is the active one (including AP auto-incre-
ment/decrement) can also change the Zero flag.
The following operations use the Zero flag:
JUMP Z, src (Jump if Zero flag is set)
JUMP NZ, src (Jump if Zero flag is cleared)
1.3.6.3 Equals Flag
The Equals flag (PSF.0) is a static flag set by the CMP instruction. When the source given to the CMP instruction is equal to the active
accumulator, the Equals flag is set to 1. When the source is different from the active accumulator, the Equals flag is cleared to 0.
The following instructions use the value of the Equals flag. Please note that the ‘src’ for the JUMP E/NE instructions must be immediate.
JUMP E, src (Jump if Equals flag is set)
JUMP NE, src (Jump if Equals flag is cleared)
In addition to the CMP instruction, any instruction using PSF as the destination can alter the Equals flag.
1.3.6.4 Carry Flag
The Carry flag (PSF.1) is a static flag indicating that a carry or borrow bit resulted from the last ADD/ADDC or SUB/SUBB operation.
Unlike the other status flags, it can be set or cleared explicitly and is also used as a generic bit operand by many other instructions.
The following instructions can alter the Carry flag:
ADD src (Add source to active accumulator)
ADDC src (Add source and Carry to active accumulator)
SUB src (Subtract source from active accumulator)
SUBB src (Subtract source and Carry from active accumulator)
SLA, SLA2, SLA4 (Arithmetic shift left active accumulator)
SRA, SRA2, SRA4 (Arithmetic shift right active accumulator)
SR (Shift active accumulator right)
RLC/RRC (Rotate active accumulator left / right through Carry)
MOVE C, Acc.<b> (Set Carry to selected active accumulator bit)
MOVE C, #i (Explicitly set, i = 1, or clear, i = 0, the Carry flag)
CPL C (Complement Carry)
AND Acc.<b>
OR Acc.<b>
XOR Acc.<b>
MOVE C, src.<b> (Copy bit addressable register bit to Carry)
any instruction using PSF as the destination
The following instructions use the value of the Carry flag:
ADDC src (Add source and Carry to active accumulator)
SUBB src (Subtract source and Carry from active accumulator)
RLC/RRC (Rotate active accumulator left/right through Carry)
CPL C (Complement Carry)
MAXQ7665/MAXQ7666 Users Guide
1-36
Maxim Integrated