Condition Codes - ZiLOG Z8 PLUS User Manual

Table of Contents

Advertisement

Watch-
1
Dog
Timer
(WDT)
Stop
0
Mode
Recovery
Flag
(SMR)

CONDITION CODES

The C, Z, S, and V Flags control the operation of the conditional JUMP instructions. Sixteen frequently useful
functions of the flag settings are encoded in a 4-bit field called the condition code (cc), which forms bits
4-7 of the conditional instructions.
Flag Definitions, Flag Settings and Condition Codes are summarized in Table 3-9, Table 3-10, and
Table 3-11.
Table 3-9. Flag Definitions
R/W
The Watch-Dog Timer reset flag is set by a watchdog timer
timeout. This permits software to determine if a timeout of the
watchdog timer has occurred.
The WDT flag is cleared by the RESET pin. The WDT and
SMR flags are the only flags effected by RESET. This behavior
permits software to determine if a RESET occurred, if a WDT
timeout occurred, or if a return from STOP mode occurred.
Software must explicitly clear this flag after detecting the
timeout condition.
Failure to clear this flag may result in undefined behavior.
R/W
The Stop Mode Recovery (SMR) flag is set upon the execution
of a STOP instruction. This permits software to determine if a
return from stop mode has occurred upon returning to active
status.
The SMR flag is cleared by the RESET pin. The WDT and SMR
flags are the only flags effected by RESET. This behavior
permits software to determine if a RESET occurred, if a WDT
timeout occurred, or if a return from STOP mode occurred.
Software must explicitly clear this flag after detecting the SMR
condition.
Failure to clear this flag may result in undefined behavior.
Flag
Description
C
Carry Flag
Z
Zero Flag
S
Sign Flag
V
Overflow Flag
.75
P
Â

Advertisement

Table of Contents
loading

Table of Contents