PIC18F Instruction Set
1. Byte-Oriented File Register Instructions
------------------------------------------
Opcode f, d, a
f - File register address
d - Destination bit (0 = store in WREG, 1 = store in f)
a - Access bit (0 = use Bank Select Register, 1 = use Access Bank)
ADDWF f, d, a Add WREG to f
ANDWF f, d, a Logical AND WREG with f
CLRF f, a Clear register f
CLRW Clear WREG
COMF f, d, a Complement f
DECF f, d, a Decrement f by 1
DECFSZ f, d, a Decrement f and skip if 0
INCF f, d, a Increment f by 1
INCFSZ f, d, a Increment f and skip if 0
IORWF f, d, a Logical OR WREG with f
MOVF f, d, a Move f to WREG or f
MOVWF f, a Move WREG to f
RLF f, d, a Rotate left through Carry
RRF f, d, a Rotate right through Carry
SUBWF f, d, a Subtract WREG from f
SWAPF f, d, a Swap nibbles in f
XORWF f, d, a XOR WREG with f
2. Bit-Oriented File Register Instructions
------------------------------------------
Opcode f, b, a
f - File register address
b - Bit position (0-7)
a - Access bit
BCF f, b, a Clear bit b in register f
BSF f, b, a Set bit b in register f
BTFSC f, b, a Test bit b in f, skip if clear
BTFSS f, b, a Test bit b in f, skip if set
(Full instruction set and examples continued...)