image of READY prompt

Wang2200.org

Listing of file='@TO.DISK' on disk='vmedia/734-8446-A.wvd.zip'

# Sector 2118, program filename = '@TO.DISK'
0010 REM %.@TO.DISK  04/09/90-- Disk to Disk  --
0012 PRINT HEX(03);AT(0,26);"*** DISK FILE COPY UTILITY ***"
0020 DIM T1$(250)1,S0$(8)124,X0$3,X0$(2)3,Z0$80,X0,Z1$8,K$1,M$2
0030 DIM D8$80,N$8,N1$80,D$(16)16,S$3,Q$1,F1$8,A$80,B$1,Z9$(16)16
0035 REM .Create Ref file leaves E=#items, D$=Source disk, N$(E names)
0040 S8,D9=0
   : F=E
   : Z0$=" "
0045 IF D0<3THEN 56
   : Z0$="From Disk.Image = "&F$
   : SELECT #2<D$>
   : LIMITS T#2,F$,S8,A,A,A
0050 DATA LOAD BA T#2,(S8)D$()
   : AND (STR(D$(),2,1),7F)
   : E9=VAL(STR(D$(),2,1))
0056 PRINT AT(1,40-LEN(Z0$)/2);Z0$;AT(2,35);F;"files"
   : X0$(1)=D$
0063 REM X0 contains processing mode
   : REM X0=1  => Copy Only
   : REM X0=2  => Copy & Verify
0070 REM Print Menu
   : REM Reset Restore Flag
   : Z1$="JUNK0000"
   : S,X1,N=0
   : GOSUB '50(S9$," ")
0080 ON R1+2GOTO 100,100,112
0100 REM Cancel; SHIFT Cancel
   : GOSUB '60("(terminated)",23,0,80)
0105 LOAD RUN T"START"
   : ERRORGOSUB '60(" ",23,0,80)
   : GOTO 70
0112 IF X0$(1)<>" "THEN 113
   : REM no origin platter selected
   : S9$=HEX(F218010132F902)
   : GOTO 120
0113 IF X0$(2)<>" "THEN 130
   : REM no destination platter selected
   : S9$=HEX(F218010132F903)
0120 PRINT HEX(07);
   : GOSUB '60("Information Required",23,0,80)
   : GOTO 70
0130 GOSUB '100(X0$(1))
   : X0$(1)=S$
   : IF Q$=" "THEN 150
0140 PRINT HEX(07);
   : GOSUB '60("Invalid Device Address",23,0,80)
   : S9$=HEX(F218010132F902)
   : GOTO 70
0150 GOSUB '100(X0$(2))
   : X0$(2)=S$
   : IF Q$=" "THEN 163
0160 PRINT HEX(07);
   : GOSUB '60("Invalid Device Address",23,0,80)
   : S9$=HEX(F218010132F903)
   : GOTO 70
0163 IF X0$(1)<>X0$(2)THEN 165
   : IF D0>1THEN 165
   : PRINT HEX(07);
   : GOSUB '60("Duplicate Device Address",23,0,80)
   : S9$=HEX(F218010132F902)
   : GOTO 70
0165 REM #1 => Origin
   : SELECT #1<X0$(1)>
   : $OPEN #1
   : ERRORGOTO 140
0166 REM #2 => Destination
   : $CLOSE#1
   : SELECT #2<X0$(2)>
   : $OPEN #2
   : ERRORGOTO 160
0167 $CLOSE#2
0168 PRINT AT(9,40);"Cat. Cur.  Max."
   : PRINT AT(10,40);
   : DATA LOAD BA T#1,(S8,A)D$()
   : ERRORINIT(00)D$()
0170 IF STR(D$(),,2)=HEX(0000)THEN 182
   : GOSUB 190
   : GOSUB 180
   : GOTO 720
0180 PRINT AT(11,40);
   : DATA LOAD BA T#2,(0,A)D$()
   : ERRORINIT(00)D$()
0182 IF STR(D$(),,2)>HEX(0000)THEN 190
   : PRINT HEX(06);"DISK ERROR: Unformatted or no catalog"
   : PRINT AT(20,62,17);"RUN - Retry"
0185 KEYIN K$
   : ON POS(HEX(50F0820D)=K$)+1GOTO 185
   : PRINT AT(10,40,40)
   : PRINT AT(11,40,40)
   : GOTO 70
0190 PRINTUSING "### ##### #####",VAL(STR(D$(),2)),VAL(STR(D$(),3),2)-1,VAL(ST
     R(D$(),5),2)-1
   : RETURN
0720 REM
0730 GOSUB '60(" ",20,1,60)
   : GOSUB '60(" ",21,0,80+50)
   : GOSUB '60("Start Copy ?",23,0,80)
0740 KEYIN K$
   : ON POS(HEX(8250F0)=K$)+1GOTO 740,2010
   : GOSUB '60(" ",23,0,80)
   : GOTO 70
1990 REM %^.Disk to Disk (file by file)
2000 %Processing File  ### : ########   Sectors = ####
2010 REM Begin Installation
2020 GOSUB '60(" ",20,0,4*80)
2030 PRINT HEX(06);AT(18,1,80);
   : PRINTUSING 2000;
   : PRINT HEX(05);
2040 GOSUB '155
   : IF N$=" "THEN 2090
