diff --git a/BIOS_equ.asm b/BIOS_equ.asm new file mode 100644 index 0000000..0d13992 --- /dev/null +++ b/BIOS_equ.asm @@ -0,0 +1,2 @@ +; EQUs (lazy variables) for BIOS stuff +BIOS_INT equ 0x10 diff --git a/README.md b/README.md index 13477ee..81f908c 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,8 @@ # eOS -A simple and operating system +A simple x86_64 operating system. (BIOS) -This operating system is in no way original nor do I recommend even taking a look at it. I am going of [this](https://tuhdo.github.io/os01/) book. I highly recommend it! :) +This operating system is in no way original nor do I recommend even taking a look at it. I am going of unfinished book. + +## Books +[Operating Systems: From 0 to 1](https://tuhdo.github.io/os01/) (Open-Source, unfinished) +[Writing a Simple Operating System - from Scratch](https://www.cs.bham.ac.uk/~exr/lectures/opsys/10_11/lectures/os-dev.pdf) diff --git a/bootloader.asm b/bootloader.asm index d452c43..960ba59 100644 --- a/bootloader.asm +++ b/bootloader.asm @@ -1,3 +1,35 @@ +%include "BIOS_equ.asm" +mov ah, 0x0e ; enter teletype mode (BIOS) + +mov al, "e" +int BIOS_INT + +mov al, "O" +int BIOS_INT + +mov al, "S" +int BIOS_INT + +mov al, 10 ; linebreak +int BIOS_INT + +; ALPHABET PRINT + + +mov al, 64 ; one less than A since we are printing in a loop and it increments before sys interupt +loop: + inc al ; move to next char + int BIOS_INT ; bios interupt to print it + push al ; push al onto stack + + mov al, 10 ; ASCII linebreak + int BIOS_INT + + pop al ; return to char + + cmp al, 91 ; 26 letters in english alphabet (65 + 26) + jl loop ; if al < 65+26: jmp loop + jmp $ times 510-($-$$) db 0 diff --git a/start.sh b/start.sh new file mode 100755 index 0000000..8cb51ad --- /dev/null +++ b/start.sh @@ -0,0 +1,2 @@ +#!/usr/bin/bash +qemu-system-x86_64 bin/bootloader.bin