Datasheet

PIC17C4X
DS30412C-page 112 1996 Microchip Technology Inc.
ADDLW ADD Literal to WREG
Syntax: [
label
] ADDLW k
Operands: 0 k 255
Operation: (WREG) + k (WREG)
Status Affected: OV, C, DC, Z
Encoding:
1011 0001 kkkk kkkk
Description:
The contents of WREG are added to the
8-bit literal 'k' and the result is placed in
WREG.
Words: 1
Cycles: 1
Q Cycle Activity:
Q1 Q2 Q3 Q4
Decode Read
literal 'k'
Execute Write to
WREG
Example:
ADDLW 0x15
Before Instruction
WREG = 0x10
After Instruction
WREG = 0x25
ADDWF ADD WREG to f
Syntax: [
label
] ADDWF f,d
Operands: 0 f 255
d ∈ [0,1]
Operation: (WREG) + (f) (dest)
Status Affected: OV, C, DC, Z
Encoding:
0000 111d ffff ffff
Description:
Add WREG to register 'f'. If 'd' is 0 the
result is stored in WREG. If 'd' is 1 the
result is stored back in register 'f'.
Words: 1
Cycles: 1
Q Cycle Activity:
Q1 Q2 Q3 Q4
Decode Read
register 'f'
Execute Write to
destination
Example:
ADDWF REG, 0
Before Instruction
WREG = 0x17
REG = 0xC2
After Instruction
WREG = 0xD9
REG = 0xC2