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

📄 flashaccess.asm

📁 DSP 5409 plc应用程序,调试通过,是用在电力线通讯上的演示程序.
💻 ASM
字号:
;==========================================================================================
; Filename:			FlashAccess.asm
;
; Description:		Contains low level code for access to external flash
;
;					the C prototypes are in flash.h
;
; Copyright (C) 2003 Texas Instruments Incorporated
; Texas Instruments Proprietary Information
; Use subject to terms and conditions of TI Software License Agreement
;
; Revision History:
; 01/13/04 JEN		Initial implementation
;==========================================================================================

	.file 	"FlashAccess.asm"

;==========================================================================================
; Function:			FarWrite()		
;
; Description:		Writes data to far program space without the need to compile
;					with a far memory model.
;					
;					The address to write to is passed in the A and the data to write is
;					passed in on the stack.
;
; Revision History:
; 01/13/04 JEN		Initial implementation
;==========================================================================================
	.sect	".text"
	.global	_FarWrite
	.sym 	_FarWrite, _FarWrite, 32, 2, 0
_FarWrite:
		WRITA 	*SP(1)		; write stack data to address passed in A
        RET

;==========================================================================================
; Function:			FarRead()		
;
; Description:		Reads data from far program space without the need to compile
;					with a far memory model.
;					
;					The address to read from is passed in the A and the data read is
;					returned in A.
;
; Revision History:
; 01/13/04 JEN		Initial implementation
;==========================================================================================
	.sect	".text"
	.global	_FarRead
	.sym 	_FarRead, _FarRead, 32, 2, 0
_FarRead:
        FRAME   #-1			; make room for the return value
 		READA 	*SP(0)		; read address passed in A to top of stack
        LD      *SP(0),A 	; move return value into A for return
        FRAME   #1			; clean up
        RET

⌨️ 快捷键说明

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