Fujitsu F2MC-8FX Hardware Manual page 580

F2mc-8fx 8-bit microcontroller
Hide thumbs Also See for F2MC-8FX:
Table of Contents

Advertisement

APPENDIX C Instruction Overview
C.2
Special Instruction
This section explains special instructions other than the addressings.
Special Instruction
JMP @A
This instruction is to branch the content of A (accumulator) to PC (program counter) as an address. N
pieces of the jump destination is arranged on the table, and one of the contents is selected and transferred to
A. N branch processing can be done by executing this instruction.
Figure C.2-1 shows a summary of the instruction.
MOVW A, PC
This instruction works as the opposite of "JMP @A". That is, it stores the content of PC to A. When you
have executed this instruction in the main routine and set it to call a specific subroutine, you can make sure
that the content of A is the specified value in the subroutine. Also, you can identify that the branch is not
from the part that cannot be expected, and use it for the reckless driving judgment.
Figure C.2-2 shows a summary of the instruction.
When this instruction is executed, the content of A reaches the same value as the address where the
following instruction is stored, rather than the address where operation code of this instruction is stored.
Therefore, in Figure C.2-2, the value "1234
operation code of "MOVW A, PC" is stored.
MULU A
This instruction performs an unsigned multiplication of AL (lower 8-bit of the accumulator) and TL (lower
8-bit of the temporary accumulator), and stores the 16-bit result in A. The contents of T (temporary
accumulator) do not change. The contents of AH (higher 8-bit of the accumulator) and TH (higher 8-bit of
the temporary accumulator) before execution of the instruction are not used for the operation. The
instruction does not change the flags, and therefore care must be taken when a branch may occur depending
on the result of a multiplication.
566
Figure C.2-1 JMP @A
(Before executing)
A
1 2 3 4
H
Old PC
X X X X
H
Figure C.2-2 MOVW A, PC
(Before executing)
A
X X X X
H
Old PC
1 2 3 3
H
(After executing)
A
1 2 3 4
H
New PC
1 2 3 4
H
(After executing)
A
1 2 3 4
H
New PC
1 2 3 4
H
" stored in A corresponds to the address where the following
H

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mb95170j series

Table of Contents