diff --git a/tools/emul/Makefile b/tools/emul/Makefile index d24d287..f189a08 100644 --- a/tools/emul/Makefile +++ b/tools/emul/Makefile @@ -1,30 +1,30 @@ -TARGETS = shell zasm -KERNEL_HEADERS = shell-kernel.h zasm-kernel.h -USER_HEADERS = zasm-user.h +TARGETS = shell/shell zasm/zasm +KERNEL_HEADERS = shell/kernel.h zasm/kernel.h +USER_HEADERS = zasm/user.h CFSPACK = ../cfspack/cfspack .PHONY: all all: $(TARGETS) -shell-kernel.h: shell_.asm -zasm-kernel.h: zasm_glue.asm +shell/kernel.h: shell/shell_.asm +zasm/kernel.h: zasm/glue.asm $(KERNEL_HEADERS): scas -o - -I ../../parts/z80 $< | ./bin2c.sh KERNEL | tee $@ > /dev/null -zasm-user.h: zasm_user.asm +zasm/user.h: zasm/user.asm scas -o - -I ../../apps/zasm $< | ./bin2c.sh USERSPACE | tee $@ > /dev/null -zasm-includes.cfs: ../../parts/z80 $(CFSPACK) - cp -rf $< zasm-includes - rm zasm-includes/README.md - $(CFSPACK) zasm-includes > $@ - rm -rf zasm-includes +zasm/includes.cfs: ../../parts/z80 $(CFSPACK) + cp -rf $< zasm/includes + rm zasm/includes/README.md + $(CFSPACK) zasm/includes > $@ + rm -rf zasm/includes -zasm-includes.h: zasm-includes.cfs +zasm/includes.h: zasm/includes.cfs ./bin2c.sh FSDEV < $< | tee $@ > /dev/null -shell: shell.c libz80/libz80.o shell-kernel.h $(CFSPACK) -zasm: zasm.c libz80/libz80.o zasm-kernel.h zasm-user.h zasm-includes.h +shell/shell: shell/shell.c libz80/libz80.o shell/kernel.h $(CFSPACK) +zasm/zasm: zasm/zasm.c libz80/libz80.o zasm/kernel.h zasm/user.h zasm/includes.h $(TARGETS): cc $< libz80/libz80.o -o $@ @@ -37,4 +37,4 @@ $(CFSPACK): .PHONY: clean clean: - rm -f $(TARGETS) $(KERNEL_HEADERS) $(USER_HEADERS) zasm-includes.* + rm -f $(TARGETS) $(KERNEL_HEADERS) $(USER_HEADERS) zasm/includes.* diff --git a/tools/emul/shell.c b/tools/emul/shell/shell.c similarity index 98% rename from tools/emul/shell.c rename to tools/emul/shell/shell.c index f3263bf..1d71b83 100644 --- a/tools/emul/shell.c +++ b/tools/emul/shell/shell.c @@ -1,8 +1,8 @@ #include #include #include -#include "libz80/z80.h" -#include "shell-kernel.h" +#include "../libz80/z80.h" +#include "kernel.h" /* Collapse OS shell with filesystem * diff --git a/tools/emul/shell_.asm b/tools/emul/shell/shell_.asm similarity index 100% rename from tools/emul/shell_.asm rename to tools/emul/shell/shell_.asm diff --git a/tools/emul/zasm_glue.asm b/tools/emul/zasm/glue.asm similarity index 100% rename from tools/emul/zasm_glue.asm rename to tools/emul/zasm/glue.asm diff --git a/tools/emul/zasm_user.asm b/tools/emul/zasm/user.asm similarity index 100% rename from tools/emul/zasm_user.asm rename to tools/emul/zasm/user.asm diff --git a/tools/emul/zasm.c b/tools/emul/zasm/zasm.c similarity index 97% rename from tools/emul/zasm.c rename to tools/emul/zasm/zasm.c index 24be458..158ae0e 100644 --- a/tools/emul/zasm.c +++ b/tools/emul/zasm/zasm.c @@ -1,9 +1,9 @@ #include #include -#include "libz80/z80.h" -#include "zasm-kernel.h" -#include "zasm-user.h" -#include "zasm-includes.h" +#include "../libz80/z80.h" +#include "kernel.h" +#include "user.h" +#include "includes.h" /* zasm reads from a specified blkdev, assemble the file and writes the result * in another specified blkdev. In our emulator layer, we use stdin and stdout diff --git a/tools/tests/zasm/runtests.sh b/tools/tests/zasm/runtests.sh index dd0b11e..ede830e 100755 --- a/tools/tests/zasm/runtests.sh +++ b/tools/tests/zasm/runtests.sh @@ -5,7 +5,7 @@ set -e TMPFILE=$(mktemp) SCAS=scas PARTS=../../../parts/z80 -ZASM=../../emul/zasm +ZASM=../../emul/zasm/zasm ASMFILE=../../../apps/zasm/instr.asm cmpas() {