aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bas.c11
-rw-r--r--listbas.c7
2 files changed, 15 insertions, 3 deletions
diff --git a/bas.c b/bas.c
index c582c2e..fad6a08 100644
--- a/bas.c
+++ b/bas.c
@@ -117,7 +117,6 @@ void parse_header(void) {
int vntp_offset;
lomem = getword(0);
- if(lomem == 0x77) lomem = 0;
vntp = getword(2);
vntd = getword(4);
vvtp = getword(6);
@@ -145,7 +144,15 @@ void parse_header(void) {
if(verbose) dump_header_vars();
/* these checks are actually kind of conservative. */
- if(lomem) die("Not an Atari BASIC program (no $0000 signature).");
+ if(lomem == 0x77) {
+ if(verbose)
+ fprintf(stderr, "OSS Integer BASIC $7700 signature found, OK.\n");
+ } else if(lomem == 0) {
+ if(verbose)
+ fprintf(stderr, "BASIC $0000 signature found, OK.\n");
+ } else {
+ die("Not an Atari BASIC program (no $0000 or $7700 signature).");
+ }
if(vntp < 0x100) die("Not an Atari BASIC program (invalid VNTP).");
if(vvtp < vntd) die("Not an Atari BASIC program (invalid VVTP).");
if(starp < vvtp) die("Not an Atari BASIC program (invalid STARP).");
diff --git a/listbas.c b/listbas.c
index acff568..99b80fc 100644
--- a/listbas.c
+++ b/listbas.c
@@ -941,7 +941,12 @@ CALLBACK(print_op) {
print_string(pos + 2, program[pos + 1]);
return;
case OP_EOL:
- return;
+ /* in Integer BASIC, this token is TO */
+ if(bas_type != B_INT) return;
+ break;
+ case 0x13:
+ /* in Integer BASIC, this is the real end-of-line token */
+ if(bas_type == B_INT) return;
default: break;
}