diff options
| author | manzerbredes <loic.guegan_secondary@yahoo.fr> | 2015-07-17 17:14:42 +0400 |
|---|---|---|
| committer | manzerbredes <loic.guegan_secondary@yahoo.fr> | 2015-07-17 17:14:42 +0400 |
| commit | c83e3bf27fdc7086a7f8c93a8ca63ef976c758e5 (patch) | |
| tree | 537615759dcfca6e618436aa3c0a1c2b0b8f9be2 | |
| parent | bd68108ff335f7f02c8517ac2d81b079679958ff (diff) | |
Create a simple bootloader with nasm
| -rw-r--r-- | bootloader/Makefile | 8 | ||||
| -rw-r--r-- | bootloader/bootloader.asm | 14 |
2 files changed, 22 insertions, 0 deletions
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 |
