pmstruct.s

来自「avr的icc编译器的源代码」· S 代码 · 共 40 行

S
40
字号
; block copy src from FLASH
;
; this routine cannot use R18/R19 w/o saving them because the compiler
; will not save them
;	asgncblk
;		size in R16/R17
;	stack:
;		dst
;		src
	.area text
asgncblk::
	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:
	lpm
	st X+,R0
	adiw R30,1
	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 + -
显示快捷键?