Program Status Word (Psw); Psw Flags Saved/Restored In Stack Operation - NEC PD750004 User Manual

4 bit single-chip microcomputer
Table of Contents

Advertisement

µPD750008 USER'S MANUAL
4.8 PROGRAM STATUS WORD (PSW): 8 BITS
The program status word (PSW) consists of various flags closely associated with processor operations.
The PSW is mapped to addresses FB0H and FB1H in data memory space. Four bits at address FB0H
can be manipulated with a memory manipulation instruction.
Address
FB0H
Can be manipulated
by an instruction
specifically provided
for controlling this flag
Save
When a CALL, CALLA, or CALLF instruction is executed
When a hardware interrupt occurs
Restore
When a RET or RETS instruction is executed
When a RETI is executed
(1) Carry flag (CY)
The carry flag is a 1-bit flag used to store information about an overflow or underflow that occurs when
an arithmetic operation with a carry (ADDC, SUBC) is executed.
The carry flag functions as a bit accumulator, and therefore can be used to store the result of a Boolean
algebra operation performed on the CY and a bit at a specified data memory bit address.
The carry flag is manipulated using special instructions, independently of the other PSW bits.
A RESET signal causes the carry flag to be undefined.
6 2
Figure 4-16. Program Status Word Format
FB1H
CY
SK2
SK1
Cannot be manipulated
Table 4-3. PSW Flags Saved/Restored in Stack Operation
FB0H
SK0
IST1
IST0
Can be manipulated
Symbol
MBE
RBE
PSW
Saved/restored flag
MBE and RBE are saved.
All PSW bits are saved.
MBE and RBE are restored.
All PSW bits are restored.

Advertisement

Table of Contents
loading

This manual is also suitable for:

Pd750006Pd750008Pd75p0016

Table of Contents