Special Instructions; B.2 Special Instructions - Fujitsu F2MC-8L F202RA Hardware Manual

F2mc-8l 8-bit microcontroller
Hide thumbs Also See for F2MC-8L F202RA:
Table of Contents

Advertisement

B.2

Special Instructions

This section describes the special instructions other than addressing.
Special Instructions
● JMP @A
By this instruction, the control branches to PC (program counter) using the contents of A (accumulator) as
the address. N items of jump destinations have been listed on the table, one of which is selected and
transferred to A. Executing this instruction can achieve N kinds of branch processing.
Figure B.2-1 shows an overview.
● MOVW A, PC
This instruction performs the opposite operation of JMP @A. In other words, the contents of the PC are
stored in A. When this instruction has been executed in the main routine and a specific subroutine is to be
called, it is possible to verify that the contents of A are the predetermined value in the subroutine. It is also
possible to verify that the branch was not from an unexpected part, so it is useful in judging that a runaway
has occurred.
Figure B.2-2 shows an overview.
When this instruction is executed, the contents of A are not the address holding the operation code of this
instruction but the same value as the address holding the next instruction. In Figure B.2-2 , therefore, the
value stored in A, 1234
Figure B.2-1 JMP @A
(Before execution)
1234
A
H
Old PC
XXXX
H
Figure B.2-2 MOVW A, PC
(Before execution)
XXXX
A
H
Old PC
1233
H
, is the same as the address holding the operation code next to the MOVW A, PC.
H
(After execution)
1234
A
H
New PC
1234
H
(After execution)
1234
A
H
New PC
1234
H
387

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

F2mc-8l mb89202Mb89202/f202ra series

Table of Contents