31 Instruction Set Summary

Note: This data sheet summarizes the features of the dsPIC33CK512MPT608 family of devices. It is not intended to be a comprehensive reference source. To complement the information in this data sheet, refer to the related section in the “dsPIC33/PIC24 Family Reference Manual”, which is available from the Microchip website (www.microchip.com).

The dsPIC33CK instruction set is almost identical to that of the dsPIC30F and dsPIC33F.

Most instructions are a single program memory word (24 bits). Only three instructions require two program memory locations.

Each single-word instruction is a 24-bit word, divided into an 8-bit opcode, which specifies the instruction type and one or more operands, which further specify the operation of the instruction.

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

  • 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 dsPIC33 instruction set summary in Table 31-2 lists all the instructions, along with the status flags affected by each instruction.

Most word or byte-oriented 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, word or byte-oriented 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 the W0 register, which is denoted as ‘WREG’

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 or file 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 some of the following operands:

  • A program memory address
  • The mode of the Table Read and Table Write instructions

Most instructions are a single word. Certain double-word instructions are designed to provide all the required information in these 48 bits. In the second word, the eight MSbs are ‘0’s. If this second word is executed as an instruction (by itself), it executes as a NOP.

The double-word instructions execute in two instruction cycles.

Most single-word instructions are executed in a single instruction cycle, unless a conditional test is true or the Program Counter is changed as a result of the instruction, or a PSV or Table Read is performed. 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 either two or three cycles if the skip is performed, depending on whether the instruction being skipped is a single-word or two-word instruction. Moreover, double-word moves require two cycles.

Note: For more details on the instruction set, refer to the “16-Bit MCU and DSC Programmer’s Reference Manual” (www.microchip.com/DS70000157).
Table 31-1. Symbols Used in Opcode Descriptions
FieldDescription
#textMeans literal defined by “text
(text)Means “content of text
[text]Means “the location addressed by text
{ }Optional field or operation
a ∈ {b, c, d}a is selected from the set of values b, c, d
[n:m]Register bit field
.bByte mode selection
.dDouble-Word mode selection
.SShadow register select
.wWord mode selection (default)
AccOne of two accumulators {A, B}
AWBAccumulator Write-Back Destination Address register ∈ {W13, [W13]+ = 2}
bit44-bit bit selection field (used in word-addressed instructions) ∈ {0...15}
C, DC, N, OV, ZMCU Status bits: Carry, Digit Carry, Negative, Overflow, Sticky Zero
ExprAbsolute address, label or expression (resolved by the linker)
fFile register address ∈ {0x0000...0x1FFF}
lit11-bit unsigned literal ∈ {0,1}
lit44-bit unsigned literal ∈ {0...15}
lit55-bit unsigned literal ∈ {0...31}
lit88-bit unsigned literal ∈ {0...255}
lit1010-bit unsigned literal ∈ {0...255} for Byte mode, {0:1023} for Word mode
lit1414-bit unsigned literal ∈ {0...16384}
lit1616-bit unsigned literal ∈ {0...65535}
lit2323-bit unsigned literal ∈ {0...8388608}; LSb must be ‘0
NoneField does not require an entry, can be blank
OA, OB, SA, SBDSP Status bits: ACCA Overflow, ACCB Overflow, ACCA Saturate, ACCB Saturate
PCProgram Counter
Slit1010-bit signed literal ∈ {-512...511}
Slit1616-bit signed literal ∈ {-32768...32767}
Slit66-bit signed literal ∈ {-16...16}
WbBase W register ∈ {W0...W15}
WdDestination W register ∈ { Wd, [Wd], [Wd++], [Wd--], [++Wd], [--Wd] }
WdoDestination W register ∈

{ Wnd, [Wnd], [Wnd++], [Wnd--], [++Wnd], [--Wnd], [Wnd+Wb] }

Wm,WnDividend, Divisor Working register pair (direct addressing)
Wm*WmMultiplicand and Multiplier Working register pair for Square instructions ∈

{W4 * W4,W5 * W5,W6 * W6,W7 * W7}

Wm*WnMultiplicand and Multiplier Working register pair for DSP instructions ∈

{W4 * W5,W4 * W6,W4 * W7,W5 * W6,W5 * W7,W6 * W7}

