36 lines
890 B
NASM
36 lines
890 B
NASM
; ***************************************************************************
|
|
; copyright : (C) 2023 by Martin Preuss
|
|
; email : martin@libchipcard.de
|
|
;
|
|
; ***************************************************************************
|
|
; * This file is part of the project "AqHome". *
|
|
; * Please see toplevel file COPYING of that project for license details. *
|
|
; ***************************************************************************
|
|
|
|
|
|
; ***************************************************************************
|
|
; code
|
|
|
|
|
|
.cseg
|
|
|
|
; ---------------------------------------------------------------------------
|
|
; Utils_CopyFromFlash
|
|
;
|
|
; IN:
|
|
; - X: dest in RAM
|
|
; - Z: src in FLASH
|
|
; - R18: number of bytes to copy
|
|
; OUT:
|
|
; - nothing
|
|
; USED: R17, R18, X, Z
|
|
|
|
Utils_CopyFromFlash:
|
|
lpm r16, Z+
|
|
st X+, r16
|
|
dec r18
|
|
brne Utils_CopyFromFlash
|
|
ret
|
|
|
|
|