commit 7edcfd1336d7b08fa28c88dbcc88c48b15b2f39e Author: Andrew Kesterson Date: Fri Jan 23 20:26:12 2015 -0800 It boots and dies, good start diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..f39ce57 --- /dev/null +++ b/Makefile @@ -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 diff --git a/bochsrc b/bochsrc new file mode 100644 index 0000000..5cba4d6 --- /dev/null +++ b/bochsrc @@ -0,0 +1,3 @@ +display_library: sdl +boot: floppy +floppya: 1_44=boot.img, status=inserted diff --git a/bootloader.S b/bootloader.S new file mode 100644 index 0000000..33672e3 --- /dev/null +++ b/bootloader.S @@ -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 \ No newline at end of file