From cff186a1bbcb3f9b978cab7693a9302eee5da7ba Mon Sep 17 00:00:00 2001 From: Ain <41307858+nero@users.noreply.github.com> Date: Mon, 16 Sep 2019 10:26:48 +0000 Subject: [PATCH] Make better use of mformat features --- Makefile | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) 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: