Complete shell refactor

This commit is contained in:
Juhani Krekelä 2023-03-27 14:08:48 +03:00
parent 75a9a51191
commit ad4c9a2209
2 changed files with 21 additions and 13 deletions

View File

@ -4,8 +4,6 @@ Feel free to add anything you think would fit in
### Basic stuff
* refactor shell.asm a bit:
- add/verify function header comments
* a release-able README
### Nice to have

View File

@ -37,6 +37,8 @@ org 0
jmp near process_event
; 0x0003
; out:
; clobbers everything but ds
initialize:
push ds
@ -100,6 +102,12 @@ initialize:
pop ds
retf
; in:
; al = event
; bx = window ID
; cx, dx = event specific
; out:
; ax = event specific
process_event:
push bx
push cx
@ -801,8 +809,8 @@ raise_window:
mov cx, ax
call unhook_window
xchg [es:GLOBAL_WINDOW_CHAIN_HEAD], cx
mov [si + window.next], cx
call hook_window
mov [si + window.next], ax
call request_redraw
@ -825,6 +833,7 @@ render_file_window:
push ax
push cx
push dx
push di
push es
mov ax, cs
@ -852,6 +861,7 @@ render_file_window:
call print_ls
pop es
pop di
pop dx
pop cx
pop ax
@ -859,13 +869,13 @@ render_file_window:
request_redraw:
push es
push bp
push ax
mov bp, PONYDOS_SEG
mov es, bp
mov ax, PONYDOS_SEG
mov es, ax
mov byte [es:GLOBAL_REDRAW], 1
pop bp
pop ax
pop es
ret
@ -1077,15 +1087,15 @@ strcmp:
pop si
ret
wallpaper_name db 'ponydos.wall'
times FS_DIRENT_NAME_SIZE-12 db 0
; ------------------------------------------------------------------
; Variables
; ------------------------------------------------------------------
bin_extension db '.bin', 0
wall_extension db '.wall', 0
%include "debug.inc"
file_window_visible db 0
wallpaper_name db 'ponydos.wall'
times FS_DIRENT_NAME_SIZE-12 db 0
disk_icon:
db 0x00, 0x0f, 0x00, 0x0f, 0x00, 0x0f, 0x00, 0x0f, 0x00, 0x0f