English
Language : 

BS83A02A-4 Datasheet, PDF (23/81 Pages) Holtek Semiconductor Inc – Touch I/O Flash MCU
BS83A02A-4/BS83A04A-3/BS83A04A-4
Touch I/O Flash MCU
The Z, OV, AC and C flags generally reflect the status of the latest operations.
• C is set if an operation results in a carry during an addition operation or if borrow does not take
place during a subtraction operation; otherwise C is cleared. C is also affected by a rotate through
carry instruction.
• AC is set if an operation results in a carry out of the low nibbles in addition, or no borrow from
the high nibble into the low nibble in subtraction; otherwise AC is cleared.
• Z is set if the result of an arithmetic or logical operation is zero; otherwise Z is cleared.
• OV is set if an operation results in a carry into the highest-order bit but not a carry out of the
highest-order bit, or vice versa; otherwise OV is cleared.
• PDF is cleared by a system power-up or executing the "CLR WDT" instruction. PDF is set by
executing the "HALT" instruction.
• TO is cleared by a system power-up or executing the "CLR WDT" or "HALT" instruction. TO is
set by a WDT time-out.
In addition, on entering an interrupt sequence or executing a subroutine call, the status register will
not be pushed onto the stack automatically. If the contents of the status registers are important and
if the subroutine can corrupt the status register, precautions must be taken to correctly save it. Note
that bits 3~0 of the STATUS register are both readable and writeable bits.
STATUS Register
Bit
7
Name
—
R/W
—
POR
—
6
5
4
3
2
1
0
—
TO
PDF
OV
Z
AC
C
—
R/W
R/W
R/W
R/W
R/W
R/W
—
0
0
×
×
×
×
Bit 7~6 Unimplemented, read as "0"
"×" unknown
Bit 5
Bit 4
TO: Watchdog Time-Out flag
0: After power up or executing the "CLR WDT"or "HALT" instruction
1: A watchdog time-out occurred.
PDF: Power down flag
0: After power up or executing the "CLR WDT" instruction
1: By executing the "HALT" instruction
Bit 3
OV: Overflow flag
0: No overflow
1: An operation results in a carry into the highest-order bit but not a carry out of the
highest-order bit or vice versa.
Bit 2
Z: Zero flag
0: The result of an arithmetic or logical operation is not zero
1: The result of an arithmetic or logical operation is zero
Bit 1
AC: Auxiliary flag
0: No auxiliary carry
1: An operation results in a carry out of the low nibbles in addition, or no borrow
from the high nibble into the low nibble in subtraction
Bit 0
C: Carry flag
0: No carry-out
1: An operation results in a carry during an addition operation or if a borrow does
not take place during a subtraction operation
C is also affected by a rotate through carry instruction.
Rev. 1.71
23
April 11, 2017