English
Language : 

7220 Datasheet, PDF (223/303 Pages) Renesas Technology Corp – 8-BIT SINGLE-CHIP MICROCOMPUTER
APPENDIX
6.3 Notes on use
6.3 Notes on use
Notes on programming and equipping when using M37221M6-XXXSP/FP are described below.
6.3.1 Notes on processor status register
(1) Initialization of processor status register
The contents of processor status register (PS)
are undefined except the I flag (I = “1”)
immediately after reset. Therefore initialize the
flags that affect execution of a program.
Especially be sure to initialize the T and D
flags because they have an important effect
on calculations.
Reset
Initialization of flags
Main program
Fig. 6.3.1 Initialization of flags in PS
(2) How to refer to processor status register
When referring to the processor status register
(PS) contents, execute the PHP instruction to
push the processor status register contents
into the stack (S) + 1. And then read the
contents of stack (S) + 1.
If necessary, execute the PLP instruction to
pull the pushed PS contents. In that case, be
sure to execute the NOP instruction immediately
after the PLP instruction.
(S)
(S) + 1
Pushed PS
Fig. 6.3.2 Stack contents after PHP instruction
execution
Execute PLP instruction
Execute NOP instruction
Fig. 6.3.3 Note when executing PLP instruction
6-4
7220 Group User’s Manual