add hello world bootloader code

This commit is contained in:
Rokas Puzonas 2023-12-07 22:13:39 +02:00
parent 344eabfbfc
commit 0975dd165e
4 changed files with 29 additions and 1 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
boot

View File

@ -1,3 +1,7 @@
# Minimal bootloader
https://www.youtube.com/watch?v=xFrMXzKCXIc
```shell
./run.sh
```
Tutorial: https://www.youtube.com/watch?v=xFrMXzKCXIc

20
boot.asm Normal file
View File

@ -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

3
run.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh
nasm boot.asm
qemu-system-i386 boot