From 66af56e87b98d8a21bc85c426c7475373f899fa2 Mon Sep 17 00:00:00 2001 From: Jonas Hvid Date: Sat, 17 Oct 2020 20:30:24 +0200 Subject: [PATCH] Restructure project directories We now split the project into three different directories: - src/ for assembly code; - init/ for Forth code that is run automatically; - lib/ for Forth code that the user can type in. --- Makefile | 4 ++-- README.md | 5 +++-- sys.f => init/sys.f | 0 uefi.f => init/uefi.f | 0 example.f => lib/example.f | 0 bootstrap.asm => src/bootstrap.asm | 0 impl.asm => src/impl.asm | 0 main.asm => src/main.asm | 4 ++-- {os => src}/uefi.asm | 0 9 files changed, 7 insertions(+), 6 deletions(-) rename sys.f => init/sys.f (100%) rename uefi.f => init/uefi.f (100%) rename example.f => lib/example.f (100%) rename bootstrap.asm => src/bootstrap.asm (100%) rename impl.asm => src/impl.asm (100%) rename main.asm => src/main.asm (99%) rename {os => src}/uefi.asm (100%) diff --git a/Makefile b/Makefile index 058cbf5..3f6972b 100644 --- a/Makefile +++ b/Makefile @@ -14,9 +14,9 @@ OVMF_CODE.fd: /usr/share/ovmf/x64/OVMF_CODE.fd OVMF_VARS.fd: /usr/share/ovmf/x64/OVMF_VARS.fd cp $< $@ -out/main: main.asm impl.asm bootstrap.asm sys.f os/uefi.asm +out/main: src/main.asm src/impl.asm src/bootstrap.asm src/uefi.asm init/sys.f init/uefi.f mkdir -p out - OS_INCLUDE=os/uefi.asm fasm $< $@ + fasm $< $@ out/startup.nsh: mkdir -p out diff --git a/README.md b/README.md index 432a356..a547925 100644 --- a/README.md +++ b/README.md @@ -15,10 +15,11 @@ the following command inside the UEFI shell: Shell> fs0:main Ready. - S" Hello, World!" TELL + : SAY-HELLO S" Hello, World!" TELL NEWLINE ; + SAY-HELLO Hello World! -(Try typing in the code in `example.f` for something a little more +(Try typing in the code in `lib/example.f` for something a little more interesting.) ## Running on real hardware diff --git a/sys.f b/init/sys.f similarity index 100% rename from sys.f rename to init/sys.f diff --git a/uefi.f b/init/uefi.f similarity index 100% rename from uefi.f rename to init/uefi.f diff --git a/example.f b/lib/example.f similarity index 100% rename from example.f rename to lib/example.f diff --git a/bootstrap.asm b/src/bootstrap.asm similarity index 100% rename from bootstrap.asm rename to src/bootstrap.asm diff --git a/impl.asm b/src/impl.asm similarity index 100% rename from impl.asm rename to src/impl.asm diff --git a/main.asm b/src/main.asm similarity index 99% rename from main.asm rename to src/main.asm index 5f63d84..73fbc0d 100644 --- a/main.asm +++ b/src/main.asm @@ -716,7 +716,7 @@ return_stack_top: ;; would expect to have available at startup. To execute these words, we just ;; include the file directly in the binary, and then interpret it at startup. sysf: -file 'sys.f' -file 'uefi.f' +file '../init/sys.f' +file '../init/uefi.f' sysf.len = $ - sysf diff --git a/os/uefi.asm b/src/uefi.asm similarity index 100% rename from os/uefi.asm rename to src/uefi.asm -- 2.39.2