From f39f25a4c1aa56b2678bd1c94237125eb115d812 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juhani=20Krekel=C3=A4?= Date: Sat, 18 Mar 2023 01:05:32 +0200 Subject: [PATCH] Start work on shell --- Makefile | 6 ++++-- ponydos.asm | 11 +++++++++++ shell.asm | 2 ++ 3 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 shell.asm diff --git a/Makefile b/Makefile index 50c28b6..8b0de76 100644 --- a/Makefile +++ b/Makefile @@ -6,8 +6,10 @@ PYTHON = python3 all: ponydos.img -ponydos.img: ponydos.bin wallpaper.bin - $(PYTHON) assemble_floppy.py $@ ponydos.bin wallpaper.bin +FS_FILES = wallpaper.bin shell.bin + +ponydos.img: ponydos.bin $(FS_FILES) + $(PYTHON) assemble_floppy.py $@ ponydos.bin $(FS_FILES) .asm.bin: $(NASM) -fbin -o $@ $< diff --git a/ponydos.asm b/ponydos.asm index 30bab61..499c273 100644 --- a/ponydos.asm +++ b/ponydos.asm @@ -71,6 +71,16 @@ load_wallpaper: call read_sectors ; TODO: error management? Surely this works... +load_shell: + mov ax, 0x1000 + mov es, ax + mov si, shell_name + call open_file + xor bx, bx + call read_sectors + + call 0x1000:0 + initialize_screen: ; Disable text cursor mov ah, 0x01 @@ -226,6 +236,7 @@ modify_sector: ; ------------------------------------------------------------------ wallpaper_name: db 'wallpaper.bin', 0 +shell_name: db 'shell.bin', 0 ; in: ; ds:si = file name diff --git a/shell.asm b/shell.asm new file mode 100644 index 0000000..dfd51d1 --- /dev/null +++ b/shell.asm @@ -0,0 +1,2 @@ +org 0 +retf