Apple Basic Decoded

This is a program which will allow you to dump BASIC statements to Hexadecimal code.

1 REM PROGRAM TO DUMP BASIC
2 REM STATEMENTS TO HEX
3 REM TO USE ... ADD A LINE
4 REM OF BASIC AFTER 1200
5 REM AND RUN.
6 REM WRITTEN BY
7 REM D.R. WILLIAMS 2/78
10 DIM S$(16):S$="0123456789ADCDEF"
20 LOCF= PEEK (203)*256+ PEEK (202)
30 INPUT "STMT #",N
35 IF N<0 THEN END
40 LOC=LOCF
50 K= PEEK (LOC+2): IF K>127 THEN 90
55 STHT=K*256+ PEEK (LOC+1)
60 IF STMT=N THEN 100
70 LOC=LOC+ PEEK <LOC)
80 IF STMT<N THEN 50
90 PRINT " ***NOT FOUND"
92 PRINT " TRY AGAIN"
94 GOTO 30
95 K=LOC/256
100 PRINT "STARTS AT ADDR ";K
101 GOSUB 200:K=LOC MOD 256
102 GOSUB 200: PRINT
105 L= PEEK (LOC)-1 : FOR 1=0 TO L
110 K= PEEK (LOC+I) : GOSUB 200
130 NEXT I: PRINT" ": GOTO 30
200 J=K/16:K=K-16*J+1:J=J+1
202 PPINT S$(J,J);S$(K,K);
204 PRINT" ";: RETURN
300 PRINT ABC
*****************************************
Please follow and like us:

About the Author

macjock