
Status Register
-
STATUS
This 8-bit register (0AH) contains the zero flag (Z), carry flag (C), auxiliary carry flag (AC), overflow
flag (OV), power down flag (PDF), and watchdog time-out flag (TO). It also records the status infor-
mation and controls the operation sequence.
With the exception of the TO and PDF flags, bits in the status register can be altered by in-
structions like most other registers. Any data written into the status register will not change
the TO or PDF flag. In addition, operations related to the status register may give different re-
sults due to the different instruction operations. The TO flag can be affected only by a system
power-up, a WDT time-out or by executing the
²
CLR WDT
²
or
²
HALT
²
instruction. The PDF
flag is affected only by executing the
²
HALT
²
or
²
CLR WDT
²
instruction or during a system
power-up.
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 a 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 high-
est-order bit, or vice versa; otherwise OV is cleared
·
is cleared by a system power-up or executing the
²
CLR WDT
²
instruction. PDF is set by ex-
ecuting 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 register is important
and if the subroutine can corrupt the status register, precautions must be taken to correctly save it.
Chapter 1 Hardware Structure
21
T O
P D F
O V
Z
A C
C
S T A T U S R e g i s t e r
A r i t h m e t i c / L o g i c O p e r a t i o n F l a g s
C a r r y f l a g
A u x i l i a r y c a r r y f l a g
Z e r o f l a g
O v e r f l o w f l a g
S y s t e m M a n a g e m e n t F l a g s
P o w e r d o w n f l a g
W a t c h d o g t i m e - o u t f l a g
N o t i m p l e m e n t e d , r e a d a s " 0 "
b 7
b 0
Содержание HT48R05A-1
Страница 7: ...vi Cost Effective I O Type MCU...
Страница 8: ...P a r t I Microcontroller Profile Part I Microcontroller Profile 1...
Страница 9: ...2 Cost Effective I O Type MCU...
Страница 52: ...P a r t I I Programming Language Part II Programming Language 45...
Страница 53: ...46 Cost Effective I O Type MCU...
Страница 59: ...52 Cost Effective I O Type MCU...
Страница 90: ...P a r t I I I Development Tools Part III Development Tools 83...
Страница 91: ...84 Cost Effective I O Type MCU...
Страница 101: ...94 Cost Effective I O Type MCU...
Страница 104: ...Appendix Appendix 97...
Страница 105: ...98 Cost Effective I O Type MCU...
Страница 115: ...108 Cost Effective I O Type MCU...
Страница 116: ...A p p e n d i x B Package Information Appendix B Package Information 109 B...
Страница 123: ...116 Cost Effective I O Type MCU...
Страница 125: ...Amendments...