add hello world bootloader code
This commit is contained in:
parent
344eabfbfc
commit
0975dd165e
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
boot
|
@ -1,3 +1,7 @@
|
|||||||
# Minimal bootloader
|
# 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
20
boot.asm
Normal 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
|
Loading…
Reference in New Issue
Block a user