WnOne of 16 Working registers ∈ {W0...W15}
WndOne of 16 Destination Working registers ∈ {W0...W15}
WnsOne of 16 Source Working registers ∈ {W0...W15}
WREGW0 (Working register used in file register instructions)
WsSource W register ∈ { Ws, [Ws], [Ws++], [Ws--], [++Ws], [--Ws] }
WsoSource W register ∈

{ Wns, [Wns], [Wns++], [Wns--], [++Wns], [--Wns], [Wns+Wb] }

WxX Data Space Prefetch Address register for DSP instructions

∈ {[W8] + = 6, [W8] + = 4, [W8] + = 2, [W8], [W8] - = 6, [W8] - = 4, [W8] - = 2,

[W9] + = 6, [W9] + = 4, [W9] + = 2, [W9], [W9] - = 6, [W9] - = 4, [W9] - = 2,

[W9 + W12], none}

WxdX Data Space Prefetch Destination register for DSP instructions ∈ {W4...W7}
WyY Data Space Prefetch Address register for DSP instructions

∈ {[W10] + = 6, [W10] + = 4, [W10] + = 2, [W10], [W10] - = 6, [W10] - = 4, [W10] - = 2,

[W11] + = 6, [W11] + = 4, [W11] + = 2, [W11], [W11] - = 6, [W11] - = 4, [W11] - = 2,

[W11 + W12], none}

WydY Data Space Prefetch Destination register for DSP instructions ∈ {W4...W7}
Note: In dsPIC33CK512MPT608 devices, read and Read-Modify-Write (RMW) operations on non-CPU Special Function Registers require an additional cycle when compared to dsPIC30F, dsPIC33F, PIC24F and PIC24H devices.
Table 31-2. Instruction Set Overview
Base

Instr #

Assembly

Mnemonic

Assembly SyntaxDescription# of Words# of Cycles(1)Status Flags Affected
1ADDADDAccAdd Accumulators11OA,OB,SA,SB
ADDff = f + WREG11C,DC,N,OV,Z
ADDf,WREGWREG = f + WREG11C,DC,N,OV,Z
ADD#lit10,WnWd = lit10 + Wd11C,DC,N,OV,Z
ADDWb,Ws,WdWd = Wb + Ws11C,DC,N,OV,Z
ADDWb,#lit5,WdWd = Wb + lit511C,DC,N,OV,Z
ADDWso,#Slit4,Acc16-bit Signed Add to Accumulator11OA,OB,SA,SB
2ADDCADDCff = f + WREG + (C)11C,DC,N,OV,Z
ADDCf,WREGWREG = f + WREG + (C)11C,DC,N,OV,Z
ADDC#lit10,WnWd = lit10 + Wd + (C)11C,DC,N,OV,Z
ADDCWb,Ws,WdWd = Wb + Ws + (C)11C,DC,N,OV,Z
ADDCWb,#lit5,WdWd = Wb + lit5 + (C)11C,DC,N,OV,Z
3ANDANDff = f .AND. WREG11N,Z
ANDf,WREGWREG = f .AND. WREG11N,Z
AND#lit10,WnWd = lit10 .AND. Wd11N,Z
ANDWb,Ws,WdWd = Wb .AND. Ws11N,Z
ANDWb,#lit5,WdWd = Wb .AND. lit511N,Z
4ASRASRff = Arithmetic Right Shift f11C,N,OV,Z
ASRf,WREGWREG = Arithmetic Right Shift f11C,N,OV,Z
ASRWs,WdWd = Arithmetic Right Shift Ws11C,N,OV,Z
ASRWb,Wns,WndWnd = Arithmetic Right Shift Wb by Wns11N,Z
ASRWb,#lit5,WndWnd = Arithmetic Right Shift Wb by lit511N,Z
5BCLRBCLRf,#bit4Bit Clear f11None
BCLRWs,#bit4Bit Clear Ws11None
6BFEXTBFEXTbit4,wid5,Ws,WbBit Field Extract from Ws to Wb22None
BFEXTbit4,wid5,f,WbBit Field Extract from f to Wb22None
7BFINSBFINSbit4,wid5,Wb,WsBit Field Insert from Wb into Ws22None
BFINSbit4,wid5,Wb,fBit Field Insert from Wb into f22None
BFINSbit4,wid5,lit8,WsBit Field Insert from #lit8 to Ws22None
8BOOTSWPBOOTSWPSwap the Active and Inactive Program Flash Space12None
9BRABRAC,ExprBranch if Carry11 (4)/1None
BRAGE,ExprBranch if Greater Than or Equal11 (4)/1None
BRAGEU,ExprBranch if unsigned Greater Than or Equal11 (4)/1None
BRAGT,ExprBranch if Greater Than11 (4)/1None
BRAGTU,ExprBranch if Unsigned Greater Than11 (4)/1None
BRALE,ExprBranch if Less Than or Equal11 (4)/1None
BRALEU,ExprBranch if Unsigned Less Than or Equal11 (4)/1None
BRALT,ExprBranch if Less Than11 (4)/1None
BRALTU,ExprBranch if Unsigned Less Than11 (4)/1None
BRAN,ExprBranch if Negative11 (4)/1None
BRANC,ExprBranch if Not Carry11 (4)/1None
BRANN,ExprBranch if Not Negative11 (4)/1None
BRANOV,ExprBranch if Not Overflow11 (4)/1None
BRANZ,ExprBranch if Not Zero11 (4)/1None
BRAOA,ExprBranch if Accumulator A Overflow11 (4)/1None
BRAOB,ExprBranch if Accumulator B Overflow11 (4)/1None
BRAOV,ExprBranch if Overflow11 (4)/1None
BRASA,ExprBranch if Accumulator A Saturated11 (4)/1None
BRASB,ExprBranch if Accumulator B Saturated11 (4)/1None
BRAExprBranch Unconditionally14/2None
BRAZ,ExprBranch if Zero11 (4)/1None
BRAWnComputed Branch14None
10BREAKBREAKStop User Code Execution11None
11BSETBSETf,#bit4Bit Set f11None
Ws,#bit4Bit Set Ws11None
12BSWBSW.CWs,WbWrite C Bit to Ws[Wb]11None
BSW.ZWs,WbWrite Z Bit to Ws[Wb]11None
13BTGBTGf,#bit4Bit Toggle f11None
BTGWs,#bit4Bit Toggle Ws11None
14BTSCBTSCf,#bit4Bit Test f, Skip if Clear11

