Datasheet

PIC12C67X
DS30561C-page 70 1997-2013 Microchip Technology Inc.
10.1 Special Function Registers as
Source/Destination
The PIC12C67X’s orthogonal instruction set allows
read and write of all file registers, including special
function registers. There are some special situations
the user should be aware of:
10.1.1 STATUS AS DESTINATION
If an instruction writes to STATUS, the Z, C and DC bits
may be set or cleared as a result of the instruction and
overwrite the original data bits written. For example,
executing CLRF STATUS will clear register STATUS,
and then set the Z bit leaving 0000 0100b in the reg-
ister.
10.1.2 TRIS AS DESTINATION
Bit 3 of the TRIS register always reads as a '1' since
GP3 is an input only pin. This fact can affect some read-
modify-write operations on the TRIS register.
10.1.3 PCL AS SOURCE OR DESTINATION
Read, write or read-modify-write on PCL may have the
following results:
Read PC: PCL dest
Write PCL: PCLATH PCH;
8-bit destination value PCL
Read-Modify-Write: PCL ALU operand
PCLATH PCH;
8-bit result PCL
Where PCH = program counter high byte (not an
addressable register), PCLATH = Program counter
high holding latch, dest = destination, WREG or f.
10.1.4 BIT MANIPULATION
All bit manipulation instructions are done by first read-
ing the entire register, operating on the selected bit and
writing the result back (read-modify-write). The user
should keep this in mind when operating on special
function registers, such as ports.