Classic Computer Magazine Archive COMPUTE! ISSUE 37 / JUNE 1983 / PAGE 213

UNNEW
For The VIC And 64
Jim Wilcox

With this utility program on tape or disk, you'll never have to worry again if you type NEW by mistake and lose your BASIC program. Just load in UNNEW, type SYS (850), and there's your program back again. For VIC and 64.

Now and then it happens. You type NEW and then instantly regret it. Fortunately, the VIC and 64 don't erase the program; they only reset some "pointers." The machine language program below will set the pointers back to where they were before your impetuous NEW.
    The first step is to type in the program, making sure each of the DATA statements is correct. RUN the program, then type NEW. Now insert a blank tape in the datassette and the statement below without any line numbers:

A$= "":FORA=833TO938:A$=A$+CHR$(PEEK(A))
 :NEXT:SAVEA$

    When instructed, press PLAY and RECORD on the tape unit. Don't worry about the graphics characters while the SAVE is taking place.
    Now to test the program. Type in or LOAD any BASIC program and give the NEW command. LOAD the UNNEW program and type in SYS(850). RUN or LIST the revived BASIC program to verify that it's there.
    The routine resides in the cassette buffer. It may be reused (SYS 850) until another program is loaded from tape.

UNNEW For The VIC And 64

100 REM UN-NEW FOR THE VIC & 64
110 FOR A=833 TO 938
120 READ B: POKE A,B: C=C+B: NEXT
130 IF C<>11380 THEN PRINT"CHECK DATA
    STATEMENTS FOR ERRORS":STOP
140 END
200 DATA 85,78,78,69,87,32,83,89
210 DATA 83,40,56,53,48,41,32,32
220 DATA 32,160,3,200,177,43,208,251
230 DATA 200,152,24,101,43,160,255,200
240 DATA 145,43,133,45,200,165,44,145
250 DATA 43,133,46,160,255,200,177,45
260 DATA 72,240,11,200,177,45,133,46
270 DATA 104,133,45,24,144,237,200,177
280 DATA 45,208,243,104,24,165,45,105
290 DATA 2,133,45,144,2,230,46,133
300 DATA 47,133,49,165,46,133,48,133
310 DATA 50,169,0,133,51,133,52,165
320 DATA 55,133,53,165,56,133,54,76
330 DATA 116,196