
HMS77C2000/2001
Nov. 2002 Ver 1.1
21
9.3 STATUS REGISTER
This register contains the arithmetic status of the ALU, the
RESET status, and the page preselect bit for program
memories larger than 512 words.
The STATUS register can be the destination for any in-
struction, as with any other register. If the STATUS regis-
ter is the destination for an instruction that affects the Z,
DC or C bits, then the write to these three bits is disabled.
These bits are set or cleared according to the device logic.
Furthermore, the TO and PD bits are not writable. There-
fore, the result of an instruction with the STATUS register
as destination may be different than intended.
For example,
CLRF STATUS
will clear the upper three
bits and set the Z bit. This leaves the STATUS register as
000u u1uu (where u = unchanged).
It is recommended, therefore, that only
BCF
,
BSF
and
MOVWF
instructions be used to alter the STATUS register
because these instructions do not affect the Z, DC or C bits
from the STATUS register. For other instructions, which
do affect STATUS bits, see Instruction Set Summary.
9.4 OPTION REGISTER
The OPTION register is a 8-bit wide, write-only register
FIGURE 9-5 STATUS REGISTER
-
PA0
R/W
TO
R
PD
R
Z
R/W
DC
R/W
C
R/W
bit7
bit0
UPWUF
: UPIO reset bit
1 = Reset due to wake-up from SLEEP on pin
change
0 = After power up or other reset
-
: Unimplemented
PA0
: Program memory page select bits
0 = page 0 (000h - 1FFh) - GMS77C1000/1001
1 = page 1 (200h - 3FFh) - GMS77C1001
TO
: Time-overflow bit
1 = After power-up, watchdog clear instruction, or
entering power-down mode
0 = A watchdog timer time-overflow occurred
PD
: Power-down bit
1 = After power-up or by the watchdog clear
instruction
0 = By execution of power-down mode
Z
: Zero bit
1 = The result of an arithmetic or logic operation
is zero
0 = The result of an arithmetic or logic operation
is not zero
DC
: Digit carry/borrow bit
(for addition and subtraction)
addition
1 = A carry from the 4th low order bit of the result
occurred
0 = A carry from the 4th low order bit of the result
did not occur
subtraction
1 = A borrow from the 4th low order bit of the
result did not occur
0 = A borrow from the 4th low order bit of the
result occurred
C
: Carry/borrow bit
(for additon,subtraction and rotation)
addition
1 = A carry occurred
0 = A carry did not occur
subtraction
1 = A borrow did not occur
0 = A borrow occurred
rotation
Load bit with LSB or MSB, respectively
R = Readable bit
W = Writable bit
ADDRESS ; 03
H
RESET VALUE : 0001_1XXX
UPWUF
R