![background image](http://html1.mh-extra.com/html/texas-instruments/tms320c28x/tms320c28x_reference-manual_1097071625.webp)
Code Examples
D-9
C2xLP Migration Guidelines
Table D
−
5. Full Context Save/Restore Comparison
C2xLP Full Context Save/Restore
C28x Full Context Save/Restore
INTx_ISR:
; context save
MAR
*, AR1
MAR
*+
SST
#1,*+
SST
#0,*+
SACH
*+
SACL
*+
SPH
*+
SPL
*+
MPY
#1
SPL
*+
SAR
AR0, *+
SAR
AR2, *+
SAR
AR3, *+
SAR
AR4, *+
SAR
AR5, *+
SAR
AR6, *+
SAR
AR7, *+
.
;interrupt code goes here
.
.
; context restore
MAR
*, AR1
MAR
*−
LAR
AR7, *−
LAR
AR6, *−
LAR
AR5, *−
LAR
AR4, *−
LAR
AR3, *−
LAR
AR2, *−
LAR
AR0, *−
SETC
INTM
MAR
*−
SPM
0
LT
*+
MPY
#1
LT
*−
MAR
*−
LPH
*−
LACL
*−
ADD
*−, 16
LST
#0, *−
LST
#1, *−
CLRC
INTM
RET
;C28x automatically saves the
;following registers:
;T,ST0,AH,AL,PH,PL,AR1,AR0,DP,ST1,
;DBGSTAT,IER,PC
INTx_ISR:
;interrupt context save
PUSH AR1H:AR0H
; 32−bit
PUSH
XAR2
; 32−bit
PUSH
XAR3
; 32−bit
PUSH
XAR4
; 32−bit
PUSH
XAR5
; 32−bit
PUSH
XAR6
; 32−bit
PUSH
XAR7
; 32−bit
PUSH
XT
; 32−bit
.
.
;interrupt code goes here
.
.
;interrupt context restore
POP XT
POP
XAR7
POP
XAR6
POP
XAR5
POP
XAR4
POP
XAR3
POP
XAR2
POP
AR1H:AR0H
IRET
Summary of Contents for TMS320C28x
Page 30: ...1 12...
Page 80: ...This page intentionally left blank 2 50 This page intentionally left blank...
Page 269: ...IN loc16 PA 6 112 MOV AL 0 AL 0 UOUT IORegC AL IOspace IORegC AL 10...
Page 308: ...MAXCUL P loc32 6 151 Saturate MOVL Var64 2 ACC Store result into Var64 MOVL Var64 P...
Page 509: ...SUBL ACC P PM 6 352 SUBL ACC P PM ACC S B 11 M X 4 MOVH Y ACC 5 Store Q15 result into Y...
Page 585: ...This page intentionally left blank 7 32 This page intentionally left blank...