Classic Computer Magazine Archive COMPUTE! ISSUE 52 / SEPTEMBER 1984 / PAGE 150

CAPUTE!

Modifications Or Corrections To Previous Articles

64 Jackpot

The 64 version of this game from the August issue (Program 3, p. 89) requires the following two lines, which were accidentally omitted from the original listing:

5 PRINT"{CLR}" ; : POKE51, 0 : POKE55, 0 :
   POKE52, 48 : POKE56, 48 : CLR : GOSUB 60	: rem 61
10 TT = 50 : S = 54272 : FORL = STOS + 24 : POKEL, 0 :
   NEXT	: rem 135

IBM PC/PCjr Blueberries

The IBM version (Program 3, p. 88) of this game in the July issue should work as published, but reader Michael Saletnik points out that the programmer used the VARPTR statement incorrectly in line 5000. VARPTR returns the starting address for the descriptor of the specified string variable. The descriptor is three bytes of data; the first byte tells the length of the string, and the other two hold the starting address within the current segment of memory where the characters that make up the string are stored. Thus, if you use a statement like V = VARPTR(ML$), then PRINT PEEK(V) will show the length of ML$, and PRINT PEEK(V + 1) + 256 * PEEK(V + 2) will give the starting address of the characters in ML$.

In line 5000, the calculated address ZZ does not point to the start of ML$ as intended, but rather off into some other part of the variable area. "Blueberries" works as printed because the programmer uses the computed address to POKE the machine language directly into memory in line 5010. A more standard way of transferring the machine language from DATA statements into ML$ would have been:

READ A : ML$ = ML$ + CHR$(A)

If the technique used in line 5010 had not been used, then the program would not have performed correctly. To place the machine language data properly into ML$, line 5000 should be changed to read:

5000 DEP SEG : ML$ = SPACE$(48) : V = VARPTR(ML$) : ZZ = PEEK(V + 1) + 256 * PEEK(V + 2)

Bunny Hop For The 64

Characters were omitted in two lines of the Commodore 64 version (Program 1, p. 74) of this game from the July issue. The final number in line 35 should be 208 instead of just 2, and the final number in line 200 should be 33 instead of 3. The corrected lines should read as follows:

35 DATA40, 169, 32, 145, 253, 96, 160, 41, 177, 253, 136, 145, 253, 200, 200, 192, 81, 208
200 POKEP, 32 : POKE37154, 127 : Y = PEEK(56320)ANDPEEK(QQ) : IF(YAND8) = 0THENP = P + 1 : D = 33

VIC Olympiad

There is an error in one of the PRINT statements which defines the arena in the VIC version (Program 2, p. 56) of this game from the June issue. Ed Eyerman notes that there should be two spaces following the five SHIFTed spaces in line 3080. The line should read as follows:

3080 PRINT" - {2 SHIFT-SPACE}{5 SPACES}U[<W>]{2 SPACES}[<Q>]I{5 SHIFT - SPACE}{2 SPACES} - ";

Also, line 1045 in the VIC version is an unintentional carryover from the original Commodore 64 version, and can be deleted.