gui2: more work on gui.
This commit is contained in:
@@ -617,10 +617,9 @@ OBJ_TreeHandleSignal_done:
|
||||
; @param xh param2
|
||||
; @param r20 mask for OBJECT_OFFS_OPTS_LO
|
||||
; @param r21 value for OBJECT_OFFS_OPTS_LO to match
|
||||
; @return CFLAG set if handled, cleared otherwise
|
||||
; @clobbers any, !R16, !R17, !X, !Y
|
||||
|
||||
OBJ_TreeHandleSignalIfMatchingOpts:
|
||||
OBJ_TreeHandleSignalIfMatchingOptsLo:
|
||||
push yl
|
||||
push yh
|
||||
; call signal handler
|
||||
@@ -631,27 +630,75 @@ OBJ_TreeHandleSignalIfMatchingOpts:
|
||||
ldd r18, Y+OBJECT_OFFS_OPTS_LO
|
||||
eor r18, r21
|
||||
and r18, r20
|
||||
brne OBJ_TreeHandleSignalIfMatchingOpts_l1
|
||||
brne OBJ_TreeHandleSignalIfMatchingOptsLo_l1
|
||||
push r20
|
||||
push r21
|
||||
rcall OBJ_HandleSignal ; (any, !Y)
|
||||
pop r21
|
||||
pop r20
|
||||
OBJ_TreeHandleSignalIfMatchingOpts_l1:
|
||||
OBJ_TreeHandleSignalIfMatchingOptsLo_l1:
|
||||
pop xh
|
||||
pop xl
|
||||
pop r17
|
||||
pop r16
|
||||
; handle children
|
||||
rcall OBJ_GetFirstChild ; r19:r18=object (none)
|
||||
OBJ_TreeHandleSignalIfMatchingOpts_loop:
|
||||
brcc OBJ_TreeHandleSignalIfMatchingOpts_done
|
||||
OBJ_TreeHandleSignalIfMatchingOptsLo_loop:
|
||||
brcc OBJ_TreeHandleSignalIfMatchingOptsLo_done
|
||||
mov yl, r18
|
||||
mov yh, r19
|
||||
rcall OBJ_TreeHandleSignalIfMatchingOpts ; recursion!
|
||||
rcall OBJ_TreeHandleSignalIfMatchingOptsLo ; recursion!
|
||||
rcall OBJ_GetNext ; r19:r18=object (none)
|
||||
rjmp OBJ_TreeHandleSignalIfMatchingOpts_loop
|
||||
OBJ_TreeHandleSignalIfMatchingOpts_done:
|
||||
rjmp OBJ_TreeHandleSignalIfMatchingOptsLo_loop
|
||||
OBJ_TreeHandleSignalIfMatchingOptsLo_done:
|
||||
pop yh
|
||||
pop yl
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine OBJ_TreeHandleSignalIfFlagsSet @global @recursive
|
||||
;
|
||||
; @param Y address of object
|
||||
; @param R16 signal number
|
||||
; @param R17 selector
|
||||
; @param xl param1
|
||||
; @param xh param2
|
||||
; @param r20 flags to match
|
||||
; @clobbers any, !R16, !R17, !X, !Y
|
||||
|
||||
OBJ_TreeHandleSignalIfFlagsSet:
|
||||
push yl
|
||||
push yh
|
||||
; call signal handler
|
||||
push r16
|
||||
push r17
|
||||
push xl
|
||||
push xh
|
||||
ldd r18, Y+OBJECT_OFFS_FLAGS
|
||||
and r18, r20
|
||||
eor r18, r20
|
||||
brne OBJ_TreeHandleSignalIfFlagsSet_l1
|
||||
push r20
|
||||
rcall OBJ_HandleSignal ; (any, !Y)
|
||||
pop r20
|
||||
OBJ_TreeHandleSignalIfFlagsSet_l1:
|
||||
pop xh
|
||||
pop xl
|
||||
pop r17
|
||||
pop r16
|
||||
; handle children
|
||||
rcall OBJ_GetFirstChild ; r19:r18=object (none)
|
||||
OBJ_TreeHandleSignalIfFlagsSet_loop:
|
||||
brcc OBJ_TreeHandleSignalIfFlagsSet_done
|
||||
mov yl, r18
|
||||
mov yh, r19
|
||||
rcall OBJ_TreeHandleSignalIfFlagsSet ; recursion!
|
||||
rcall OBJ_GetNext ; r19:r18=object (none)
|
||||
rjmp OBJ_TreeHandleSignalIfFlagsSet_loop
|
||||
OBJ_TreeHandleSignalIfFlagsSet_done:
|
||||
pop yh
|
||||
pop yl
|
||||
ret
|
||||
@@ -672,7 +719,6 @@ OBJ_TreeHandleSignalIfMatchingOpts_done:
|
||||
; @param R17 selector
|
||||
; @param xl param1
|
||||
; @param xh param2
|
||||
; @return CFLAG set if handled, cleared otherwise
|
||||
; @clobbers any, !R16, !R17, !X, !Y
|
||||
|
||||
OBJ_TreeHandleSignalChildenFirst:
|
||||
|
||||
Reference in New Issue
Block a user