Rom Correction Example - NEC PD78056F User Manual

Pd78058f series; pd78058fy series 8-bit single-chip microcontrollers
Table of Contents

Advertisement

25.5

ROM Correction Example

The example of ROM correction when the instruction at address 1000H "ADD A, #1" is changed to "ADD A, #2"
is as follows.
0000H
0080H
1000H
1002H
EFFFH
(1) Branches to address F7FDH when the preset value 1000H in the correction address register 0, 1 (CORAD0,
CORAD1) matches the fetch address value after the main program is started.
(2) Branches to any address (address F702H in this example) by setting the entire-space branch instruction (BR
!addr16) to address F7FDH with the main program.
(3) Returns to the internal ROM program after executing the substitute instruction ADD A, #2.
CHAPTER 25 ROM CORRECTION
Figure 25-8. ROM Correction Example
Internal ROM
Program start
(3)
ADD A, #1
MOV B, A
(1)
Internal Expansion RAM
F400H
F702H
ADD A, #2
BR !1002H
F7FDH
BR !F702H
F7FFH
(2)
533

Advertisement

Table of Contents
loading

Table of Contents