diff options
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | bxl_tokens.c | 64 | ||||
-rw-r--r-- | bxl_tokens.h | 5 | ||||
-rw-r--r-- | listbas.c | 5 | ||||
-rw-r--r-- | turbo_tokens.h | 8 |
5 files changed, 78 insertions, 8 deletions
@@ -63,8 +63,8 @@ vxrefbas: bas.o cxrefbas: bas.o bcdfp.o linetab.o -listbas: listbas.c bas.o bcdfp.o tokens.o atables.o turbo_tokens.o aplus_tokens.o - $(CC) $(CFLAGS) -o listbas listbas.c bas.o bcdfp.o tokens.o atables.o turbo_tokens.o aplus_tokens.o -lm +listbas: listbas.c bas.o bcdfp.o tokens.o atables.o turbo_tokens.o aplus_tokens.o bxl_tokens.o + $(CC) $(CFLAGS) -o listbas listbas.c bas.o bcdfp.o tokens.o atables.o turbo_tokens.o aplus_tokens.o bxl_tokens.o -lm bas.o: bas.c bas.h diff --git a/bxl_tokens.c b/bxl_tokens.c new file mode 100644 index 0000000..3543f11 --- /dev/null +++ b/bxl_tokens.c @@ -0,0 +1,64 @@ +const char *bxl_cmds[] = { + "WHILE", /* $38 */ + "ENDWHILE", /* $39 */ + "TRACEOFF", /* $3A */ + "TRACE", /* $3B */ + "ELSE", /* $3C */ + "ENDIF", /* $3D */ + "DPOKE", /* $3E */ + "LOMEM", /* $3F */ + "DEL", /* $40 */ + "RPUT", /* $41 */ + "RGET", /* $42 */ + "BPUT", /* $43 */ + "BGET", /* $44 */ + "TAB", /* $45 */ + "CP", /* $46 */ + "ERASE", /* $47 */ + "PROTECT", /* $48 */ + "UNPROTECT", /* $49 */ + "DIR", /* $4A */ + "RENAME", /* $4B */ + "MOVE", /* $4C */ + "MISSILE", /* $4D */ + "PMCLR", /* $4E */ + "PMCOLOR", /* $4F */ + "PMGRAPHICS", /* $50 */ + "PMMOVE", /* $51 */ + "PMWIDTH", /* $52 */ + "SET", /* $53 */ + "LVAR", /* $54 */ + "RENUM", /* $55 */ + "FAST", /* $56 */ + "NUM", /* $57 */ + "END", /* $58 */ + 0, /* $59 */ + "", /* $5A, disk extensions */ +}; + +const int bxl_cmd_size = sizeof(bxl_cmds); + +const char *bxl_ops[] = { + " USING ", /* $55 */ + "%", /* $56 */ + "!", /* $57 */ + "&", /* $58 */ + ";", /* $59 */ + "BUMP(", /* $5A */ + "FIND(", /* $5B */ + "HEX$", /* $5C */ + "RANDOM(", /* $5D */ + "DPEEK", /* $5E */ + "SYS", /* $5F */ + "VSTICK", /* $60 */ + "HSTICK", /* $61 */ + "PMADR", /* $62 */ + "ERR", /* $63 */ + "TAB", /* $64 */ + "PEN", /* $65 */ + "LEFT$(", /* $66 */ + "RIGHT$(", /* $67 */ + "MID$(", /* $68 */ +}; + +const int bxl_ops_size = sizeof(bxl_ops); diff --git a/bxl_tokens.h b/bxl_tokens.h new file mode 100644 index 0000000..b769038 --- /dev/null +++ b/bxl_tokens.h @@ -0,0 +1,5 @@ +extern const char *bxl_cmds[]; +extern const int bxl_cmd_size; + +extern const char *bxl_ops[]; +extern const int bxl_ops_size; @@ -13,8 +13,8 @@ #include "tokens.h" #include "turbo_tokens.h" #include "aplus_tokens.h" -/* #include "bxl_tokens.h" +/* #include "bxe_tokens.h" */ #include "atables.h" @@ -620,7 +620,8 @@ void init_turbo_tables() { } void init_bxl_tables() { - die("BASIC XL not supported yet!"); + memmove(cmd_tokens + last_command + 1, bxl_cmds, bxl_cmd_size); + memmove(op_tokens + last_operator + 1, bxl_ops, bxl_ops_size); } void init_bxe_tables() { diff --git a/turbo_tokens.h b/turbo_tokens.h index 7696d52..3cb83ec 100644 --- a/turbo_tokens.h +++ b/turbo_tokens.h @@ -1,5 +1,5 @@ -extern const char *turbo_cmds[] ; -extern const int turbo_cmd_size ; +extern const char *turbo_cmds[]; +extern const int turbo_cmd_size; -extern const char *turbo_ops[] ; -extern const int turbo_ops_size ; +extern const char *turbo_ops[]; +extern const int turbo_ops_size; |