image of READY prompt

Wang2200.org

Listing of file='@MOVEFIL' on disk='vmedia/mvp-boot-2.6.2.wvd.zip'

# Sector 1400, program filename = '@MOVEFIL'
0010 REM % Prog = @MOVEFIL  DMB  Date = 03/26/85  Rel 2.6  COPYRIGHT WANG LABO
     RATORIES 1985
0020 LOAD T"@MOVE1"10,40BEG 90
0050 DIM A1$3,A2$3,T$1,C1,C2
   : DIM C1$8,C2$8,C3$8,C0$8,A4$5,A3$3,A5$3,P9$8
   : DIM S$(24,2)8,S$3,N$8,N3$8,P1$1,Q1$1,Q$1,Q6$2,L$2,E$49,S1$3,S2$3,N1$8,N2$
     8,N4$8,N5$8,N6$8,H7$(30)8
   : PRINT HEX(020D0C030F020402000F);
0090 PRINT HEX(060E03);AT(0,25);"***** MOVE FILE UTILITY *****";HEX(0F)
   : S$(),C1$,C2$,C3$,N3$,P9$=ALL(00)
   : T$="W"
   : A1$="D11"
   : A2$="D10"
   : A5$,A3$=" "
   : P=1
   : PRINT AT(2,0);"Press 'FN' or 'TAB' to return to menu"
0130 PRINT AT(4,0);
   : LINPUT "Input address:  "-A1$
   : $TRAN(A1$,"BbDd")R
   : GOSUB '100(A1$)
   : IF Q$<>" " THEN 130
   : IF A1$=A3$AND Q$=" "THEN 160
   : A3$=A1$
   : PRINT HEX(06);AT(6,0);"W = WANG 2200 type";AT(7,0);"I = IBM 3741 type"
0150 PRINT AT(5,0,30);
   : LINPUT "Input platter type:  "-T$
   : IF T$="W"OR T$ = "w"THEN PRINT AT(5,22);"WANG"
   : IF T$="I"OR T$="i"  THEN PRINT AT(5,22);"3741"
   : C1=POS("IWiw"=T$)
   : IF C1=0THEN 150
   : PRINT HEX(06);AT(6,0,);
   : C1,C2=MOD(C1,2)*2^14
   : GOSUB '105(1,A1$,C1)
   : IF Q$=" "THEN 160
   : A3$=" "
   : GOTO 130
0160 GOSUB 400
   : H$="Y"
   : PRINT AT(7,20,);
   : LINPUT "Do you wish to move all active files ?",H$
   : IF STR(H$,1,1)="N"OR STR(H$,1,1)="n" THEN 190
   : REM CHECK FOR SAME DISK
   : IF A1$ <> A2$ THEN 162
   : PRINT HEX(07);AT(11,0,80);"Input and output disks may not be the same."
   : PRINT AT(6,0,240)
   : GOTO 130
0162 PRINT AT(7,20,);"    ** MOVING ALL ACTIVE FILES **"
   : Z=1
   : H$="Y"
   : PRINT AT(8,20,50);
   : LINPUT "Do you wish to overwrite files ?",H$
   : $TRAN (H$,"YyNn")R
   : GOTO 200
0190 PRINT AT(7,20,);"    ** MOVING SPECIFIED FILES **"
0200 GOSUB '115(1,0,A1$,C1)
   : IF Q$<>" "THEN 130
   : I1=VAL(STR(S$(),2))
0210 IF Z9=1THEN 240
   : IF C1$<>P9$THEN 230
0220 GOSUB '130(0,1,C3$,A9,I1-1,A1$,C1)
   : IF N3$="@SPAN001"THEN C9$="Y"
   : IF Q$=" "AND C9$="Y"THEN 250
   : IF Q$="N"AND Z=1AND H$="Y"THEN 550
   : IF Q$="N"AND Z=1THEN 570
   : IF Z=1AND R3<0THEN 225
   : IF Q$="N"THEN N3$=" "
   : GOTO 240
0225 C3$=N3$
   : GOTO 200
