Read-Modify-Write Operations

Any instruction that specifies a file register as part of the instruction performs a Read-Modify-Write (RMW) operation. The register is read, the data is modified, and the result is stored according to either the Working (W) register, or the originating file register, depending on the state of the destination designator ‘d’ (see Table 1 for more information). A read operation is performed on a register even if the instruction writes to that register.

Table 1. Opcode Field Descriptions
Field Description
f Register file address (0x00 to 0x7F)
W Working register (accumulator)
b Bit address within an 8-bit file register
k Literal field, constant data or label

“Don’t care” location (= 0 or 1).
The assembler will generate code with x = 0.
It is the recommended form of use for compatibility with all Microchip software tools.

d Destination select; d = 0: store result in W, d = 1: store result in file register f.
n FSR or INDF number. (0-1)
mm Pre/post increment/decrement mode selection
Table 2. Abbreviation Descriptions
Field Description
PC Program Counter
TO Time-Out bit
C Carry bit
DC Digit Carry bit
Z Zero bit
PD Power-Down bit