gui2: added OBJ_SkipObjects
This commit is contained in:
@@ -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
|
||||
;
|
||||
|
||||
Reference in New Issue
Block a user