0230 Z9=1
0240 IF Z9=1THEN 241
   : C1$,C2$,C3$=N3$
   : GOTO 242
0241 C2$,C3$=N3$
0242 A9=S9
   : IF R3<0OR STR(N3$,,5)="@SPAN"THEN 220
   : GOTO 270
0250 C9$=" "
   : A9=0
   : C3$=ALL(00)
   : GOSUB '130(1,1,"@SPAN001",0,I1-1,A1$,C1)
   : C1$,C2$=" "
   : IF R3<0THEN 210
   : IF Q$<>" "THEN 270
   : C1$,C2$=N3$
   : GOSUB '115(1,R4,A1$,C1)
   : C2$=STR(S$(),9,8)
   : PRINT HEX(0E);AT(11,0,80);"File @SPAN001";" contains a portion of file ";
     C2$;
0270 P9$=C1$
   : IF Z=1THEN 280
   : PRINT HEX(06);AT(9,0,320);
   : LINPUT "Input file name:  "-C1$
   : GOTO 290
0280 PRINT AT(10,0,320);"MOVING FILE  ";C2$
0290 IF C1$=" "THEN 220
   : IF STR(C1$,,5)="@SPAN"AND STR(C1$,6)<>"001"THEN 270
   : C0$=C1$
   : $OPEN #1,#2
   : PRINT HEX(06);AT(11,0,80);"GETTING FILE PARAMETERS";
   : IF C1$<>N3$OR Q$<>" "OR P9$=C1$THEN GOSUB '130(1,1,C1$,0,I1-1,A1$,C1)
   : IF Q$=" "AND C1$="@SPAN001"THEN 320
   : ELSE IF Q$=" "THEN 350
   : IF C1$="@SPAN001"THEN 340
   : C1$="@SPAN001"
   : A9=0
0310 GOSUB '130(1,1,C1$,A9,I1-1,A1$,C1)
   : IF Q$="N"THEN 340
0320 GOSUB '115(1,R4,A1$,C1)
   : Q$="N"
   : C2$=STR(S$(),9,8)
   : IF C2$<>C0$AND C0$<>"@SPAN001"THEN 340
   : Q$=" "
   : C1$=N3$
   : A3=VAL(STR(S$(),5),2)
   : A5=VAL(STR(S$(),3),2)-A3
   : GOTO 360
0340 $CLOSE
   : PRINT HEX(07);AT(11,0);
   : LINPUT "File does not exist in source platter. Key RETURN to try again",P
     1$
   : PRINT AT(11,0,160);
   : C1$=" "
   : GOTO 270
0350 C2$=N3$
   : A3=R6
   : A5=R5-R4-R6+1
0360 PRINT HEX(0E);AT(11,0,);
   : IF STR(C0$,,5)<>"@SPAN"THEN 370
   : PRINT "File ";C0$;" contains a portion of file ";C2$;
0370 IF Z=1THEN 455
   : PRINT AT(12,0);"Currently,";A3;"sectors are used in file ";C2$;" and";A5;
     " are free.";
