beautypg.com

FUJITSU F2MC-8L F202RA User Manual

Page 406

background image

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 (1232

H

and 1233

H

) is the same as the

address holding the operation code next to CALLV #vct (return address), i.e. 5679

H

.

PC

S P

PC

S P

X X

H

X X

H

F E

H

D C

H

5 6

H

7 9

H

F E

H

DC

H

(- 2

(Before execution)

(After execution)

)

5678

H

1234

H

FEDC

H

1232

H

1232

H

1233

H

FFC6

H

FFC7

H

1232

H

1233

H

FFC6

H

FFC7

H

This manual is related to the following products: