© 2000 Scenix Semiconductor, Inc. All rights reserved.
SX Users Manual Rev. 3.1
Chapter 2 Architecture
The CALL addr8 instruction calls a subroutine. It works just like a JMP addr9 instruction, with
the following differences:
The call instruction saves the full program counter value, incremented by one, on the program
stack. This allows the program to later return from the subroutine and continue execution with
the instruction immediately following the call.
The call instruction only specifies the lower eight bits (rather than the lower nine bits) of the
jump address. The ninth bit (bit 8) of the jump address is always 0. Therefore, the subroutine must
start in the bottom half of a 512-word page in the program memory (000h to 0FFh, 200h to 2FFh,
Figures 2-3 and 2-4 show how the program counter is loaded for a jmp instruction and for call
instruction, respectively. In either case, the PA2:PA0 bits must contain the desired 512-word page of
the program memory before the jmp or call instruction is executed. These bits can be easily
changed with the page instruction.
Figure 2-3 Program Counter Loading for Jump Instruction
Figure 2-4 Program Counter Loading for Call Instruction
9-BIT VALUE IN
BITS 11:8 OF
8-BIT VALUE IN
BITS 11:8 OF