(2 or 3)

None
BTSCWs,#bit4Bit Test Ws, Skip if Clear11

(2 or 3)

None
15BTSSBTSSf,#bit4Bit Test f, Skip if Set11

(2 or 3)

None
BTSSWs,#bit4Bit Test Ws, Skip if Set11

(2 or 3)

None
16BTSTBTSTf,#bit4Bit Test f11Z
BTST.CWs,#bit4Bit Test Ws to C11C
BTST.ZWs,#bit4Bit Test Ws to Z11Z
BTST.CWs,WbBit Test Ws[Wb] to C11C
BTST.ZWs,WbBit Test Ws[Wb] to Z11Z
17BTSTSBTSTSf,#bit4Bit Test then Set f11Z
BTSTS.CWs,#bit4Bit Test Ws to C, then Set11C
BTSTS.ZWs,#bit4Bit Test Ws to Z, then Set11Z
18CALLCALLlit23Call Subroutine24(2)SFA
CALLWnCall Indirect Subroutine14(2)SFA
CALL.LWnCall Indirect Subroutine (long address)14(2)SFA
19CLRCLRff = 0x000011None
CLRWREGWREG = 0x000011None
CLRWsWs = 0x000011None
CLRAcc,Wx,Wxd,Wy,Wyd,AWBClear Accumulator11OA,OB,SA,SB
20CLRWDTCLRWDTClear Watchdog Timer11WDTO,Sleep
21COMCOMff = f11N,Z
COMf,WREGWREG = f11N,Z
COMWs,WdWd = Ws11N,Z
22CPCPfCompare f with WREG11C,DC,N,OV,Z
CPWb,#lit8Compare Wb with lit811C,DC,N,OV,Z
CPWb,WsCompare Wb with Ws

(Wb – Ws)

11C,DC,N,OV,Z
23CP0CP0fCompare f with 0x000011C,DC,N,OV,Z
CP0WsCompare Ws with 0x000011C,DC,N,OV,Z
24CPBCPBfCompare f with WREG, with Borrow11C,DC,N,OV,Z
CPBWb,#lit8Compare Wb with lit8, with Borrow11C,DC,N,OV,Z
CPBWb,WsCompare Wb with Ws, with

Borrow (Wb – Ws – C)

