diff --git a/Makefile b/Makefile index 58de885..a4f3f67 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,4 @@ -FD_CYLINDERS = 40 -FD_HEADS = 2 -FD_SECTORS = 9 +FLOPPY = 360 PROGRAMS = $(patsubst %.asm,%.com,$(wildcard programs/*.asm)) DISTFILES = kernel.com $(PROGRAMS) @@ -38,8 +36,7 @@ programs/%.com: programs/%.asm nasm -s -I lib -o $@ $< fdimage.img: floppy.bs $(DISTFILES) - dd if=/dev/zero bs=512 count=$$(( $(FD_CYLINDERS) * $(FD_HEADS) * $(FD_SECTORS) )) of=$@ - mformat -i $@ -t $(FD_CYLINDERS) -h $(FD_HEADS) -n $(FD_SECTORS) -B floppy.bs :: + mformat -C -i $@ -f $(FLOPPY) -B floppy.bs :: mcopy -i $@ $(DISTFILES) :: clean: