Files
aqhomecontrol/avr/modules/network/msg/addr-r.asm
2025-04-21 00:43:11 +02:00

37 lines
998 B
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_ValueRead @global
; Read a VALUE message.
;
; @param X buffer to read from
; @return R18 command
; @return R19 address to send
; @clobbers R18, R19
NETMSG_Address_Read:
adiw xh:xl, 2
ld r18, X+ ; command
adiw xh:xl, 5 ; skip src addr and uid
ld r19, X+ ; addr
sbiw xh:xl, 9 ; back to msg begin
ret
; @end