English
Language : 

PIC18CXX2_13 Datasheet, PDF (189/304 Pages) Microchip Technology – High Performance Microcontrollers with 10-bit A/D
PIC18CXX2
FIGURE 19-1:
GENERAL FORMAT FOR INSTRUCTIONS
Byte-oriented file register operations
15
10 9 8 7
0
OPCODE d a
f (FILE #)
d = 0 for result destination to be WREG register
d = 1 for result destination to be file register (f)
a = 0 to force Access Bank
a = 1 for BSR to select bank
f = 8-bit file register address
Example Instruction
ADDWF MYREG, W, B
Byte to Byte move operations (2-word)
15
12 11
OPCODE
0
f (Source FILE #)
15
12 11
1111
0
f (Destination FILE #)
MOVFF MYREG1, MYREG2
f = 12-bit file register address
Bit-oriented file register operations
15
12 11
98 7
0
OPCODE b (BIT #) a f (FILE #)
b = 3-bit position of bit in file register (f)
a = 0 to force Access Bank
a = 1 for BSR to select bank
f = 8-bit file register address
BSF MYREG, bit, B
Literal operations
15
87
0
OPCODE
k (literal)
k = 8-bit immediate value
MOVLW 0x7F
Control operations
CALL, GOTO and Branch operations
15
87
0
OPCODE
n<7:0> (literal)
15
12 11
1111
0
n<19:8> (literal)
n = 20-bit immediate value
15
87
0
OPCODE
S n<7:0> (literal)
15
12 11
0
n<19:8> (literal)
S = Fast bit
GOTO Label
CALL MYFUNC
15
11 10
0
OPCODE
n<10:0> (literal)
15
OPCODE
87
0
n<7:0> (literal)
BRA MYFUNC
BC MYFUNC
 1999-2013 Microchip Technology Inc.
DS39026D-page 189