www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit 64971229f349a50ad58feb40cd374d016eae7bb0
parent 4edc0a7177f4c9343694d896eff02b2fd61073a6
Author: Georges Dupéron <georges.duperon@gmail.com>
Date:   Tue,  3 Jul 2018 17:20:24 +0200

Made the os.sh a chameleon: it is now an x86 bootsector and a shell script at the same time.

Diffstat:
Mexample-os/os.asm | 11+++++++++++
1 file changed, 11 insertions(+), 0 deletions(-)

diff --git a/example-os/os.asm b/example-os/os.asm @@ -1,6 +1,11 @@ [BITS 16] [ORG 0x7c00] +db `#!/usr/bin/env sh\n` +db `: <<'EOF'\n` + +times 0x7c78-0x7c00-($-$$) db 0 + ;; Switch to 320x200x256 VGA mode mov ax, 0x0013 int 10h @@ -41,5 +46,11 @@ times 512-2-($-$$) db 0 db 0x55 db 0xaa +;; end of the bootsector, close the sh here-document skipped via : <<'EOF' +db `\n` +db `EOF\n` +db `echo Hello world from sh!\n` +db `exit\n` + ;; Fill up to 1.44M with 0 times (1440*1024)-($-$$) db 0