💾 Archived View for mirrors.apple2.org.za › archive › apple2.caltech.edu › 8bit › games › inmate › d… captured on 2024-12-17 at 23:26:17.

View Raw

More Information

-=-=-=-=-=-=-


3  IF  PEEK (43364) = 127 THEN  POKE 43364,246: REM MAX FILE LENGTH
4  PRINT  CHR$ (4)"MAXFILES1":D$ =  CHR$ (4): PRINT D$"MONC": PRINT D$"BLOADDUDOBJ":RWT =  PEEK (43634) + 256 *  PEEK (43635)
5 PACK = RWT + 3:UNPACK = PACK + 3:OUT =  PEEK (UNPACK + 3) + 256 *  PEEK (UNPACK + 4):IN =  PEEK (UNPACK + 5) + 256 *  PEEK (UNPACK + 6):FIOB = UNPACK + 7
6 NT = 8: REM # OF TRACKS/PASS
10  TEXT : HOME : PRINT  TAB( 14)"WELCOME TO DUD": PRINT  TAB( 3)"A DISK UPLOADING/DOWNLOADING UTILITY": PRINT  TAB( 7)"COPYRIGHT 1991 BY PHIL GOETZ
20  PRINT : PRINT "DUD SPLITS ENTIRE DISKS INTO FILES WITH": PRINT "RUN-LENGTH COMPRESSION.  USE IT FOR": PRINT "DISKS WITH MANY SMALL FILES, OR FOR": PRINT "DATA NOT STORED IN FILE FORMAT.
30  PRINT : PRINT "CAUTION: RUN ONLY UNDER DOS 3.3!": PRINT 
35  INPUT "SOURCE DRIVE: ";Z$:SD =  VAL (Z$): IF SD < 1 OR SD > 2 THEN 35
37  INPUT "DESTINATION DRIVE: ";Z$:DD =  VAL (Z$): IF DD < 1 OR DD > 2 THEN 37
38  INPUT "PROMPT FOR DISKS? ";Z$:Z$ =  LEFT$ (Z$,1):P = Z$ = "Y": IF  NOT P THEN  PRINT "INSERT DISKS NOW.
40  INPUT "HOW MANY TRACKS (35-40, DEF 35) ? ";Z$:T =  VAL (Z$): IF  NOT T THEN T = 35
50  IF T < 35 OR T > 40 THEN 40
60  PRINT T" TRACKS"
65  INPUT "PREFIX NAME OF FILES ? ";PRE$: IF PRE$ = "" THEN 65
70  PRINT : PRINT "(U)PLOAD: SEPARATE A DISK INTO FILES": PRINT "(D)OWNLOAD: ASSEMBLE FILES INTO A DISK": PRINT "(Q)UIT": PRINT 
80  INPUT "WHICH ? ";Z$:Z$ =  LEFT$ (Z$,1): IF Z$ = "U" THEN 100
85  IF Z$ = "D" THEN 500
90  IF Z$ <  > "Q" THEN 70
95  END 
100  HOME : PRINT "UPLOADING"
110  PRINT : PRINT "'SOURCE DISK' REFERS TO THE DISK": PRINT "   TO BE SPLIT UP INTO FILES & UPLOADED": PRINT "'DESTINATION DISK' REFERS TO THE DISKS": PRINT "   WHICH THE FILES TO BE UPLOADED": PRINT "   WILL BE WRITTEN TO
120  PRINT "NOTE: THE DESTINATION DISKS MUST BE": PRINT "   INITIALIZED
130 N = 0:CT = 0: REM FILE SUFFIX, CURRENT TRACK
140 LAST = CT + NT - 1: IF LAST > T - 1 THEN LAST = T - 1: REM LAST TRACK TO COPY THIS PASS
150  POKE 25,16 * (LAST + 1 - CT): IF P THEN  INPUT "INSERT SOURCE DISK";Z$
155 BUF = IN:OP = 1:D = SD: FOR CT = CT TO LAST: GOSUB 1000:BUF = BUF + 4096: NEXT CT: CALL PACK
160  IF P THEN  INPUT "INSERT DESTINATION DISK";Z$
165  PRINT D$"BSAVE"PRE$"."N",A"OUT",L"( PEEK (8) + 256 *  PEEK (9)) - OUT",D"DD
170 N = N + 1: IF CT < T THEN 140
180  PRINT "DONE!": END 
500  HOME : PRINT "DOWNLOADING
510  PRINT : PRINT "'SOURCE DISK' REFERS TO THE DISK WITH": PRINT "   THE NEXT "PRE$".N FILE ON IT.": PRINT "'DESTINATION DISK' REFERS TO THE DISK": PRINT "   TO BE CONSTRUCTED FROM THE": PRINT "   DOWNLOADED FILES
515  PRINT "NOTE: THE DESTINATION DISK MUST BE": PRINT "   INITIALIZED
520 N = 0:CT = 0
525  IF P THEN  PRINT : PRINT "INSERT DISK WITH FILE "PRE$"."N;: GET Z$: PRINT 
530  PRINT D$"BLOAD"PRE$"."N",A"OUT",D"SD
540  IF P THEN  INPUT "INSERT DESTINATION DISK";Z$
550 LAST = CT + NT - 1: IF LAST > T - 1 THEN LAST = T - 1
560  POKE 25,16 * (LAST + 1 - CT): CALL UNPACK:BUF = IN:OP = 2:D = DD: FOR CT = CT TO LAST: GOSUB 1000:BUF = BUF + 4096: NEXT CT
570 N = N + 1: IF CT < T THEN 530
580  PRINT "DONE!": END 
990  END 
1000  CALL FIOB:IOB =  PEEK (6) + 256 *  PEEK (7): POKE IOB + 2,D: POKE IOB + 3,0: POKE IOB + 4,CT: POKE IOB + 11,0: POKE IOB + 12,OP
1010  POKE IOB + 8,BUF - 256 *  INT (BUF / 256): POKE IOB + 9, INT (BUF / 256) + 15: CALL RWT
1020  RETURN