image of READY prompt

Wang2200.org

Listing of file='3741030A' on disk='vmedia/3741_util.wvd.zip'

# Sector 94, program filename = '3741030A'
0010 REM 3741030A,02-00(12/1/78),THIS PROGRAM IS A PRODUCT OF WANG LABS. INC.
3000 % THIS MUST BE STATEMENT 3000
3020 DIM X$(4)62,X0$(1)1,Y$(4)64,F1$17,A$18,C1$(4)64,H1$64,N$64,E$(4)64
3040 DEFFN1(E2)=E2*(VAL(STR(E$(1),5,1))*256+VAL(STR(E$(1),6,1))-(VAL(STR(E$(1)
     ,3,1))*256+VAL(STR(E$(1),4,1))))
3060 DEFFN'15
3070 PRINT HEX(03);,"CONVERT 3741 FILE TO TC FORMAT"
   : PRINT "MOUNT DISK PLATTERS."
   : GOSUB '254
   : PRINT HEX(03);,"CONVERT 3741 FILE TO TC FORMAT"
   : GOSUB '200("1","2",1,0,"ENTER MODE (1-ALL OR 2-ONE FILE)",1)
   : C=Q9
3150 IF C=1THEN 3210
   : C$="MODE - ONE FILE"
   : GOSUB '248(8,10,0)
   : PRINT C$;
   : GOTO 3400
3210 C$="MODE - ALL"
   : GOSUB '248(8,10,0)
   : PRINT C$;
   : STR(H1$,1,3)=HEX(0D0C0E)
   : STR(H1$,4,18)="CONVERT 3741 TO TC"
   : STR(H1$,22,3)=HEX(0D0A0E)
   : STR(H1$,25)="INPUT NAME           OUTPUT NAME"
   : GOSUB '50(H1$)
3310 GOSUB '200("1","2",1,0,"ENTER WHERE THE CONVERSION SHOULD STOP (1-'EOD' O
     R 2-'EOE')",1)
   : C0=Q9
   : GOSUB '248(9,10,1)
   : IF C0=2THEN 3370
   : PRINT "COPY TO - 'EOD'"
   : GOTO 3400
3370 PRINT "COPY TO - 'EOE'"
3400 GOSUB '248(1,0,0)
   : GOSUB '200("1","2",1,0,"ENTER OPTION (1-TRANSLATE;2-LEAVE IN EBCDIC)",1)
   : A=Q9
   : IF A=1THEN 3460
   : A$="LEAVE IN EBCDIC"
   : GOTO 3480
3460 A$="TRANSLATE TO ASCII"
3480 GOSUB '248(10,10,1)
   : PRINT "OPTION - ";A$;
   : GOSUB '248(1,0,3)
   : IF C=2THEN 3580
   : C1=16389
3530 GOSUB '91(C1)
   : IF C1-16384>=27THEN 4440
   : GOTO 3870
3580 GOSUB '200(" "," ",17,0,"ENTER THE INPUT FILE NAME.",2)
   : F1$=Q6$
   : GOSUB '186(F1$)
   : IF Q$=" "THEN 3640
   : PRINT HEX(010A0A0A07);"ERROR - FILE DOES NOT EXIST."
   : GOTO 3580
3640 Y=Z5
3670 GOSUB '200("1","2",1,0,"ENTER WHERE THE CONVERSION SHOULD STOP. (1-'EOD'
     OR 2-'EOE')",1)
   : GOSUB '248(9,10,1)
   : IF Q9=2THEN 3750
   : PRINT "COPY TO - 'EOD'"
   : Y0=Z3-Z1
   : IF Y0>0THEN 3790
   : GOSUB '255
   : GOTO 3670
3750 PRINT "COPY TO - 'EOE'"
   : Y0=Z2-Z1+1
3790 GOSUB '200(" "," ",8,0,"ENTER THE OUTPUT FILE NAME.",2)
   : Y$=Q6$
   : GOSUB '229(5,Y$)
   : IF R=0THEN 3870
   : PRINT HEX(010A0A0A07);"ERROR - FILE ALREADY EXISTS."
   : GOTO 3790
3870 GOSUB '248(11,10,1)
   : PRINT "INPUT FILE NAME - ";F1$;TAB(17-LEN(F1$))
   : GOSUB '248(12,10,1)
   : PRINT "OUTPUT FILE NAME - ";Y$;TAB(8-LEN(Y$))
   : K,X=0
   : GOSUB '248(1,0,3)
   : Y1=INT(Y0/INT(246/(Z5+1)))+5
   : E1=Y1
   : GOSUB '75
   : IF FN1(1)>=E1THEN 4120
4010 Y1=FN1(1)
4020 GOSUB '248(1,0,3)
   : PRINT "AVAILABLE SECTORS - ";FN1(1)-2;"TOTAL # OF SECTORS REQUIRED - ";E1
   : GOSUB '254
   : GOSUB '75
   : IF FN1(1)-2<=0THEN 4020
   : IF FN1(1)<E1THEN 4090
   : Y1=E1
   : GOTO 4120
