OSDN Git Service

ファイル構成の修正
authorhikarupsp <hikarupsp@users.sourceforge.jp>
Mon, 10 Mar 2014 11:31:36 +0000 (20:31 +0900)
committerhikarupsp <hikarupsp@users.sourceforge.jp>
Mon, 10 Mar 2014 11:31:36 +0000 (20:31 +0900)
ヘッダファイルの統一

13 files changed:
.gitignore
comlib.c
comlib.h [deleted file]
dependent.h [deleted file]
dpndenv.c [moved from dependent.c with 99% similarity]
function.c
function.h [deleted file]
jitc.c
jitc.h [deleted file]
main.c
osecpu.h
screen.h [deleted file]
switch.h [deleted file]

index 25edec0..4070d3d 100644 (file)
@@ -160,3 +160,4 @@ HeavyOSECPU.xcodeproj/project.xcworkspace/xcshareddata/HeavyOSECPU.xccheckout
 HeavyOSECPU.xcodeproj/project.xcworkspace/xcuserdata/hikaru.xcuserdatad/UserInterfaceState.xcuserstate
 HeavyOSECPU.xcodeproj/xcuserdata/hikaru.xcuserdatad/xcschemes/HeavyOSECPU.xcscheme
 HeavyOSECPU.xcodeproj/xcuserdata/hikaru.xcuserdatad/xcschemes/xcschememanagement.plist
+Breakpoints_v2.xcbkptlist
index 2489b01..e25803b 100644 (file)
--- a/comlib.c
+++ b/comlib.c
@@ -26,7 +26,7 @@ int ComLib_getTmpBit(struct ComLib_Str *s)
 unsigned char *ComLib_main(const unsigned char *p, unsigned char *q)
 {
        struct ComLib_Str s;
-       int i, dis;
+       int i, dis = 0;
        dis |= -1;
        s.p = p;
        s.bitBufLen &= 0;
diff --git a/comlib.h b/comlib.h
deleted file mode 100644 (file)
index 088bc01..0000000
--- a/comlib.h
+++ /dev/null
@@ -1,8 +0,0 @@
-#ifndef _HDLOAD_COMLIB
-#define _HDLOAD_COMLIB 1
-
-/* ComLib関係 */
-
-unsigned char *ComLib_main(const unsigned char *p, unsigned char *q);
-
-#endif
\ No newline at end of file
diff --git a/dependent.h b/dependent.h
deleted file mode 100644 (file)
index 3c9c873..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-#ifndef _HDLOAD_DEPENDENT
-#define _HDLOAD_DEPENDENT
-
-/* OSに依存する関数群を定義する。 */
-
-void *mallocRWE(int bytes); // 実行権付きメモリのmalloc.
-void drv_openWin(int x, int y, unsigned char *buf, char *winClosed);
-void drv_flshWin(int sx, int sy, int x0, int y0);
-void drv_sleep(int msec);
-
-#endif
\ No newline at end of file
similarity index 99%
rename from dependent.c
rename to dpndenv.c
index 5bc3c58..4b958c1 100644 (file)
+++ b/dpndenv.c
@@ -1,15 +1,21 @@
 #include "osecpu.h"
-#include <windows.h>
+
 
 #if (DRV_OSNUM == 0x0002)
+//
+// for Mac OSX 32-bit
+//
 
-#error "Your OS is not supported."
 
 #elif (DRV_OSNUM == 0x0003)
 
 #error "Your OS is not supported."
 
 #elif (DRV_OSNUM == 0x0001)
+//
+// for Windows 32-bit
+//
+#include <windows.h>
 
 #define TIMER_ID                        1
 #define TIMER_INTERVAL         10
index a8e8989..489c696 100644 (file)
@@ -31,12 +31,12 @@ void randStatInit(unsigned seed)
        return;
 }
 
