Reference Tables for C2xLP Code Migration Topics
D-11C2xLP Migration Guidelines
Table D−6. C2xLP and C28x Differences in Interrupts (Continued)
C28xC2xLPMigration topic
8 Interrupt enable and return
from function call
CLRC INTM
next_instn
next_instn
CLRC INTM
9 Interrupts Vector Uses Branch statements at the
vector address.
Ex: B Start ;assembly
;code
;
opcode in memory
0x7980 ;branch
;instruction
0x0040 ;branch
;address
32−bit absolute addresses.
; code in vector location
0x0040 (low address)
0x003F (high address)
10 Context save No automatic context save
See section D.3 for a full context
save/restore example
Automatic context save of CPU regis-
ters T, ST0, AH, AL, PH, PL, AR1,
AR0, DP, ST1, DBGSTAT, IER, PC
See Table D−5 for a full context save/
restore example
Table D−7. C2xLP and C28x Differences in Status Registers
Migration topic C2xLP C28x
1 Saving ST0/ST1 registers Save:
SST #0,mem ;store ST0
SST #1,mem ;store ST1
Restore:
LST #0,mem ;load ST0
LST #1,mem ;load ST1
Save:
PUSH ST ;store ST0 to stack
PUSH ST ;store ST1 to stack
Restore:
POP ST1 ;load ST1
;from stack
POP ST0 ;load ST0
;from stack
2
ST0/ST1 bit differences ST0/ST1 bits have CPU registers
and status bits
ST0/ST1 bits are rearranged
compared to C2xLP registers.