2050 GOSUB '154(N$)
2070 PRINT AT(22,0,80)
   : PRINT AT(23,0,80)
   : N=N+1
   : PRINT AT(18,0);HEX(020402000E06);
   : PRINTUSING 2000,N,N$,B1-A1+1
   : PRINT HEX(0F);AT(19,0,80);STR(N1$,10)
   : GOSUB 2120
2075 IF D1<>3THEN 2080
   : GOSUB '229(2,N$)
   : IF STR(Z9$(Z6),2,1)<>HEX(80)THEN 2080
   : REM .Adj.AP' index
   : STR(Z9$(Z6),2,1)=HEX(40)
   : DATA SAVE BA T#2,(Z3,Z9)Z9$()
2080 GOSUB 180
   : GOTO 2040
2090 GOSUB '60("Disk File Copy Complete, Please Press Cancel/Edit",23,0,80)
2100 KEYIN K$
   : ON POS(HEX(50F0)=K$)+1GOTO 2100
   : GOSUB '60(" ",18,0,60)
   : GOSUB '60(" ",23,0,80)
   : GOTO 70
2120 IF D0<>1THEN 2410
   : MOVE T#1,N$TO T#2,
   : ERRORX9=ERR
   : GOTO 2170
2130 IF X0=1THEN RETURN
2140 LIMITS T#2,N$,A,B,C,D
   : ERRORX9=ERR
   : GOTO 2170
2150 VERIFY T#2,(A,B)E1
   : ERRORX9=ERR
   : GOTO 2170
2160 IF E1=0THEN RETURN
   : GOTO 2320
2170 REM .Interrograte error on initial attempt to move file
   : ON X9-80GOTO 2240,2210,2180
   : REM .81=Already catalogued   82=not on source  83=no room on platter
   : GOTO 2300
2180 REM already catalogued
   : SCRATCH T#2,N$
   : ERRORX9=ERR
   : GOTO 2300
2190 PRINT AT(18,0,10);"Replacing"
   : MOVE T#1,N$TO T#2,()
   : ERRORX9=ERR
   : IF X9=81THEN 2270
   : IF X9=82THEN 2210
   : GOTO 2300
2200 GOTO 2130
2210 REM not at origin
   : PRINT HEX(07);
   : GOSUB '60("File not found on origin platter",22,0,80)
   : GOTO 2245
2240 REM no room on destination platter
   : PRINT HEX(07);
   : GOSUB '60("No room on destination platter",22,0,80)
2245 GOSUB '60("Load new disk and press RUN or Cancel/Edit to Abort",23,0,80)
2250 KEYIN K$
   : ON POS(HEX(8250F0)=K$)+1GOTO 2250,2260
   : GOTO 2340
2260 GOSUB '60(" ",22,0,80*2)
   : GOTO 2120
2270 REM insufficient room in old file space
   : SAVE T#2,(N$)Z1$0,0
   : ERRORX9=ERR
   : IF X9<>83THEN 2300
   : CONVERT STR(Z1$,5)TO E1
   : CONVERT E1+1TO STR(Z1$,5),(####)
   : IF E1>9999THEN 2300
   : GOTO 2270
2280 SCRATCH T#2,Z1$
   : ERRORX9=ERR
   : GOTO 2300
2290 GOTO 2120
2300 N=N-1
   : RETURN CLEAR
   : PRINT HEX(07);
   : GOSUB '60("DISK ERROR -",22,0,80)
   : Z0$=ERR$(X9)
   : PRINT HEX(0E);X9;Z0$;HEX(0F);
   : GOSUB '60("RUN - Retry          CANCEL - Exit",23,0,80)
2310 KEYIN K$
   : ON POS(HEX(8250F0)=K$)+1GOTO 2310,2050
   : PRINT AT(18,0,6*80)
   : GOTO 70
2320 RETURN CLEAR
   : PRINT HEX(07);
   : GOSUB '60("MOVE FILE ABORTED, PLEASE CANCEL - VERIFY ERROR SECTOR",23,0,8
     0)
   : PRINT HEX(0E);E1;HEX(0F);
2330 KEYIN K$
   : ON POS(HEX(50F0)=K$)+1GOTO 2310
2340 GOSUB '60(" ",18,0,80)
   : GOSUB '60(" ",22,0,2*80)
   : GOTO 70
2400 REM %^.Img to Disk (file by file)
   : REM .MOVE T #1, TO T#2
2410 REM .#1 N$ LIMITS in A1,B1,C1,D1
   : REM %0 C  #1 sectors
   : C=B1-A1+1
2420 LIMITS T#2,N$,A,B,D,D
   : ERRORX9=ERR
   : GOTO 2300
2430 IF D<>0THEN 2460
2440 REM .None on destination -- Make one
   : DATA SAVE DC OPEN T#2,(C)N$
   : ERRORX9=ERR
   : GOTO 2170
2450 GOTO 2420
2460 REM .Is there room enuf?
   : IF C>B-A+1THEN 2270
   : REM /.no
2480 REM %.Move file
   : PRINT AT(18,0,10);"Replacing"
   : COPY T#1,(A1,A1+C)TO T#2,(A)
2490 REM .Make index item
   : K$=HEX(00)
   : IF D1=1THEN K$=HEX(80)
   : IF D1=3THEN K$=HEX(40)
   : I$=HEX(10)&K$&BIN(A,2)&BIN(A+C-1,2)&HEX(0000)&N$
2500 GOSUB '229(2,N$)
   : Z9$(Z6)=I$
   : DATA SAVE BA T#2,(Z3,Z9)Z9$()
   : D1=0
   : RETURN