aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2024-06-27 01:44:09 -0400
committerB. Watson <urchlay@slackware.uk>2024-06-27 01:44:09 -0400
commit3b02bdbbf657cb407d2cd9ec348aa9da6ced9c89 (patch)
treed19097dfe3a2c305240c632f05b1d00635b05de7
parent4251e9459250406dadeb0d2edf539c4f5207c21a (diff)
downloadbw-atari8-tools-3b02bdbbf657cb407d2cd9ec348aa9da6ced9c89.tar.gz
bas.h: remove TOK_COLON (use OP_COLON instead).
-rw-r--r--bas.h7
-rw-r--r--unprotbas.c4
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;