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

📄 c6_1_1.asm

📁 dsp入门与实践一书的源代码
💻 ASM
字号:
   		.mmregs
   		.def 		main
   		.def 		ad50_data 
spsa0  	.set  	38h   			
spcd0  	.set  	39h  			
dxr10  	.set  	23h   			
drr10  	.set  	21h  			

spcr10  	.set 		00h				
spcr20  	.set 		01h
rcr10   	.set 		02h
rcr20   	.set 		03h
xcr10   	.set 		04h
xcr20   	.set 		05h
srgr10  	.set 		06h
srgr20  	.set 		07h
mcr10  	.set 		08h
mcr20  	.set 		09h
rcera0  	.set 		0ah
rcerb0  	.set 		0bh
xcera0  	.set 		0ch
xcerb0  	.set 		0dh
pcr0    	.set 		0eh   
     	 
k_iptr  	.set 		000111000b<<07	
k_temp  	.set 		1111111b    
data_dp   .usect "filter_vars",0         
   
main:
   stm  		4000h,sp		
   ld   		#0h,dp			

   ldm     	pmst,a				
   and     	#k_temp,a
   or      	#k_iptr,a
   stl     	a,ar6
   mvdm   	ar6,pmst
   nop
   nop
   nop
   stm     	#0ffffh,tcr			
   stm     	#05h,prd			
   stm     	#08e0h,tcr			

   ssbx    	intm				
   ssbx    	sxm
   st      	#2491h,swwsr			
   nop
   nop
   nop
   ssbx    	xf				
   nop						
   nop
   nop
   nop
dss_init:							
   rsbx    cpl 
   nop
   nop
   stm     spcr10,spsa0
   nop
   stm     06h,spcd0 
   nop
   stm     spcr20,spsa0
   nop
   stm     200h,spcd0 
   nop
   stm     pcr0,spsa0
   nop
   stm     0eh,spcd0 
   nop
   stm     rcr10,spsa0
   nop
   stm     40h,spcd0
   nop
   stm     rcr20,spsa0
   nop
   stm     4h,spcd0
   nop
   stm     xcr10,spsa0
   nop
   stm     40h,spcd0
   nop
   stm     xcr20,spsa0
   nop
   stm     4h,spcd0
   nop
   
   ld      #64h,a
   rpt     #50
   nop
   
   stm     spcr10,spsa0
   nop
   stm     07h,spcd0
   nop
   stm     spcr20,spsa0
   nop
   stm     201h,spcd0			
   nop
   rpt     #50
   nop

aic_init:				
   stm    	0h,imr			
   orm    	10h,imr
   stm     	0ffffh,ifr		
   portw   	08h,02h
   nop
   nop
   nop
   call    	wait
waitr$14$:
   stm     	0h,spsa0
   nop
   ldm     	spcd0,a
   nop
   nop
   nop
   and    	#2h,0,a,a		
   bc     	waitr$14$,aeq		
   stm    	#101h,dxr10     	
   call    	wait   
   stm     	0ffffh,ifr

waitr$17$:					
   stm    	0h,spsa0
   nop
   ldm    	spcd0,a 
   nop
   nop
   nop
   and    	#2h,0,a,a
   bc     	waitr$17$,aeq		
   stm    	#210h,dxr10		
   call    	wait
   stm     	0ffffh,ifr

waitr$22$:				
   stm    	0h,spsa0
   nop
   ldm    	spcd0,a 
   nop
   nop
   nop
   and    	#2h,0,a,a
   bc    		waitr$22$,aeq	
   ;stm    	#430h,dxr10      	
   ;stm    	#440h,dxr10      	
   stm    	#400h,dxr10       	
   call    	wait
   stm     	0ffffh,ifr

waitr$24$:				
   stm    	0h,spsa0
   nop
   ldm    	spcd0,a 
   nop
   nop
   nop
   and    	#2h,0,a,a
   bc     	waitr$24$,aeq   	
   stm    	#301h,dxr10		
   call    	wait 

   stm    	#1,ar0
   nop
   stm  		0ffffh,ifr
   nop
   rsbx    	xf
   nop   
   nop
   nop
   ldm   		drr10,a	
   nop				
   stm     	0h,imr
   orm     	10h,imr		
   nop
   nop 
   rsbx   	intm		
wait_data:                      
   nop
   nop
   nop
   nop
   b     		wait_data
   nop
   nop
   nop
   
wait:                       		
   rpt    		#8048		
   nop
   nop
   nop
   ret  				
   nop
   nop
   nop   
   
ad50_data:     					
   ldm   		drr10,a      		
   call  		signal_processing	
   nop
   nop 
   nop
   rete						
   nop
   nop
   stl    		a,dxr10			
   nop 
   nop
   
signal_processing				
   nop						
   ret 						

⌨️ 快捷键说明

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