bootsectordisk/Makefile

20 lines
389 B
Makefile
Raw Permalink Normal View History

2021-08-16 17:15:38 +00:00
boot.bin: boot.o
ld -o $@ --oformat binary -Ttext 0x7000 $<
2021-08-16 17:15:38 +00:00
boot.o: boot.s
as -o $@ $<
2021-08-19 19:57:02 +00:00
floppy.bin: boot.bin floppy_base.bin
rm -vf $@
cp floppy_base.bin $@
2021-08-19 20:37:38 +00:00
dd if=boot.bin of=$@ conv=notrunc
2021-08-19 19:57:02 +00:00
2021-08-16 17:19:47 +00:00
.PHONY: boot disasm hexdump
2021-08-19 19:57:02 +00:00
boot: floppy.bin
2021-08-16 17:15:38 +00:00
qemu-system-i386 -drive file=$^,index=0,if=floppy,format=raw
disasm: boot.bin
objdump -D -b binary -mi8086 $^
2021-08-16 17:19:47 +00:00
hexdump: boot.bin
hexdump $^ -C