Magic Discover how to clear your screen, generate truly random
numbers and get an animated cursor. By TIM WALSH
S56B Verifying with RUN Script Here's an almost foolproof method ofdetermining ifyou're working with the latest version of a document treated with
that uses RND and the result is truly random numbers. For reference purposes, note lhat run-stop/restore docs not
deactivate my Utility. Also, voice 3 will not function properly when 64 Non-Random RND is activated.
RUN Script 64 or 128. Load in one file of the document, and then press Fl, followed by the !■" key, to display the
number of bytes free in the command bar a( the top of the
REM
64
CURE
FOR NON-RANDOM RND -
CULLEY
DENNIS :REM*243
screen. Then load in the other version of the document and repeat die process. Compare the number nf bytes free. If they match, the chances are good thai the documents are identical. If you remember adding text to the first version
10 FOR T* 679 TO 716:READ D:
of the document, the iatest version will show fewer bytes free.
30 CK=0:FOR T= 828 TO 883:READ D: CK=CK+D:
If, on the other hand, you deleted text, (lie version with
more bytes free will be the latest.
CK=CK+D:POKE
T,D:NEXT
20 IF CK <>
:REM*5
5206 THENPRINT"ERROR IN
.":END
DATA.
:REM*161
POKE T,D:NEXT
:REM*240
40
IF CK
50 60
SYS 828 :REM*180 DATA 165,1,41,254,133,1,76,0,0,169,255,
in Basic 7.0 to develop programming subroutines similar to
70
DATA
series computers, I've written a short routine thai shows how lo u.se Trap, the unimplemeuted Off command and ilie Err$ function to execute a perfectly functioning subroutine, all without the use of a single Goto or GoSub! Give it a try, it works remarkably well.
80
DATA
0 REM ILLEGAL C-128
11
—Tim Walsh, Magic Columnist
S5GC Illegal C-128 Trapping Season You can use the unimplemented Off and Quit commands
those found in Amiga, Apple Macintosh and other 68000-
c>
7678 THENPRINT"ERROR IN DATA..
.":END
:REM*43
141,14,212,141,15,212,169,128
:REM*151
141,18,212,162,4,173,27,212,149,97
,234,234,234,202,208,245,76
:REM*51
227,224,173,2,3,141,174,2,173,3,3,
141,175,2,160,0,132,251,169
:REM*53
90 DATA 160,133,252,177,251,145,251,200,20 8,249,230,252,165,252,201,192
:REM*211
10 I DATA 208,241,169,176,141,96,160,169,2, 141,97,160,169,167,141,2,3,169
RYL
10 20
L.
INSTRUCTION TRAPS
KNOWLES
- DA
:REM*136
TRAP 5000 :REM*136 PRINT"TESTING UNIMPLEMENTED COMMAND 'OF F1 ":OFF :REM*107
30 PRINT"THIS IS THE MAIN PROGRAM IN LINE 30!" :REM*229 40
END
:REM*168
5000 REM ERROR TRAP 5010 PRINT
ERR${ERR)"
:REM*191 IN
LINE";EL:PRINT:HE
LP
:REM*82
5020 PRINT"THIS IS THE TRAP HANDLER IN LIN ES
5030
5000
resume
-
5030"
next
:REM*151
:rem*149
—Daryl l. Knowi.es, Jr.. Greenville, tx
S5BD Curing Non-Random RND Numbers
Even novice programmers quickly realize lhat the C-64's RNU Function does not return a series of truly random num bers. C4 Non-Random RNO uses the random number gen erator of voice 3 of the S1I) sound chip to enhance the RND function. Run my program in conjunction with any program 6
RUN
JANUARY 1090
i data 2,141,3,3,96
:REM*84
:rem*121
—Dennis Culley, West Chicago, il
SSGE Left/Right Screen Clear 64 The next time you write a C-64 program, try incorporating Wt/Right Screen Clear 64 into it. After typing in, saving
and running ibis machine language routine, it resides in memory at location 49152. Then, entering SYS 49152 in either Program or Direct mode clears the entire screen from the center in a left/right sweeping motion. 0 REM LEFT-RIGHT SCREEN
CLEAR
64
PANICI
10
-
JEFFREY :REM*82
FORX=49152TO49152+107:READD:POKEX,D:C=C +D:NEXT
:REM*229
20
IFC<>17061THENPRINT"ERROR!1!":END
30
DATA
40
DATA 254,162,24,160,38,177,251,200,145, 251,136,177,253,200,145,253,136 :REM*80
50
DATA 136,.192,20,176,239,160,20,169,32,1 45,251,160,1,177,251,136,145 :REM*238
:REM*58
169,20,133,250,169,0,162,4,160,216
,133,251,133,253,134,252,132
:REM*49