From 3b02bdbbf657cb407d2cd9ec348aa9da6ced9c89 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Thu, 27 Jun 2024 01:44:09 -0400 Subject: bas.h: remove TOK_COLON (use OP_COLON instead). --- bas.h | 7 ++----- unprotbas.c | 4 ++-- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/bas.h b/bas.h index ed897ef..6996b35 100644 --- a/bas.h +++ b/bas.h @@ -27,9 +27,6 @@ them anyway. */ #define MAXVARS 256 -/* tokenized colon (statement separator) */ -#define TOK_COLON 0x14 - /* BASIC tokens. Full set, taken from Chapter 10 of De Re Atari. I used a paper copy, but you can also find it on the web: https://www.atariarchives.org/dere/chapt10.php @@ -101,8 +98,8 @@ #define OP_STRCONST 0x0f #define OP_COMMA 0x12 #define OP_DOLLAR 0x13 -#define OP_EOS 0x14 -#define OP_COLON 0x14 +#define OP_EOS 0x14 /* two names: "end of statement"... */ +#define OP_COLON 0x14 /* ...and "colon" */ #define OP_SEMICOLON 0x15 #define OP_EOL 0x16 #define OP_GOTO 0x17 diff --git a/unprotbas.c b/unprotbas.c index ae01b50..f7007fc 100644 --- a/unprotbas.c +++ b/unprotbas.c @@ -52,7 +52,7 @@ int writemap = 0; 2 09 line length (or, offset to next line) [!] 3 06 offset to next statement *from the start of the line* 4 28 token for "?" - 5 14 token for : (end of statement), we call it TOK_COLON + 5 14 token for : (end of statement), we call it OP_COLON 6 09 offset to next statement [!] 7 15 token for END 8 16 token for end-of-line [*] @@ -71,7 +71,7 @@ int fixline(int linepos) { /* +3 here to skip the line number + line length */ int offset = program[linepos + 3]; - while(program[linepos + offset - 1] == TOK_COLON) + while(program[linepos + offset - 1] == OP_COLON) offset = program[linepos + offset]; program[linepos + 2] = offset; -- cgit v1.2.3