Complete shell refactor
This commit is contained in:
parent
75a9a51191
commit
ad4c9a2209
|
@ -4,8 +4,6 @@ Feel free to add anything you think would fit in
|
||||||
|
|
||||||
### Basic stuff
|
### Basic stuff
|
||||||
|
|
||||||
* refactor shell.asm a bit:
|
|
||||||
- add/verify function header comments
|
|
||||||
* a release-able README
|
* a release-able README
|
||||||
|
|
||||||
### Nice to have
|
### Nice to have
|
||||||
|
|
32
shell.asm
32
shell.asm
|
@ -37,6 +37,8 @@ org 0
|
||||||
jmp near process_event
|
jmp near process_event
|
||||||
|
|
||||||
; 0x0003
|
; 0x0003
|
||||||
|
; out:
|
||||||
|
; clobbers everything but ds
|
||||||
initialize:
|
initialize:
|
||||||
push ds
|
push ds
|
||||||
|
|
||||||
|
@ -100,6 +102,12 @@ initialize:
|
||||||
pop ds
|
pop ds
|
||||||
retf
|
retf
|
||||||
|
|
||||||
|
; in:
|
||||||
|
; al = event
|
||||||
|
; bx = window ID
|
||||||
|
; cx, dx = event specific
|
||||||
|
; out:
|
||||||
|
; ax = event specific
|
||||||
process_event:
|
process_event:
|
||||||
push bx
|
push bx
|
||||||
push cx
|
push cx
|
||||||
|
@ -801,8 +809,8 @@ raise_window:
|
||||||
mov cx, ax
|
mov cx, ax
|
||||||
call unhook_window
|
call unhook_window
|
||||||
|
|
||||||
xchg [es:GLOBAL_WINDOW_CHAIN_HEAD], cx
|
call hook_window
|
||||||
mov [si + window.next], cx
|
mov [si + window.next], ax
|
||||||
|
|
||||||
call request_redraw
|
call request_redraw
|
||||||
|
|
||||||
|
@ -825,6 +833,7 @@ render_file_window:
|
||||||
push ax
|
push ax
|
||||||
push cx
|
push cx
|
||||||
push dx
|
push dx
|
||||||
|
push di
|
||||||
push es
|
push es
|
||||||
|
|
||||||
mov ax, cs
|
mov ax, cs
|
||||||
|
@ -852,6 +861,7 @@ render_file_window:
|
||||||
call print_ls
|
call print_ls
|
||||||
|
|
||||||
pop es
|
pop es
|
||||||
|
pop di
|
||||||
pop dx
|
pop dx
|
||||||
pop cx
|
pop cx
|
||||||
pop ax
|
pop ax
|
||||||
|
@ -859,13 +869,13 @@ render_file_window:
|
||||||
|
|
||||||
request_redraw:
|
request_redraw:
|
||||||
push es
|
push es
|
||||||
push bp
|
push ax
|
||||||
|
|
||||||
mov bp, PONYDOS_SEG
|
mov ax, PONYDOS_SEG
|
||||||
mov es, bp
|
mov es, ax
|
||||||
mov byte [es:GLOBAL_REDRAW], 1
|
mov byte [es:GLOBAL_REDRAW], 1
|
||||||
|
|
||||||
pop bp
|
pop ax
|
||||||
pop es
|
pop es
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
@ -1077,15 +1087,15 @@ strcmp:
|
||||||
pop si
|
pop si
|
||||||
ret
|
ret
|
||||||
|
|
||||||
wallpaper_name db 'ponydos.wall'
|
; ------------------------------------------------------------------
|
||||||
times FS_DIRENT_NAME_SIZE-12 db 0
|
; Variables
|
||||||
|
; ------------------------------------------------------------------
|
||||||
|
|
||||||
bin_extension db '.bin', 0
|
bin_extension db '.bin', 0
|
||||||
wall_extension db '.wall', 0
|
wall_extension db '.wall', 0
|
||||||
|
|
||||||
%include "debug.inc"
|
wallpaper_name db 'ponydos.wall'
|
||||||
|
times FS_DIRENT_NAME_SIZE-12 db 0
|
||||||
file_window_visible db 0
|
|
||||||
|
|
||||||
disk_icon:
|
disk_icon:
|
||||||
db 0x00, 0x0f, 0x00, 0x0f, 0x00, 0x0f, 0x00, 0x0f, 0x00, 0x0f
|
db 0x00, 0x0f, 0x00, 0x0f, 0x00, 0x0f, 0x00, 0x0f, 0x00, 0x0f
|
||||||
|
|
Loading…
Reference in New Issue