diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..36ef4c3 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +boot diff --git a/README.md b/README.md index 151de0d..c01b8db 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,7 @@ # Minimal bootloader -https://www.youtube.com/watch?v=xFrMXzKCXIc +```shell +./run.sh +``` + +Tutorial: https://www.youtube.com/watch?v=xFrMXzKCXIc diff --git a/boot.asm b/boot.asm new file mode 100644 index 0000000..9f95de1 --- /dev/null +++ b/boot.asm @@ -0,0 +1,20 @@ +bits 16 +org 0x7c00 + +mov si, 0 + +print: + mov ah, 0x0E + mov al, [hello+si] + int 0x10 + add si, 1 + cmp byte [hello+si] ,0 + jne print + +jmp $ + +hello: + db "Hello World!", 0 + +times 510 - ($ - $$) db 0 +dw 0xAA55 diff --git a/run.sh b/run.sh new file mode 100755 index 0000000..5109a49 --- /dev/null +++ b/run.sh @@ -0,0 +1,3 @@ +#!/bin/sh +nasm boot.asm +qemu-system-i386 boot