
MaximIntegrated 19-10
MAX31782 User’s Guide
Revision 0; 8/11
19.6.3EqualsFlag
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 .
19.6.4CarryFlag
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)
• MOVE Acc .<b>, C (Set selected active accumulator bit to Carry)
• AND Acc .<b> (Carry = Carry AND selected active accumulator bit)
• OR Acc .<b> (Carry = Carry OR selected active accumulator bit)
• XOR Acc .<b> (Carry = Carry XOR selected active accumulator bit)
• JUMP C, src (Jump if Carry flag is set)
• JUMP NC, src (Jump if Carry flag is cleared)