CHAPTER 4 INTERNAL CPU FUNCTION
74 Users Manual U10676EJ3V0UM
4.8 Program Status Word (PSW) ... 8 Bits
The program status word (PSW) consists of flags closely related to the operations of the processor.
PSW is mapped to addresses FB0H and FB1H of the data memory space, and the 4 bits of address FB0H can
be manipulated by using a memory manipulation instruction.
Figure 4-13. Configuration of Program Status Word
RBEMBEIST0IST1
(SK0)
Note
(SK1)
Note
(SK2)
Note
(CY)
Note
Cannot be
manipulated
Can be
manipulated
FB0HFB1H
Can be manipulated
b
y
dedicated instruction
Symbol
PSW
Address
FB0H
Note Not reserved as a reserved word.
Table 4-3. PSW Flags Saved/Restored to/from Stack
Flag Saved or Restored
Save When CALL, CALLA, or CALLF instruction is executed MBE and RBE are saved
When hardware interrupt occurs All PSW bits are saved
Restore When RET or RETS instruction is executed MBE and RBE are restored
When RETI instruction is executed All PSW bits are restored
(1) Carry flag (CY)
The carry flag records the occurrence of an overflow or underflow when an operation instruction with a carry
(ADDC or SUBC) is executed.
The carry flag also functions as a bit accumulator and can store the result of a Boolean operation performed
between a specified bit address and data memory.
The carry flag is manipulated by using a dedicated instruction and is independent of the other PSW bits.
The carry flag becomes undefined when the RESET signal is asserted.