strings.inc

来自「PKE(被动无钥门禁系统」· INC 代码 · 共 49 行

INC
49
字号
;---------------------------------------------------------------------------------------------------------
; Strings.inc                     
;
;	Jan Ornter
;
;	DATE:	11-9-2005
;	VER.:	1.0


	extern String.ReadFromPGM, String.Hex2ASCII, String.HexArray2String, String.GetLength, String.Char2String, String.Append, String.Copy

;/*
;	This function reads a String from the program memory to a RAM buffer.
;	
;	ATTENTION, the buffer has to be at least big enough for the string.
;	This function will write the complete string to ram, regardless of the buffer size!
;	
;	@param Prog The start address in the program memory
;	@param RAM The start address of the buffer to write
;
;	@stacklevel 1 /*/String.Hex2ASCII
;	@resgisters FSR1 FSR2 /*/String.Hex2ASCII
;	@calls String.Hex2ASCII /*/String.Hex2ASCII
;
;	@example
;		String.ReadPGM2RAM ExString,BufferADR
;
;	...	...		...
;
;	ExString
;		DE	"Example\0"
;	@ex-desc
;		This will copy the string "Example" to BufferADR in RAM.
;
;	@status Tested
;
;*/
String.ReadPGM2RAM	macro	Prog, RAM
	movlw	upper Prog
	movwf	TBLPTRU
	movlw	high Prog
	movwf	TBLPTRH
	movlw	low Prog
	movwf	TBLPTRL
	lfsr	FSR2,RAM
	movlw	high RAM
	call	String.ReadFromPGM
	endm

⌨️ 快捷键说明

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