Make better use of mformat features

This commit is contained in:
Nero 2019-09-16 10:26:48 +00:00
parent fe42e9145a
commit cff186a1bb

View File

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