eepwrl.s

来自「cxstm8 编译器」· S 代码 · 共 25 行

S
25
字号
;	WRITE A LONG IN EEPROM
;	Copyright (c) 2008 by COSMIC Software
;	- eeprom address in X
;	- value in LONG accu
;
	xdef	d_eewrl
	xref.b	c_lreg
	include	"eeprom.i"
	.dcall	"3,0,d_eewrl"
;
d_eewrl:
	ldw	y,#c_lreg	; source address
bcl:
	ld	a,(y)		; get byte
	ld	(x),a		; and store in latch
wait:
	btjt	IAPSR,#EOP,wait ; wait for completion
	incw	y		; next source byte
	incw	x		; next eeprombyte
	cpw	y,#c_lreg+4	; last byte ?
	jrne	bcl		; loop if more
	retf			; return
;
	end

⌨️ 快捷键说明

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