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

📄 data.asm

📁 很多数字信号处理的源程序哦!是做毕业设计的学生的一个很好的参考!文件有点大。
💻 ASM
字号:
;/******************************************************************************/
;/* exam.asm                                                                   */
;/*                                                                       	   */
;/* This is proprietary information, not to be published -- DIGIPRO DATA   	   */
;/* Copyright (C) 2002, DigiPro Information Co.,Ltd.  All Rights Reserved.     */
;/*                                                                            */
;/* Author: Wu DingMing                                                        */
;/* Date: August 12, 2002                                                      */
;/******************************************************************************/
T		.set	00EH
BRC		.set    01AH 
SWWSR	.set	028H
CLKMD	.set    058H

PADD	.set    1F00H		;PROGRAM_MEMORY ADDRESS
DADD    .set    2000H		;DATA_MEMORY ADDRESS

		.def 	_main	 
		.def	_c_int00
		.def    _DELAY
		.text
_c_int00:	
		RPT		#1000H
		NOP
		LD 		#40H,DP		
		STM		#4000H ,SP
		ADDM	#7FFH,*(SP)
		ANDM	#0FFFEH,*(SP)
	    SSBX 	INTM					;禁止中断
		STM 	#07FFFH,SWWSR			;置外部等待时间 
		STM		#06004H,CLKMD
		LD		#0FFFFH,A
		CALL	_DELAY
		STM		#087FBH,CLKMD
		LD		#0FFFFH,A
		CALL	_DELAY
		B		_main
		
_main:	CALL	INIT_DATA		;;初始化程序区为0,数据区为0-127
   		NOP
 		NOP	      
        CALL	WRITE_A			;;将1#数据区的内容写到1#程序区
   		NOP
 		NOP	      
        CALL	READ_A 			;;将1#程序区的内容写到2#数据区
 		NOP
 		NOP	      
        CALL	MOVE_DP         ;;将2#数据区的内容写到2#程序区      	
 		NOP
 		NOP	      
        CALL	MOVE_PD			;;将2#程序区的内容写到3#数据区
 		NOP
 		NOP	      
        CALL	MOVE_DD 		;;将3#数据区的内容写到4#数据区
 		NOP
 		NOP	      
   		B		$      
	
_DELAY:	STLM  	A,BRC
		RPTB  	_DELAY1-1
		NOP
		NOP
		NOP
		NOP
_DELAY1:RET       

INIT_DATA:           
		STM		#PADD,AR2      
		RPTZ	A,#03FFH
		STL		A,*AR2+
		NOP
		NOP
		NOP
		LD		#0,A
		
		STM		#DADD,AR2
		STM  	#127,BRC
		RPTB  	_INIT_DATA1-1
		STL 	A,*AR2+
		ADD		#1,0,A
		NOP
		NOP
_INIT_DATA1: 
 		RET          
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; This routine uses the MVDD instruction to move
; information in data memory to other data memory
; locations.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
MOVE_DD:
		STM 	#DADD+100h,AR2 		;Load pointer to source in data memory.
		STM 	#DADD+180h,AR3 		;Load pointer to
								;destination in data memory.
		RPT 	#127			;Move 128 value.
		MVDD 	*AR2+,*AR3+
		RET
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; This routine uses the MVDP instruction to move external
; data memory to internal program memory.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
MOVE_DP:
		STM 	#DADD+80h,AR1 	;Load pointer to source in data memory.
		RPT 	#127 			;Move 128 to program memory space.
		MVDP 	*AR1+,#PADD+80H
		RET
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; This routine uses the MVPD instruction to move external
; program memory to internal data memory.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
MOVE_PD:
		STM 	#DADD+100h,AR1 		;Load pointer to destination in data memory.
		RPT 	#127			;Move 128 words from external
		MVPD 	#PADD+80h,*AR1+ 	;program to internal data memory.
		RET
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; This routine uses the READA instruction to move external
; program memory to internal data memory. This differs
; from the MVPD instruction in that the accumulator
; contains the address in program memory from which to
; transfer. This allows for a calculated, rather than
; pre-determined, location in program memory to be
; specified. READA can access locations in program memory
; beyond 64K word boundary
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
READ_A:
		LD		#PADD,A
		STM 	#DADD+80h,AR1 		;Load pointer to destination in data memory.
		RPT 	#127 			;Move 128 words from external
		READA 	*AR1+	 		;program to internal data memory.
		RET
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; This routine uses the WRITA instruction to move data
; memory to program memory. The calling routine must
; contain the destination program memory address in the
; accumulator. WRITA can access program memory address
; beyond 64K word boundary
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
WRITE_A:
		LD		#PADD,A
		STM 	#DADD,AR1 		;Load pointer to source in data memory.
		RPT 	#127 			;Move 128 words from data
		WRITA 	*AR1+ 			;memory to program memory.
		RET
		.end

⌨️ 快捷键说明

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