11C,DC,N,OV,Z
25CPSEQCPSEQWb,WnCompare Wb with Wn,

Skip if =

11

(2 or 3)

None
CPBEQCPBEQWb,Wn,ExprCompare Wb with Wn, Branch if =11 (5)None
26CPSGTCPSGTWb,WnCompare Wb with Wn,

Skip if >

11

(2 or 3)

None
CPBGTCPBGTWb,Wn,ExprCompare Wb with Wn, Branch if >11 (5)None
27CPSLTCPSLTWb,WnCompare Wb with Wn,

Skip if <

11

(2 or 3)

None
CPBLTWb,Wn,ExprCompare Wb with Wn, Branch if <11 (5)None
28CPSNECPSNEWb,WnCompare Wb with Wn,

Skip if ≠

11

(2 or 3)

None
CPBNEWb,Wn,ExprCompare Wb with Wn, Branch if ≠11 (5)None
29CTXTSWPCTXTSWP#1it3Switch CPU Register Context to Context Defined by lit312None
30CTXTSWPCTXTSWPWnSwitch CPU Register Context to Context Defined by Wn12None
31DAW.BDAW.BWnWn = Decimal Adjust Wn11C
32DECDECff = f – 111C,DC,N,OV,Z
DECf,WREGWREG = f – 111C,DC,N,OV,Z
DECWs,WdWd = Ws – 111C,DC,N,OV,Z
33DEC2DEC2ff = f – 211C,DC,N,OV,Z
DEC2f,WREGWREG = f – 211C,DC,N,OV,Z
DEC2Ws,WdWd = Ws – 211C,DC,N,OV,Z
34DISIDISI#lit14Disable Interrupts for k Instruction Cycles11None
35DIVF(2)DIVFWm,WnSigned 16/16-Bit Fractional Divide16N,Z,C,OV
36DIV.S(2)DIV.SWm,WnSigned 16/16-Bit Integer Divide16N,Z,C,OV
DIV.SDWm,WnSigned 32/16-Bit Integer Divide16N,Z,C,OV
37DIV.U(2)DIV.UWm,WnUnsigned 16/16-Bit Integer Divide16N,Z,C,OV
DIV.UDWm,WnUnsigned 32/16-Bit Integer Divide16N,Z,C,OV
38DIVF2(2)DIVF2Wm,WnSigned 16/16-Bit Fractional Divide (W1:W0 preserved)16N,Z,C,OV
39DIV2.S(2)DIV2.SWm,WnSigned 16/16-Bit Integer Divide (W1:W0 preserved)16N,Z,C,OV
DIV2.SDWm,WnSigned 32/16-Bit Integer Divide 
(W1:W0 preserved)16N,Z,C,OV
40DIV2.U(2)DIV2.UWm,WnUnsigned 16/16-Bit Integer Divide 
(W1:W0 preserved)16N,Z,C,OV
DIV2.UDWm,WnUnsigned 32/16-Bit Integer Divide 
(W1:W0 preserved)16N,Z,C,OV
41DODO#lit15,ExprDo Code to PC + Expr,

lit15 + 1 Times

22None
DOWn,ExprDo code to PC + Expr,

(Wn) + 1 Times

22None
42EDEDWm*Wm,Acc,Wx,Wy,WxdEuclidean Distance (no accumulate)11OA,OB,OAB,

SA,SB,SAB

43EDACEDACWm*Wm,Acc,Wx,Wy,WxdEuclidean Distance11OA,OB,OAB,

SA,SB,SAB

44EXCHEXCHWns,WndSwap Wns with Wnd11None
46FBCLFBCLWs,WndFind Bit Change from Left (MSb) Side11C
47FF1LFF1LWs,WndFind First One from Left (MSb) Side11C
48FF1RFF1RWs,WndFind First One from Right (LSb) Side11C
49FLIMFLIMWb, WsForce Data (Upper and Lower) Range Limit without Limit Excess Result11N,Z,OV
FLIM.VWb, Ws, WdForce Data (Upper and Lower) Range Limit with Limit Excess Result11N,Z,OV
50GOTOGOTOExprGo to Address24/2None
GOTOWnGo to Indirect14/2None
GOTO.LWnGo to Indirect (long address)14/2None
51INCINCff = f + 111C,DC,N,OV,Z
INCf,WREGWREG = f + 111C,DC,N,OV,Z
INCWs,WdWd = Ws + 111C,DC,N,OV,Z
52INC2INC2ff = f + 211C,DC,N,OV,Z
INC2f,WREGWREG = f + 211C,DC,N,OV,Z
INC2Ws,WdWd = Ws + 211C,DC,N,OV,Z
53IORIORff = f .IOR. WREG11N,Z
IORf,WREGWREG = f .IOR. WREG11N,Z
IOR#lit10,WnWd = lit10 .IOR. Wd11N,Z
IORWb,Ws,WdWd = Wb .IOR. Ws11N,Z
IORWb,#lit5,WdWd = Wb .IOR. lit511N,Z
54LACLACWso,#Slit4,AccLoad Accumulator11OA,OB,OAB,

