390
APPENDIX B Overview of the Instructions
CALLV #vct
This addressing is used for branching to one of the subroutine addresses registered in the table. After the
return address (the contents of PC) is saved to the address indexed by SP (stack pointer), the control is
branched to the address listed in the vector table via the vector addressing. This instruction is one byte, so
using it for the frequently used subroutines enables the entire program size to be smaller.
Figure B.2-7 shows the overview.
Figure B.2-7 Executing Example of CALLV #3
When this instruction is executed, the contents of the PC to be saved in the stack area are not the address
holding the operation code of this instruction. Instead, they comprise the address holding the next
instruction. In Figure B.2-7 , therefore, the value saved in the stack (1232H and 1233H) is the same as the
address holding the operation code next to CALLV #vct (return address), i.e. 5679H.
PC
SP
PC
SP
XXH
XXH
FEH
DCH
5 6H
7 9H
F
EH
DCH
(-2
(Before execution) (After execution)
)
5678H
1234H
FEDCH
1232H
1232H
1233H
FFC6H
FFC7H
1232H
1233H
FFC6H
FFC7H