38 Instruction Set Summary

The PIC32AK1216GC41064 family of devices supports modified Harvard architecture. For details of the 32-bit Comprehensive Instruction Set for the PIC32AK1216GC41064 device family, refer to the PIC32A Programmer's Reference Manual”, which is available from the Microchip website (www.microchip.com).

The instruction set is highly orthogonal and is grouped into five basic categories:

  • Long word, word or byte-oriented operations
  • Bit-oriented operations
  • Literal operations
  • DSP operations
  • Control operations

Table   1 lists the general symbols used in describing the instructions.

The instruction set summary in Table 38-2 lists all the instructions, along with the status flags affected by each instruction.

Most long word, word or byte-oriented operations W register instructions (including barrel shift instructions) have three operands:

  • The first source operand, which is typically a register ‘Wb’ without any address modifier
  • The second source operand, which is typically a register ‘Ws’ with or without an address modifier
  • The destination of the result, which is typically a register ‘Wd’ with or without an address modifier

However, long word, word or byte-oriented operations file register instructions have two operands:

  • The file register specified by the value ‘f’
  • The destination, which could be either the file register ‘f’ or any W register

Most bit-oriented instructions (including simple rotate/shift instructions) have two operands:

  • The W register (with or without an address modifier) or file register (specified by the value of ‘Ws’ or ‘f’)
  • The bit in the W register or file register (specified by a literal value or indirectly by the contents of register ‘Wb’)

The literal instructions that involve data movement can use some of the following operands:

  • A literal value to be loaded into a W register (specified by ‘k’)
  • The W register or file register where the literal value is to be loaded (specified by ‘Wb’ or ‘f’)

However, literal instructions that involve arithmetic or logical operations use some of the following operands:

  • The first source operand, which is a register ‘Wb’ without any address modifier
  • The second source operand, which is a literal value
  • The destination of the result (only if not the same as the first source operand), which is typically a register ‘Wd’ with or without an address modifier

The MAC class of DSP instructions can use some of the following operands:

  • The accumulator (A or B) to be used (required operand)
  • The W registers to be used as the two operands
  • The X and Y address space prefetch operations
  • The X and Y address space prefetch destinations
  • The accumulator write-back destination

The other DSP instructions do not involve any multiplication and can include:

  • The accumulator to be used (required)
  • The source or destination operand (designated as Wso or Wdo, respectively) with or without an address modifier
  • The amount of shift specified by a W register ‘Wn’ or a literal value

The control instructions can use a program memory address.

Most single-word instructions are executed in a single instruction cycle unless a conditional test is true, the Program Counter is changed as a result of the instruction. In these cases, the execution takes multiple instruction cycles with the additional instruction cycle(s) executed as a NOP. Certain instructions that involve skipping over the subsequent instruction require extra cycles if the skip is performed, depending on whether the instruction being skipped is a single-word or two-word instruction.

