MOV W,#lit 1 1 - W Move literal into W MOVLW lit MOV W,fr 1 Z W Move fr into W MOVF fr,0 MOV fr,W 1 - fr Move W into fr MOVWF fr MOV fr,#lit 2 - W,fr Move literal into fr MOVLW lit; MOVWF fr MOV fr1,fr2 2 Z W,fr1 Move fr2 into fr1 MOVF fr2,0; MOVWF fr1 ADD W,fr 1 C,DC,Z - Add fr into W ADDWF fr,0 ADD fr,W 1 C,DC,Z -,fr Add W into fr ADDWF fr,1 ADD fr,#lit 2 C,DC,Z W,fr Add literal into fr MOVLW lit; ADDWF fr,1 ADD fr1,fr2 2 C,DC,Z W,fr1 Add fr2 into fr1 MOVF fr2,0; ADDWF fr1,1 MOV W,fr-W 1 C,DC,Z - Move fr-W into W SUBWF fr,0 SUB fr,W 1 C,DC,Z -,fr Subtract W from fr SUBWF fr,1 SUB fr,#lit 2 C,DC,Z W,fr Subtract lit from fr MOVLW lit; SUBWF fr,1 SUB fr1,fr2 2 C,DC,Z W,fr1 Subtract fr2 from fr1 MOVF fr2,0; SUBWF fr1,1 AND W,#lit 1 Z - AND literal into W ANDLW lit AND W,fr 1 Z - AND fr into W ANDWF fr,0 AND fr,W 1 Z -,fr AND W into fr ANDWF fr,1 AND fr,#lit 2 Z W,fr AND literal into fr MOVLW lit; ANDWF fr,1 AND fr1,fr2 2 Z W,fr1 AND fr2 into fr1 MOVF fr2,0; ANDWF fr,1 OR W,#lit 1 Z - OR literal into W IORLW lit OR W,fr 1 Z - OR fr into W IORWF fr,0 OR fr,W 1 Z -,fr OR W into fr IORWF fr,1 OR fr,#lit 2 Z W,fr OR literal into fr MOVLW lit; IORWF fr,1 OR fr1,fr2 2 Z W,fr1 OR fr2 into fr1 MOVF fr2,0; IORWF fr1,1 XOR W,#lit 1 Z - XOR literal into W XORLW lit XOR W,fr 1 Z - XOR fr into W XORWF fr,0 XOR fr,W 1 Z - XOR W into fr XORWF fr,1 XOR fr,#lit 2 Z W XOR literal into fr MOVLW lit; XORWF fr,1 XOR fr1,fr2 2 Z W XOR fr2 into fr1 MOVF fr2,0; XORWF fr1,1 CLR W 1 Z - Clear W CLRW CLR fr 1 Z - Clear fr CLRF fr MOV W,++fr 1 Z - Move fr+1 into W INCF fr,0 INC fr 1 Z - Increment fr INCF fr,1 MOV W,--fr 1 Z - Move fr-1 into W DECF fr,0 DEC fr 1 Z - Decrement fr DECF fr,1 MOV W,<<fr 1 C - Move left-rotated fr into W RLF fr,0 RL fr 1 C - Rotate left fr RLF fr,1 MOV W,>>fr 1 C - Move right-rotated fr into W RRF fr,0 RR fr 1 C - Rotate right fr RRF fr,1 MOV W,<>fr 1 - - Move nibble-swapped fr into W SWAPF fr,0 SWAP fr 1 - - Swap nibbles in fr SWAPF fr,1 NOT W 1 Z - Perform not on W XORLW 0FFh MOV W,/fr 1 Z - Move not'd fr into W COMF fr,0 NOT fr 1 Z - Perform not on fr COMF fr,1 TEST W 1 Z - Test W for zero IORLW 0 TEST fr 1 Z - Test fr for zero MOVF fr,1 TSTN w 1 Z w Test W for $FF (NOT w) XORLW 0FFh TSTN fr 1 Z fr Test fr for $FF (NOT fr) COMF fr,1 CLRB bit 1 - - Clear bit BCF bit CLC 1 C - Clear carry BCF 3,0 CLZ 1 Z - Clear zero BCF 3,2 SETB bit 1 - - Set bit BSF bit STC 1 C - Set carry BSF 3,0 STZ 1 Z - Set zero BSF 3,2 ADDB fr,bit 2 Z - Add bit into fr BTFSC bit; INCF fr,1 ADDB fr,/bit 2 Z - Add not bit into fr BTFSS bit; INCF fr,1 SUBB fr,bit 2 Z - Subtract bit from fr BTFSC bit; DECF fr,1 SUBB fr,/bit 2 Z - Subtract not bit from fr BTFSS bit; DECF fr,1 MOVB bit1,bit2 4 - - Move bit2 into bit1 BTFSS bit2; BCF bit1; BTFSC bit2; BSF bit1 (doesn't work) MOVB bit1,/bit2 4 - - Move not bit2 into bit1 BTFSC bit2; BCF bit1; BTFSS bit2; BSF bit1 (doesn't work) MOVSZ W,++fr 1 - - Move fr+1 into W, skip if zero INCFSZ fr,0 INCSZ fr 1 - - Increment fr, skip if zero INCFSZ fr,1 IJNZ fr,addr 2 * - - Increment fr, jump if not zero INCFSZ fr,1; GOTO addr MOVSZ W,--fr 1 - - Move fr-1 into W, skip if zero DECFSZ fr,0 DECSZ fr 1 - - Decrement fr, skip if zero DECFSZ fr,1 DJNZ fr,addr 2 * - - Decrement fr, jump if not zero DECFSZ fr,1; GOTO addr CSE fr,#lit 3 C,DC,Z W Compare, skip if equal MOVLW lit; SUBWF fr,0; BTFSS 3,2 CSE fr1,fr2 3 C,DC,Z W Compare, skip if equal MOVF fr2,0; SUBWF fr1,0; BTFSS 3,2 CSNE fr,#lit 3 C,DC,Z W Compare, skip if not equal MOVLW lit; SUBWF fr,0; BTFSC 3,2 CSNE fr1,fr2 3 C,DC,Z W Compare, skip if not equal MOVF fr2,0; SUBWF fr1,0; BTFSC 3,2 CSA fr,#lit 3 C,DC,Z W Compare, skip if above MOVLW /lit; ADDWF fr,0; BTFSS 3,0 CSA fr1,fr2 3 C,DC,Z W Compare, skip if above MOVF fr1,0; SUBWF fr2,0; BTFSC 3,0 CSAE fr,#lit 3 C,DC,Z W Compare, skip if above or equal MOVLW lit; SUBWF fr,0; BTFSS 3,0 CSAE fr1,fr2 3 C,DC,Z W Compare, skip if above or equal MOVF fr2,0; SUBWF fr1,0; BTFSS 3,0 CSB fr,#lit 3 C,DC,Z W Compare, skip if below MOVLW lit; SUBWF fr,0; BTFSC 3,0 CSB fr1,fr2 3 C,DC,Z W Compare, skip if below MOVF fr2,0; SUBWF fr1,0; BTFSC 3,0 CSBE fr,#lit 3 C,DC,Z W Compare, skip if below or equal MOVLW /lit; ADDWF fr,0; BTFSC 3,0 CSBE fr1,fr2 3 C,DC,Z W Compare, skip if below or equal MOVF fr1,0; SUBWF fr2,0; BTFSS 3,0 CJE fr,#lit,addr 4 * C,DC,Z W Compare, jump if equal MOVLW lit; SUBWF fr,0; BTFSC 3,2; GOTO addr CJE fr1,fr2,addr 4 * C,DC,Z W Compare, jump if equal MOVF fr2,0; SUBWF fr1,0; BTFSC 3,2; GOTO addr CJNE fr,#lit,addr 4 * C,DC,Z W Compare, jump if not equal MOVLW lit; SUBWF fr,0; BTFSS 3,2; GOTO addr CJNE fr1,fr2,addr 4 * C,DC,Z W Compare, jump if not equal MOVF fr2,0; SUBWF fr1,0; BTFSS 3,2; GOTO addr CJA fr,#lit,addr 4 * C,DC,Z W Compare, jump if above MOVLW /lit; ADDWF fr,0; BTFSC 3,0; GOTO addr CJA fr1,fr2,addr 4 * C,DC,Z W Compare, jump if above MOVF fr1,0; SUBWF fr2,0; BTFSS 3,0; GOTO addr CJAE fr,#lit,addr 4 * C,DC,Z W Compare, jump if above or equal MOVLW lit; SUBWF fr,0; BTFSC 3,0; GOTO addr CJAE fr1,fr2,addr 4 * C,DC,Z W Compare, jump if above or equal MOVF fr2,0; SUBWF fr1,0; BTFSC 3,0; GOTO addr CJB fr,#lit,addr 4 * C,DC,Z W Compare, jump if below MOVLW lit; SUBWF fr,0; BTFSS 3,0; GOTO addr CJB fr1,fr2,addr 4 * C,DC,Z W Compare, jump if below MOVF fr2,0; SUBWF fr1,0; BTFSS 3,0; GOTO addr CJBE fr,#lit,addr 4 * C,DC,Z W Compare, jump if below or equal MOVLW /lit; ADDWF fr,0; BTFSS 3,0; GOTO addr CJBE fr1,fr2,addr 4 * C,DC,Z W Compare, jump if below or equal MOVF fr1,0; SUBWF fr2,0; BTFSC 3,0; GOTO addr SB bit 1 - - Skip if bit BTFSS bit SC 1 - - Skip if carry BTFSS 3,0 SZ 1 - - Skip if zero BTFSS 3,2 SNB bit 1 - - Skip if not bit BTFSC bit SNC 1 - - Skip if not carry BTFSC 3,0 SNZ 1 - - Skip if not zero BTFSC 3,2 JB bit,addr 2 * - - Jump to address if bit BTFSC bit; GOTO addr JC addr 2 * - - Jump to address if carry BTFSC 3,0; GOTO addr JZ addr 2 * - - Jump to address if zero BTFSC 3,2; GOTO addr JNB bit,addr 2 * - - Jump to address if not bit BTFSS bit; GOTO addr JNC addr 2 * - - Jump to address if not carry BTFSS 3,0; GOTO addr JNZ addr 2 * - - Jump to address if not zero BTFSS 3,2; GOTO addr SKIP 1 - - Skip next instruction word BTFSC/BTFSS 2,0 JMP addr 1 * - - Jump to address GOTO addr JMP PC+W 1 C,DC,Z - Add W into PC(L) ADDWF 2,1 JMP W 1 - - Move W into PC(L) MOVWF 2 CALL addr 1 * - - Call to address RETW lit,lit... 1 - - Return from call, literal in W RET 1 - - Return from call RETP 1 - - Return from call, affect PA2:PA0 RETI 1 - - Return from interrupt RETIW 1 - - Return from interrupt, compensate RTCC PAGE addr 1 - - Transfer addr.11:addr.9 into PA2:PA0, will delay skipping BANK fr 1 - - Transfer fr.7:fr.5 into FSR.7:FSR.5 MOV M,#lit 1 - - Move literal into M MOV M,W 1 - - Move W into M MOV M,fr 2 Z W Move fr into M MOV W,M 1 - - Move M into W MOV fr,M 2 - W Move M into fr MOV !port,W 1 - - Move W into port's TRIS TRIS port (port=5 to 7) MOV !port,#lit 2 - W Move literal into port's TRIS MOVLW lit; TRIS port (port=5 to 7) MOV !port,fr 2 Z W Move fr into port's TRIS MOVF fr,0; TRIS port (port=5 to 7) MOV !OPTION,W 1 - - Move W into OPTION OPTION MOV !OPTION,#lit 2 - W Move literal into OPTION MOVLW lit; OPTION MOV !OPTION,fr 2 Z W Move fr into OPTION MOVF fr,0; OPTION CLR !WDT 1 TO,PD - Clear WDT and prescaler CLRWDT SLEEP 1 TO,PD - Clear WDT and enter sleep mode SLEEP IREAD 1 - - Read instruction at M:W into M:W NOP 1 - - No operation NOP