Contents
xi
CHAPTER 15
INSTRUCTION SET REFERENCE
15.1
QUICK LIST OF INSTRUCTIONS ................................................ 15–1
15.2
OVERVIEW ...................................................................................... 15–2
15.3
INSTRUCTION TYPES & NOTATION CONVENTIONS ........ 15–3
15.4
MULTIFUNCTION INSTRUCTIONS .......................................... 15–4
15.4.1
ALU/MAC With Data & Program Memory Read ............... 15–4
15.4.2
Data & Program Memory Read ............................................... 15–6
15.4.3
Computation With Memory Read .......................................... 15–6
15.4.4
Computation With Memory Write.......................................... 15–6
15.4.5
Computation With Data Register Move ................................. 15–7
15.5
ALU, MAC & SHIFTER INSTRUCTIONS ................................... 15–9
15.5.1
ALU Group ................................................................................. 15–9
15.5.2
MAC Group .............................................................................. 15–10
15.5.3
Shifter Group ............................................................................ 15–11
15.6
MOVE: READ & WRITE............................................................... 15–12
15.7
PROGRAM FLOW CONTROL ................................................... 15–14
15.8
MISCELLANEOUS INSTRUCTIONS ........................................ 15–16
15.9
EXTRA CYCLE CONDITIONS ................................................... 15–18
15.9.1
Multiple Off-Chip Memory Accesses ................................... 15–18
15.9.2
Wait States ................................................................................ 15–18
15.9.3
SPORT Autobuffering & DMA .............................................. 15–18
15.10
INSTRUCTION SET SYNTAX ..................................................... 15–19
15.10.1
Punctuation & Multifunction Instructions ........................... 15–19
15.10.2
Syntax Notation Example ....................................................... 15–19
15.10.3
Status Register Notation ......................................................... 15–20
ALU
Add/Add with Carry ................................................................... 15–23
Subtract X-Y/Subtract X-Y with Borrow .................................... 15–25
Subtract Y-X/Subtract Y-X with Borrow .................................... 15–27
AND, OR, XOR .............................................................................. 15–29
Test Bit, Clear Bit, Set Bit, Toggle Bit .......................................... 15–31
Pass/Clear ...................................................................................... 15–33
Negate ........................................................................................... 15–35
NOT ................................................................................................ 15–36
Absolute Value ............................................................................... 15–37
Increment ........................................................................................ 15–38
Decrement ....................................................................................... 15–39
Divide ............................................................................................. 15–40
Generate ALU Status ..................................................................... 15–42