I am OCRing the text adventure game Survival found on page 142 of the January 1982 issue of Creative Computing. However, the version in archive.org has hand-written notes and markup. All I need is lines 10 through 50, which the person scribbled over.
There’s another copy at the Internet Archive which is clean:
That’s an unusual variant of BASIC. It allows control over the size of strings. It says the program was originally for a “home brew S100” but no indication of the actual BASIC.
Any one know which BASIC it might be?
I wonder if that BASIC only allows statically string allocation? That is, the DIM C$3
means C$
will always be 3 characters in size?
I’ve been trying to figure that out, and I’m leaning toward it being home-brew.
There are three bits in the code that are non-standard:
- you can use single or double quotes to delimit strings
- strings are fixed length but you also have string arrays
- the MID$ function is STR (no $)
I have looked at a lot of BASIC’s over the years, and I’ve found any number of examples of (1), very few (2)'s and none with this particular syntax (actually I seem to remember one…) and zero with (3).
The sidebar mentions this, indirectly, but yes, this is a fixed width indicator.
Someone has pointed out that the STR function is used in Wang BASIC for MID$ as well. Ironically I wrote the wiki article on Wang BASIC, but did not remember this detail.
Wang also uses fixed-length strings, but places the length after the array specification, not before as in this case. It’s possible Wang allows that too, but I have no way to test it.
There are certainly parallels, so my suspicion is that the author wrote this BASIC on his system based on a Wang manual, which I’ll bet is what he used at work.
And on further reflection, it appears this dialect is a compiler, perhaps a cross-compiler. The article notes that the machine he plays this on has 8k of RAM, but the program contains about 20k of source code.
It would be a bit unusual for the author to publish a program bigger than their computer can handle. That and the fixed-size strings do point to compilation.
There’s a chance it could fit in 8K. Tokenization will save some space. And the suggestions in the article on reducing program size could make a big difference; especially dropping the REM statements.
Do you have the OCR version available? I’d be interested in gauging the various size ranges.