Note: For more details on the instruction set, refer to the PIC32A Programmer's Reference Manual (DS70005540)” (www.microchip.com/).
Table 38-1. Symbols Used in Opcode Descriptions
Symbol(1)Description
{ }Optional field or operation
[text]The location addressed by text
(text)The contents of text
#textThe literal defined by text
{label:}Optional label name
[n:m]Register bit field
.l32-bit Long Word mode selection
.b8-bit Byte mode selection
.sl24-bit (literal) Word mode selection
.VDestination data value select (MAXABW, MINABW and FLIMW)
.w16-bit Word mode selection (default)
AWBAccumulator write back destination address register
bit33-bit bit selection field (used in byte addressed instructions) (0:7)
bit44-bit bit selection field (used in word addressed instructions) (0:15)
C, N, OV, ZALU status bits: Carry, Digit Carry, Negative, Overflow, Zero
dFile register destination (W0, none)
ExprAbsolute address, label or expression (resolved by the linker)
fFile register address (0x0000:0xFFFF) or (0x00000:0xFFFFF) (addressable space varies depending upon instruction class)
Fd(2)One of 32 FPU destination data registers (F0:F31) (Register Direct)
Fs(2)One of 32 FPU source data registers (F0:F31) (Register Direct)
FSR, FSRH, FCR, FEAR 1(2)FPU special (control & status) coprocessor registers (Register Direct)
labelTranslates to a literal representing the location of the label name
lit11-bit unsigned literal (0:1)
lit33-bit unsigned literal (0:7)
lit55-bit unsigned literal (0:31)
lit66-bit unsigned literal (0:63)
lit88-bit unsigned literal (0:255)
lit1616-bit unsigned literal (0:65535)
lit2424-bit unsigned literal (0:1677215; LSb must be 0 if an address)
lit3232-bit unsigned literal (0:4294967295)
noneField does not require an entry and may be blank
OA, OB, SA, SBDSC status bits: ACCA Overflow, ACCB Overflow, ACCA Saturate, ACCB Saturate
PCProgram Counter
RdoDestination Working register
RndInstruction rounding mode [E, Z, P, N]
RsoSource Working register
Slit6Signed 6-bit literal (-32:31)
Slit7Signed 7-bit literal (-64:63)
Slit8Signed 8-bit literal (-128:127)
Slit20Signed 20-bit literal (-524288:524287)
SRStatus Register
text1 {text2, {text3,…}text1 must be in the set of text2, text3, ...
vSelects MULxxx operand data types
WbBase Working register
WdDestination Working register
WmOne of 16 Working registers (W0:W15)
WnBoth source and destination Working register (W0:W15)
WndOne of 16 destination Working registers
WnsOne of 16 source Working registers
Wm * WmMultiplicand and Multiplier Working register for Square instructions
Wm * WnMultiplicand and Multiplier W register for DSP instructions
WsSource Working register
WxX data space fetch address register for DSP instructions
WyY data space fetch address register for DSP instructions
Note:
  1. The range of each symbol is instruction-dependent.
  2. Only applicable when the FPU coprocessor is present.
  3. Read and Read-Modify-Write (RMW) operations on non-CPU Special Function Registers require additional cycles when updating SFRs belonging to peripherals on different peripheral clock speeds. The bus speed should be taken into consideration on time sensitive writes.
Table 38-2. Instruction Set Overview
Base

Instr #

Assembly

Mnemonic

Assembly SyntaxDescription# of Words# of Cycles(1)Status Flags Affected
1ABSABS Fs, FdAbsolute value of Fs (FPU Instr)11SUBO
2ADDADD AAdd Accumulators0.51OA, SA, OB, SB
ADD Rso,#Slit6, A16-bit Signed Add to Accumulator11OA, SA, OB, SB
ADD f,Wnf = f + Wn11C, N, OV, Z
ADD f,Wn,WnWn = f + Wn11C, N, OV, Z
ADD.l #lit5,WnWn = Wn + lit50.51C, N, OV, Z
ADD #lit16,WnWn = Wn + lit160.5/11C, N, OV, Z
ADD Wb,Ws,WdWd = Wb + Ws11C, N, OV, Z
ADD Wb,#lit7,WdWd = Wb + lit7 (literal zero-extended)11C, N, OV, Z
ADD Fb, Fs, FdFd = Fb + Fs (FPU Instr) SUBO, INX, UDF, OVF, INVAL
3 ADDCADDC f,Wnf = f + Wn + (C)11C, N, OV, Z
ADDC f,Wn,WnWn = f + Wn + (C)11C, N, OV, Z
ADDC #lit16,WnWn = Wn + lit16 + (C)11C, N, OV, Z
ADDC Wb,Ws,WdWd = Wb + Ws + (C)0.5/11C, N, OV, Z
ADDC Wb,#lit7,WdWd = Wb + lit7 + (C)(literal zero-extended)11C, N, OV, Z
4 ANDAND f,Wnf = f .AND. Wn11N, Z
AND f,Wn,WnW0 = f .AND. Wn11N, Z
AND #lit16,WnWn = Wn .AND. lit1611N, Z
AND Wb,Ws,WdWd = Wb .AND. Ws0.5/11N, Z
AND Wb,#lit7,WdWd = Wb .AND. Lit7 (literal zero-extended)11N, Z
AND1 Wb,#lit7,WdWd = Wb .AND. Lit7 (literal zero-extended)11N, Z
AND #lit16, FSRFSR = FSR AND lit16 (FPU instr)11SUBO, HUGI, INX, UDF, OVF, DIV0, INVAL
AND #lit16, FCRFCR = FCR AND lit16 (FPU instr)11None
AND #lit16, FEARFEAR = FEAR AND lit16 (FPU instr)11None
5 ASRASR ff = Arithmetic Right Shift f by 111N, Z
ASR f,WnWn = Arithmetic Right Shift f by 111N, Z
ASR Ws,WdWd = Arithmetic Right Shift Ws by 10.5/11N, Z
ASR Ws,Wb,WdWnd = Arithmetic Right Shift Ws by Wb0.5/11N, Z
ASR Ws,lit5,WdWnd = Arithmetic Right Shift Ws by lit50.5/11N, Z
6 ASRMASRM Ws, #lit5, WndWnd = Arithmetic Right Shift Ws by lit5, then logically OR with next lsw12N, Z
ASRM Ws, Wb, WndWnd = Arithmetic Right Shift Ws by Wb, then logically OR with next lsw12N, Z
7 BCLRBCLR.b f,bit3Bit Clear f11None
BCLR Ws,bit4Bit Clear Ws0.5/11None
8 BFEXTBFEXT bit4,wid5,Ws,WbBit Field Extract from Ws to Wb11None
BFEXT bit4,wid5,f,WbBit Field Extract from f to Wb22None
9 BFINSBFINS bit4,wid5,Wb,WsBit Field Insert from Wb into Ws11None
BFINS bit4,wid5,Wb,fBit Field Insert from Wb into f22None
BFINS bit4,wid5,#lit8,WsBit Field Insert lit8 into Ws22None
10BOOTSWPBOOTSWPSwap the Active and Inactive Program Flash Space12None
11BRABRA LabelBranch Unconditionally11None
BRA WnComputed Branch12None
BRA C,LabelBranch if Carry11(2/3)None
BRA GE,LabelBranch if greater than or equal11(2/3)None
BRA GEU,LabelBranch if unsigned greater than or equal11(2/3)None
BRA GT,LabelBranch if greater than11(2/3)None
BRA GTU,LabelBranch if unsigned greater than11(2/3)None
BRA LE,LabelBranch if less than or equal11(2/3)None
BRA LEU,LabelBranch if unsigned less than or equal11(2/3)None
BRA LT,LabelBranch if less than11(2/3)None
BRA LTU,LabelBranch if unsigned less than11(2/3)None
BRA N,LabelBranch if Negative11(2/3)None
BRA NC,LabelBranch if Not Carry11(2/3)None
BRA NN,LabelBranch if Not Negative11(2/3)None
BRA NOV,LabelBranch if Not Overflow11(2/3)None
BRA NZ,LabelBranch if Not Zero11(2/3)None
BRA Z,LabelBranch if Zero11(2/3)None
BRA OA,LabelBranch if accumulator A overflow11(2/3)None
BRA OB,LabelBranch if accumulator B overflow11(2/3)None
BRA OV,LabelBranch if Overflow11(2/3)None
BRA SA,LabelBranch if accumulator A saturated11(2/3)None
BRA SB,LabelBranch if accumulator B saturated11(2/3)None
12BREAKBREAKStop User Code Execution11None
13 BSETBSET.b f,bit3Bit Set f11None
BSET Ws,bit4Bit Set Ws0.5/11None
14 BSW BSW.C Ws,WbWrite C or Z bit to Ws<Wb>11None
BSW.Z Ws,WbWrite C or Z bit to Ws<Wb>0.5/11None
15 BTGBTG.b f,bit3Bit Toggle f11None
BTG Ws,bit4Bit Toggle Ws0.5/11None
16BTSC Not supported N/A
17BTSS Not supported N/A
18 BTST BTST.b f,bit3Bit Test f11Z
BTST.C Ws,bit4Bit Test Ws to C0.5/11C, Z
BTST.Z Ws,bit4Bit Test Ws to Z11Z
BTST.C Ws,WbBit Test Ws<Wb> to C0.5/11C, Z
BTST.Z Ws,WbBit Test Ws<Wb> to Z11Z
19 BTSTS BTSTS.b f,bit3Bit Test then Set f11Z
BTSTS.C Ws,bit4Bit Test Ws to C then Set0.5/11C, Z
BTSTS.Z Ws,bit4Bit Test Ws to Z then Set11Z
20CALLCALL LabelCall subroutine (label > ~ 16MB)11None
Call subroutine (label < ~ 16MB)22None
CALL WnsCall indirect subroutine at address [W11]12None
21 CLR CLR ff = 0x0000 000011None
CLR WdWd = 0x0000 000011None
CLR AClear Accumulator0.51None
21CLRWDTCLRWDTClear Watchdog Timer0.51WDTO, Sleep
22COMCOM ff = f11N, Z
COM f,WdWd = f11N, Z
COM Ws,WdWd = Ws0.5/11N, Z
23CPCP f,WsCompare f with Ws11C, N, OV, Z
CP Ws,#lit13Compare Ws with lit13 (literal zeroextended)11C, N, OV, Z
CP Wb,#lit16Compare Wb with lit16 (literal zeroextended)11C, N, OV, Z
CP Wb, WsCompare Wb with Ws0.5/11C, N, OV, Z
24CP0CP0 fCompare f with 0x0000 000011C, N, OV, Z
CP0 WsCompare Ws with 0x0000 0000 (substitute CPLS Ws ,#0)11C, N, OV, Z
25CPBCPB f,WsCompare f with Ws, with borrow11C, N, OV, Z
CP Wb,#lit13Compare Wb with lit13, with borrow (literal zero-extended)11C, N, OV, Z
CP Wb,#lit16Compare Wb with lit16, with borrow (literal zero-extended)11C, N, OV, Z
CPB Wb,WsCompare Borrow Wb with Ws0.5/11C, N, OV, Z
CPSEQNot supportedN/A
CPBEQNot supportedN/A
CPSGTNot supportedN/A
CPBGTNot supportedN/A
CPSNENot supportedN/A
26CTXTSWPCTXTSWP #lit3Swap to CPU register context defined by lit30.52None
CTXTSWP WnSwap to CPU register context defined in Wn[2:0]12None
27DAW Not supported N/A
28 DEC DEC ff = f -111C, N, OV, Z
DEC f,WdW5 = f -111C, N, OV, Z
DEC Ws,WdWd = Ws - 111C, N, OV, Z
29 DEC2 DEC2 ff = f -211C, N, OV, Z
DEC2 f,WdW5 = f -211C, N, OV, Z
DEC2 Ws,WdWd = Ws - 211C, N, OV, Z
30DISI Not supported N/A
31 DISICTL DISICTL #lit3 {,Wd}Disable interrupts at IPL <= lit3 Optionally save prior IPL threshold to Wd11None
DISICTL Wns {,Wd}Disable interrupts at IPL <= Wns[2:0] Optionally save prior IPL threshold to Wd11None
32DIVFDIVF Wm/WnInterruptible Signed 16/16 or 32/16 Fractional Divide11C, N, OV, Z
33DIVFLDIVFL Wm/WnInterruptible Signed 32/32 Fractional Divide11C, N, OV, Z
34DIVSDIVS.w Wm/WnInterruptible Signed 16/16-bit Integer Divide11C, N, OV, Z
DIVS.l Wm/WnInterruptible Signed 32/16-bit Integer Divide11C, N, OV, Z
35DIVSLDIVSL Wm/WnInterruptible Signed 32/32 Integer Divide11C, N, OV, Z
36DIVUDIVU.w Wm/WnInterruptible Unsigned 16/16-bit Integer Divide11C, N, OV, Z
DIVU.l Wm/WnInterruptible Unsigned 32/16-bit Integer Divide11C, N, OV, Z
37DIVULDIVUL Wm/WnInterruptible Unsigned 32/32 Integer Divide11C, N, OV, Z
38DIV2 Not supported N/A
39DTBDTB Wn,LabelDecrement Wn, then branch if not zero11(2/3)None
40DO Not supported N/A
41EDED Wxp * Wyp, A, AWBEuclidean Distance12OA, SA, OB, SB
42EDACEDAC Wxp * Wyp, A, AWBEuclidean Distance Accumulate12OA, SA, OB, SB
43EXCHEXCH Wns,WndSwap Wns with Wnd12None
44FBCLFBCL Ws,WndFind Bit Change from Left (MSb) Side11C
45FF1LFF1L Ws,WndFind First One from Left (MSb) Side11C
46FF1RFF1R Ws,WndFind First One from Right (LSb) Side11C
47FLIMFLIM Wb, WsForce Data (Upper and Lower) Range Limit without Limit Excess Result12N, Z, OV
FLIM Wb, Ws, WdForce Data (Upper and Lower) Range Limit with Limit Excess Flag (Wd=-1)12N, Z, OV
FLIM.V Wb, Ws, WdForce Data (Upper and Lower) Range Limit with Limit Excess Result12N, Z, OV
48GOTOGOTO LabelGoto address (address < ~ 16MB)12None
GOTO Label(label < ~ 16MB)22None
GOTO WnGo to indirect address at [W11]12None
49INCINC ff = f + 111C, N, OV, Z
INC f,WdW5 = f + 111C, N, OV, Z
INC Ws,WdWd = Ws + 111C, N, OV, Z
50 INC2 INC2 ff = f + 211C, N, OV, Z
INC2 f,WdW5 = f + 211C, N, OV, Z
INC2 Ws,WdWd = Ws +211C, N, OV, Z
51 IOR IOR f,Wnf = f .IOR. Wn11N, Z
IOR f,Wn,WnWn = f .IOR. Wn11N, Z
IOR #lit16,WnWn = Wn .IOR. lit1611N, Z
IOR Wb,Ws,WdWd = Wb .IOR. Ws0.5/11N, Z
IOR Wb,#lit7,WdWd = Wb .IOR. lit711N, Z
52 LACLAC Rso,#Slit6, ALoad Accumulator (16/32-bit), literal shift11OA, SA, OB, SB
LLACLLAC.l Rso,#Slit6, ALoad Lower (LSw) of Accumulator (32-bit), literal shift11OA, SA, OB, SB
LAUCLUAC.l Rso,#Slit6, ALoad Upper (LSb) of Accumulator (32-bit), literal shift11OA, SA, OB, SB
53LNKLNK #lit16Link frame pointer11None
LNK #lit7Link frame pointer (literal < 128)0.51None
54LSRLSR ff = Logical Right Shift f by 111C,N,Z
LSR f,WdWd = Logical Right Shift f by 111C,N,Z
LSR Ws,WdWd = Logical Right Shift Ws by 10.5/11C,N,Z
LSR Ws,Wb,WdWnd = Logical Right Shift Ws by Wns0.5/11C,N,Z
LSR Ws,#lit5,WdWnd = Logical Right Shift Ws by lit50.5/11N,Z
LSRM Ws,#lit5, WndWnd = Logical Right Shift Ws by lit5, then logically OR with next lsw12N,Z
LSRM Ws, Wb, WndWnd = Logical Right Shift Ws by Wb, then logically OR with next lsw12N,Z
55MACMAC Wxp * Wyp, A, AWBMultiply and Accumulate11OA, SA, OB, SB
56MAXMAX Wb, WsForce Data Maximum Range Limit11OA, SA, OB, SB
MAX AForce Data Maximum Range Limit0.51N, Z, OV
MAX.V A, RdoForce Data Maximum Range Limit with Result12N, Z, OV
57 MIN MIN Wb, WsForce Data Minimum Range Limit11N, Z, OV
MIN AForce Data Minimum Range Limit0.51N, Z, OV
MIN.V A, RdoForce Data Minimum Range Limit with Result12N, Z, OV
58 MOVMOV Rso,RdoMove Ws to Wd0.5/11None
MOV.l #lit32,WndMove 32-bit unsigned literal to Wnd22None
MOV.sl #lit24,WndMove 24-bit unsigned literal to Wnd; 0 extend to 32-bits11None
MOV.w #lit16,WndMove 16-bit unsigned literal to Wnd; 0 extend to 32-bits11None
MOV.bz #lit8,WndMove 8-bit unsigned literal to Wnd; 0 extend to 32-bits11None
MOV.l [W15-#lit7], Wnd [W14+#slit7], WndMove from system stack with literal offset to Wnd using SP or FP0.51None
MOV.l Wns, [W15-#lit7] Wns, [W14+#slit7]Move from Wns to system stack with literal off-set using SP or FP0.51None
MOV.l f,WndMove f to Wnd (Word or Long Word)(f < ~1MB)11None
MOV.w f,WndMove f to Wnd (Word or Long Word)(f > ~1MB)22None
MOV.b f,WndMove f to Wnd (Byte)11None
MOV.l Wns,fMove Wns to f (Word or Long Word)(f < ~1MB)11None
MOV.w Wns,fMove Wns to f (Word or Long Word)(f > ~1MB)22None
MOV.b Wns,fMove Wns to f (Byte)11None
MOV [Wns+#Slit12],WndMove [Wns+Slit12] to Wnd11None
MOV Wns,[Wnd+#Slit12]Move Wns to [Wnd+Slit12]11None
MOVIF.l CC, Wb, Wns, WdIf SR.Z=1 Move W1 to [W15++] Else Move W2 to [W15++]11None
MOVIF.w CC, Wb, Wns, WdIf SR.Z=1 Move W1 to [W15++] Else Move W2 to [W15++]11None
MOVIF.bz CC, Wb, Wns, WdIf SR.Z=1 Move W1 to [W15++] Else Move W2 to [W15++]11None
MOVIF.b CC, Wb, Wns, WdIf SR.Z=1 Move W1 to [W15++] Else Move W2 to [W15++]11None
MOVR.lMove Ws to Wd with destination Bit Reversed11None
MOVR.wMove Ws to Wd with destination Bit Reversed11None
MOVS.l #slit16, WdMove signed extended 16-bit literal to Wd11None
MOVS.w #slit16, WdMove 16-bit literal to Wd; sign extend to 32-bits if register direct mode.11None
MOVS.b #slit8, WndMove 8-bit literal to Wd; no extension.11None
59MOVPAGNot supportedN/A
60MOVSACNot supportedN/A
61MPYMPY Wxp * Wyp, A, AWBMultiply Wm by Wn to Accumulator11OA, SA, OB, SB
62MPYNMPYN Wxp * Wyp, A, AWB(negative)(Multiply Wm by Wn) to Accumulator11OA, SA, OB, SB
63MSCMSC Wxp * Wyp, A, AWBMultiply and Subtract from Accumulator11OA, SA, OB, SB
65 MULMUL f, WnW2 = f * Wn11None
MULISS Wb,Ws,AInteger: Acc(A or B) = signed(Wb) * signed(Ws)11None
MULFSS Wb,Ws,AFractional: Acc(A or B) = signed(Wb) * signed(Ws)11None
MULISU Wb,Ws,AInteger: Acc(A or B) = signed(Wb) * unsigned(Ws)11None
MULFSU Wb,Ws,AFractional: Acc(A or B) = signed(Wb) * unsigned(Ws)11None
MULIUS Wb,Ws,AInteger: Acc(A or B) = unsigned(Wb) * signed(Ws)11None
MULFUS Wb,Ws,AFractional: Acc(A or B) = unsigned(Wb) * signed(Ws)11None
MULIUU Wb,Ws,AInteger: Acc(A or B) = unsigned(Wb) * unsigned(Ws)11None
MULFUU Wb,Ws,AFractional: Acc(A or B) = unsigned(Wb) * unsigned(Ws)11None
MULISS Wb,#slit8,AInteger: Acc(A or B) = signed(Wb) * signed(slit8)11None
MULFSS Wb,#slit8,AInteger: Acc(A or B) = signed(Wb) * signed(slit8)11None
MULISU Wb,#lit8,AInteger: Acc(A or B) = signed(Wb) * unsigned(lit8)11None
MULFSU Wb,#lit8,AInteger: Acc(A or B) = signed(Wb) * unsigned(lit8)11None
MULIUS Wb,#slit8,AInteger: Acc(A or B) = signed(Wb) * signed(slit8)11None
MULFUS Wb,#slit8,AInteger: Acc(A or B) = signed(Wb) * signed(slit8)11None
MULIUU Wb,#lit8,AInteger: Acc(A or B) = signed(Wb) * unsigned(lit8)11None
MULFUU Wb,#lit8,AInteger: Acc(A or B) = signed(Wb) * unsigned(lit8)11None
MULSS Wb,Ws,Wnd{Wd}=signed(Wb) * signed(Ws)0.5/11None
MULSU Wb,Ws,Wnd{Wd}=signed(Wb) * unsigned(Ws)0.5/11None
MULUS Wb,Ws,Wnd{Wd}=unsigned(Wb) * signed(Ws)0.5/11None
MULUU Wb,Ws,Wnd{Wd}=unsigned(Wb) * unsigned(Ws)0.5/11None
MULSU Wb,#lit8,Wnd{Wd}=signed(Wb) * unsigned(lit8)11None
MULUU Wb,#lit8,Wnd{Wd}=unsigned(Wb) * unsigned(lit8)11None
MULSS Wb,#slit8,Wnd{Wd}=signed(Wb) * signed(slit8)11None
MULUS Wb,#slit8,Wnd{Wd}=unsigned(Wb) * signed(slit8)11None
66 NEG NEG ANegate Accumulator11OA, SA, OB, SB
NEG ff = f +111OA, SA, OB, SB
NEG f,WdWd = f + 111OA, SA, OB, SB
NEG Ws,WdWd = Ws + 111OA, SA, OB, SB
67NEOPNEOPNone executable NOP (16-bit instruction pad)0.50None
68NOPNOPNo Operation11None
NOPRNo Operation11None
69NORMNORM A, RdoNormalize Accumulator11N,OV,Z
70POPPOP fPop f from top of stack (TOS)11None
POP {[--Ws],} WndPop Wnd Register from system stack.0.51None
POP FdPop Fd Register from system stack.0.51None
71PUSHPUSH fPush f to top of stack (TOS)11None
PUSH Wns, {[Wd++]}Push Wns Register to system stack0.51None
PUSH FsPush Fs Register to system stack0.51None
72PWRSAVPWRSAV modeGo into sleep mode0.52WDTO, Sleep
RCALLRCALL LabelRelative Call11None
RCALL WnsComputed Call12None
73REPEATREPEAT #lit15Repeat Next Instruction lit15+1 times11RA (if lit15 > 0)
REPEAT #lit5Repeat Next Instruction lit5+1 times0.51RA (if lit5 > 0)
REPEAT WnRepeat Next Instruction (Wn)+1 times11RA (if Wn > 0)
74RESETRESETSoftware Device Reset11None
75RETFIERETFIEReturn from interrupt enable14None
76RETLW lit16,WnRETLW #lit16,WnReturn from Subroutine with literal in Wn13None
77RETURNRETURNReturn from Subroutine0.53None
78 RLC RLC ff = Rotate Left through Carry f11C, N, Z
RLC f,WdWd = Rotate Left through Carry f11C, N, Z
RLC Ws,WdWd = Rotate Left through Carry Ws0.5/11C, N, Z
79 RLNC RLNC ff = Rotate Left (No Carry) f11N, Z
RLNC f,WdWd = Rotate Left (No Carry) f11N, Z
RLNC Ws,WdWd = Rotate Left (No Carry) Ws0.5/11N, Z
80 RRC RRC ff = Rotate Right through Carry f11C, N, Z
RRC f,WdWd = Rotate Right through Carry f11C, N, Z
RRC Ws,WdWd = Rotate Right through Carry Ws0.5/11C, N, Z
81 RRNC RRNC ff = Rotate Right (No Carry) f11N, Z
RRNC f,WdWd = Rotate Right (No Carry) f11N, Z
RRNC Ws,WdWd = Rotate Right (No Carry) Ws0.5/11N, Z
82 SAC SAC A,#Slit6,RdoStore Accumulator (16/32-bit)11None
SACR A,#Slit6,RdoStore Rounded Accumulator (16/32-bit), literal shift11None
SACRW A,Ws,RdoStore Rounded Accumulator (16/32-bit), Wb shift11None
83SESE Rso,WndWd = sign-extended Ws0.5/11C, N, Z
84SETMSETM ff = 0xFFFF FFFF11None
SETM WdWd = 0xFFFF FFFF11None
85SFTACSFTAC A,WnArithmetic Shift by (Wn) Accumulator11OA, SA, OB, SB
SFTAC A,#Slit7Arithmetic Shift by Slit7 Accumulator11OA, SA, OB, SB
86SLSL ff = Left Shift f by 111C, N, Z
SL f,WdWd = Left Shift f by 111C, N, Z
SL Ws,WdWd = Left Shift Ws by 10.5/11C, N, Z
SL Ws,Wb,WndWnd = Left Shift Wb by Wns0.5/11C, N, Z
SL Ws,#lit5,WndWnd = Left Shift Ws by lit50.5/11C, N, Z
SLMSLM Ws, #lit5, WndWnd = Left Shift Wb by lit5, then logically OR with next msw12Z
SLM Ws, Wb, WndWnd = Left Shift Wb by Wb, then logically OR with next msw12Z
87SLACSLAC.l A,#Slit6,RdoStore Lower (lsw of) Accumulator (32-bit), literal shift11None
88SUACSUAC.l A,#Slit6,RdoStore sign extended Upper (MSB) Accumulator (32- bit), literal shift11None
89SUBSUB ASubtract Accumulators0.51OA, SA, OB, SB
SUB Rso,#Slit6, A16-bit Signed Subtract from Accumulator11OA, SA, OB, SB
SUB f,Wnf = f - Wn11C, N, OV, Z
SUB f,Wn,WnWn = f - Wn11C, N, OV, Z
SUB.l #lit5,WnWn = Wn - lit50.51C, N, OV, Z
SUB #lit16,WnWn = Wn - lit1611C, N, OV, Z
SUB Wb,Ws,WdWd = Wb - Ws0.5/11C, N, OV, Z
SUB Ws,#lit7,WdWd = Ws - lit7 (literal zero-extended)11C, N, OV, Z
90SUBBSUBB f,Wnf = f - Wn - (C)11C, N, OV, Z
SUBB f,Wn,WnWn = f - Wn - (C)11C, N, OV, Z
SUBB #lit16,WnWn = Wn - lit16 - (C)11C, N, OV, Z
SUBB Wb,Ws,WdWd = Wb - Ws - (C)0.5/11C, N, OV, Z
SUBB Ws,#lit7,WdWd = Ws - lit7 - (literal zero-extended)11C, N, OV, Z
91SUBRSUBR f,Wnf = Wn - f11C, N, OV, Z
SUBR f,Wn,WnWn = Wn - f11C, N, OV, Z
SUBR Wb,Ws,WdWd = Ws - Wb0.5/11C, N, OV, Z
SUBR Ws,#lit7,WdWd = lit7 - Ws (literal zero-extended)0.5/11C, N, OV, Z
92SUBBRSUBBR f,Wnf = Wn - f - (C)11C, N, OV, Z
SUBBR f,Wn,WnWn = Wn -f - (C)11C, N, OV, Z
SUBBR Wb,Ws,WdWd = Ws - Wb - (C)0.5/11C, N, OV, Z
SUBBR Ws,#lit7,WdWd = lit7 - Ws - (C) (literal zero-extended)11C, N, OV, Z
93SWAPSWAP WnWn = Word or byte swap Wn11None
94SQRSQR Wxp, A, AWBSquare to Accumulator11OA, SA, OB, SB
95SQRACSQRAC Wxp, A, AWBSquare and Accumulate11OA, SA, OB, SB
96SQRNSQRN Wxp, A, AWBNegated Square to Accumulator11OA, SA, OB, SB
97SQRSCSQRSC Wxp, A, AWBSquare and Subtract from Accumulator11OA, SA, OB, SB
98TBLRDHNot supportedN/A
99TBLRDLNot supportedN/A
100TBLWTHNot supportedN/A
101TBLWTL Not supported N/A
102TSTTST fTest f11N, Z
TST f,WndTest f and move f to Wnd11N, Z
103ULNKULNKUnlink frame pointer11None
104XORXOR f,Wnf = f .XOR. Wn11N, Z
XOR f,Wn,WnWn = f .XOR. Wn11N, Z
XOR lit16,WnWn = Wn .XOR. lit1611N, Z
XOR Wb,Ws,WdWd = Wb .XOR. Ws0.5/11N, Z
XOR Wb,lit7,WdWd = Wb .XOR. Lit7 (literal zero-extended)11N, Z
105ZEZE Rso,WndWd = Zero-extend Ws0.5/11C, N, Z
Note:
  1. Read and Read-Modify-Write (e.g., bit operations and logical operations) on non-CPU SFRs incur an additional instruction cycle.
  2. For PIC32AK1216GC41064 devices, the divide instructions must be preceded with a “REPEAT #5” instruction, such that they are executed six consecutive times.