home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Glitch Apple Disk Collection
/
2014.glitch.apple.collection.zip
/
indexed
/
33MASTER.DSK
/
COPYA.bas
< prev
next >
Wrap
BASIC Source File
|
2014-09-09
|
3KB
|
60 lines
0 TEXT
10 REM ************************
20 REM * DISK COPY *
30 REM * COPYRIGHT 1980 BY *
40 REM * APPLE COMPUTER INC. *
50 REM * *
60 REM ************************
70 PRINT "<CTRL-D>BLOAD COPY.OBJ0": REM A$2C0
80 HOME : PRINT " APPLE DISKETTE DUPLICATION PROGRAM": PRINT : PRINT
90 CALL 704:CS = PEEK(718)/16
100 POKE 715, PEEK(110) +1: REM BUFSTART
110 POKE 716, PEEK(112) -1: REM BUFEND
130 I$ = " ORIGINAL":N = CS:A = 718: GOSUB 310:MS = N:N = PEEK(720): GOSUB 320:MD = N:A = 717
132 I$ = "DUPLICATE":N = MS: GOSUB 310:SS = N:N = 3 -MD: GOSUB 320:SD = N
160 FT = 0
163 VTAB 5: HTAB 24: PRINT " ": VTAB 8: HTAB 24: PRINT " "
165 CALL 704: POKE 717,SS *16: POKE 718,MS *16: POKE 719,SD: POKE 720,MD
170 VTAB 17: POKE 34,16: CALL -936
175 HOME : POKE 222,0
180 PRINT "-- PRESS 'RETURN' KEY TO BEGIN COPY --";: INPUT " ";I$
185 HOME
190 DK$ = " ORIGINAL": GOSUB 360: REM GET ORIG DISK
195 VTAB 5: HTAB 24: INVERSE : PRINT "READING": NORMAL
200 CALL 707: REM READ A HUNK
210 IF PEEK(713) = 2 THEN 280: REM ERROR!
225 VTAB 5: HTAB 24: PRINT " ": IF PEEK(713) = 1 THEN 290
230 IF FT THEN 255: REM NOT FIRST RD
240 DK$ = "DUPLICATE": GOSUB 360: REM GET DUP DISK
245 ONERR GOTO 275
246 VTAB 8: HTAB 24: INVERSE : PRINT "FORMATTING": NORMAL
250 PRINT "<CTRL-D>INIT XXX,S";SS;",D";SD;",V"; PEEK(714):FT = 1
251 VTAB 8: HTAB 24: PRINT " "
252 POKE 216,0: POKE 222,0
253 GOTO 256
255 DK$ = "DUPLICATE": GOSUB 360: REM GET DUP DISK
256 VTAB 8: HTAB 24: INVERSE : PRINT "WRITING";: NORMAL : PRINT " "
260 CALL 710: REM WRITE A HUNK
265 VTAB 8: HTAB 24: PRINT " "
270 IF PEEK(713) < >2 THEN 190
275 IF PEEK(222) = 255 THEN STOP
277 VTAB 18: INVERSE : PRINT "****** UNABLE TO WRITE ******<CTRL-G><CTRL-G>": GOTO 290
280 VTAB 18: INVERSE : PRINT "****** UNABLE TO READ ******<CTRL-G><CTRL-G>"
290 VTAB 19: NORMAL : POKE -16368,0: PRINT : INPUT "DO YOU WISH TO MAKE ANOTHER COPY?";I$: IF LEN(I$) = 0 THEN 300
295 IF LEFT$(I$,1) = "Y" THEN 160
300 IF LEFT$(I$,1) < >"N" THEN 290
305 TEXT : END
310 PRINT : GOSUB 350: PRINT N;: NORMAL : HTAB 1: PRINT I$;" SLOT: ";:L = 1:H = 7: GOSUB 330: POKE A,N *16: RETURN
320 GOSUB 350: PRINT N;: NORMAL : HTAB 4: PRINT " DRIVE: ";:L = 1:H = 2: GOSUB 330: RETURN
330 K = PEEK( -16384): IF K <128 THEN 330: POKE -16368,0: IF K = 141 THEN 340:K = K -176: IF K <L OR K >H THEN 330:N = K
335 POKE -16368,0: IF K = 141 THEN 340
336 K = K -176: IF K <L OR K >H THEN 330
337 N = K
340 HTAB 20: PRINT N;" ": RETURN
350 INVERSE : HTAB 22: PRINT "DEFAULT = ";: POKE ( PEEK(41) *256 + PEEK(40) +14),96: RETURN
360 IF MS < >SS THEN RETURN
370 IF MD < >SD THEN RETURN
375 HOME : IF LEFT$(DK$,1) = "D" THEN PRINT
380 PRINT "INSERT ";DK$;" DISK AND PRESS RETURN";: INPUT " ";DK$
385 CALL -936
390 RETURN