It boots and dies, good start

This commit is contained in:
2015-01-23 20:26:12 -08:00
commit 7edcfd1336
3 changed files with 24 additions and 0 deletions

14
Makefile Normal file
View File

@@ -0,0 +1,14 @@
all: boot.img
boot.bin: bootloader.S
nasm $< -f bin -o $@
boot.img: boot.bin
dd if=$< bs=512 of=$@
test: boot.img
bochs -f bochsrc -q
.PHONY: clean
clean:
rm -f boot.bin

3
bochsrc Normal file
View File

@@ -0,0 +1,3 @@
display_library: sdl
boot: floppy
floppya: 1_44=boot.img, status=inserted

7
bootloader.S Normal file
View File

@@ -0,0 +1,7 @@
[BITS 16] ; 16 bit real mode code
[ORG 0x7C00] ; Origin at 0x7C00 (upper end of memory)
JMP $ ; hang forever
TIMES 510 - ($ - $$) db 0 ; fill up to 510 bytes with 0
DW 0xAA55 ; magic bootloader signature