SA,SB,SAB

LAC.DWso, #Slit4, AccLoad Accumulator Double12OA,SA,OB,SB
56LNKLNK#lit14Link Frame Pointer11SFA
57LSRLSRff = Logical Right Shift f11C,N,OV,Z
LSRf,WREGWREG = Logical Right Shift f11C,N,OV,Z
LSRWs,WdWd = Logical Right Shift Ws11C,N,OV,Z
LSRWb,Wns,WndWnd = Logical Right Shift Wb by Wns11N,Z
LSRWb,#lit5,WndWnd = Logical Right Shift Wb by lit511N,Z
58MACMACWm*Wn,Acc,Wx,Wxd,Wy,Wyd,AWBMultiply and Accumulate11OA,OB,OAB,

SA,SB,SAB

MACWm*Wm,Acc,Wx,Wxd,Wy,WydSquare and Accumulate11OA,OB,OAB,

SA,SB,SAB

59MAXMAXAccForce Data Maximum Range Limit11N,OV,Z
MAX.VAcc, WndForce Data Maximum Range Limit with Result11N,OV,Z
60MINMINAccIf Accumulator A Less than B Load Accumulator with B or vice versa11N,OV,Z
MIN.VAcc, WdIf Accumulator A Less than B Accumulator Force Minimum Data Range Limit with Limit Excess Result11N,OV,Z
MINZAccAccumulator Force Minimum Data Range Limit11N,OV,Z
MINZ.VAcc, WdAccumulator Force Minimum Data Range Limit with Limit Excess Result11N,OV,Z
61MOVMOVf,WnMove f to Wn11None
MOVfMove f to f11None
MOVf,WREGMove f to WREG11None
MOV#lit16,WnMove 16-Bit Literal to Wn11None
MOV.b#lit8,WnMove 8-Bit Literal to Wn11None
MOVWn,fMove Wn to f11None
MOVWso,WdoMove Ws to Wd11None
MOVWREG,fMove WREG to f11None
MOV.D Wns,WdMove Double from W(ns):W(ns + 1) to Wd12None
MOV.D Ws,WndMove Double from Ws to W(nd + 1):W(nd)12None
62MOVPAGMOVPAG#lit10,DSRPAGMove 10-Bit Literal to DSRPAG11None
MOVPAG#lit8,TBLPAGMove 8-Bit Literal to TBLPAG11None
MOVPAGWs, DSRPAGMove Ws[9:0] to DSRPAG11None
MOVPAGWs, TBLPAGMove Ws[7:0] to TBLPAG11None
64MOVSACMOVSACAcc,Wx,Wxd,Wy,Wyd,AWBPrefetch and Store Accumulator11None
65MPYMPY Wm*Wn,Acc,Wx,Wxd,Wy,WydMultiply Wm by Wn to Accumulator11OA,OB,OAB,

SA,SB,SAB

MPY Wm*Wm,Acc,Wx,Wxd,Wy,WydSquare Wm to Accumulator11OA,OB,OAB,

SA,SB,SAB

66MPY.NMPY.N Wm*Wn,Acc,Wx,Wxd,Wy,Wyd-(Multiply Wm by Wn) to Accumulator11None
67MSCMSCWm*Wm,Acc,Wx,Wxd,Wy,Wyd,AWBMultiply and Subtract from Accumulator11OA,OB,OAB,

SA,SB,SAB

