Compare commits
No commits in common. "0b5fd0d84e928942db90255dd40ba48acbe9a41c" and "8bea9d6120c8469d975be6c84eb9307365696a06" have entirely different histories.
0b5fd0d84e
...
8bea9d6120
17
hello.asm
17
hello.asm
|
@ -88,17 +88,9 @@ process_event:
|
||||||
jne .not_open_file
|
jne .not_open_file
|
||||||
call event_open_file
|
call event_open_file
|
||||||
jmp .end
|
jmp .end
|
||||||
.not_open_file:
|
.not_opend_file:
|
||||||
|
|
||||||
.end:
|
.end:
|
||||||
cmp byte [exiting], 0
|
|
||||||
je .not_exiting
|
|
||||||
; Once we have deallocated our own memory, we may not call any
|
|
||||||
; external functions that might allocate. Safest place to do the
|
|
||||||
; deallocation is just before returning control to our caller
|
|
||||||
call deallocate_own_memory
|
|
||||||
.not_exiting:
|
|
||||||
|
|
||||||
pop es
|
pop es
|
||||||
pop ds
|
pop ds
|
||||||
pop bp
|
pop bp
|
||||||
|
@ -297,7 +289,10 @@ event_click:
|
||||||
jne .not_close
|
jne .not_close
|
||||||
.close:
|
.close:
|
||||||
call unhook_self_from_window_chain
|
call unhook_self_from_window_chain
|
||||||
mov byte [exiting], 1
|
; Nothing can call into us again after we unhook
|
||||||
|
; the window, so deallocate the memory we have
|
||||||
|
; reserved
|
||||||
|
call deallocate_own_memory
|
||||||
; We don't need to call request_redraw here, since
|
; We don't need to call request_redraw here, since
|
||||||
; it will be called unconditionally above
|
; it will be called unconditionally above
|
||||||
jmp .title_bar_end
|
jmp .title_bar_end
|
||||||
|
@ -677,8 +672,6 @@ request_redraw:
|
||||||
; Variables
|
; Variables
|
||||||
; ------------------------------------------------------------------
|
; ------------------------------------------------------------------
|
||||||
|
|
||||||
exiting db 0
|
|
||||||
|
|
||||||
window_title db 'Hello'
|
window_title db 'Hello'
|
||||||
.end:
|
.end:
|
||||||
WINDOW_TITLE_LEN equ window_title.end - window_title
|
WINDOW_TITLE_LEN equ window_title.end - window_title
|
||||||
|
|
17
memory.asm
17
memory.asm
|
@ -76,17 +76,9 @@ process_event:
|
||||||
jne .not_open_file
|
jne .not_open_file
|
||||||
call event_open_file
|
call event_open_file
|
||||||
jmp .end
|
jmp .end
|
||||||
.not_open_file:
|
.not_opend_file:
|
||||||
|
|
||||||
.end:
|
.end:
|
||||||
cmp byte [exiting], 0
|
|
||||||
je .not_exiting
|
|
||||||
; Once we have deallocated our own memory, we may not call any
|
|
||||||
; external functions that might allocate. Safest place to do the
|
|
||||||
; deallocation is just before returning control to our caller
|
|
||||||
call deallocate_own_memory
|
|
||||||
.not_exiting:
|
|
||||||
|
|
||||||
pop es
|
pop es
|
||||||
pop ds
|
pop ds
|
||||||
pop bp
|
pop bp
|
||||||
|
@ -281,7 +273,10 @@ event_click:
|
||||||
jne .not_close
|
jne .not_close
|
||||||
.close:
|
.close:
|
||||||
call unhook_self_from_window_chain
|
call unhook_self_from_window_chain
|
||||||
mov byte [exiting], 1
|
; Nothing can call into us again after we unhook
|
||||||
|
; the window, so deallocate the memory we have
|
||||||
|
; reserved
|
||||||
|
call deallocate_own_memory
|
||||||
; We don't need to call request_redraw here, since
|
; We don't need to call request_redraw here, since
|
||||||
; it will be called unconditionally above
|
; it will be called unconditionally above
|
||||||
jmp .title_bar_end
|
jmp .title_bar_end
|
||||||
|
@ -559,8 +554,6 @@ request_redraw:
|
||||||
; Variables
|
; Variables
|
||||||
; ------------------------------------------------------------------
|
; ------------------------------------------------------------------
|
||||||
|
|
||||||
exiting db 0
|
|
||||||
|
|
||||||
window_next dw 0xffff
|
window_next dw 0xffff
|
||||||
window_x dw 65
|
window_x dw 65
|
||||||
window_y dw 3
|
window_y dw 3
|
||||||
|
|
Loading…
Reference in New Issue