4090 Y1=FN1(1)
4120 IF K=Y0THEN 4360
4130 IF A=1THEN 4160
   : GOSUB '197
   : GOTO 4170
4160 GOSUB '181
4170 IF Q$=HEX(08)THEN 4130
   : IF Q$<>HEX(20)THEN 4360
   : MAT COPY Z$()<1,Y>TO Y$()
   : K=K+1
   : PRINT HEX(010A0A0A0A0A0A);,"CONVERTING RECORD -";K
   : IF X=0THEN 4620
   : IF X+Y>248THEN 4690
4270 BIN(X0$(1))=Y
   : MAT COPY X0$()<1,1>TO X$()<X,1>
   : MAT COPY Y$()TO X$()<X+1,Y>
   : X=X+Y+1
   : BIN(STR(X$(1),2,1))=X
   : GOTO 4120
4360 STR(X$(1),1,1)=HEX(F0)
   : DATA SAVE DC #5,X$()
   : DATA SAVE DC #5,END
   : GOSUB '188
   : IF C=2THEN 4440
   : GOTO 3530
4440 PRINT HEX(03);"CONVERT 3741 FILE TO TC FORMAT"
   : GOSUB '200(" "," ",1,0,"DO YOU WANT TO RERUN THIS PROGRAM? (Y/N)",2)
   : IF Q6$="Y"THEN 3070
   : IF Q6$="N"THEN 4520
   : GOSUB '255
   : GOTO 4440
4520 DEFFN'31
   : GOSUB '229(1,"3741020A")
   : IF R=1THEN 4580
   : PRINT HEX(030A);"MOUNT SYSTEM DISK."
   : GOSUB '254
   : GOTO 4520
4580 PRINT HEX(03);"SYSTEM NOW LOADING - SYSTEM MENU"
   : LOAD DC T#1,"3741020A"3000,6990
4620 DATA SAVE DC OPEN T#5,Y1,Y$
4630 INIT(20)X$()
   : X$(1)=HEX(0003)
   : X=3
   : GOTO 4270
4690 DATA SAVE DC #5,X$()
   : GOSUB '92
   : GOTO 4630
4740 DEFFN'91(C1)
4750 C1=C1+1
   : IF C1-16384<27THEN 4800
   : RETURN
4800 Z0=C1-16384
   : GOSUB '199
   : C1$(1)=Z0$(1)
   : C1$(3)=Z0$(3)
   : F1$=STR(C1$(1),6,17)
   : GOSUB '186(F1$)
   : IF STR(C1$(1),1,3)<>"HDR"THEN 4750
   : IF STR(C1$(3),1,1)=HEX(F8)THEN 4750
   : IF Q$<>" "THEN 4750
   : Y=Z5
   : IF C0=1THEN 4980
   : Y0=Z2-Z1+1
   : GOTO 5070
4980 Y0=Z3-Z1
   : IF Y0>0THEN 5070
   : INIT(20)N$
   : STR(N$,1,22)=F1$
   : STR(N$,23)=" CANNOT BE CONVERTED TO 'EOD'"
   : GOSUB '50(N$)
   : GOTO 4750
5070 IF LEN(F1$)<=8THEN 5100
   : Y$=STR(F1$,1,8)
   : GOTO 5120
5100 Y$=F1$
5120 GOSUB '40
   : RETURN
5160 DEFFN'40
   : N0=0
5190 GOSUB '229(5,Y$)
   : IF R<>0THEN 5290
   : INIT(20)N$
   : N$=F1$
   : STR(N$,46)=Y$
   : GOSUB '50(N$)
   : RETURN
5290 N0=N0+1
   : CONVERT N0TO STR(Y$,7,2),(##)
   : GOTO 5190
5340 DEFFN'92
   : IF E1>FN1(1)THEN 5380
   : RETURN
5380 LIMITS T#5,O7,O8,O9
   : IF O9=O8-1THEN 5420
   : RETURN
5420 DBACKSPACE #5,1S
   : STR(X$(1),1,1)=HEX(F0)
   : DATA SAVE DC #5,X$()
   : DATA SAVE DC #5,END
   : GOSUB '248(1,0,3)
   : PRINT "MOUNT PLATTER TO CONTAIN NEXT VOLUME OF OUTPUT FILE"
   : GOSUB '254
   : GOSUB '75
   : IF FN1(1)>=E1-Y1THEN 5620
   : GOSUB '248(1,0,3)
5530 PRINT "AVAILABLE SECTORS - ";FN1(1)-2;" TOTAL # OF SECTORS REQIRED - ";E1
     -Y1
   : GOSUB '254
   : GOSUB '75
   : IF FN1(1)-2<=0THEN 5530
   : IF FN1(1)>=E1-Y1THEN 5620
   : DATA SAVE DC OPEN T#5,FN1(1),Y$
   : Y1=Y1+FN1(1)
   : RETURN
5620 DATA SAVE DC OPEN T#5,E1-Y1,Y$
   : RETURN
5660 DEFFN'75
   : DATA LOAD BA T#5,(0,E)E$()
   : AND (STR(E$(1),3,1),7F)
   : AND (STR(E$(1),5,1),7F)
   : RETURN