Notes On Use; Notes On Processor Status Register; Fig. 6.3.1 Initialization Of Flags In Ps; Fig. 6.3.2 Stack Contents After Php Instruction Execution - Renesas 7200 Series User Manual

Mitsubishi 8-bit single-chip microcomputer
Table of Contents

Advertisement

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.
(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.
6-4

Fig. 6.3.1 Initialization of flags in PS

(S) + 1
Fig. 6.3.2 Stack contents after PHP instruction

Fig. 6.3.3 Note when executing PLP instruction

7220 Group User's Manual
Reset
Initialization of flags
Main program
(S)
Pushed PS
execution
Execute PLP instruction
Execute NOP instruction

Advertisement

Table of Contents
loading

This manual is also suitable for:

7220

Table of Contents