Xilinx UG129 Answering Machine User Manual


 
PicoBlaze 8-bit Embedded Microcontroller www.xilinx.com 95
UG129 (v1.1.2) June 24, 2008
CALL [Condition,] Address — Call Subroutine at Specified Address, Possibly with Conditions
R
Condition
Depending on the specified Condition, the program calls the subroutine beginning at the
specified Address. If the specified Condition is not met, the program continues to the next
instruction.
Pseudocode
if (Condition = TRUE) then
; push current PC onto top of the CALL/RETURN stack
; TOS = Top of Stack
TOS Å PC
; load PC with specified Address
PC Å Address
else
PC Å PC + 1
endif
Registers/Flags Altered
Registers: PC, CALL/RETURN stack
Flags: Not affected
Notes
The maximum number of nested subroutine calls is 31 levels, due to the depth of the
CALL/RETURN stack.
Table C-1: CALL Instruction Conditions
Condition Description
<none> Always true. Call subroutine unconditionally.
C CARRY = 1. Call subroutine if CARRY flag is set.
NC CARRY = 0. Call subroutine if CARRY flag is cleared.
Z ZERO = 1. Call subroutine if ZERO flag is set.
NZ ZERO = 0. Call subroutine if ZERO flag is cleared.