EasyManuals Logo

Texas Instruments TMS320C28x User Manual

Texas Instruments TMS320C28x
695 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #133 background imageLoading...
Page #133 background image
Stack Addressing Modes (SP)
5-9C28x Addressing Modes
5.5 Stack Addressing Modes (SP)
AMODE ”loc16/loc32” Syntax Description
0
*−SP[6bit]
32bitDataAddr(31:16) = 0x0000
32bitDataAddr(15:0) = SP 6bit
Note: The 6-bit offset value is subtracted from the current 16-bit SP register val-
ue. The offset value enables 0 to 63 words to be addressed relative to the
current SP register value.
Example(s):
ADD AL,*−SP[5] ; Add 16-bit contents from stack location
; −5 words from top of stack to AL register
MOV *-SP[8],AL ; Store 16-bit AL register to stack location
; -8 words from top of stack
ADDL ACC,*−SP[12] ; Add 32-bit contents from stack location
; −12 words from top of stack to ACC register.
MOVL *-SP[34],ACC ; Store 32-bit ACC register to stack location
; −34 words from top of stack
AMODE ”loc16/loc32” Syntax Description
X *SP++ 32bitDataAddr(31:16) = 0x0000
32bitDataAddr(15:0) = SP
if(loc16), SP = SP + 1
if(loc32), SP = SP + 2
Example(s):
MOV *SP++,AL ; Push contents of 16-bit AL register onto top
; of stack
MOVL *SP++,P ; Push contents of 32-bit P register onto top
; of stack
AMODE ”loc16/loc32” Syntax Description
X *−−SP if(loc16), SP = SP 1
if(loc32), SP = SP 2
32bitDataAddr(31:16) = 0x0000
32bitDataAddr(15:0) = SP
Example(s):
ADD AL,*−−SP ; Pop contents from top of stack and add to 16-bit
; AL register
MOVL ACC,*−−SP ; Pop contents from top of stack and store in
; 32-bit ACC register
Note: This addressing mode can only access the lower 64K of data address space on the C28x device.

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Texas Instruments TMS320C28x and is the answer not in the manual?

Texas Instruments TMS320C28x Specifications

General IconGeneral
BrandTexas Instruments
ModelTMS320C28x
CategoryProcessor
LanguageEnglish

Related product manuals