📄 dirctaddr.asm
字号:
;
; Project: Experiment 2.10.2 DSP Addressing Mode - Chapter 2
; File name: directAddr.asm
;
; Description: This function uses DSP direct addressing mode
; to initialize an array
;
; For the book "Real Time Digital Signal Processing:
; Implementation and Application, 2nd Ed"
; By Sen M. Kuo, Bob H. Lee, and Wenshun Tian
; Publisher: John Wiley and Sons, Ltd
;
; Tools used: CCS v.2.12.07
; TMS320VC5510 DSK Rev-C
;
* * * * * * * * * * * * * * * * * * * * * * * * * * *
*
* dirctAddr: Direct Addressing Mode
*
* * * * * * * * * * * * * * * * * * * * * * * * * * *
.def _dirctAddr
.ref _x
.text
_dirctAddr
;
; Direct addressing
;
btstclr #14,*(ST1),TC1 ; Turn off CPL bits for direct addressing mode
amov #_x,XDP ; Load direct addressing data-page pointer
.dp _x
mov #9,@_x ; Direct addressing mode
mov #3,@_x +1 ; Initialize x[8]={9,3,2,0,1,9,7,1}
mov #2,@_x+2
mov #0,@_x+3
mov #1,@_x+4
mov #9,@_x+5
mov #7,@_x+6
mov #1,@_x+7
xcc continue,TC1
bset CPL ; Turn CPL bit back on
continue
ret
.end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -