avr: reorganized common code.

This commit is contained in:
Martin Preuss
2026-04-20 23:56:52 +02:00
parent 2d2105ae00
commit abe218e7b0
12 changed files with 281 additions and 155 deletions

View File

@@ -212,8 +212,8 @@ List_UnlinkAllObjects_loop:
; Calls the given function for every object until it
; returns with a set carry flag or until the full list
; is handled.
; Registers that can be used by the given function are all
; except R16, R18 and R19 (those are used by this routine).
; All registers that can be used by the given function, however
; R16, R18, R19 and Y are modified between function calls.
;
; @param Y pointer to first object in a list
; @param Z routine to call for every object
@@ -223,9 +223,6 @@ List_ForEveryObject:
List_ForEveryObject_loop:
ldd r18, Y+LIST_OFFS_NEXT_LO ; next
ldd r19, Y+LIST_OFFS_NEXT_HI ; next
clr r16
std Y+LIST_OFFS_NEXT_LO, r16
std Y+LIST_OFFS_NEXT_HI, r16
push r18 ; next
push r19 ; next
rcall List_ForEveryObject_callZ