39 lines
1.1 KiB
NASM
39 lines
1.1 KiB
NASM
; ***************************************************************************
|
|
; copyright : (C) 2025 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
|
|
|
|
|
|
; ---------------------------------------------------------------------------
|
|
; @routine NETMSG_RangeRead @global
|
|
; Read a RANGE message.
|
|
;
|
|
; @param X buffer to read from
|
|
; @return R18 command
|
|
; @return R20 range begin
|
|
; @return R21 range end
|
|
; @clobbers none
|
|
|
|
NETMSG_Range_Read:
|
|
adiw xh:xl, NETMSG_OFFS_CMD
|
|
ld r18, X ; command
|
|
adiw xh:xl, NETMSG_RANGE_OFFS_FROM-NETMSG_OFFS_CMD ; skip src addr and uid
|
|
ld r20, X+ ; range from
|
|
ld r21, X ; range to
|
|
sbiw xh:xl, NETMSG_RANGE_OFFS_TO ; back to msg begin
|
|
ret
|
|
; @end
|
|
|
|
|
|
|