![Maxim Integrated MAX31782 User Manual Download Page 176](http://html1.mh-extra.com/html/maxim-integrated/max31782/max31782_user-manual_1744481176.webp)
MaximIntegrated 19-11
MAX31782 User’s Guide
Revision 0; 8/11
19.6.5OverflowFlag
The Overflow flag (PSF .2) is a static flag indicating that the carry or borrow bit (Carry status Flag) resulting from the last
ADD/ADDC or SUB/SUBB operation but did not match the carry or borrow of the high order bit of the active accumula-
tor . The overflow flag is useful when performing signed arithmetic operations .
The following instructions can alter the Overflow 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)
19.7ControllingProgramFlow
The MAX31782 provides several options to control program flow and branching . Jumps may be unconditional, con-
ditional, relative, or absolute . Subroutine calls store the return address on the hardware stack for later return . Built-in
counters and address registers are provided to control looping operations .
19.7.1ObtainingtheNextExecutionAddress
The address of the next instruction to be executed can be read at any time by reading the Instruction Pointer (IP)
register . This can be particularly useful for initializing loops . Note that the value returned is actually the address of the
current instruction plus 1, so this will be the address of the next instruction executed as long as the current instruction
does not cause a jump .
19.7.2UnconditionalJumps
An unconditional jump can be relative (IP +127/-128 words) or absolute (to anywhere in program space) . Relative
jumps must use an
8-bit immediate operand, such as
Label1:
; must be 127/-128 words of the JUMP
...
jump
Label1
Absolute jumps can use a 16-bit immediate operand, a 16-bit register, or an 8-bit register .
jump
LongJump
; assembles to:
move PFX[0], #high(LongJump)
;
jump
#low(LongJump)
jump
DP[0]
; absolute jump to the address in DP[0]
If an 8-bit register is used as the jump destination, the prefix value is used as the high byte of the address and the
register is used as the low byte .