add basic bootloader boilerplate (does this even work???)
This commit is contained in:
parent
35628a5aa2
commit
6fe1b4be72
3 changed files with 37 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
# Badloader
|
||||
|
||||
THE WORST BOOTLOADER EVER DO NOT USE THIS PLEASE
|
||||
THE WORST BOOTLOADER EVER DO NOT USE THIS PLEASE
|
||||
|
||||
# Building
|
||||
install `nasm`, then run build.sh.
|
||||
|
||||
i havent tested this in qemu lol
|
1
build.sh
Executable file
1
build.sh
Executable file
|
@ -0,0 +1 @@
|
|||
nasm -f bin main.asm -o badloader.img
|
30
main.asm
Normal file
30
main.asm
Normal file
|
@ -0,0 +1,30 @@
|
|||
; future note to self: WHY ARE YOU DOING THIS PLEASE STOP
|
||||
; IM TELLING YOU PLS STOP
|
||||
; no im not commenting this. because this is the badloader and
|
||||
; its bad lol
|
||||
|
||||
[BITS 16]
|
||||
[ORG 0x7C00]
|
||||
|
||||
start:
|
||||
mov ax, 0x0600
|
||||
mov bh, 0x07
|
||||
mov cx, 0x0000
|
||||
mov dx, 0x184F
|
||||
int 0x10
|
||||
|
||||
mov si, msg
|
||||
print:
|
||||
lodsb
|
||||
cmp al, 0
|
||||
je hang
|
||||
mov ah, 0x0E
|
||||
int 0x10
|
||||
jmp print
|
||||
hang:
|
||||
jmp hang
|
||||
|
||||
msg db "hi im the badloader", 0
|
||||
|
||||
times 510-($-$$) db 0
|
||||
dw 0xAA55
|
Loading…
Reference in a new issue