diff --git a/Makefile b/Makefile index 0fa5534..c5d275f 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ all: - cd common-post-process ; make ; cd .. + cd xa-pre-process ; make ; cd .. cd common ; make ; cd .. cd emulator ; make ; cd .. @@ -7,6 +7,6 @@ run: ./emulator/emulator < common/system.obj clean: - cd common-post-process ; make clean ; cd .. + cd xa-pre-process ; make clean ; cd .. cd common ; make clean ; cd .. cd emulator ; make clean ; cd .. diff --git a/README.md b/README.md index 368e66d..cf43975 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ # COMMON + Advances some ideas using Steve Wozniak's SWEET16 interpreted byte-code language as inspiration. While the goal of SWEET16 was brevity, the goal of COMMON is functionality. The intent is to make a platform suitable for many commercial, scientific, and engineering applications. For example: @@ -33,11 +34,11 @@ The meat of the project: Auxiliary: * `emulator/*`: 6502 emulator (borrowed Mike Chambers' Fake6502 CPU emulator v1.1 ©2011) -* `common-post-process/*`: this utility converts 32-bit fixed decimal quantities so that `xa` can use them +* `xa-pre-process/*`: utility `xapp` to convert 32-bit fixed decimal quantities so that `xa` can use them Right now, for testing purposes, the code builds everything into one file `system.obj` and runs the code in the last block loaded, in this case, the code corresponding to `page6.src`. Eventually will support decoupling of system and application files. -*To build and run:* +To build and run: make make run diff --git a/common/Makefile b/common/Makefile index 8488cf2..fe478a7 100644 --- a/common/Makefile +++ b/common/Makefile @@ -1,4 +1,4 @@ -POPR=../common-post-process/common-post-process +XAPP=../xa-pre-process/xapp system.obj: common.obj page6.obj cat common.obj page6.obj > system.obj @@ -7,7 +7,7 @@ common.obj: rom.h common.h common.asm xa -M common.asm -l common.lbl -o common.obj page6.obj: rom.h macros.h page6.src - cpp -P page6.src | $(POPR) > page6.asm + cpp -P page6.src | $(XAPP) > page6.asm xa -M page6.asm -l page6.lbl -o page6.obj clean: diff --git a/common-post-process/Makefile b/xa-pre-process/Makefile similarity index 92% rename from common-post-process/Makefile rename to xa-pre-process/Makefile index 633f1f1..6b199fa 100644 --- a/common-post-process/Makefile +++ b/xa-pre-process/Makefile @@ -1,4 +1,4 @@ -TGT=common-post-process +TGT=xapp $(TGT): main.c $(TGT).h $(TGT).re $(TGT).l $(TGT).y re2c -is $(TGT).re -o $(TGT).c diff --git a/common-post-process/main.c b/xa-pre-process/main.c similarity index 94% rename from common-post-process/main.c rename to xa-pre-process/main.c index 604ff4b..7e2609b 100644 --- a/common-post-process/main.c +++ b/xa-pre-process/main.c @@ -2,8 +2,8 @@ #include #include -#include "common-post-process.h" -#include "common-post-process.yy.h" +#include "xapp.h" +#include "xapp.yy.h" long long result; diff --git a/common-post-process/common-post-process.h b/xa-pre-process/xapp.h similarity index 93% rename from common-post-process/common-post-process.h rename to xa-pre-process/xapp.h index a369e5a..4c6eebf 100644 --- a/common-post-process/common-post-process.h +++ b/xa-pre-process/xapp.h @@ -1,5 +1,5 @@ -#ifndef __COMMON_POST_PROCESS_H -#define __COMMON_POST_PROCESS_H +#ifndef __XAPP_H +#define __XAPP_H /* How many bits for ... */ @@ -68,4 +68,4 @@ int tokenizeInput(const char *cursor, TOKEN *tokens); long long parseCommon(const char *input); long long shiftCommon(long long base, long long amount); -#endif /* __COMMON_POST_PROCESS_H */ \ No newline at end of file +#endif /* __XAPP_H */ \ No newline at end of file diff --git a/common-post-process/common-post-process.l b/xa-pre-process/xapp.l similarity index 95% rename from common-post-process/common-post-process.l rename to xa-pre-process/xapp.l index 4b3931f..1713435 100644 --- a/common-post-process/common-post-process.l +++ b/xa-pre-process/xapp.l @@ -3,7 +3,7 @@ #include #include -#include "common-post-process.tab.h" +#include "xapp.tab.h" %} diff --git a/common-post-process/common-post-process.re b/xa-pre-process/xapp.re similarity index 98% rename from common-post-process/common-post-process.re rename to xa-pre-process/xapp.re index a91f5d3..ebe2718 100644 --- a/common-post-process/common-post-process.re +++ b/xa-pre-process/xapp.re @@ -1,7 +1,7 @@ #include #include -#include "common-post-process.h" +#include "xapp.h" static int copyToken(TOKEN *tokens, int index, TOKEN_TYPE type, const char *text, int length); diff --git a/common-post-process/common-post-process.y b/xa-pre-process/xapp.y similarity index 97% rename from common-post-process/common-post-process.y rename to xa-pre-process/xapp.y index dea0305..1977893 100644 --- a/common-post-process/common-post-process.y +++ b/xa-pre-process/xapp.y @@ -1,7 +1,7 @@ %error-verbose %code requires { - #include "common-post-process.h" + #include "xapp.h" } %{ @@ -10,8 +10,8 @@ #include #include - #include "common-post-process.h" - #include "common-post-process.yy.h" + #include "xapp.h" + #include "xapp.yy.h" %} %union {