Converting Applesoft I to II

A complete program listing is given below to convert a program written in Applesoft I so it will load in Applesoft II.  This program is available from the club library, as is a version of Applesoft I with corrections made.

Load the converter program in Integer BASIC and RUN.  The program will instruct you when to load your Applesoft I program.  When the conversion is complete and you have re-saved your Applesoft I program, load it into Applesoft II and LIST.  You will then need to manually correct commands to the new format.  I.E. PLTG becomes GR.

——————-Start of Program Listing—————–

Note Illegal line 1: enter manually

0 TEXT: CALL -936: VTAB 3: PRINT “APPLESOFT CONVERSION PROGRAM”
1 LOMEM:2048
2 PRINT “CONVERTS OLD APPLESOFT PROGRAMS TO”: PRINT “APPLESOFT ][ FORMAT”
3 PRINT “COPYRIGHT 1978 APPLE COMPUTER INC.”
4 PRINT ” “:POKE 34,10
S PRINT “WAS PROGRAM WRITTEN IN OPTION 1 OR “: PRINT “OPTION 2?” : PRINT “OPTION l: GRAPHICS COMMANDS WITHOUT I”
6 PRINT ” LET OR REM STATEMENTS”: PRINT “OPTION 2: LET AND REM STATEMENTS BUT NO GRAPHICS.”
7 INPUT “OPTION #”,O : IF O<>1
AND O<>2 THEN 7
10 CALL -936′ PRINT “PUT APPLESOFT PROGRAM TAPE IN RECORDER,”: POKE 60,Z’ POKE 61,Z: POKE 62,2: POKE 63,Z:F=1536:B=4096
20 INPUT “PRESS THE PLAY BUTTON, THEN HIT RETURN”,A$: CALL -259
25 IF PEEK (1)<123 THEN 30: PRINT”TAPE READ ERROR I”: PRINT “TRY  RE-ADJUSTING VOLUME CONTROLS ON TAPEPlAYER. THEN RE-RUN THIS PROGRAM”
30 POKE 60,Z: POKE 61,16:E= PEEK (Z)+ PEEK (1)*256-6651: POKE 62,E : MOD 256: POKE 63,E/256: CALL -259
35 CALL -936: PRINT I”CONVERT I NG ••• ”
40 IF B>=E THEN 1000:A= FEEK (B)+F MOD 256: POKE B,A MOD 256: POKE B+1, PEEK (B+1)+F/ 256+(A>255)
58 FOR B=B+4 TO B+999:T= PEEK(B): IF T<133 THEN 250: IF T<>135 AND T<>142 OR O=2 THEN 200: C=B
55 IF T<>142 THEN 60:T=137: GOTO 250
60 C=C+l:U= PEEK(C): IF U=32 THEN 60: IF U=67 OR U=71 OR U=72 OR U=80 OR U=86 THEN GOTO U: PRINT “BAD STATEMENT IN PROGRAM”: GOTO 250
67 T=160: GOTO 90
71 T=136: GOTO 90
72 T=142: GOTO 87
80 T=141: GOTO 90
86 T=143
87 CC=Z:D=B
88 D=D+l: IF PEEK (O)<>44 AND PEEK (O)<>58 AND PEEK (D) THEN 88: IF PEEK (D)=44 THEN 89: PRINT “BAD STATEMENT IN PROGRAM I”: GOTO 250
89 CC=CC+l: IF CC=1 THEN 88: POKE D,197
90 POKE C,32: GOTO 250
199 REM :MAP OLD TOKENS TO NEW
200 IF T>195 THEN 250:T=T+1+(T> 134)*34+(T>139)+(T>160)+(T> 177)*2
250 POKE B,T:  IF B/500*500=B THEN PRINT “STILL CONVERTING!”
251 IF T<>0 THEN NEXT B:B=B+1: GOTO 40
878 CC=Z:D=C
1000 CALL – 936: POKE 60,Z: POKE 61,Z: POKE 62,21 POKE 63.Z:PRINT “DONE!”: INPUT “START RECORDING, THEN HIT ‘RETURN'”,A$
1001 POKE E-2,Z: POKE E-1,Z: POKE E,Z ,
1005 D=E-4096: POKE Z.D MOD 256:POKE 1,D/256: POKE 2,Z: CALL -307
1010 POKE 60,Z: POKE 61.16: POKE 62,E MOD 256: POKE 63,E/256 : CALL. -307
1020 PRINT “O.K. ..      “: PRINT liTHE TAPE JUST RECORDED CAN NOW BE LOADED IN TO APPlESOFT ][.”: END

———————END OF PROGRAM————————

Please follow and like us:
error

About the Author

Bill Martens

A.P.P.L.E. Chairman of the Board and Club president -- Bill worked for the founder, Val J. Golding and A.P.P.L.E. from 1981 to 1982. In 1999, he began archiving the materials which were distributed and sold by A.P.P.L.E.. That project led to the group that remained of A.P.P.L.E. Bill was involved in the financial industry in Tokyo and has over 20 major office infrastructure projects to his name. In March 2001, he retired to write books and to spend more time pursuing personal interests. As the president of the users group, Bill is in charge of distribution of Call-A.P.P.L.E. magazine as well as the organization of this web site. Bill currently resides in Tokyo, Japan and Shelton, Wa splitting time between the places.