Specifications

mikroElektronika | Free Online Book | PIC Microcontrollers | Chapter 9: Instruction Set
Arithmetic-logic Instructions
ADDLW k Add W and constant W+k -> W C, DC, Z 1
ADDWF f,d Add W and f W+f -> d C, DC ,Z 1 1, 2
SUBLW k Subtract W from constant k-W -> W C, DC, Z 1
SUBWF f,d Subtract W from f f-W -> d C, DC, Z 1 1, 2
ANDLW k
Logical AND with W with
constant
W AND k -> W Z 1
ANDWF f,d
Logical AND with W with
f
W AND f -> d Z 1 1, 2
ANDWF f,d
Logical AND with W with
f
W AND f -> d Z 1 1, 2
IORLW k
Logical OR with W with
constant
W OR k -> W Z 1
IORWF f,d Logical OR with W with f W OR f -> d Z 1 1, 2
XORWF f,d
Logical exclusive OR
with W with constant
W XOR k -> W Z 1 1, 2
XORLW k
Logical exclusive OR
with W with f
W XOR f -> d Z 1
INCF f,d Increment f by 1 f+1 -> f Z 1 1, 2
DECF f,d Decrement f by 1 f-1 -> f Z 1 1, 2
RLF f,d
Rotate left f through
CARRY bit
C 1 1, 2
RRF f,d
Rotate right f through
CARRY bit
C 1 1, 2
COMF f,d Complement f f -> d Z 1 1, 2
Bit-oriented Instructions
BCF f,b Clear bit b in f 0 -> f(b) 1 1, 2
BSF f,b Clear bit b in f 1 -> f(b) 1 1, 2
Program Control Instructions
BTFSC f,b
Test bit b of f. Skip the
following instruction if
clear.
Skip if f(b) = 0 1 (2) 3
BTFSS f,b
Test bit b of f. Skip the
following instruction if
set.
Skip if f(b) = 1 1 (2) 3
DECFSZ f,d
Decrement f. Skip the
following instruction if
clear.
f-1 -> d skip if Z = 1 1 (2) 1, 2, 3
INCFSZ f,d
Increment f. Skip the
following instruction if
set.
f+1 -> d skip if Z = 0 1 (2) 1, 2, 3
GOTO k Go to address k -> PC 2
CALL k Call subroutine PC -> TOS, k -> PC 2
RETURN Return from subroutine TOS -> PC 2
RETLW k
Return with constant in
W
k -> W, TOS -> PC 2
http://www.mikroe.com/en/books/picmcubook/ch9/ (2 of 35)5/3/2009 11:35:12 AM