diff --git a/bootloader/Makefile b/bootloader/Makefile new file mode 100644 index 0000000..9cb2ec5 --- /dev/null +++ b/bootloader/Makefile @@ -0,0 +1,8 @@ + + + +bootloader.bin: bootloader.asm + nasm -f bin -o $@ $^ + +clean: + rm bootloader.bin diff --git a/bootloader/bootloader.asm b/bootloader/bootloader.asm new file mode 100644 index 0000000..8009ff0 --- /dev/null +++ b/bootloader/bootloader.asm @@ -0,0 +1,14 @@ +[BITS 16] + +;Save the first adress in with start label +start: + +;Init CPU registers +mov ax, 0x0C70 +mov ds, ax ;Init data segment + +;Complete the MBR with nothing +times 510 - ($ - start) db 0x0 + +;Declare magic number +dw 0xAA55