Save some bytes

This commit is contained in:
shikhin 2023-03-18 12:12:18 +05:30
parent f39f25a4c1
commit a110e1da1b
3 changed files with 14 additions and 9 deletions

View File

@ -6,7 +6,7 @@ PYTHON = python3
all: ponydos.img
FS_FILES = wallpaper.bin shell.bin
FS_FILES = bg.bin shell.bin
ponydos.img: ponydos.bin $(FS_FILES)
$(PYTHON) assemble_floppy.py $@ ponydos.bin $(FS_FILES)

View File

@ -72,8 +72,8 @@ load_wallpaper:
; TODO: error management? Surely this works...
load_shell:
mov ax, 0x1000
mov es, ax
push word 0x1000
pop es
mov si, shell_name
call open_file
xor bx, bx
@ -118,15 +118,20 @@ mainloop:
draw_wallpaper:
pusha
push es
push ds
mov bx, 0xb800
mov es, bx
xor ax, ax
mov ds, ax
push word 0xb800
pop es
mov si, WALLPAPER
xor di, di
mov cx, 80*25
rep movsw
pop ds
pop es
popa
ret
@ -135,8 +140,8 @@ flip_mouse_cursor:
pusha
push es
mov bx, 0xb800
mov es, bx
push word 0xb800
pop es
; Column
xor bh, bh
@ -224,7 +229,7 @@ modify_sector:
ret
.error:
; Reset the disk system unconditinoally, as we have no
; Reset the disk system unconditionally, as we have no
; kernel panic handler to go to after 3 tries and proper
; error handling would take too much code
xor ah, ah
@ -235,7 +240,7 @@ modify_sector:
; Filesystem
; ------------------------------------------------------------------
wallpaper_name: db 'wallpaper.bin', 0
wallpaper_name: db 'bg.bin', 0
shell_name: db 'shell.bin', 0
; in: