gui2: added OBJ_SkipObjects

This commit is contained in:
Martin Preuss
2026-03-21 08:29:18 +01:00
parent 69a16c4c0f
commit 4eac2a105e

View File

@@ -362,6 +362,40 @@ OBJ_GetChildAt_ret:
; @end
; ---------------------------------------------------------------------------
; @routine OBJ_SkipObjects @global
;
; @param Y address of object
; @param R16 number of objects to skip
; @return CFLAG set, if found, cleared otherwise
; @return r19:r18 resulting object
; @clobbers r16
OBJ_SkipObjects:
push yl
push yh
tst r16 ; zero to skip, done
sec
breq OBJ_SkipObjects_ret
OBJ_SkipObjects_loop:
rcall OBJ_GetNext
brcc OBJ_SkipObjects_ret
dec r16
breq OBJ_SkipObjects_done
mov yl, r18
mov yh, r19
rjmp OBJ_SkipObjects_loop
OBJ_SkipObjects_done:
sec
OBJ_SkipObjects_ret:
pop yh
pop yl
ret
; @end
; ---------------------------------------------------------------------------
; @routine OBJ_AddChild @global
;