Basic programming - The House in the Dunes by Derek Denton
Posted by RedGazelle64@reddit | learnprogramming | View on Reddit | 4 comments
I recently discovered that my great uncle wrote a few novels in the early 80's. After tracking a couple of them down, one book, "The House in the Dunes", has a programme written in basic at the end, based on the plot of the book. Here is the explanation text:
"The following program is based on the adventure you have just read.
It is written in a popular version of BASIC. Any unusual commands are explained, and alternatives are given. To run this program you will need a computer with a minimum of 32K RAM.
REM statements show you where the various proces-sing sections take place, enabling you to amend or add to the program. If you feel other readers will enjoy your amendments or additions, please send details to: MR ANDREW WARBURTON c/o John Goodchild Publishers 10 Mandeville Road Aylesbury, Bucks HP21 8AA
Publisher's Note: The publishers regret that they cannot enter into any direct correspondence about the program below. All enquiries should be addressed to Mr Andrew Warburton, as detailed above."
Following this, it begins:
"1 PUT 31 DIM DE(55) DIM (112) DIM H(9) IX-91Y-2217-81E-8 11 FOR 1-1 TO 55 12 READ S 13 08111-58"
This continues for quite a few pages.
Apologies if this is a dumb question as I know absolutely nothing about programming, but how would I go about getting this to run? Is it even possible? I can't post an actual photo of the pages unfortunately!
peterlinddk@reddit
Are you sure that it is all written exactly like that on a single line?
Because it looks kind of like Basic Code, but with a lot of missing pieces.
In BASIC, line-numbers are part of the program, so you'd usually see every line beginning with a number, often numbered 10, 20, 30, but also often without "jumps".
DIM DE(55)means create an array calleddewith a length of 55, but then there is another array without any name with a length of 112.And IX-91Y-2217-81E-8 means absolutely nothing
Then
11 FOR 1-1 TO 55looks kind of like a line 11 with a for loop, althoughFOR I=1 TO 55would make more sense ...And again 12 READ S would make sense, but then the next line 13 is just gibberish code again.
Are you sure it is as originally printed, and not perhaps a mangled OCR document?
RedGazelle64@reddit (OP)
Thanks for the response! Yes, I think I've typed it out correctly as it appears on the page, I will double check this!it goes on for a good few pages! I won't pretend to understand it, so perhaps I'm maybe typing it out wrong.
Following your reply, it is written line by line with each line starting with a number. I've no idea about programming language so it's interesting to know about the DIM DE(55). Hmm yea perhaps I have interpreted this incorrectly seeing that you are able to determine all this information without actually seeing the source material! Perhaps I could send you a message of a photograph of a page or 2?
POGtastic@reddit
I would install a modern BASIC interpreter like Yabasic and try to get it to run on that. Since Basic was never really standardized, it's very likely that the version of Basic that this program was written for is different from the available modern interpreters, so you'll probably encounter errors. Good luck!
If you have the time to transcribe the entire program and put it into something like a Github Gist someone might be able to provide more help.
RedGazelle64@reddit (OP)
Thanks for the insights! I think it's worth a try, even for the fun of learning something new!