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
Содержание F2MC-8L F202RA
Страница 2: ......
Страница 4: ......
Страница 32: ...16 CHAPTER 1 OVERVIEW ...
Страница 90: ...74 CHAPTER 3 CPU ...
Страница 142: ...126 CHAPTER 5 TIME BASE TIMER POPW A RETI ENDS END ...
Страница 150: ...134 CHAPTER 6 WATCHDOG TIMER ...
Страница 174: ...158 CHAPTER 7 8 BIT PWM TIMER User processing POPW A XCHW A T Restoring A and T POPW A RETI ENDS ...
Страница 176: ...160 CHAPTER 7 8 BIT PWM TIMER ...
Страница 220: ...204 CHAPTER 8 8 16 BIT CAPTURE TIMER COUNTER ...
Страница 240: ...224 CHAPTER 9 12 BIT PPG TIMER ...
Страница 258: ...242 CHAPTER 10 EXTERNAL INTERRUPT CIRCUIT 1 EDGE PUSHW A User processing POPW A XCHW A T POPW A RETI ENDS END ...
Страница 274: ...258 CHAPTER 11 EXTERNAL INTERRUPT CIRCUIT 2 LEVEL ...
Страница 362: ...346 CHAPTER 15 BUZZER OUTPUT ...
Страница 371: ...355 CHAPTER 16 WILD REGISTER FUNCTION 16 3 5 Data Test Set Register WROR A test register Do not access this register ...
Страница 390: ...374 CHAPTER 17 FLASH MEMORY ...
Страница 419: ...403 INDEX INDEX The index follows on the next page This is listed in alphabetic order ...
Страница 434: ...418 INDEX ...
Страница 436: ......