16Cxx instruction set


Byte oriented file register operations

BinaryHexMnemonicDescription
00 0111 dfff ffff   
07ff 
ADDWF f,dAdd W and f
00 0101 dfff ffff   
05ff 
ANDWF f,dAND W and f
00 0001 1fff ffff   
018f 
CLRF fClear f
00 0001 0xxx xxxx   
0100 
CLRWClear W
00 1001 dfff ffff   
09ff 
COMF f,dComplement f
00 0011 dfff ffff   
03ff 
DECF f,dDecrement f
00 1011 dfff ffff   
0Bff 
DECFSZ f,dDecrement f, skip if zero
00 1010 dfff ffff   
0Aff 
INCF f,dIncrement f
00 1111 dfff ffff   
0Fff 
INCFSZ f,dIncrement f, skip if zero
00 0100 dfff ffff   
04ff 
IORWF f,dInclusive OR W and f
00 1000 dfff ffff   
08ff 
MOVF f,dMove f
00 0000 1fff ffff   
008f 
MOVWF fMove W to f
00 0000 0xx0 0000   
0000 
NOPNo operation
00 1101 dfff ffff   
0Dff 
RLF f,dRotate left f
00 1100 dfff ffff   
0Cff 
RRF f,dRotate right f
00 0110 dfff ffff   
02ff 
SUBWF f,dSutract W from f
00 1110 dfff ffff   
0Eff 
SWAPF f,dSwap halves f
00 0110 dfff ffff   
06ff 
XORWF f,dExclusive OR W and f



Bit oriented file register operations

BinaryHexMnemonicDescription
01 00bb bfff ffff   
1bff 
BCF f,bBit clear f
01 01bb bfff ffff   
1bff 
BSF f,bBit set f
01 10bb bfff ffff   
1bff 
BTFSC f,bBit test, skip if clear
01 11bb bfff ffff   
1bff 
BTFSS f,bBit test, skip if set



Literal and control operations

BinaryHexMnemonicDescription
11 111x kkkk kkkk   
3Ekk 
ADDLW kAdd literal to W
11 1001 kkkk kkkk   
39kk 
ANDLW kAnd literal and W
10 0kkk kkkk kkkk   
2kkk 
CALL kCall subroutine
00 0000 0110 0100   
0064 
CLRWDTClear watch dog timer
10 1kkk kkkk kkkk   
2kkk 
GOTO kGoto address k
11 1000 kkkk kkkk   
38kk 
IORLW kIncl. OR literal and W
11 00xx kkkk kkkk   
30kk 
MOVLW kMove Literal to W
00 0000 0110 0010   
0062 
OPTIONLoad OPTION register W
00 0000 0000 1001   
0009 
RETFIEReturn from Interrupt
11 01xx kkkk kkkk   
34kk 
RETLW kReturn with literal in W
00 0000 0000 1000   
0008 
RETURNReturn from subroutine
00 0000 0110 0011   
0063 
SLEEPGo into stand by mode
11 110x kkkk kkkk   
3Ckk 
SUBLW kSubtract W from literal
00 0000 0110 0fff   
006f 
TRIS fTristate port f
11 1010 kkkk kkkk   
3Akk 
XORLW kExclusive OR literal and W



Special instruction mnemonics

NameMnemonicEquivalent
Operation(s)
Status
Clear CarryCLRCBCF 3,0 -
Clear Digit CarryCLRDCBCF 3,1 -
Set Digit CarrySETDCBSF 3,1 -
Clear ZeroCLRZBCF 3,2 -
Set ZeroSETZBSF 3,2 -
Skip on CarrySKPCBTFSS 3,0 -
Skip on No CarrySKPNCBTFSC 3,0 -
Skip on Digit CarrySKPDCBTFSS 3,1 -
Skip on No Digit CarrySKPNDCBTFSC 3,1 -
Skip on ZeroSKPZBTFSS 3,2 -
Skip on Non ZeroSKPNZBTFSC 3,2 -
Test FileTSTF fMOVF f,1 Z
Move File to WMOVFW fMOVF f,0 Z
Negate FileNEGF f,dCOMF f,1
INCF f,d
Z
Add Carry to FileADDCF f,dBTFSC 3,0
INCF f,d
Z
Subtract Carry from FileSUBCF f,dBTFSC 3,0
DECF f,d
Z
Add Digit Carry to FileADDDCF f,dBTFSC 3,1
INCF f,d
Z
Subtract Digit
Carry from File
SUBDCF f,dBTFSC 3,1
DECF f,d
Z
BranchB kGOTO k -
Branch on CarryBC kBTFSC 3,0
GOTO k
-
Branch on No CarryBNC kBTFSS 3,0
GOTO k
-
Branch on Digit CarryBDC kBTFSC 3,1
GOTO k
-
Branch on No Digit CarryBNDC kBTFSS 3,1
GOTO k
-
Branch on ZeroBZ kBTFSC 3,2
GOTO k
-
Branch on Non ZeroBNZ kBTFSS 3,2
GOTO k
-
Call across page boundaryLCALL kBCF 3,5 or BSF 3,5
BCF 3,6 or BSF 3,6
CALL k
-