Personal Computer News


Cavern Listing Is Driving Me Crazy

 
Published in Personal Computer News #101

Cavern Listing Is Driving Me Crazy

Q. Please help: I have gone boggle-eyed typing in the listings for Crazy Caverns. All the parts work except Part 4 (Out of Data Error in 501) and Parts 7, 8 and 9 (illegal Quantity Error in 501).

Could you tell me if there is an error in your listings? If not, what should I look for?

E. T. Jones
Richmond, N. Yorks

A. If cries of help are any indicator of popularity, Crazy Caverns has to be the hottest listing we've ever published. So, for Mr. Jones and the dozens of others who have written and phoned for guidance, here is the definitive explanation of Crazy Caverns.

First, with the exception of the four-line correction published in issue 99, the listing is bug-free.

The second point concerns the order in which it should be typed in. Begin by entering and saving the two-line set-up routine in issue 97. Then enter and save Parts 1 to 16. Tape users *must* save them in the correct order; disk users can save them in any order although it makes sense to maintain the sequence. This completes the actual Crazy Caverns program.

Part 17 is a separate program in its own right, and should be saved on a different tape. It will generate a pure machine code version of the game later.

Finally, Part 18 is a third program - a loader for the machine code version produced by Part 17. Save this on a third tape.

Next, you may have a couple of problems decyphering some of the symbols in the listing. They are generally confined to Parts 16 and 17. In line 550, Part 16, the backslash should be £ sign, and again in Part 16, the symbol should be the up-arrow. Our printer couldn't cope with these.

In Part 17 some of the print statements don't have ending quotes marks because these are optional on the Commodore 64. Although some of the other symbols look strange in the listing, they will be correct on the screen since the programs redefine the character set.

The biggest problem everyone is encountering with entering the listing comes in line 501 of each part. You'll usually get one of two error messages: Out of Data or Illegal Quantity. The first is obvious - you've missed a number or perhaps a whole line out of the listing.

The second is more baffling and means one of two things: either you've missed a comma, or the program is attempting to POKE the checksum into memory.

Illegal Quantity errors usually come when you try and POKE into memory a number greater than 255. If you get one of these two error messages you know you've made a serious mistake when typing.

If you've made a minor mistake in one or more numbers, the program will end with the simple Error In message followed by the line number.

Once you have each part debugged and saved you can move on to the next stage.

Take your tape containing the two-line loader and Parts 1 to 16 and then load and run the first bit. The rest of the program will autoload and run without any intervention until you get the instruction screen. Start the game and then break it with the Run/Stop key. Remove the tape from the cassette player and insert the tape containing Part 17, "Saver".

Load "Saver" then remove that tape and insert the third tape containing Part 18, the final loader program. Position the tape to start just after the end of Part 18.

Run "Saver" which will create two new machine code files called Data1 and Data2 and automatically save them to tape. Finally, switch off, reload Part 16 only and save it after Data2.

This means you should end up with a tape containing four files called Part 18 (or you might call it Crazy Caverns), Data1, Data2 and Part 16. You can then LOAD"CRAZY CAVERNS" and then game will then load and run much faster than from the Basic versions.

E. T. Jones