Academic Program

Literal and Control Commands

Literal and Control Commands

Literal Operations

These commands load or operate on literal values.

Mnemonic,
Operands
Description Cycles 14-bit Opcode
MSb……LSb
Status
Affected
Notes
Literal Operations
ADDLW k Add literal and W 1 11 1110 kkkk kkkk C,DC,Z  
ANDLW k AND literal with W 1 11 1001 kkkk kkkk Z  
IORLW k Inclusive OR literal with W 1 11 1000 kkkk kkkk Z  
MOVLB k Move Literal to BSR 1 00 0000 001k kkkk None  
MOVLP k Move Literal to PCLATH 1 11 0001 1kkk kkkk None  
MOVLW k Move literal to W 1 11 0000 kkkk kkkk None  
SUBLW k Subtract W from Literal 1 11 1100 kkkk kkkk C,DC,Z  
XORLW k Exclusive OR literal with W 1 11 1010 kkkk kkkk Z

 

The commands control movement within the program such as branches, jumps or returns from interrupts.

Control Operations

Mnemonic,
Operands
Description Cycles 14-bit Opcode
MSb……LSb
Status
Affected
Notes
Control Operations
BRA k Relative Branch 2 11 001k kkkk kkkk None  
BRW   Relative Branch with W 2 00 0000 0000 1011 None  
CALL k Call Subroutine 2 10 0kkk kkkk kkkk None  
CALLW   Call Subroutine with W 2 00 0000 0000 1010 None  
GOTO k Goto address 2 10 1kkk kkkk kkkk None  
RETFIE k Return from interrupt 2 00 0000 0000 1001 None  
RETLW k Return, place literal in W 2 11 0100 kkkk kkkk None  
RETURN k Return from subroutine 2 00 0000 0000 1000 None