📄 pmstruct.s
字号:
; 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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -