Program Status Word (Psw); Program Status Word Configuration; Carry Flag Manipulation Instructions - NEC PD75402A User Manual

4-bit single-chip microcomputer
Table of Contents

Advertisement

4.7
PROGRAM STATUS WORD (PSW) ..... 8 BITS
The program status word (PSW) consists of various flags concerning closely the processor operation. Fig. 4-10
shows its configuration.
Saved to the stack memory per 8 bits at the interrupt acceptance and restored from the stack memory per 8 bits
at the RETI instruction execution (see Figs. 4-8 and 4-9).
7
CY
The PSW is not assigned to the data memory space. So it is impossible to operate each flag by the memory
manipulation instruction. The carry flag (CY) alone is operable by a dedicated instruction, however.
IST0 turns 0 and SK0 to SK2 and CY turn indeterminate at RESET input.
(1) Carry flag (CY)
The carry flag is a 1-bit flag to store the overflow occurrence information at the operation instruction with carry
(ADDC) execution.
The carry flag also has the function of the bit accumulator, so it can perform Boolean operation with the bit address
specify data memory and can store its results.
The carry flag is operated by a dedicated instruction irrespective of the other PSW bits.
The carry flag turns indeterminate with the RESET input.
Carry flag manipulation
dedicated
Bit Boolean instruction
Interrupting process
---------------------------------------------------------------------------------------------------------
CHAPTER 4. INTERNAL CPU FUNCTIONS
Fig. 4-10 Program Status Word Configuration
6
5
4
3
SK2
SK1
SK0
0
Table 4-1 Carry Flag Manipulation Instructions
Instruction (Mnemonic)
SET1 CY
Set (1) CY
CLR1 CY
Clear (0) CY
NOT1 CY
Invert the content of CY
SKT CY
Skip if the content of CY is 1
AND1 CY, fmem.bit
Take AND/OR/XOR of the contents bit of the specified bit and CY
OR1 CY, fmem.bit
and store the result in CY
XOR1 CY, fmem.bit
At interrupt execution
Save to the stack memory in 8 bits parallel to the other PSW bits
RETI
Restore from the stack memory in parallel to the other PSW
2
1
0
IST0
0
0
Interrupt Status Flag
Skip Flag
Carry Flag
Carry Flag Operation, Process
39

Advertisement

Table of Contents
loading

This manual is also suitable for:

Pd75p402

Table of Contents