exp4c54_6.asm

来自「用dsp解压mp3程序的算法」· 汇编 代码 · 共 38 行

ASM
38
字号
****************************************************************************
* exp4c54_6.asm - An assembly program for C5000 CCS simulator
*                  y = sum(0.99) for a total of 256 times in Section 4.6.6
*     
****************************************************************************
* Section allocation
*
	.def	 yl,yh,yg
yl	.usect "vars",1	 ; reserve 1 location for AH
yh	.usect "vars",1  ; reserve 1 location for AL
yg	.usect "vars",1  ; reserve 1 location for guard bits

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

start:
	NOP

add:
	.mmregs
	SSBX SXM	 ; turn-on sign extension
	;SSBX OVM	 ; turn-on Overflow mode
	RSBX OVM	 ; turn-off Overflow mode (allow overflow)
	LD #7FFFh, 16, A
	RPT #254
	ADD #7FFFh,16,A 
	
* Write the result to memory location y

write:
	STH A,*(yh)	 ; y  <- AL
	STL A,*(yl)	 ; yh <- AH
	STH A,-16,*(yg)	 ; yg <- AG
end
	NOP
	B	end	 ; stop here

⌨️ 快捷键说明

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