0380 PRINT HEX(0F);AT(10,0,80);
   : CONVERT A5TO A4$,(#####)
   : LINPUT "Extra Sectors:  "-A4$
   : CONVERT A4$TO A4
   : ERRORGOTO 370
0390 IF A4<0OR A4+A3>2^16-1THEN 380
   : PRINT HEX(06);AT(13,0,)
   : GOTO 460
0400 IF A5$<>" "THEN 500
0410 PRINT AT(4,40,40);
   : LINPUT "Output address:  "-A2$
   : $TRAN(A2$,"BbDd")R
   : GOSUB '100(A2$)
   : IF Q$<>" "THEN 410
   : IF A2$=A5$AND Q$=" "OR A2$=A1$THEN 440
   : A5$=A2$
0420 PRINT HEX(06);AT(6,40,40);"W = WANG 2200 type";AT(7,40,);"I = IBM 3741 ty
     pe"
   : T$="W"
0430 PRINT AT(5,40,40);
   : LINPUT "Output platter type:  "-T$
   : IF T$="W"OR T$="w"THEN PRINT AT(5,62);"WANG"
   : IF T$="I"OR T$="i" THEN PRINT AT(5,62);"3741"
   : C2=POS("IWiw"=T$)
   : IF C2=0THEN 430
   : PRINT HEX(06);AT(6,40,);
   : C2=MOD(C2,2)*2^14
0440 GOSUB '105(2,A2$,C2)
   : IF Q$=" "THEN 450
   : A5$=" "
   : GOTO 410
0450 RETURN
0455 A4=A5
0460 GOSUB '115(2,0,A2$,C2)
   : IF Q$<>" "THEN 410
   : I4=VAL(STR(S$(),2))
0470 IF C2=0OR K9=1THEN 500
   : PRINT AT(15,0);
   : Q1$="N"
   : F=1
0475 IF STR(S$(),,2)<>HEX(000D)AND STR(S$(),5,2)<>HEX(03E9)THEN PRINT HEX(0E);
     "Your platter needs to be initialized";HEX(0F);
   : ELSE F=0
   : IF F=1THEN Q1$="Y"
   : PRINT AT(16,0);
   : LINPUT "Do you want to initialize the platter?"-Q1$
   : K9=1
   : ON POS("YyNn"=Q1$)GOTO 490,490,480,480
   : ELSE GOTO 470
0480 ON F+1GOTO 500
   : PRINT AT(8,40);
   : LINPUT "Mount a new platter and key RETURN",P1$
   : GOTO 420
0490 PRINT HEX(06);AT(17,0);"Initializing output platter"
   : GOSUB '240(A2$)
0500 IF Z=1THEN 510
   : PRINT HEX(06);AT(9,40,);
0505 LINPUT "Output file name:  "-C2$
   : REM CHECK FOR SAME DISK, SAME NAME
   : IF C1$ <> C2$ OR A1$ <> A2$ THEN 510
   : PRINT HEX(07);AT(14,10,70);"File names must be different if input and out
     put disks are the same.";AT(9,40);
   : GOTO 505
0510 PRINT HEX(06);AT(14,10,);"Scanning output index";AT(15,0,);
   : GOSUB '130(1,2,C2$,0,I4-1,A2$,C2)
   : IF Q$="N"THEN 540
0520 Q1$="N"
   : IF STR(H$,1,1)="Y"AND Z=1THEN 540
   : IF STR(H$,1,1)="N"AND Z=1THEN 530
   : PRINT AT(14,10);"File ";C2$;" already exists. OK to overwrite?";
   : LINPUT Q1$
   : PRINT AT(14,10,50);HEX(06);
   : ON POS("YyNn"=Q1$)GOTO 540,540,500,500
   : ELSE GOTO 520
0530 H7$(P)=C2$
   : P=P+1
   : IF P > 30 THEN P = 30
   : GOTO 210
0540 PRINT AT(6,30,50);
   : GOSUB '255(C1$,A1$,C1,A4,C2$,A2$,C2)
0541 REM IF FILE WAS A PROGRAM FILE, CHANGE FILE NAME IN FIRST SECTOR TO MATCH
          THE FILE NAME IN THE CATALOG INDEX
   : GOSUB '105(2,A2$,C2)
   : LIMITS T#2,C2$,D1,D2,D3,D4
   : IF D4<>1THEN GOTO 543
0542 GOSUB '115(2,D1,S$,0)
   : STR(S$(1,1),2,7) =STR(C2$,1,7)
   : STR(S$(1,2),1,1)=STR(C2$,8,1)
   : GOSUB '110(2,D1,S$,0)
0543 $CLOSE
   : GOTO 210
0545 DEFFN'127
0550 DEFFN'126
   : LOAD RUN "START"
0570 PRINT AT(7,24,);"OVERWRITE EXCEPTIONS"
   : FOR I=1TO 10
   : PRINT AT(I+8,10);I;") ";H7$(I);AT(I+8,30);I+10;") ";H7$(I+10);AT(I+8,50);
     I+20;") ";H7$(I+20)
   : NEXT I
0580 KEYIN K$,550,550
   : GOTO 580