Department of Computer Science and Information EngineeringNational Cheng Kung University, TAIWAN
HANEL
FLAG BITS AND PSW REGISTER Program Status Word(cont’)
P
OV
RS0
RS1
F0
AC
CY CY PSW.7 Carry flag.AC PSW.6 Auxiliary carry flag.--PSW.5 Available to the user for general purposeRS1 PSW.4 Register Bank selector bit 1.RS0 PSW.3 Register Bank selector bit 0.OV PSW.2 Overflow flag.--PSW.1 User definable bit.P PSW.0 Parity flag. Set/cleared by hardware each
instruction cycle to indicate an odd/even number of 1 bits in the accumulator.18H –1FH3
1
110H –17H2
0
108H –0FH1
1
000H –07H0
0
0AddressRegister Bank
RS0
RS1A carry from D3 to D4Carry out from the d7 bitReflect the number of 1s in register AThe result of signed number operation is too large, causing the high-order bit to overflow into the sign bit