CPU Functions
C500 Family
Semiconductor Group
2-3
1998-04-01
Special Function Register PSW (Address D0H)
Reset Value : 00H
2.4
Stack Pointer
The stack pointer (SP) register is 8 bits wide. It is incremented before data is stored during PUSH
and CALL executions and decremented after data is popped during a POP and RET (RETI)
execution, i.e. it always points to the last valid stack byte. While the stack may reside anywhere in
the on-chip RAM, the stack pointer is initialized to 07H after a reset. This causes the stack to begin
a location = 08H above register bank zero. The SP can be read or written under software control.
Bit
Function
CY
Carry Flag
Used by arithmetic and conditional branch instruction.
AC
Auxiliary Carry Flag
Used by instructions which execute BCD operations.
F0
General Purpose Flag
RS1
RS0
Register Bank select control bits
These bits are used to select one of the four register banks.
OV
Overflow Flag
Used by arithmetic instruction.
F1
General Purpose Flag
P
Parity Flag
Always set/cleared by hardware to indicate an odd/even number of "one"
bits in the accumulator, i.e. even parity.
P
F1
OV
RS0
RS1
F0
AC
CY
0
1
2
3
4
5
6
7
LSB
MSB
Bit No.
D0H
PSW
RS1
RS0
Function
0
0
Registerbank 0 at data address 00H-07H selected
0
1
Registerbank 1 at data address 08H-0FH selected
1
0
Registerbank 2 at data address 10H-17H selected
1
1
Registerbank 3 at data address 18H-1FH selected