image of READY prompt

Wang2200.org

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

# Sector 1786, program filename = '@MODSYSF'
0010 REM ! Prog = @MODSYSF  V2.0   By TBO     Date = 07/17/89  MVP 3.4 & CS/38
     6
0015 REM ! COPYRIGHT WANG LABORATORIES 1985,1986,1989
0020 REM ! Convert @SYSFILE to new structure for CS/386 & CS/2200 Rel.3.3 plus
0030 REM % V1.1   ST 01/03/85  V2.0
0035 DIM F0$8,F2$8
   : F2$="JUNKXXXA"
   : F0$="@SYSFILE"
0040 DIM F$8,U,U$1,S$48,T$16,C$16,P$(16)8,D$(33)3,T$(15)13
   : DIM M2$15,W3$3,Q$1,Q6$2
0041 DIM U9$50
0042 REM . $8      num  ($1)  $32  $16  $16   $(16)6   $(33)3    $(16)13
0043 REM . F2$      W     W$  W0$  W1$  W2$   W3$()    W4$()     W5$()
0044 REM . F$       U     U$   S$   T$   C$    P$()    D$()      T$()
0046 REM . $8      num   $1   $48  $16  $16   $(16)6   $(33)3    $(16)13
0050 DIM F9$(11)8,U9(11),S9$(11)32,T9$(11)16,C9$(11)16,P9$(11,16)8,D9$(11,33)3
   : DIM D3$(11,33)3,P3$(11,15)13
0070 P3$(),T$()=ALL(00)
   : I=0
0080 PRINT HEX(030E);AT(0,17);"Convert System Configuration File"
0090 REM %*** READ OLD CONFIGURATIONS ***
0100 PRINT HEX(06);AT(5,0,80);
   : PRINT "Enter disk address of datafile '";F0$;"'  ";
   : LINPUT -W3$
   : GOSUB '100(W3$)
   : IF Q$<>" "THEN 100
   : SELECT #1<W3$>
   : ERRORGOTO 100
0110 DATA LOAD DC OPEN T#1,F0$
   : ERRORE=ERR
   : PRINT AT(18,0,80);"No configurations ('";F0$;"') on disk  -  (Error ";E;"
      )"
   : END
0120 INIT(FF)U9$,T$()
   : F0=1
   : DATA LOAD DC #1,F$,U,U9$,S$,T$,C$,P$(),D$(),T$()
   : ERRORE=ERR
   : IF E=74OR E=88THEN 140
   : REM JUMP IF OLD FILE TYPE
   : ELSE PRINT HEX(0E);"Error ";E;" while loading ";F0$
   : END
0125 F0=2
   : IF LEN(U9$)>1THEN 140
   : IF POS(T$(15)<>HEX(FF))=0THEN 140
   : F0=3
   : IF U$<" "THEN F0=4
0130 PRINT
   : PRINT "System Configuration File has already been converted"
   : END
0140 DBACKSPACE #1,BEG
   : T$()=ALL(00)
0150 IF F0=2THEN 155
   : DATA LOAD DC #1,F$,U,S$,T$,C$,P$(),D$()
   : ERRORE=ERR
   : PRINT HEX(0E);"Error ";E;" while loading ";F0$
   : END
0152 GOTO 160
0155 DATA LOAD DC #1,F$,U,S$,T$,C$,P$(),D$(),T$()
   : ERRORE=ERR
   : PRINT HEX(0E);"Error ";E;" while loading ";F0$
   : END
0160 IF END THEN 200
   : IF F$=" "THEN 150
   : I=I+1
   : IF I>10THEN 200
   : GOSUB '225
   : GOTO 150
0170 REM % *** READ THE OLD CONFIGURATION INFORMATION INTO ARRAYS ***
0180 DEFFN'225
   : F9$(I)=F$
   : U9(I)=U
   : S9$(I)=S$
   : C9$(I)=C$
   : T9$(I)=T$
   : FOR J=1TO 16
   : P9$(I,J)=P$(J)
   : NEXT J
   : FOR J=1TO 33
   : D9$(I,J)=D$(J)
   : NEXT J
0185 IF F0=1THEN RETURN
   : FOR J=1TO 15
   : P3$(I,J)=T$(J)
   : NEXT J
   : RETURN
0190 REM % SAVE THE NEW CONFIG FILE
0200 REM % STRETCH EXISTING FILE TO ACCOMODATE EXTRA INFO
0210 SCRATCH T#1,F0$
   : ERRORPRINT AT(10,0);HEX(060E);"Disk write protected - press any key to re
     try ";
   : KEYIN K$
   : PRINT HEX(06),AT(10,0,)
0230 SAVE DC T#1,(F0$)F2$10,10
   : ERRORF2$=ADDCHEX(01)
   : GOTO 230
0240 SCRATCH T#1,F2$
0250 DATA SAVE DC OPEN T#1,(3*17+2)F0$
   : ERRORE=ERR
   : PRINT AT(10,0);"Disk error ";E;" while creating new ";F0$
   : STOP #
   : END
0260 DBACKSPACE #1,BEG
   : REM %.Move CONFIGURATIONS one at a time into new format
0265 FOR J=1TO I
   : F$=F9$(J)
   : U=U9(J)
   : U$=" "
   : T$=T9$(J)
   : C$=C9$(J)
0270 I=1
   : FOR K=1TO 32STEP 2
   : STR(S$,I)=HEX(00)&STR(S9$(J),K,2)
   : I=I+3
   : NEXT K
0275 FOR K=1TO 16
   : P$(K)=P9$(J,K)
   : NEXT K
0280 FOR K=1TO 33
   : D$(K)=D9$(J,K)
   : NEXT K
0285 FOR K=1TO 15
   : T$(K)=P3$(J,K)
   : NEXT K
0290 DATA SAVE DC #1,F$,U,U$,S$,T$,C$,P$(),D$(),T$()
   : NEXT J
0300 DATA SAVE DC #1,END
   : DATA SAVE DC CLOSE
0310 PRINT
   : PRINT "File conversion complete"
   : IF V9=0THEN END
   : LOAD T"@GENPART"
0330 DEFFN'31
   : SCRATCH T"@MODSYSF"
   : SAVE DC T()"@MODSYSF"
5020 REM %.VALIDATE ADDR
5025 DEFFN'100(W3$)
   : IF W3$="340"THEN 5035
   : $TRAN(W3$,"AaBbCcDdEeFf")R
   : IF POS("DB3"=W3$)>0AND POS("123567"=STR(W3$,2))>0AND VER(STR(W3$,3),"H")>
     0THEN 5030
   : Q$="I"
   : RETURN
5030 IF POS("3B"=W3$)=0OR POS("123"=STR(W3$,2))=0OR STR(W3$,3)<>"0"THEN 5035
   : IF STR(W3$,,1)="3"THEN STR(W3$,3)="1"
   : STR(W3$,,1)="D"
5035 Q$=" "
   : RETURN