exp4c55_7.asm

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

ASM
47
字号
****************************************************************** exp4c55_7.asm - An assembly program for C55x CCS simulator*               Special case of multiplication in Section 4.6.7******************************************************************* Section allocation*	.def	 x,yh,y,initx       .usect 	 "vars",2   ; reserve 2 locations for xy	.usect   "vars",1   ; reserve 1 location for yyh	.usect   "vars",1   ; reserve 1 location for yh	.sect "table"init    .int -32768,-32768	.text		    ; create code section	.def	 start	    ; label of the beginning of codestart	BCLR	C54CM	    ; set C55x native mode	BSET 	SXMD	BSET 	SATD        BSET 	FRCT copy        AMOV	#x,XAR1	    ; XAR1 pointing to x0	AMOV	#init,XAR2  ; XAR2 pointing to table of data	RPT	#1          ; repeat next instruction 2 times        MOV	*AR2+,*AR1+ ; copy 2 data to x    mult	AMOV	#x,XAR1	AMOV	#(x+1),XAR2	MOV 	*AR1<<#16,AC0	MPYM 	*AR2,AC0* Write the result to memory location ywrite:	MOV	AC0,*(#y)       ; y <- AL	MOV 	HI(AC0),*(#yh)	; yh <- AHend	NOP	B	end		; stop here

⌨️ 快捷键说明

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