When I load and run one of my ports of Del Horn's "Golden Flutes and Great Escapes" text-based adventure games, it will sometimes crash with a bogus error message reading "Undefined line number." Upon LISTing the program, I find that MBASIC has shuffled a line in the program; that is, it has placed a line where it does not belong. For example, in "Treasure Hunt" (the annotation is my own):
...
950 IF B(CP)=10 THEN 1520
1690 IF C=6 THEN FR=FR-DC 'ERROR!
960 IF B(CP)=20 THEN 1560
...
Or again, in "The Golden Flute" (once again my own annotation):
...
5440 IF D=1 THEN PRINT"BROMBIRAN";:BR=0
5780 R=RND*9+1:IF R>8 THEN RETURN 'ERROR!
5450 IF D=2 THEN PRINT"DAGGLETTE";:DG=0
...
This also happens in "The Great Escape" and "Mars," but those instances aren't listed here.
I originally thought this to be an internal problem within MBASIC itself, so I wasn't sure if the problem could be fixed, as, although MBASIC is classified as "abandonware," it's still copyrighted by Microsoft and, as such, can't be modified. However, when I ran the same programs (with a minor modification in each) in GW-BASIC (a later version of MBASIC for DOS), I get no line shuffling whatsoever. This leads me to believe that there's no problem in MBASIC or GW-BASIC.
As the problem happens only intermittently, I'm usually able to work around it by reloading the offending program. Sometimes, however, the problem remanifests itself several times in a row.
I was intrigued by your DUMPRAM program (in A:1). It showed me that MBASIC doesn't do a very good job of cleaning up the NABU's memory when a NEW or CLEAR statement is executed.
I'm enclosing my C: drive (in a ZIP file) containing the game programs. Also included on the C: drive are text files containing the instructions and "HELP" subroutine from "Mars", high score files for "The Golden Flute", "The Great Escape" and "Mars", and a small program that clears these high scores. (There's also a menu program which I based on the Apple ]['s version of the compilation, but you can use it or lose it as you see fit.)
C.zip