Specifications
mikroElektronika | Free Online Book | PIC Microcontrollers | Chapter 9: Instruction Set
f - Any memory location (register);
W - Working register (accumulator);
b - Bit address within an 8-bit register;
d - Destination bit;
[label] - Set of 8 characters indicating start of particular address in the program;
TOS - Top of stack;
[] - Option;
<> - bit field in register (several bit addresses);
C - Carry/Borrow bit of the STATUS register;
DC - Digit Carry bit of the STATUS register; and
Z - Zero bit of the STATUS register.
ADDLW - Add literal and W
Syntax: [label] ADDLW k
Description: The content of the register W is added to the 8-bit literal k. The result is
stored in the W register.
Operation: (W) + k -> W
Operand: 0 ≤ k ≤ 255
Status affected: C, DC, Z
Number of cycles: 1
EXAMPLE:
....
[label] ADDLW 0x15
Before instruction execution: W=0x10
After instruction: W=0x25
C=0 (the result is not greater than 0xFF, which means that Carry
has not occurred).
ADDWF - Add W and f
Syntax: [label] ADDWF f, d
Description: Add the contents of the W and f registers.
http://www.mikroe.com/en/books/picmcubook/ch9/ (5 of 35)5/3/2009 11:35:12 AM