struct.s

来自「AVR下的ICC所有函数库代码」· S 代码 · 共 39 行

S
39
字号
; block copy
;
; this routine cannot use R18/R19 w/o saving them because the compiler
; will not save them
;	asgnblk
;		size in R16/R17
;	stack:
;		dst
;		src
	.area text
asgnblk::
	st -Y,R26
	st -Y,R27
	st -Y,R30
	st -Y,R31
	st -Y,R0
	ldd R26,y+5+2	; X dst
	ldd R27,y+5+3
	ldd R30,y+5+0	; Z src
	ldd R31,y+5+1
loop:
	cpi R16,0
	cpc R16,R17
	breq done
notdone:
	ld R0,Z+
	st X+,R0
	subi R16,1
	sbci R17,0
	rjmp loop
done:
	ld R0,Y+
	ld R31,Y+
	ld R30,Y+
	ld R27,Y+
	ld R26,Y+
	adiw R28,4		; deallocate argument
	ret

⌨️ 快捷键说明

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