⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 try1c54.asm

📁 用dsp解压mp3程序的算法
💻 ASM
字号:
******************************************************************
* try1c54.asm - An assembly program for C5000 CCS simulator
*
*     function: y = x0+x1+x2+x3 (needs to be fixed)
******************************************************************
* Section allocation
*
		.def	 x,y,init
x		.usect "vars",8	; reserve 8 locations for x
y		.usect "vars",1	; reserve 1 location for y

		.sect	 "table"
init	.int	 0,5792,8191,5792,0,-5792,-8191,-5792 ; value of x

		.text		; create code section
		.def	 start	; label of the beginning of code



* Copy data to vector x using indirect addressing mode

start:
	NOP
copy:	
	STM	#x,AR1		; AR0 pointing to x0
	RPT	 7           	; repeat next instruction 8 times
	MVPD init,*AR1+ 	; copy 8 data to x
	
* Add the first 4 data using direct addressing mode

add:
	LD	#x,DP		; DP pointing to vector x0
	LD	@x,A		; A <- x0
	ADD	@(x+1),A	; add x1
	ADD	@(x+2),A	; add x2
	ADD	@(x+3),A	; add x3

* Write the result to memory location y

write:
	STL	A,*(y)		; y <- A

end
	NOP
	B	end		; stop here

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -