FUJITSU Semiconductor Controller MB89950/950A User Manual

Page 291

Advertising
background image

277

APPENDIX B Overview of Instructions

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 PC) in the location at the address contained in SP (stack pointer), and uses

vector addressing to cause a branch to the address stored in the vector table. Because CALLV #vct is a 1-

byte instruction, the use of this instruction for frequently used subroutines can reduce the entire program

size.

Figure B.3-7 "Example of executing CALLV #3" shows a summary of the instruction.

Figure B.3-7 Example of executing CALLV #3

After the CALLV #vct instruction is executed, the contents of PC saved on the stack area are the address of

the operation code of the next instruction, rather than the address of the operation code of CALLV #vct.

Accordingly, Figure B.3-7 "Example of executing CALLV #3" shows that the value saved in the stack

(1232

H

and 1233

H

) is 5679

H

, which is the address of the operation code of the instruction that follows

CALLV #vct (return address).

1 2 3 4

H

PC

SP

F E D C

H

PC

SP

(Before execution)

(After execution)

1 2 3 2

H

5 6 7 8

H

1 2 3 2

H

1 2 3 3

H

X X

H

X X

H

F E

H

D C

H

F F C 6

H

F F C 7

H

1 2 3 2

H

1 2 3 3

H

5 6

H

7 9

H

F E

H

D C

H

F F C 6

H

F F C 7

H

(-2)

Advertising