By: Masud-ul-Hasan
27
PSW (Program Status Word)
•CY: (Carry Flag) is dual purpose: (1) As traditional CY for arithmetic operations e.g., If A contains FFH then the instruction ADD A, #1
leaves A equal to 00H and sets the CY in PSW. (A=00H & CY=1)
(2) As Boolean accumulator e.g., ANL C, 25H ; ANDs bit 25H with the carry flag and places the result back in the CY. •AC: (Auxiliary Carry Flag) used in addition of BCD numbers, is set if a carry was generated out of bit 3 into bit 4. If the values are added are BCD, then the add instruction must be followed by DAA (decimal adjust accumulator) to bring results greater than 9 back into range. •F0: (Flag 0) is a general-purpose flag bit available for user applications.