SHARC (21k) and 68k Register Comparison
ENCM515Home ] Up ] Links to ADSP2106X SHARC Notes for Audio Channel Modeling ] Analog Devices links -- on-line DSP tutorials, technical documents etc ] Help from -- Virtual Laboratory and Online DSP University ] MOVE instruction comparison between 68k and 21k processors ] SHARC -- Delayed Branches Tutorial ] SHARC Navigator Tool (download latest) ] SHARC NAVIGATOR 1.3 -- local copy ] SHARC 2106X Processor -- Quick reference sheet for assembly language programming ] [ SHARC (21k) and 68k Register Comparison ] Student Prediction and Tracking of Learning Progress in an assembly language programming course -- ASEE99 article ] Training on VisualDSP Tool (zip) ]


  68k 21k
Integer Data registers D0 to D7 R0 to R15
Float Data registers Use D0 to D7
F0 to F15
WARNING: F registers occupy same processor space as D registers
Address registers
(called Index registers by Analog Devices)
A1 to A7 I0 to I15
Modify registers Use software
ADDA.L #num, Addreg
SUBA.L #num, Addreg
M0 to M15
Stack Pointer SSP, USP = A7
Points to next used location
(By convention)
Points to next empty location
Frame Pointer A6 or A4
Points to saved old SP
(By convention)
Points to saved old FP?
(By convention)
Return Address Return PC value on the stack at location described by SP Return (PC - 1) on the stack at location described by (SP+1)
Note  1 = 4 bytes
Volatile registers
(called Scratch registers
by Analog Devices)
D0, D1, A0, A1
(By convention)
R0, R1, R2
R4, I4, M4 (S.O.T.T.)
R8 (S.O.T.T.)
R12, I12, M12 (S.O.T.T.)
(By convention)
S.O.T.T. means Some Of The Time
Special Constants/Instructions
for faster operation
Use software or processor hardware
ADDQ.L #num, register
MOVEQ.L #num, register
MOVE.L register, -(SP)
MOVE.L (SP)+, register
M5 = M13 = 0
M6 = M14 = 1
M7 = M15 = -1
(Caused during startup procedure)
Note 1 = 4 bytes (or 6 S.O.T.T)
Non-Volatile registers
(called Compiler Registers
by Analog Devices)
All others All others
Function/Subroutine return values D0 (and if necessary D1) R0 (and if necessary R1)
Passing subroutine/function parameters OUTPAR1 at 0(SP)
OUTPAR2 at 4(SP)
OUTPAR3 at 8(SP)
OUTPAR4 at 12(SP)
Always on the stack (SDS)
OUTPAR1 = R4 (M.O.T.T.)
OUTPAR2 = R8 (M.O.T.T.)
OUTPAR3 = R12 (M.O.T.T)
OUTPAR4 = On stack
M.O.T.T. means Most Of The Time

These pages are best printed with a size 10 font -- Last Modified 06 January, 2002 10:16 PM by M. Smith