mirror of
https://github.com/option8/SG32.git
synced 2024-10-08 21:55:12 +00:00
54 lines
2.3 KiB
QBasic
54 lines
2.3 KiB
QBasic
|
0 GOTO 100: REM ADAPTED FROM https://vintageapple.org/apple_ii/pdf/The_Best_Apple_Public_Domain_Software1985.pdf
|
||
|
10 C1 = INT (CV / 8): C2 = CV - C1 * 8: P = 1024 + 128 * C2 + 40 * C1 + CH: C = PEEK (P): RETURN
|
||
|
100 TEXT: HOME: D$ = CHR$(4): PRINT D$"CATALOG": B = PEEK (37) - 2: IF B > 22 THEN B = 22
|
||
|
110 T = 0: CH = 4: FOR CV = 5 TO 23: GOSUB 10: IF C < > 160 THEN POKE P - 1,219: POKE P,T + 193: POKE P + 1,221: T = T + 1: S = CV
|
||
|
120 NEXT CV: B$ = "BLOAD": HTAB 1 : VTAB 3 : ? "TYPE A LETTER TO CHOOSE THE FILE TO HASH"
|
||
|
130 K = PEEK (-16384): IF K < 128 THEN FOR K = 1 TO 75: NEXT K: K = FRE (0): GOTO 130
|
||
|
140 POKE -16368,0: K = K - 176 : IF K < 17 OR K > T+16 GOTO 130
|
||
|
150 CH = 1:CV = S - T + K - 16: GOSUB 10
|
||
|
160 VTAB 24: ? "LOADING: ";
|
||
|
170 FOR CH = 6 TO 39: GOSUB 10: B$ = B$ + CHR$ (C): ?CHR$ (C) ; : NEXT CH
|
||
|
180 ?"": HTAB 1: CALL -868: PRINT CHR$(4) "BLOAD SEED,A$B00" : PRINT CHR$(4) B$ ",A$C00"
|
||
|
190 POKE 251, PEEK(-21919): POKE 250,PEEK(-21920)
|
||
|
200 HOME: PRINT CHR$(4) "BRUN SG32"
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
B = VTAB?
|
||
|
REM READS LINE FROM TEXT PAGE
|
||
|
P = MEMORY LOCATION
|
||
|
C = CHARACTER
|
||
|
|
||
|
T=LETTER FOR SELECTION
|
||
|
|
||
|
B$ IS THE COMMAND
|
||
|
|
||
|
|
||
|
|
||
|
CH HORIZ CHAR
|
||
|
CV VERT CHAR
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
"LEVI"
|
||
|
0 REM 06/06/83
|
||
|
100 TEXT : HOME :D$ = CHR$ (4): PRINT D$"CATALOG":B = PEEK (37) - 2: IF B > 22 THEN B = 22
|
||
|
110 T = 0:CH = 4: FOR CV = 5 TO 23: GOSUB 1000: IF C < > 160 THEN POKE P - 1,219: POKE P,T + 193: POKE P + 1,221:T =T + 1:S = CV
|
||
|
120 NEXT CV: VTAB 24:A$ = "TYPE LETTER TO RUN, OR LOAD=1 LOCK=2 UNLOCK=3 DELETE=4 EXIT=5...."
|
||
|
130 B$ = "RUN": HTAB 1: PRINT LEFT$ (A$,39);:A$ = MID$ (A$,2) + LEFT$ (A$,1):K = PEEK ( -16384): IF K < 128 THEN FOR K = 1 TO 75: NEXT K:K = FRE (0): GOTO 130
|
||
|
140 POKE - 16368,0:K = K - 176: IF K < 1 OR K > 5 THEN 300
|
||
|
200 HTAB 1: CALL - 868: IF K = 5 THEN END
|
||
|
210 PRINT "PRESS 'LETTER' YOU WISH TO ";: IF K = 1 THEN B$ ="LOAD"
|
||
|
220 IF K = 2 THEN B$ = "LOCK"
|
||
|
230 IF K = 3 THEN B$ = "UNLOCK"
|
||
|
240 IF K = 4 THEN B$ = "DELETE": FLASH
|
||
|
250 PRINT B$;: CALL - 198: NORMAL: GET K$:K = ASC (K$) - 48
|
||
|
300 IF K < 17 OR K > T + 16 THEN 130
|
||
|
310 CH = 1:CV = S - T + K - 16: GOSUB 1000: IF C = 194 AND (B$ = "RUN" OR B$ = "LOAD") THEN B$ = "B" + B$
|
||
|
320 FOR CH = 6 TO 39: GOSUB 1000: B$ = B$ + CHR$ (C): NEXT CH: HTAB 1: CALL - 868: PRINT B$: PRINT D$;B$: GOTO 100
|
||
|
1000 C1 = INT (CV / 8):C2 = CV - C1 * 8:P = 1024 + 128 * C2 + 40 * C1 + CH:C = PEEK (P): RETURN
|