diff options
-rw-r--r-- | bas.c | 11 | ||||
-rw-r--r-- | listbas.c | 7 |
2 files changed, 15 insertions, 3 deletions
@@ -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)."); @@ -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; } |