Figure B.2G Execution Example Of Callv #3 - Fujitsu F2MC-8L MB89620 Series Hardware Manual

8-bit microcontroller
Table of Contents

Advertisement

l
CALLV #vct
This instruction is used to branch to a subroutine address stored in the vector table. The
instruction saves the return address (contents of the PC) to the address corresponding to the
SP (stack pointer) and branches to the address stored in the vector table using vector
addressing. As "CALLV #vct" is a single-byte instruction, using this instruction for commonly
used subroutines reduces the overall program size.
Figure B.2g shows an outline of the instruction operation.
The content of PC saved to stack area after executing this instruction is the address of next
instruction (not the address containing the operation code of this instruction.) Accordingly, the
value "5679
address (return address) of the next operation code after "MOVW A,PC".
MB89620 series
(Before execution)
PC
5678
SP
1234
1232
XX
H
H
1233
XX
H
H
FFC6
FE
H
H
FFC7
DC
H

Figure B.2g Execution Example of CALLV #3

" saved to stack (1232
H
H
(After execution)
H
PC
(-2)
H
SP
1232
H
1233
H
FFC6
H
FFC7
H
H
, 1233
) in the example shown in Figure B.2g is the
H
FEDC
H
1232
H
56
H
79
H
FE
H
DC
H
APPENDIX
APPEND
279

Advertisement

Table of Contents
loading

Table of Contents