68MULMUL.SSWb,Ws,Wnd{Wnd + 1, Wnd} = Signed(Wb) * Signed(Ws)11None
MUL.SSWb,Ws,AccAccumulator = Signed(Wb) * Signed(Ws)11None
MUL.SUWb,Ws,Wnd{Wnd + 1, Wnd} = Signed(Wb) * Unsigned(Ws)11None
MUL.SUWb,Ws,AccAccumulator = Signed(Wb) * Unsigned(Ws)11None
MUL.SUWb,#lit5,AccAccumulator = Signed(Wb) * Unsigned(lit5)11None
MUL.USWb,Ws,Wnd{Wnd + 1, Wnd} = Unsigned(Wb) * Signed(Ws)11None
MUL.USWb,Ws,AccAccumulator = Unsigned(Wb) * Signed(Ws)11None
MUL.UUWb,Ws,Wnd{Wnd + 1, Wnd} = Unsigned(Wb) * Unsigned(Ws)11None
MUL.UUWb,#lit5,AccAccumulator = Unsigned(Wb) * Unsigned(lit5)11None
MUL.UUWb,Ws,AccAccumulator = Unsigned(Wb) * Unsigned(Ws)11None
MULW.SSWb,Ws,WndWnd = Signed(Wb) * Signed(Ws)11None
MULW.SUWb,Ws,WndWnd = Signed(Wb) * Unsigned(Ws)11None
MULW.USWb,Ws,WndWnd = Unsigned(Wb) * Signed(Ws)11None
MULW.UUWb,Ws,WndWnd = Unsigned(Wb) * Unsigned(Ws)11None
MUL.SUWb,#lit5,Wnd{Wnd + 1, Wnd} = Signed(Wb) * Unsigned(lit5)11None
MUL.SUWb,#lit5,WndWnd = Signed(Wb) * Unsigned(lit5)11None
MUL.UUWb,#lit5,Wnd{Wnd + 1, Wnd} = Unsigned(Wb) * Unsigned(lit5)11None
MUL.UUWb,#lit5,WndWnd = Unsigned(Wb) * Unsigned(lit5)11None
MULfW3:W2 = f * WREG11None
69NEGNEGAccNegate Accumulator11OA,OB,OAB,

SA,SB,SAB

NEGff = f + 111C,DC,N,OV,Z
NEGf,WREGWREG = f + 111C,DC,N,OV,Z
NEGWs,WdWd = Ws + 111C,DC,N,OV,Z
70NOPNOPNo Operation11None
NOPRNo Operation11None
71NORMNORMAcc, WdNormalize Accumulator11N,OV,Z
72POPPOPfPop f from Top-of-Stack (TOS)11None
POPWdoPop from Top-of-Stack (TOS) to Wdo11None
POP.DWndPop from Top-of-Stack (TOS) to 
W(nd):W(nd + 1)12None
POP.SPop Shadow Registers11All
73PUSHPUSHfPush f to Top-of-Stack (TOS)11None
PUSHWsoPush Wso to Top-of-Stack (TOS)11None
PUSH.DWnsPush W(ns):W(ns + 1) to Top-of-Stack (TOS)12None
PUSH.SPush Shadow Registers11None
74PWRSAVPWRSAV #lit1Go into Sleep or Idle mode11WDTO,Sleep
75RCALLRCALLExprRelative Call14/2(2)SFA
RCALLWnComputed Call14/2(2)SFA
76REPEATREPEAT#lit15Repeat Next Instruction

lit15 + 1 Times

11None
REPEATWnRepeat Next Instruction

(Wn) + 1 Times

11None
77RESETRESETSoftware Device Reset11None
78RETFIERETFIEReturn from Interrupt16 (5)/3(2)SFA
79RETLWRETLW#lit10,WnReturn with Literal in Wn16 (5)/3(2)SFA
80RETURNRETURNReturn from Subroutine16 (5)/3(2)SFA
81RLCRLCff = Rotate Left through

Carry f

