Reference Tables for C2xLP Code Migration Topics
9. C2xLP and C28x Differences in Instructions and Registers (Continued)
C28x
C2xLP
Migration topic
4
GREG register
Memory mapped register
Memory mapped register in XINTF
Global Space may or may not be im-
plemented on a particular device.
See the device data sheet for details.
5
ARx registers
ARx registers are 16
−
bit only
LAR AR1, #0FFFFh
ADRK #1
Result:
AR1 = 0x0000h
XARn registers are 32 bits. Some in-
structions access only the lower
16 bits known as ARn
MOV XAR1, #0FFFFh
ADD XAR1,#1
Result:
XAR1 = 0x10000h
6
2s complement subtraction
to ARx
LAR AR1, #0FFFFh
ADRK #0FE
Result:
AR1 = 0xFFFDh
MOV XAR1, #0FFFFh
ADD XAR1,#0FE
Result:
XAR1 = 0x1FFFDh
7
I/O instructions
Supports IN, OUT instructions
Supports IN, OUT,UOUT
I/O Space may or may not be imple-
mented on a particular device. See
the device datasheet for details
.
8
Stack
Uses 8
−
deep Hardware stack
C2xLP Compiler uses AR1 as
Stack Pointer
Uses software stack pointer register
(SP)
Compiler will use SP register, as
stack pointer
9
Program counter
16 bits in size
B 5000h ; Branch to 5000
; address
22 bits in size
The C28x assembler will use special
C2xLP compatible instructions that
force the upper program address
lines to 0x3F thus creating a 16
−
bit
C2xLP compatible PC.
B 0x3F5000 ;
or
XB 5000h
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...