
387
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.
Figure B.2-1 JMP @A
●
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.
Figure B.2-2 MOVW A, PC
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
H
, is the same as the address holding the operation code next to the MOVW A, PC.
A
A
(Before execution)
(After execution)
Old PC
New PC
1234
H
1234
H
1234
H
XXXX
H
A
A
(Before execution)
(After execution)
Old PC
New PC
XXXX
H
1234
H
1234
H
1233
H
Summary of Contents for F2MC-8L F202RA
Page 2: ......
Page 4: ......
Page 32: ...16 CHAPTER 1 OVERVIEW ...
Page 90: ...74 CHAPTER 3 CPU ...
Page 142: ...126 CHAPTER 5 TIME BASE TIMER POPW A RETI ENDS END ...
Page 150: ...134 CHAPTER 6 WATCHDOG TIMER ...
Page 176: ...160 CHAPTER 7 8 BIT PWM TIMER ...
Page 220: ...204 CHAPTER 8 8 16 BIT CAPTURE TIMER COUNTER ...
Page 240: ...224 CHAPTER 9 12 BIT PPG TIMER ...
Page 274: ...258 CHAPTER 11 EXTERNAL INTERRUPT CIRCUIT 2 LEVEL ...
Page 362: ...346 CHAPTER 15 BUZZER OUTPUT ...
Page 390: ...374 CHAPTER 17 FLASH MEMORY ...
Page 419: ...403 INDEX INDEX The index follows on the next page This is listed in alphabetic order ...
Page 434: ...418 INDEX ...
Page 436: ......