11C,N,Z
RLCf,WREGWREG = Rotate Left through Carry f11C,N,Z
RLCWs,WdWd = Rotate Left through Carry Ws11C,N,Z
82RLNCRLNCff = Rotate Left (No Carry) f11N,Z
RLNCf,WREGWREG = Rotate Left (No Carry) f11N,Z
RLNCWs,WdWd = Rotate Left (No Carry) Ws11N,Z
83RRCRRCff = Rotate Right through Carry f11C,N,Z
RRCf,WREGWREG = Rotate Right through Carry f11C,N,Z
RRCWs,WdWd = Rotate Right through Carry Ws11C,N,Z
84RRNCRRNCff = Rotate Right (No Carry) f11N,Z
RRNCf,WREGWREG = Rotate Right (No Carry) f11N,Z
RRNCWs,WdWd = Rotate Right (No Carry) Ws11N,Z
85SACSACAcc,#Slit4,WdoStore Accumulator11None
SAC.RAcc,#Slit4,WdoStore Rounded Accumulator11None
SAC.D#Slit4, WdoStore Accumulator Double11None
86SESEWs,WndWnd = Sign-Extended Ws11C,N,Z
87SETMSETMff = 0xFFFF11None
SETMWREGWREG = 0xFFFF11None
SETMWsWs = 0xFFFF11None
88SFTACSFTACAcc,WnArithmetic Shift Accumulator by (Wn)11OA,OB,OAB,

SA,SB,SAB

SFTACAcc,#Slit6Arithmetic Shift Accumulator by Slit611OA,OB,OAB,

SA,SB,SAB

89SLSLff = Left Shift f11C,N,OV,Z
SLf,WREGWREG = Left Shift f11C,N,OV,Z
SLWs,WdWd = Left Shift Ws11C,N,OV,Z
SLWb,Wns,WndWnd = Left Shift Wb by Wns11N,Z
SLWb,#lit5,WndWnd = Left Shift Wb by lit511N,Z
91SUBSUBAccSubtract Accumulators11OA,OB,OAB,

SA,SB,SAB

SUBff = f – WREG11C,DC,N,OV,Z
SUBf,WREGWREG = f – WREG11C,DC,N,OV,Z
SUB#lit10,WnWn = Wn – lit1011C,DC,N,OV,Z
SUBWb,Ws,WdWd = Wb – Ws11C,DC,N,OV,Z
SUBWb,#lit5,WdWd = Wb – lit511C,DC,N,OV,Z
92SUBBSUBBff = f – WREG – (C)11C,DC,N,OV,Z
SUBBf,WREGWREG = f – WREG – (C)11C,DC,N,OV,Z
SUBB#lit10,WnWn = Wn – lit10 – (C)11C,DC,N,OV,Z
SUBBWb,Ws,WdWd = Wb – Ws – (C)11C,DC,N,OV,Z
SUBBWb,#lit5,WdWd = Wb – lit5 – (C)11C,DC,N,OV,Z
93SUBRSUBRff = WREG – f11C,DC,N,OV,Z
SUBRf,WREGWREG = WREG – f11C,DC,N,OV,Z
SUBRWb,Ws,WdWd = Ws – Wb11C,DC,N,OV,Z
SUBRWb,#lit5,WdWd = lit5 – Wb11C,DC,N,OV,Z
94SUBBRSUBBRff = WREG – f – (C)11C,DC,N,OV,Z
SUBBRf,WREGWREG = WREG – f – (C)11C,DC,N,OV,Z
SUBBRWb,Ws,WdWd = Ws – Wb – (C)11C,DC,N,OV,Z
SUBBRWb,#lit5,WdWd = lit5 – Wb – (C)11C,DC,N,OV,Z
95SWAPSWAP.bWnWn = Nibble Swap Wn11None
SWAPWnWn = Byte Swap Wn11None
96TBLRDHTBLRDHWs,WdRead Prog[23:16] to Wd[7:0]15/3None
97TBLRDLTBLRDLWs,WdRead Prog[15:0] to Wd15/3None
98TBLWTHTBLWTHWs,WdWrite Ws[7:0] to Prog[23:16]12None
99TBLWTLTBLWTLWs,WdWrite Ws to Prog[15:0]12None
101ULNKULNKUnlink Frame Pointer11SFA
104XORXORff = f .XOR. WREG11N,Z
XORf,WREGWREG = f .XOR. WREG11N,Z
XOR#lit10,WnWd = lit10 .XOR. Wd11N,Z
XORWb,Ws,WdWd = Wb .XOR. Ws11N,Z
XORWb,#lit5,WdWd = Wb .XOR. lit511N,Z
105ZEZEWs,WndWnd = Zero-Extend Ws11C,Z,N
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 dsPIC33CK512MPT608 devices, the divide instructions must be preceded with a “REPEAT #5” instruction, such that they are executed six consecutive times.