-const unsigned char *searchArg(int argc, const unsigned char **argv, const unsigned char *tag, int i)
+const char *searchArg(int argc, const char **argv, const char *tag, int i)
 {
        int j, l;
-       const unsigned char *r = NULL;
+       const char *r = NULL;
        if (tag != NULL) {
-               l = strlen(tag);
+               l = (int)strlen(tag);
                for (j = 1; j < argc; j++) {
                        if (strncmp(argv[j], tag, l) == 0) {
                                r = argv[j] + l;
@@ -235,7 +235,7 @@ void devFunc(struct Regs *r)
 
        switch (r->ireg[0x30]) {
        case 0xff00:
-               printf("R31=%d(dec)¥n", r->ireg[0x31]);
+               printf("R31=%d(dec)\n", r->ireg[0x31]);
                break;
 
        case 0xff01:
@@ -243,17 +243,17 @@ void devFunc(struct Regs *r)
                if (r->buf0 == NULL)
                        r->buf0 = malloc(1024 * 1024);
                if (r->argc <= r->ireg[0x31]) {
-                       fprintf(stderr, "devFunc: error: R30=ff01: argc error: R31=%08X¥n", r->ireg[0x31]);
+                       fprintf(stderr, "devFunc: error: R30=ff01: argc error: R31=%08X\n", r->ireg[0x31]);
                        exit(1);
                }
                fp = fopen(r->argv[r->ireg[0x31]], "rb");
                if (fp == NULL) {
-                       fprintf(stderr, "devFunc: error: R30=ff01: fopen error: '%s'¥n", r->argv[r->ireg[0x31]]);
+                       fprintf(stderr, "devFunc: error: R30=ff01: fopen error: '%s'\n", r->argv[r->ireg[0x31]]);
                        exit(1);
                }
-               i = fread(r->buf0, 1, 1024 * 1024 - 4, fp);
+               i = (int)fread(r->buf0, 1, 1024 * 1024 - 4, fp);
                if (i >= 1024 * 1024 - 4 || i < 0) {
-                       fprintf(stderr, "devFunc: error: R30=ff01: fread error: '%s'¥n", r->argv[r->ireg[0x31]]);
+                       fprintf(stderr, "devFunc: error: R30=ff01: fread error: '%s'\n", r->argv[r->ireg[0x31]]);
                        exit(1);
                }
                fclose(fp);
@@ -267,16 +267,16 @@ void devFunc(struct Regs *r)
        case 0xff02:
                /* return: none */
                if (r->argc <= r->ireg[0x31]) {
-                       fprintf(stderr, "devFunc: error: R30=ff02: argc error: R31=%08X¥n", r->ireg[0x31]);
+                       fprintf(stderr, "devFunc: error: R30=ff02: argc error: R31=%08X\n", r->ireg[0x31]);
                        exit(1);
                }
                fp = fopen(r->argv[r->ireg[0x31]], "wb");
                if (fp == NULL) {
-                       fprintf(stderr, "devFunc: error: R30=ff02: fopen error: '%s'¥n", r->argv[r->ireg[0x31]]);
+                       fprintf(stderr, "devFunc: error: R30=ff02: fopen error: '%s'\n", r->argv[r->ireg[0x31]]);
                        exit(1);
                }
                if (r->ireg[0x32] >= 1024 * 1024 || r->ireg[0x32] < 0){
-                       fprintf(stderr, "devFunc: error: R30=ff02: fwrite error: R02=%08X¥n", r->ireg[0x32]);
+                       fprintf(stderr, "devFunc: error: R30=ff02: fwrite error: R02=%08X\n", r->ireg[0x32]);
                        exit(1);
                }
                fwrite(r->preg[0x31].p, 1, r->ireg[0x32], fp);
@@ -293,7 +293,7 @@ void devFunc(struct Regs *r)
                break;
 
        case 0xff04:
-               printf("P31.(p-p0)=%d(dec)¥n", r->preg[0x31].p - r->preg[0x31].p0);
+               printf("P31.(p-p0)=%d(dec)\n", (int)(r->preg[0x31].p - r->preg[0x31].p0));
                break;
 
        case 0xff05:
@@ -334,7 +334,7 @@ void devFunc(struct Regs *r)
                                r->preg[0x31].typ = 0; // TYP_CODE
                                r->preg[0x31].p0 = r->jitbuf;
                                r->preg[0x31].p1 = r->jitbuf + 1;
-                               //int j; for (j = 0; j < i; j++) printf("%02X ", r->jitbuf[j]); putchar('¥n');
+                               //int j; for (j = 0; j < i; j++) printf("%02X ", r->jitbuf[j]); putchar('\n');
                                r->jitbuf += i;
                                static unsigned char ff08_ret[3] = { 0x1e, 0x3f, 0x30 };
                                i = jitCompiler(r->jitbuf, r->jitbuf1, ff08_ret, ff08_ret + 3, puc, r->label, r->maxLabels, r->ireg[0x32], -1, JITC_NOSTARTUP + JITC_PHASE1 + 0);
@@ -587,7 +587,7 @@ void devFunc(struct Regs *r)
                break;
 
        default:
-               printf("devFunc: error: R30=%08X¥n", r->ireg[0x30]);
+               printf("devFunc: error: R30=%08X\n", r->ireg[0x30]);
                exit(1);
 
        }
diff --git a/function.h b/function.h
deleted file mode 100644 (file)
index 7a8faf5..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-#ifndef _HDLOAD_FUNCTION
-#define _HDLOAD_FUNCTION 1
-
-/* プログラムのすべての部分で汎用的に利用できる関数を定義する。 */
-
-
-void dbgrMain(struct Regs *r);
-const unsigned char *searchArg(int argc, const unsigned char **argv, const unsigned char *tag, int i); // コマンドライン引数処理.
-void randStatInit(unsigned int seed);
-void randStatNext();
-void devFunc(struct Regs *r); // junkApiを処理する関数
-
-
-
-
-#endif
\ No newline at end of file
diff --git a/jitc.c b/jitc.c
index 3192437..3674934 100644 (file)
--- a/jitc.c
+++ b/jitc.c
@@ -20,7 +20,7 @@
 void errorHandler(struct Regs *r)
 {
        puts("security error! abort...");
-       printf("debugInfo0=%d, debugInfo1=%d¥n", r->debugInfo0, r->debugInfo1);
+       printf("debugInfo0=%d, debugInfo1=%d\n", r->debugInfo0, r->debugInfo1);
 #if (USE_DEBUGGER != 0)
        dbgrMain(r);
 #endif
@@ -309,7 +309,8 @@ int jitCompiler(unsigned char *dst, unsigned char *dst1, const unsigned char *sr
 /* 本来ならこのレイヤでは文法チェックしない */
 {
        struct JitCompWork w;
-       unsigned char *dst00 = dst, *errmsg = "", *enter0 = NULL, *tmp_ucp;
+       unsigned char *dst00 = dst, *enter0 = NULL, *tmp_ucp;
+    char *errmsg = "";
        const unsigned char *oldsrc;
        int timecount = 0, i, j = 0, lastlabel = -1, debugInfo0 = -1;
        int reg0, reg1, reg2, cmp0reg = -1, cmp0lev = 0;
@@ -395,7 +396,7 @@ int jitCompiler(unsigned char *dst, unsigned char *dst1, const unsigned char *sr
                        }
                        if ((flags & JITC_PHASE1) == 0) {
                                i = jitCompGetLabelNum(&w, src + 2);
-                               //printf("i=%06X %06X¥n", i, src-src0);
+                               //printf("i=%06X %06X\n", i, src-src0);
                                if (label[i].opt != 0 && w.err == 0) { w.err = JITC_ERR_LABELREDEF; goto err_w; }
                                if (w.prefix != 0) { w.err = JITC_ERR_PREFIX; goto err_w; }
                                label[i].opt = src[1] + 1;
@@ -449,7 +450,7 @@ int jitCompiler(unsigned char *dst, unsigned char *dst1, const unsigned char *sr
                                        w.prefix = 0;
                                }
                                j = 0;
-                               if ((flags & JITC_PHASE1) != 0 || ((flags & JITC_PHASE1) == 0) && label[i].opt != 0)
+                               if ((flags & JITC_PHASE1) != 0 || (((flags & JITC_PHASE1) == 0) && label[i].opt != 0))
                                        j = label[i].p - (w.dst + 4);
                                jitCompPutImm32(&w, j);
 #if (jitCompA0001_OPTIMIZE_JMP != 0)
@@ -1135,7 +1136,7 @@ int jitCompiler(unsigned char *dst, unsigned char *dst1, const unsigned char *sr
                                        //      if (label[i].typ != 1) { w.err = JITC_ERR_LABELTYP; goto err_w; }
                                }
                                j = 0;
-                               if ((flags & JITC_PHASE1) != 0 || ((flags & JITC_PHASE1) == 0) && label[i].opt != 0)
+                               if ((flags & JITC_PHASE1) != 0 || (((flags & JITC_PHASE1) == 0) && label[i].opt != 0))
                                        j = label[i].p - (w.dst + 4);
                                jitCompPutImm32(&w, j);
 #if (jitCompA0001_OPTIMIZE_JMP != 0)
@@ -1383,8 +1384,8 @@ err_w:
        if (w.err == (JITC_ERR_MASK & JITC_ERR_BADTYPE))                errmsg = "bad type code";
        if (w.err == (JITC_ERR_MASK & JITC_ERR_PREFIXFAR))              errmsg = "prefix internal error";
        if (w.err == (JITC_ERR_MASK & JITC_ERR_INTERNAL))               errmsg = "general internal error";
-       if (*errmsg != '¥0') {
-               fprintf(stderr, "JITC: %s at %06X (debugInfo0=%d)¥n    ", errmsg, src - src0, debugInfo0);
+       if (*errmsg != '\0') {
+               fprintf(stderr, "JITC: %s at %06X (debugInfo0=%d)\n    ", errmsg, src - src0, debugInfo0);
                for (i = 0; i < 16; i++)
                        fprintf(stderr, "%02X ", src[i]);
                static char *table[0x30] = {
@@ -1396,7 +1397,7 @@ err_w:
                        "PCMPE", "PCMPNE", "PCMPL", "PCMPGE", "PCMPLE", "PCMPG", "??", "EXT" };
                errmsg = "??";
                if (*src < 0x30) errmsg = table[*src];
-               fprintf(stderr, "(%s)¥n", errmsg);
+               fprintf(stderr, "(%s)\n", errmsg);
        }
        return -1;
 }
@@ -1571,7 +1572,7 @@ int jitc0(unsigned char **qq, unsigned char *q1, const unsigned char *p0, const
 
 #if (USE_DEBUGGER != 0)
 
-int dbgrGetRegNum(const unsigned char *p)
+int dbgrGetRegNum(const char *p)
 {
        int i, j, r = -1;
        if (p[2] <= ' ') {
@@ -1589,20 +1590,20 @@ void dbgrMain(struct Regs *r)
 {
        if (r->dbgr == 0) return;
        for (;;) {
-               unsigned char cmd[64], *p;
+               char cmd[64], *p;
                int i, j, k;
-               printf("¥ndbgr>");
+               printf("\ndbgr>");
                p = fgets(cmd, 64, stdin);
                if (p == NULL) break;
-               if (cmd[0] == '¥0') continue;
+               if (cmd[0] == '\0') continue;
                if (cmd[0] == 'q' && cmd[1] <= ' ') break;
-               if (cmd[0] == 'p' && cmd[1] <= ' ' && cmd[1] != '¥0') {
+               if (cmd[0] == 'p' && cmd[1] <= ' ' && cmd[1] != '\0') {
                        p = &cmd[2];
-                       while (*p <= ' ' && *p != '¥0') p++;
+                       while (*p <= ' ' && *p != '\0') p++;
                        if (*p == 'R') {
                                i = dbgrGetRegNum(p + 1);
                                if (0 <= i && i <= 0x3f) {
-                                       printf("R%02X = 0x%08X = %d¥n", i, r->ireg[i], r->ireg[i]);
+                                       printf("R%02X = 0x%08X = %d\n", i, r->ireg[i], r->ireg[i]);
                                }
                                else
                                        puts("register name error");
@@ -1613,7 +1614,7 @@ void dbgrMain(struct Regs *r)
                                if (0 <= i && i <= 0x3f) {
                                        p = "invalid";
                                        if (0 <= r->preg[i].typ && r->preg[i].typ <= 0x15) {
-                                               static unsigned char *typName[] = {
+                                               static char *typName[] = {
                                                        "T_CODE", "T_VPTR", "T_SINT8", "T_UINT8",
                                                        "T_SINT16", "T_UINT16", "T_SINT32", "T_UINT32",
                                                        "T_SINT4", "T_UINT4", "T_SINT2", "T_UINT2",
@@ -1623,14 +1624,14 @@ void dbgrMain(struct Regs *r)
                                                };
                                                p = typName[r->preg[i].typ];
                                        }
-                                       printf("P%02X:¥n  type = %s(%04X),  (origin-ptr) = 0x%08X¥n", i, p, r->preg[i].typ, r->preg[i].p0);
+                                       printf("P%02X:\n  type = %s(%04X),  (origin-ptr) = 0x%08X\n", i, p, r->preg[i].typ, (unsigned int)(r->preg[i].p0));
                                        if (r->preg[i].p != NULL && r->preg[i].p0 != NULL) {
                                                j = jitCompA000_dataWidth(jitCompA000_convTyp(r->preg[i].typ)) >> 3;
                                                if (j <= 0) j = 1;
                                                k = (r->preg[i].p1 - r->preg[i].p0) / j;
-                                               printf("  size = 0x%08X = %d¥n", k, k);
+                                               printf("  size = 0x%08X = %d\n", k, k);
                                                k = (r->preg[i].p - r->preg[i].p0) / j;
-                                               printf("  pos  = 0x%08X = %d¥n", k, k);
+                                               printf("  pos  = 0x%08X = %d\n", k, k);
                                        }
                                        else {
                                                puts("  null pointer");
diff --git a/jitc.h b/jitc.h
deleted file mode 100644 (file)
index 029cdbf..0000000
--- a/jitc.h
+++ /dev/null
@@ -1,23 +0,0 @@
-#ifndef _HDLOAD_JITC
-#define _HDLOAD_JITC 1
-
-/* JITCのフラグ群 */
-#define        JITC_LV_SLOWEST         0       /* デバッグ支援は何でもやる */
-#define        JITC_LV_SLOWER          1       /* エラーモジュールはレポートできるが、行番号は分からない、テストは過剰 */
-#define        JITC_LV_SAFE            2       /* とにかく止まる、場所は不明、テストは必要最小限 */
-#define        JITC_LV_FASTER          4       /* 情報は生成するがチェックをしない */
-#define        JITC_LV_FASTEST         5       /* 情報すら生成しない */
-#define JITC_PHASE1                    0x0001
-#define JITC_SKIPCHECK         0x0002  /* セキュリティチェックを省略する(高速危険モード) */
-#define JITC_NOSTARTUP         0x0004
-#define JITC_MAXLABELS         4096
-#define PTRCTRLSIZ                     4096
-
-
-int jitc0(unsigned char **qq, unsigned char *q1, const unsigned char *p0, const unsigned char *p1, int level, struct LabelTable *label);
-int jitCompiler(unsigned char *dst, unsigned char *dst1, const unsigned char *src, const unsigned char *src1, const unsigned char *src0, struct LabelTable *label, int maxLabels, int level, int debugInfo1, int flags);
-unsigned char *jitCompCallFunc(unsigned char *dst, void *func);
-unsigned char *jitCompInit(unsigned char *dst);
-void errorHandler(struct Regs *r);
-
-#endif
diff --git a/main.c b/main.c
index dbf7bc1..2d5d7c8 100644 (file)
--- a/main.c
+++ b/main.c
@@ -39,22 +39,22 @@ int osecpuMain(int argc, char **argv)
        FILE *fp = fopen(SYSLIB_OSE, "rb");
        if (fp == NULL) {
                syslib[0] = '/';
-               strcpy(syslib + 1, argv[0]);
+               strcpy((char *)syslib + 1, argv[0]);
                up = syslib + 1;
-               while (*up != '¥0') up++;
+               while (*up != '\0') up++;
                while (*up != '/' && *up != 0x5c) up--;
                up++;
-               strcpy(up, SYSLIB_OSE);
-               fp = fopen(syslib + 1, "rb");
+               strcpy((char *)up, SYSLIB_OSE);
+               fp = fopen((char *)syslib + 1, "rb");
        }
        if (fp == NULL) {
-               fputs("syslib-file fopen error.¥n", stderr);
+               fputs("syslib-file fopen error.\n", stderr);
                return 1;
        }
        appsiz0 = fread(syslib, 1, SYSLIBSIZ1 - 4, fp);
        fclose(fp);
        if (appsiz0 >= SYSLIBSIZ1 - 4) {
-               fputs("syslib-file too large.¥n", stderr);
+               fputs("syslib-file too large.\n", stderr);
                return 1;
        }
        if (syslib[0] == 0x05 && syslib[1] == 0xc1) {
@@ -68,14 +68,14 @@ int osecpuMain(int argc, char **argv)
        sysjit0 = sysjit1;
        i = jitc0(&sysjit1, sysjit00 + SJITSIZ1, syslib + 32, syslib + SYSLIBSIZ1, JITC_LV_SLOWEST + 9, label);
        if (i != 0) {
-               fputs("syslib-file JITC error.¥n", stderr);
+               fputs("syslib-file JITC error.\n", stderr);
                return 1;
        }
        di1_serial++;
 
        /* アプリバイナリの読み込み */
        if (argc <= 1) { return 0; }
-       const unsigned char *argv1 = argv[1];
+       const char *argv1 = argv[1];
        if (argv1[0] == ':' && argv1[2] == ':') {
                level = argv1[1] - '0';
                if (level < 0 || level > 9)
@@ -84,18 +84,18 @@ int osecpuMain(int argc, char **argv)
        }
        fp = fopen(argv1, "rb");
        if (fp == NULL) {
-               fputs("app-file load error.¥n", stderr);
+               fputs("app-file load error.\n", stderr);
                return 1;
        }
        appsiz1 = appsiz0 = fread(appbin, 1, APPSIZ1 - 4, fp);
        fclose(fp);
        if (appsiz0 >= APPSIZ1 - 4) {
-               fputs("app-file too large.¥n", stderr);
+               fputs("app-file too large.\n", stderr);
                return 1;
        }
        if (appsiz0 < 3) {
        header_error:
-               fputs("app-file header error.¥n", stderr);
+               fputs("app-file header error.\n", stderr);
                return 1;
        }
 
@@ -108,15 +108,15 @@ int osecpuMain(int argc, char **argv)
                appsiz1 = -9;
 #endif
                if (appsiz1 < 0) {
-                       fputs("unsupported-format(tek5)¥n", stderr);
+                       fputs("unsupported-format(tek5)\n", stderr);
                        return 1;
                }
        }
 
        int argDebug = 0, stacksiz = 1;
-       const unsigned char *cp = searchArg(argc, argv, "debug:", 0);
+       const  char *cp = searchArg(argc, (const char **)argv, "debug:", 0);
        if (cp != NULL) argDebug = *cp - '0';
-       cp = searchArg(argc, argv, "stack:", 0);
+       cp = searchArg(argc, (const char **)argv, "stack:", 0);
        if (cp != NULL) stacksiz = strtol(cp, NULL, 0);
 
        struct Regs regs;
@@ -142,7 +142,7 @@ int osecpuMain(int argc, char **argv)
                (*jitfunc)(((char *)&regs) + 128); /* サイズを節約するためにEBPを128バイトずらす */
                if (regs.ireg[0] != 0) {
                        jp = regs.preg[2].p - 1;
-                       fprintf(stderr, "unpack error: %02X (at %06X) (R00=%d)¥n", *jp, jp - systmp0, regs.ireg[0]);
+                       fprintf(stderr, "unpack error: %02X (at %06X) (R00=%d)\n", *jp, jp - systmp0, regs.ireg[0]);
                        if ((argDebug & 2) != 0) {
                                fp = fopen("debug2.bin", "wb");
                                fwrite(systmp0, 1, jp - systmp0 + 16, fp);
@@ -186,7 +186,7 @@ int osecpuMain(int argc, char **argv)
        }
 
        regs.argc = argc;
-       regs.argv = argv;
+       regs.argv = (const char **)argv;
        regs.buf0 = regs.buf1 = NULL;
        regs.preg[0x28].p = p28;
        regs.preg[0x28].typ = 0; // TYP_CODE
@@ -198,7 +198,7 @@ int osecpuMain(int argc, char **argv)
        regs.winClosed = 0;
        regs.autoSleep = 0;
        regs.setjmpEnv = &setjmpEnv;
-       regs.lastConsoleChar = '¥n';
+       regs.lastConsoleChar = '\n';
 
        regs.label = label;
        regs.maxLabels = JITC_MAXLABELS;
@@ -206,7 +206,7 @@ int osecpuMain(int argc, char **argv)
        regs.jitbuf1 = jitbuf + 1024 * 1024;
        regs.errHndl = &errorHandler;
        regs.dbgr = 0;
-       if (searchArg(argc, argv, "dbgr:1", 0) != NULL) regs.dbgr = 1;
+       if (searchArg(argc, (const char **)argv, "dbgr:1", 0) != NULL) regs.dbgr = 1;
 
        if ((argDebug & 1) != 0) {
                fp = fopen("debug1.bin", "wb");
@@ -224,17 +224,17 @@ int osecpuMain(int argc, char **argv)
                while (regs.winClosed == 0)
                        drv_sleep(100);
        }
-       if (regs.lastConsoleChar != '¥n')
-               putchar('¥n');
+       if (regs.lastConsoleChar != '\n')
+               putchar('\n');
 
        tm2 = clock() / (double)CLOCKS_PER_SEC;
 
        /* 実行結果確認のためのレジスタダンプ */
-       if (searchArg(argc, argv, "verbose:1", 0) != NULL) {
-               printf("time: JITC=%.3f[sec], exec=%.3f[sec]¥n", tm1 - tm0, tm2 - tm1);
-               printf("size: OSECPU=%d, decomp=%d, tmp=%d, native=%d¥n", appsiz0, appsiz1, tmpsiz, appsiz2);
-               printf("result:¥n");
-               printf("R00:0x%08X  R01:0x%08X  R02:0x%08X  R03:0x%08X¥n", regs.ireg[0], regs.ireg[1], regs.ireg[2], regs.ireg[3]);
+       if (searchArg(argc, (const char **)argv, "verbose:1", 0) != NULL) {
+               printf("time: JITC=%.3f[sec], exec=%.3f[sec]\n", tm1 - tm0, tm2 - tm1);
+               printf("size: OSECPU=%d, decomp=%d, tmp=%d, native=%d\n", appsiz0, appsiz1, tmpsiz, appsiz2);
+               printf("result:\n");
+               printf("R00:0x%08X  R01:0x%08X  R02:0x%08X  R03:0x%08X\n", regs.ireg[0], regs.ireg[1], regs.ireg[2], regs.ireg[3]);
        }
 #if (USE_DEBUGGER != 0)
        dbgrMain(&regs);
index ee99d53..a0d218f 100644 (file)
--- a/osecpu.h
+++ b/osecpu.h
@@ -1,8 +1,9 @@
 #ifndef _HDLOAD_OSECPU
 #define _HDLOAD_OSECPU 1
 
-// プロジェクトのすべてのファイルで読み込むヘッダ
-
+//
+// Including stdc headers
+//
 #include <stdio.h>
 #include <string.h>
 #include <limits.h>
 #include <setjmp.h>
 #include <stdlib.h>
 
+
+//
+// Compile options
+//
+
+// Target architecture
+// 1 : i386
+#define JITC_ARCNUM 0x0001
+
+// Target operating system
+// 1 : Windows 32bit
+// 2 : Mac OSX 32bit
+// 3 : blike for Linux
+#define DRV_OSNUM 0x0001
+
+// Decoder (syslib.ose) setting
+// syslib.ose is necessary to work OSECPU
+#define SYSLIB_OSE     "syslib.ose"
+#define SIGN1          0xe1
+
+#define USE_DEBUGGER   1
+#define USE_TEK5               0       //元々は1
+
+#define        APPSIZ1         1 * 1024 * 1024 /* 1MB for now */
+#define        JITSIZ1         1 * 1024 * 1024 /* 1MB for now */
+#define        SJITSIZ1        1 * 1024 * 1024 /* 1MB for now */
+#define        SYSLIBSIZ1      1 * 1024 * 1024 /* 1MB for now */
+#define SYSTMP0SIZ     1 * 1024 * 1024 /* 1MB for now */
+#define SYSTMP1SIZ     2 * 1024 * 1024 /* 1MB for now */
+
+#define KEYBUFSIZ              4096
+
+//
+// HOSECPU structures
+//
 struct PtrCtrl {
        int liveSign;
        int size, typ;
        unsigned char *p0;
 };
+typedef struct PtrCtrl HOSECPU_PointerControlTag;
 
 struct Ptr {   /* 32バイト(=256bit!) */
        unsigned char *p;
@@ -24,24 +61,27 @@ struct Ptr {        /* 32バイト(=256bit!) */
        struct PtrCtrl *pls;
        int flags, dummy;       /* read/writeなど */
 };
+typedef struct Ptr HOSECPU_PointerRegisterEntry;
 
 struct LabelTable {
        unsigned char *p, *p1;
        int opt, typ;
 };
 
+typedef struct LabelTable HOSECPU_LabelListTag;
+
 struct Regs {
-       int ireg[64]; /* 32bit整数レジスタ */
-       struct Ptr preg[64];    /* ポインタレジスタ */
+       int ireg[64];           /* 32bit整数レジスタ */
+       struct Ptr preg[64];    /* ポインタレジスタ */
 
        int debugInfo0, debugInfo1, dmy[2]; /* 2304 */
-       struct PtrCtrl *ptrCtrl; /* 2320 */
+       struct PtrCtrl *ptrCtrl;            /* 2320 */
        char winClosed, autoSleep;
        jmp_buf *setjmpEnv;
 
        /* for-junkApi */
        int argc;
-       const unsigned char **argv;
+       const char **argv;
        unsigned char *buf0, *buf1, *junkStack, lastConsoleChar, *junkStack1;
 
        struct LabelTable *label;
@@ -52,7 +92,11 @@ struct Regs {
        int mapDi1s[16][16];
 };
 
-#define KEY_ENTER              '¥n'
+//
+// Define constant values
+//
+
+#define KEY_ENTER              '\n'
 #define KEY_ESC                        27
 #define KEY_BACKSPACE  8
 #define KEY_TAB                        9
@@ -67,25 +111,173 @@ struct Regs {
 #define KEY_INS                        0x1028
 #define KEY_DEL                        0x1029
 
+//
+// Grobal static values
+//
+
 static int *keybuf, keybuf_r, keybuf_w, keybuf_c;
 static int *vram = NULL, v_xsiz, v_ysiz;
 static int di1_serial = 0;
 
-// main.c
+//
+// Functions
+//
+
+// @main.c
 void putKeybuf(int i);
 
-#include "switch.h"
-#include "function.h"
-#include "dependent.h"
-#include "jitc.h"
-#include "screen.h"
-#include "comlib.h"
+// @comlib.c
+unsigned char *ComLib_main(const unsigned char *p, unsigned char *q);
+// @dpndenv.c
+// OSに依存する関数群を定義する。
+void *mallocRWE(int bytes); // 実行権付きメモリのmalloc.
+void drv_openWin(int x, int y, unsigned char *buf, char *winClosed);
+void drv_flshWin(int sx, int sy, int x0, int y0);
+void drv_sleep(int msec);
 
-#if (USE_TEK5 != 0)
+// @function.c
+void dbgrMain(struct Regs *r);
+const char *searchArg(int argc, const char **argv, const char *tag, int i); // コマンドライン引数処理.
+void randStatInit(unsigned int seed);
+void randStatNext();
+void devFunc(struct Regs *r); // junkApiを処理する関数
+
+// @jitc.c
+/* JITCのフラグ群 */
+#define        JITC_LV_SLOWEST         0       /* デバッグ支援は何でもやる */
+#define        JITC_LV_SLOWER          1       /* エラーモジュールはレポートできるが、行番号は分からない、テストは過剰 */
+#define        JITC_LV_SAFE            2       /* とにかく止まる、場所は不明、テストは必要最小限 */
+#define        JITC_LV_FASTER          4       /* 情報は生成するがチェックをしない */
+#define        JITC_LV_FASTEST         5       /* 情報すら生成しない */
+#define JITC_PHASE1                    0x0001
+#define JITC_SKIPCHECK         0x0002  /* セキュリティチェックを省略する(高速危険モード) */
+#define JITC_NOSTARTUP         0x0004
+#define JITC_MAXLABELS         4096
+#define PTRCTRLSIZ                     4096
+
+
+int jitc0(unsigned char **qq, unsigned char *q1, const unsigned char *p0, const unsigned char *p1, int level, struct LabelTable *label);
+int jitCompiler(unsigned char *dst, unsigned char *dst1, const unsigned char *src, const unsigned char *src1, const unsigned char *src0, struct LabelTable *label, int maxLabels, int level, int debugInfo1, int flags);
+unsigned char *jitCompCallFunc(unsigned char *dst, void *func);
+unsigned char *jitCompInit(unsigned char *dst);
+void errorHandler(struct Regs *r);
+
+// @screen.c
+static unsigned char fontdata[] = {
+       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+       0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x10, 0x10, 0x00, 0x00,
+       0x28, 0x28, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+       0x00, 0x44, 0x44, 0x44, 0xfe, 0x44, 0x44, 0x44, 0x44, 0x44, 0xfe, 0x44, 0x44, 0x44, 0x00, 0x00,
+       0x10, 0x3a, 0x56, 0x92, 0x92, 0x90, 0x50, 0x38, 0x14, 0x12, 0x92, 0x92, 0xd4, 0xb8, 0x10, 0x10,
+       0x62, 0x92, 0x94, 0x94, 0x68, 0x08, 0x10, 0x10, 0x20, 0x2c, 0x52, 0x52, 0x92, 0x8c, 0x00, 0x00,
+       0x00, 0x70, 0x88, 0x88, 0x88, 0x90, 0x60, 0x47, 0xa2, 0x92, 0x8a, 0x84, 0x46, 0x39, 0x00, 0x00,
+       0x04, 0x08, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+       0x02, 0x04, 0x08, 0x08, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x04, 0x02, 0x00,
+       0x80, 0x40, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x20, 0x20, 0x40, 0x80, 0x00,
+       0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x92, 0x54, 0x38, 0x54, 0x92, 0x10, 0x00, 0x00, 0x00, 0x00,
+       0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0xfe, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00,
+       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x08, 0x08, 0x10,
+       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00,
+       0x02, 0x02, 0x04, 0x04, 0x08, 0x08, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x40, 0x80, 0x80,
+       0x00, 0x18, 0x24, 0x24, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x24, 0x24, 0x18, 0x00, 0x00,
+       0x00, 0x08, 0x18, 0x28, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x3e, 0x00, 0x00,
+       0x00, 0x18, 0x24, 0x42, 0x42, 0x02, 0x04, 0x08, 0x10, 0x20, 0x20, 0x40, 0x40, 0x7e, 0x00, 0x00,
+       0x00, 0x18, 0x24, 0x42, 0x02, 0x02, 0x04, 0x18, 0x04, 0x02, 0x02, 0x42, 0x24, 0x18, 0x00, 0x00,
+       0x00, 0x0c, 0x0c, 0x0c, 0x14, 0x14, 0x14, 0x24, 0x24, 0x44, 0x7e, 0x04, 0x04, 0x1e, 0x00, 0x00,
+       0x00, 0x7c, 0x40, 0x40, 0x40, 0x58, 0x64, 0x02, 0x02, 0x02, 0x02, 0x42, 0x24, 0x18, 0x00, 0x00,
+       0x00, 0x18, 0x24, 0x42, 0x40, 0x58, 0x64, 0x42, 0x42, 0x42, 0x42, 0x42, 0x24, 0x18, 0x00, 0x00,
+       0x00, 0x7e, 0x42, 0x42, 0x04, 0x04, 0x08, 0x08, 0x08, 0x10, 0x10, 0x10, 0x10, 0x38, 0x00, 0x00,
+       0x00, 0x18, 0x24, 0x42, 0x42, 0x42, 0x24, 0x18, 0x24, 0x42, 0x42, 0x42, 0x24, 0x18, 0x00, 0x00,
+       0x00, 0x18, 0x24, 0x42, 0x42, 0x42, 0x42, 0x42, 0x26, 0x1a, 0x02, 0x42, 0x24, 0x18, 0x00, 0x00,
+       0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00,
+       0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x08, 0x08, 0x10,
+       0x00, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x00,
+       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+       0x00, 0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x00,
+       0x00, 0x38, 0x44, 0x82, 0x82, 0x82, 0x04, 0x08, 0x10, 0x10, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00,
+       0x00, 0x38, 0x44, 0x82, 0x9a, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0x9c, 0x80, 0x46, 0x38, 0x00, 0x00,
+       0x00, 0x18, 0x18, 0x18, 0x18, 0x24, 0x24, 0x24, 0x24, 0x7e, 0x42, 0x42, 0x42, 0xe7, 0x00, 0x00,
+       0x00, 0xf0, 0x48, 0x44, 0x44, 0x44, 0x48, 0x78, 0x44, 0x42, 0x42, 0x42, 0x44, 0xf8, 0x00, 0x00,
+       0x00, 0x3a, 0x46, 0x42, 0x82, 0x80, 0x80, 0x80, 0x80, 0x80, 0x82, 0x42, 0x44, 0x38, 0x00, 0x00,
+       0x00, 0xf8, 0x44, 0x44, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x44, 0x44, 0xf8, 0x00, 0x00,
+       0x00, 0xfe, 0x42, 0x42, 0x40, 0x40, 0x44, 0x7c, 0x44, 0x40, 0x40, 0x42, 0x42, 0xfe, 0x00, 0x00,
+       0x00, 0xfe, 0x42, 0x42, 0x40, 0x40, 0x44, 0x7c, 0x44, 0x44, 0x40, 0x40, 0x40, 0xf0, 0x00, 0x00,
+       0x00, 0x3a, 0x46, 0x42, 0x82, 0x80, 0x80, 0x9e, 0x82, 0x82, 0x82, 0x42, 0x46, 0x38, 0x00, 0x00,
+       0x00, 0xe7, 0x42, 0x42, 0x42, 0x42, 0x42, 0x7e, 0x42, 0x42, 0x42, 0x42, 0x42, 0xe7, 0x00, 0x00,
+       0x00, 0x7c, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x7c, 0x00, 0x00,
+       0x00, 0x1f, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x84, 0x48, 0x30, 0x00,
+       0x00, 0xe7, 0x42, 0x44, 0x48, 0x50, 0x50, 0x60, 0x50, 0x50, 0x48, 0x44, 0x42, 0xe7, 0x00, 0x00,
+       0x00, 0xf0, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x42, 0x42, 0xfe, 0x00, 0x00,
+       0x00, 0xc3, 0x42, 0x66, 0x66, 0x66, 0x5a, 0x5a, 0x5a, 0x42, 0x42, 0x42, 0x42, 0xe7, 0x00, 0x00,
+       0x00, 0xc7, 0x42, 0x62, 0x62, 0x52, 0x52, 0x52, 0x4a, 0x4a, 0x4a, 0x46, 0x46, 0xe2, 0x00, 0x00,
+       0x00, 0x38, 0x44, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x44, 0x38, 0x00, 0x00,
+       0x00, 0xf8, 0x44, 0x42, 0x42, 0x42, 0x44, 0x78, 0x40, 0x40, 0x40, 0x40, 0x40, 0xf0, 0x00, 0x00,
+       0x00, 0x38, 0x44, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x92, 0x8a, 0x44, 0x3a, 0x00, 0x00,
+       0x00, 0xfc, 0x42, 0x42, 0x42, 0x42, 0x7c, 0x44, 0x42, 0x42, 0x42, 0x42, 0x42, 0xe7, 0x00, 0x00,
+       0x00, 0x3a, 0x46, 0x82, 0x82, 0x80, 0x40, 0x38, 0x04, 0x02, 0x82, 0x82, 0xc4, 0xb8, 0x00, 0x00,
+       0x00, 0xfe, 0x92, 0x92, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x7c, 0x00, 0x00,
+       0x00, 0xe7, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x24, 0x3c, 0x00, 0x00,
+       0x00, 0xe7, 0x42, 0x42, 0x42, 0x42, 0x24, 0x24, 0x24, 0x24, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00,
+       0x00, 0xe7, 0x42, 0x42, 0x42, 0x5a, 0x5a, 0x5a, 0x5a, 0x24, 0x24, 0x24, 0x24, 0x24, 0x00, 0x00,
+       0x00, 0xe7, 0x42, 0x42, 0x24, 0x24, 0x24, 0x18, 0x24, 0x24, 0x24, 0x42, 0x42, 0xe7, 0x00, 0x00,
+       0x00, 0xee, 0x44, 0x44, 0x44, 0x28, 0x28, 0x28, 0x10, 0x10, 0x10, 0x10, 0x10, 0x7c, 0x00, 0x00,
+       0x00, 0xfe, 0x84, 0x84, 0x08, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x42, 0x82, 0xfe, 0x00, 0x00,
+       0x00, 0x3e, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3e, 0x00,
+       0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x20, 0x10, 0x10, 0x08, 0x08, 0x04, 0x04, 0x04, 0x02, 0x02,
+       0x00, 0x7c, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x7c, 0x00,
+       0x00, 0x10, 0x28, 0x44, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x00,
+       0x10, 0x08, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+       0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x08, 0x04, 0x3c, 0x44, 0x84, 0x84, 0x8c, 0x76, 0x00, 0x00,
+       0xc0, 0x40, 0x40, 0x40, 0x40, 0x58, 0x64, 0x42, 0x42, 0x42, 0x42, 0x42, 0x64, 0x58, 0x00, 0x00,
+       0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x4c, 0x84, 0x84, 0x80, 0x80, 0x82, 0x44, 0x38, 0x00, 0x00,
+       0x0c, 0x04, 0x04, 0x04, 0x04, 0x34, 0x4c, 0x84, 0x84, 0x84, 0x84, 0x84, 0x4c, 0x36, 0x00, 0x00,
+       0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x44, 0x82, 0x82, 0xfc, 0x80, 0x82, 0x42, 0x3c, 0x00, 0x00,
+       0x0e, 0x10, 0x10, 0x10, 0x10, 0x7c, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x7c, 0x00, 0x00,
+       0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x4c, 0x84, 0x84, 0x84, 0x84, 0x4c, 0x34, 0x04, 0x04, 0x78,
+       0xc0, 0x40, 0x40, 0x40, 0x40, 0x58, 0x64, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0xe3, 0x00, 0x00,
+       0x00, 0x10, 0x10, 0x00, 0x00, 0x30, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x38, 0x00, 0x00,
+       0x00, 0x04, 0x04, 0x00, 0x00, 0x0c, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x08, 0x30,
+       0xc0, 0x40, 0x40, 0x40, 0x40, 0x4e, 0x44, 0x48, 0x50, 0x60, 0x50, 0x48, 0x44, 0xe6, 0x00, 0x00,
+       0x30, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x38, 0x00, 0x00,
+       0x00, 0x00, 0x00, 0x00, 0x00, 0xf6, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0xdb, 0x00, 0x00,
+       0x00, 0x00, 0x00, 0x00, 0x00, 0xd8, 0x64, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0xe3, 0x00, 0x00,
+       0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x44, 0x82, 0x82, 0x82, 0x82, 0x82, 0x44, 0x38, 0x00, 0x00,
+       0x00, 0x00, 0x00, 0x00, 0x00, 0xd8, 0x64, 0x42, 0x42, 0x42, 0x42, 0x42, 0x64, 0x58, 0x40, 0xe0,
+       0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0x4c, 0x84, 0x84, 0x84, 0x84, 0x84, 0x4c, 0x34, 0x04, 0x0e,
+       0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x62, 0x42, 0x40, 0x40, 0x40, 0x40, 0x40, 0xe0, 0x00, 0x00,
+       0x00, 0x00, 0x00, 0x00, 0x00, 0x7a, 0x86, 0x82, 0xc0, 0x38, 0x06, 0x82, 0xc2, 0xbc, 0x00, 0x00,
+       0x00, 0x00, 0x10, 0x10, 0x10, 0x7c, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x0e, 0x00, 0x00,
+       0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x46, 0x3b, 0x00, 0x00,
+       0x00, 0x00, 0x00, 0x00, 0x00, 0xe7, 0x42, 0x42, 0x42, 0x24, 0x24, 0x24, 0x18, 0x18, 0x00, 0x00,
+       0x00, 0x00, 0x00, 0x00, 0x00, 0xe7, 0x42, 0x42, 0x5a, 0x5a, 0x5a, 0x24, 0x24, 0x24, 0x00, 0x00,
+       0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0x44, 0x28, 0x28, 0x10, 0x28, 0x28, 0x44, 0xc6, 0x00, 0x00,
+       0x00, 0x00, 0x00, 0x00, 0x00, 0xe7, 0x42, 0x42, 0x24, 0x24, 0x24, 0x18, 0x18, 0x10, 0x10, 0x60,
+       0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x82, 0x84, 0x08, 0x10, 0x20, 0x42, 0x82, 0xfe, 0x00, 0x00,
+       0x00, 0x06, 0x08, 0x10, 0x10, 0x10, 0x10, 0x60, 0x10, 0x10, 0x10, 0x10, 0x08, 0x06, 0x00, 0x00,
+       0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10,
+       0x00, 0x60, 0x10, 0x08, 0x08, 0x08, 0x08, 0x06, 0x08, 0x08, 0x08, 0x08, 0x10, 0x60, 0x00, 0x00,
+       0x00, 0x72, 0x8c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+       0x00, 0x00, 0x00, 0x00, 0x10, 0x28, 0x44, 0x82, 0xfe, 0x82, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00
+};/* tinyMTの32bit版のアルゴリズムを使っています : http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/TINYMT/index-jp.html */
+
+static int iColor1[] = {
+       0x000000, 0xff0000, 0x00ff00, 0xffff00,
+       0x0000ff, 0xff00ff, 0x00ffff, 0xffffff
+};
 
+void putOsaskChar(int c, struct Regs *r);
+
+void checkString(struct Regs *r, int rxx, int pxx);
+
+void checkRect(struct Regs *r, int rxx);
+
+int loadColor(struct Regs *r, int rxx);
+
+#if (USE_TEK5 != 0)
 /* tek.cを移植するのは大変だと思ったので、断念 */
 #error "tek is not supported. edit switch.h and set USE_TEK5=0"
-
 //     #include "tek.c"
 //     int tek5Decomp(unsigned char *buf, unsigned char *buf1, unsigned char *tmp);
 #endif
diff --git a/screen.h b/screen.h
deleted file mode 100644 (file)
index bb22a1b..0000000
--- a/screen.h
+++ /dev/null
@@ -1,116 +0,0 @@
-#ifndef _HDLOAD_SCREEN
-#define _HDLOAD_SCREEN 1
-
-static unsigned char fontdata[] = {
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-       0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x10, 0x10, 0x00, 0x00,
-       0x28, 0x28, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-       0x00, 0x44, 0x44, 0x44, 0xfe, 0x44, 0x44, 0x44, 0x44, 0x44, 0xfe, 0x44, 0x44, 0x44, 0x00, 0x00,
-       0x10, 0x3a, 0x56, 0x92, 0x92, 0x90, 0x50, 0x38, 0x14, 0x12, 0x92, 0x92, 0xd4, 0xb8, 0x10, 0x10,
-       0x62, 0x92, 0x94, 0x94, 0x68, 0x08, 0x10, 0x10, 0x20, 0x2c, 0x52, 0x52, 0x92, 0x8c, 0x00, 0x00,
-       0x00, 0x70, 0x88, 0x88, 0x88, 0x90, 0x60, 0x47, 0xa2, 0x92, 0x8a, 0x84, 0x46, 0x39, 0x00, 0x00,
-       0x04, 0x08, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-       0x02, 0x04, 0x08, 0x08, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x04, 0x02, 0x00,
-       0x80, 0x40, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x20, 0x20, 0x40, 0x80, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x92, 0x54, 0x38, 0x54, 0x92, 0x10, 0x00, 0x00, 0x00, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0xfe, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x08, 0x08, 0x10,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00,
-       0x02, 0x02, 0x04, 0x04, 0x08, 0x08, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x40, 0x80, 0x80,
-       0x00, 0x18, 0x24, 0x24, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x24, 0x24, 0x18, 0x00, 0x00,
-       0x00, 0x08, 0x18, 0x28, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x3e, 0x00, 0x00,
-       0x00, 0x18, 0x24, 0x42, 0x42, 0x02, 0x04, 0x08, 0x10, 0x20, 0x20, 0x40, 0x40, 0x7e, 0x00, 0x00,
-       0x00, 0x18, 0x24, 0x42, 0x02, 0x02, 0x04, 0x18, 0x04, 0x02, 0x02, 0x42, 0x24, 0x18, 0x00, 0x00,
-       0x00, 0x0c, 0x0c, 0x0c, 0x14, 0x14, 0x14, 0x24, 0x24, 0x44, 0x7e, 0x04, 0x04, 0x1e, 0x00, 0x00,
-       0x00, 0x7c, 0x40, 0x40, 0x40, 0x58, 0x64, 0x02, 0x02, 0x02, 0x02, 0x42, 0x24, 0x18, 0x00, 0x00,
-       0x00, 0x18, 0x24, 0x42, 0x40, 0x58, 0x64, 0x42, 0x42, 0x42, 0x42, 0x42, 0x24, 0x18, 0x00, 0x00,
-       0x00, 0x7e, 0x42, 0x42, 0x04, 0x04, 0x08, 0x08, 0x08, 0x10, 0x10, 0x10, 0x10, 0x38, 0x00, 0x00,
-       0x00, 0x18, 0x24, 0x42, 0x42, 0x42, 0x24, 0x18, 0x24, 0x42, 0x42, 0x42, 0x24, 0x18, 0x00, 0x00,
-       0x00, 0x18, 0x24, 0x42, 0x42, 0x42, 0x42, 0x42, 0x26, 0x1a, 0x02, 0x42, 0x24, 0x18, 0x00, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x08, 0x08, 0x10,
-       0x00, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-       0x00, 0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x00,
-       0x00, 0x38, 0x44, 0x82, 0x82, 0x82, 0x04, 0x08, 0x10, 0x10, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00,
-       0x00, 0x38, 0x44, 0x82, 0x9a, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0x9c, 0x80, 0x46, 0x38, 0x00, 0x00,
-       0x00, 0x18, 0x18, 0x18, 0x18, 0x24, 0x24, 0x24, 0x24, 0x7e, 0x42, 0x42, 0x42, 0xe7, 0x00, 0x00,
-       0x00, 0xf0, 0x48, 0x44, 0x44, 0x44, 0x48, 0x78, 0x44, 0x42, 0x42, 0x42, 0x44, 0xf8, 0x00, 0x00,
-       0x00, 0x3a, 0x46, 0x42, 0x82, 0x80, 0x80, 0x80, 0x80, 0x80, 0x82, 0x42, 0x44, 0x38, 0x00, 0x00,
-       0x00, 0xf8, 0x44, 0x44, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x44, 0x44, 0xf8, 0x00, 0x00,
-       0x00, 0xfe, 0x42, 0x42, 0x40, 0x40, 0x44, 0x7c, 0x44, 0x40, 0x40, 0x42, 0x42, 0xfe, 0x00, 0x00,
-       0x00, 0xfe, 0x42, 0x42, 0x40, 0x40, 0x44, 0x7c, 0x44, 0x44, 0x40, 0x40, 0x40, 0xf0, 0x00, 0x00,
-       0x00, 0x3a, 0x46, 0x42, 0x82, 0x80, 0x80, 0x9e, 0x82, 0x82, 0x82, 0x42, 0x46, 0x38, 0x00, 0x00,
-       0x00, 0xe7, 0x42, 0x42, 0x42, 0x42, 0x42, 0x7e, 0x42, 0x42, 0x42, 0x42, 0x42, 0xe7, 0x00, 0x00,
-       0x00, 0x7c, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x7c, 0x00, 0x00,
-       0x00, 0x1f, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x84, 0x48, 0x30, 0x00,
-       0x00, 0xe7, 0x42, 0x44, 0x48, 0x50, 0x50, 0x60, 0x50, 0x50, 0x48, 0x44, 0x42, 0xe7, 0x00, 0x00,
-       0x00, 0xf0, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x42, 0x42, 0xfe, 0x00, 0x00,
-       0x00, 0xc3, 0x42, 0x66, 0x66, 0x66, 0x5a, 0x5a, 0x5a, 0x42, 0x42, 0x42, 0x42, 0xe7, 0x00, 0x00,
-       0x00, 0xc7, 0x42, 0x62, 0x62, 0x52, 0x52, 0x52, 0x4a, 0x4a, 0x4a, 0x46, 0x46, 0xe2, 0x00, 0x00,
-       0x00, 0x38, 0x44, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x44, 0x38, 0x00, 0x00,
-       0x00, 0xf8, 0x44, 0x42, 0x42, 0x42, 0x44, 0x78, 0x40, 0x40, 0x40, 0x40, 0x40, 0xf0, 0x00, 0x00,
-       0x00, 0x38, 0x44, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x92, 0x8a, 0x44, 0x3a, 0x00, 0x00,
-       0x00, 0xfc, 0x42, 0x42, 0x42, 0x42, 0x7c, 0x44, 0x42, 0x42, 0x42, 0x42, 0x42, 0xe7, 0x00, 0x00,
-       0x00, 0x3a, 0x46, 0x82, 0x82, 0x80, 0x40, 0x38, 0x04, 0x02, 0x82, 0x82, 0xc4, 0xb8, 0x00, 0x00,
-       0x00, 0xfe, 0x92, 0x92, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x7c, 0x00, 0x00,
-       0x00, 0xe7, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x24, 0x3c, 0x00, 0x00,
-       0x00, 0xe7, 0x42, 0x42, 0x42, 0x42, 0x24, 0x24, 0x24, 0x24, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00,
-       0x00, 0xe7, 0x42, 0x42, 0x42, 0x5a, 0x5a, 0x5a, 0x5a, 0x24, 0x24, 0x24, 0x24, 0x24, 0x00, 0x00,
-       0x00, 0xe7, 0x42, 0x42, 0x24, 0x24, 0x24, 0x18, 0x24, 0x24, 0x24, 0x42, 0x42, 0xe7, 0x00, 0x00,
-       0x00, 0xee, 0x44, 0x44, 0x44, 0x28, 0x28, 0x28, 0x10, 0x10, 0x10, 0x10, 0x10, 0x7c, 0x00, 0x00,
-       0x00, 0xfe, 0x84, 0x84, 0x08, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x42, 0x82, 0xfe, 0x00, 0x00,
-       0x00, 0x3e, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3e, 0x00,
-       0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x20, 0x10, 0x10, 0x08, 0x08, 0x04, 0x04, 0x04, 0x02, 0x02,
-       0x00, 0x7c, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x7c, 0x00,
-       0x00, 0x10, 0x28, 0x44, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x00,
-       0x10, 0x08, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x08, 0x04, 0x3c, 0x44, 0x84, 0x84, 0x8c, 0x76, 0x00, 0x00,
-       0xc0, 0x40, 0x40, 0x40, 0x40, 0x58, 0x64, 0x42, 0x42, 0x42, 0x42, 0x42, 0x64, 0x58, 0x00, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x4c, 0x84, 0x84, 0x80, 0x80, 0x82, 0x44, 0x38, 0x00, 0x00,
-       0x0c, 0x04, 0x04, 0x04, 0x04, 0x34, 0x4c, 0x84, 0x84, 0x84, 0x84, 0x84, 0x4c, 0x36, 0x00, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x44, 0x82, 0x82, 0xfc, 0x80, 0x82, 0x42, 0x3c, 0x00, 0x00,
-       0x0e, 0x10, 0x10, 0x10, 0x10, 0x7c, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x7c, 0x00, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x4c, 0x84, 0x84, 0x84, 0x84, 0x4c, 0x34, 0x04, 0x04, 0x78,
-       0xc0, 0x40, 0x40, 0x40, 0x40, 0x58, 0x64, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0xe3, 0x00, 0x00,
-       0x00, 0x10, 0x10, 0x00, 0x00, 0x30, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x38, 0x00, 0x00,
-       0x00, 0x04, 0x04, 0x00, 0x00, 0x0c, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x08, 0x30,
-       0xc0, 0x40, 0x40, 0x40, 0x40, 0x4e, 0x44, 0x48, 0x50, 0x60, 0x50, 0x48, 0x44, 0xe6, 0x00, 0x00,
-       0x30, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x38, 0x00, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0xf6, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0xdb, 0x00, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0xd8, 0x64, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0xe3, 0x00, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x44, 0x82, 0x82, 0x82, 0x82, 0x82, 0x44, 0x38, 0x00, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0xd8, 0x64, 0x42, 0x42, 0x42, 0x42, 0x42, 0x64, 0x58, 0x40, 0xe0,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0x4c, 0x84, 0x84, 0x84, 0x84, 0x84, 0x4c, 0x34, 0x04, 0x0e,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x62, 0x42, 0x40, 0x40, 0x40, 0x40, 0x40, 0xe0, 0x00, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x7a, 0x86, 0x82, 0xc0, 0x38, 0x06, 0x82, 0xc2, 0xbc, 0x00, 0x00,
-       0x00, 0x00, 0x10, 0x10, 0x10, 0x7c, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x0e, 0x00, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x46, 0x3b, 0x00, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0xe7, 0x42, 0x42, 0x42, 0x24, 0x24, 0x24, 0x18, 0x18, 0x00, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0xe7, 0x42, 0x42, 0x5a, 0x5a, 0x5a, 0x24, 0x24, 0x24, 0x00, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0x44, 0x28, 0x28, 0x10, 0x28, 0x28, 0x44, 0xc6, 0x00, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0xe7, 0x42, 0x42, 0x24, 0x24, 0x24, 0x18, 0x18, 0x10, 0x10, 0x60,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x82, 0x84, 0x08, 0x10, 0x20, 0x42, 0x82, 0xfe, 0x00, 0x00,
-       0x00, 0x06, 0x08, 0x10, 0x10, 0x10, 0x10, 0x60, 0x10, 0x10, 0x10, 0x10, 0x08, 0x06, 0x00, 0x00,
-       0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10,
-       0x00, 0x60, 0x10, 0x08, 0x08, 0x08, 0x08, 0x06, 0x08, 0x08, 0x08, 0x08, 0x10, 0x60, 0x00, 0x00,
-       0x00, 0x72, 0x8c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x10, 0x28, 0x44, 0x82, 0xfe, 0x82, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00
-};/* tinyMTの32bit版のアルゴリズムを使っています : http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/TINYMT/index-jp.html */
-
-static int iColor1[] = {
-       0x000000, 0xff0000, 0x00ff00, 0xffff00,
-       0x0000ff, 0xff00ff, 0x00ffff, 0xffffff
-};
-
-void putOsaskChar(int c, struct Regs *r);
-
-void checkString(struct Regs *r, int rxx, int pxx);
-
-void checkRect(struct Regs *r, int rxx);
-
-int loadColor(struct Regs *r, int rxx);
-
-#endif
\ No newline at end of file
diff --git a/switch.h b/switch.h
deleted file mode 100644 (file)
index 0977438..0000000
--- a/switch.h
+++ /dev/null
@@ -1,45 +0,0 @@
-#ifndef _HDLOAD_SWITCH
-#define _HDLOAD_SWITCH 1
-
-/*
- * このファイルを編集することでコンパイルの仕方を変更できます
- */
-
-
-/*
- * CPUのアーキテクチャ
- * 1 : i386
- */
-#define JITC_ARCNUM 0x0001
-
-/*
- * 実行環境となるOSの種類
- * 1 : Win32
- * 2 : Mac OS
- * 3 : blike for Linux
- */
-#define DRV_OSNUM 0x0001
-
-/*
- * フロントエンドコード->バックエンドコード を実行するsyslib(decorder)ファイルを指定する。
- * OSECPUの動作にはsyslib.oseが必要。
- */
-#define SYSLIB_OSE     "syslib.ose"
-#define SIGN1          0xe1
-
-
-
-#define USE_DEBUGGER   1
-#define USE_TEK5               0       //元々は1
-
-#define        APPSIZ1         1 * 1024 * 1024 /* とりあえず1MBで */
-#define        JITSIZ1         1 * 1024 * 1024 /* とりあえず1MBで */
-#define        SJITSIZ1        1 * 1024 * 1024 /* とりあえず1MBで */
-#define        SYSLIBSIZ1      1 * 1024 * 1024 /* とりあえず1MBで */
-#define SYSTMP0SIZ     1 * 1024 * 1024 /* とりあえず1MBで */
-#define SYSTMP1SIZ     2 * 1024 * 1024 /* とりあえず2MBで */
-
-#define KEYBUFSIZ              4096
-
-#endif
-