image of READY prompt

Wang2200.org

Listing of file='2229PB' on disk='vmedia/mvp-diag-2.6.2.wvd.zip'

# Sector 1423, program filename = '2229PB'
0010 COM F9$8
   : F9$="2229PB"
   : LOAD T"2229STRT"
0020 REM % File name "2229PB"  -  Part of 2229 utilities package  ST 01/21/198
     3
0030 REM % Back up a complete platter to tape
0040 SELECT PRINT 005(80),CO 005(80),LIST 005(80)
   : RETURN CLEAR ALL
0050 DIM T$30,A$(16),K$1,A1$(16,16)64,E$20,C$2,D$3,C(4),S$30,R$16
0060 REM T$ TITLE
   : REM D$ SOURCE ADDRESS
   : REM A1$() DATA BUFFER
   : REM A$() SECTOR BUFFER
   : REM E$ ERROR MESSAGE
   : REM C$ EMBEDDED BLOCK COUNT
   : REM C() STARTING SECTOR OF BLOCK
0070 DIM V$(16),D1$6,T1$6,L1$3
0080 DIM F$(16)
   : REM FILE LABEL
   : DIM M$80
   : REM MESSAGE
0090 LOAD T#1,"2229SUB"5000,8999BEG 100
0100 INIT(00)V$()
   : REM VOLUME LABEL
   : FOR K=1TO 4
   : C(K)=0
   : NEXT K
   : REM CLEAR OUT SECTOR ARRAY
0110 T$="BACKUP PLATTER TO TAPE"
   : $OPEN #4
   : GOSUB '151
0120 REM % Get source disk address
   : PRINT HEX(0F);
0130 IF D$=" "THEN D$="D11"
   : PRINT AT(3,0);
   : PRINT "Source platter address ";AT(3,22);
   : LINPUT -D$
   : SELECT #2<D$>
   : ERRORA=1
   : GOTO 150
0140 VERIFY T#2,(0,0)G1
   : ERRORA=1
0150 IF A=0THEN 170
0160 PRINT AT(3,30);"ERROR ";ERR;HEX(07);
   : GOTO 120
0170 PRINT AT(3,0,79);"Source Platter ";
   : PRINT AT(3,23); D$
   : DATA LOAD BA T#2,(0)A$()
   : ERRORGOTO 160
0180 G1=VAL(STR(A$(1),2,2))
   : G3=VAL(STR(A$(1),3,2),2)-1
   : G2=VAL(STR(A$(1),5,2),2)-1
0190 PRINT
   : PRINTUSING 200,"INDEX SECTORS = ",G1
   : PRINTUSING 200,"END CAT. AREA = ",G2
   : PRINTUSING 200,"CURRENT END   = ",G3
0200 %############### #####
0210 M$=" "
   : GOSUB '160
   : K$="Y"
   : LINPUT "Is this the correct platter?",-K$
   : ERRORGOTO 210
0220 IF K$="Y" OR K$="y"THEN 230
   : PRINT HEX(06); AT(3,0,)
   : GOTO 120
0230 M$=" "
   : GOSUB '160
0240 S1=0
   : REM FIRST SECTOR
0250 GOSUB '240
   : REM  Get volume label parameters
   : GOSUB '241
   : REM GET FILE PARAMETERS
0260 CONVERT STR(V$(),13,2)TO V
   : M$="Insert cartridge and press ONLINE"
   : GOSUB '160
   : PRINT HEX(0D0A)
   : GOSUB '152
0270 PRINT HEX(06);AT(5,0,);
   : PRINTUSING 280,V
   : GOSUB '104
   : REM LOAD TAPE
0280 %Tape sequence number   #
0290 GOSUB '102
   : REM TAKE STATUS
0300 IF STR(S$,07,1)=HEX(00)THEN 310
   : GOSUB '208
   : GOTO 270
0310 K$=HEX(10)
   : STR(S$,08,1)=AND K$
   : IF STR(S$,08,1) =HEX(00)THEN 320
   : M$="Tape is write protected "
   : GOSUB '160
   : GOSUB '152
   : GOTO 270
0320 STR(F$(),69,80)=D$&ALL(20)
   : STR(F$(),72,23)=" BASIC-2 platter backup"
   : STR(F$(),149,1)=HEX(00)
0330 REM WRITE FILE MARK
   : GOSUB '115
   : IF E<>0THEN 9050
0340 REM % Write volume label
0350 MAT COPY V$()TO A1$()
   : REM MOVE LABEL INTO DATA BLOCK
0360 GOSUB '213
   : REM WRITE VOLUME HEADER LABEL
   : IF E=0THEN 370
   : IF E<>3THEN 9050
   : GOSUB '208
   : GOTO 360
0370 GOSUB '115
   : REM WRITE FILE MARK
   : IF E<>0THEN 9050
0380 REM % Write file header label
0390 GOSUB '245
   : REM SET UP FILE HEADER
   : STR(F$(),5,2)=BIN(1,2)
   : REM FIRST FILE ON TAPE
0400 MAT COPY F$()TO A1$()
   : REM MOVE LABEL INTO DATA ARRAY
0410 GOSUB '213
   : REM WRITE LABEL
   : IF E=0THEN 420
   : IF E<>3THEN 9050
   : GOSUB '208
   : GOTO 410
0420 REM % Start writing data blocks
0430 S2=S1
   : GOSUB '225
   : REM GET DATA BLOCK
   : B=P-1
   : REM # OF BYTES
0440 PRINT HEX(06);AT(10,0,79);"Now on sectors ";S2;"to ";S1-1
   : GOSUB '113
   : REM WRITE DATA
   : IF E<>0THEN 460
0450 IF S1<=G3 THEN 430
   : GOSUB '220
   : REM IF NOT DONE, GET MORE DATA
   : REM ELSE GET RESULTS OF WRITE
0460 IF E=0THEN 470
   : REM ALL GOOD
   : IF E=2THEN 470
   : REM OUT OF TAPE
   : IF E<>3THEN 9050
   : GOSUB '208
   : GOTO 440
0470 REM % Out of tape or finished - finish off file and volume labels and con
     tinue on next cartridge if not done
0480 IF STR(R$,2,1)=HEX(00)THEN 490
   : S1=C(VAL(STR(R$,2,1))+1)
   : REM RESET STARTING SECTOR ADDRESS TO ACCOUNT FOR BLOCKS NOT WRITTEN
0490 GOSUB '115
   : REM WRITE FILE MARK
   : IF E=2THEN 490
   : IF E<>0THEN 9050
0500 REM SET UP FILE TRAILER LABEL
0510 C=C-VAL(STR(R$,2,1))
   : GOSUB '242
   : REM NEW BLOCK COUNT
0520 REM % Write file trailer
   : MAT COPY F$()TO A1$()
   : GOSUB '213
   : IF E=2THEN 520
   : IF E<>0THEN 9050
0530 IF E<>0THEN 9050
0540 GOSUB '115
   : REM WRITE FILE MARK
   : IF E=2THEN 540
   : IF E<>0THEN 9050
0550 REM % Write volume trailer
0560 STR(V$(),1,4)="VEND"
   : V=V+1
   : IF S1>G3THEN STR(V$(),39,8)=ALL(00)
   : REM NEXT VOLUME NAME
   : MAT COPY V$()TO A1$()
0570 GOSUB '213
   : IF E=2THEN 570
   : IF E<>0THEN 9050
0580 GOSUB '105
   : IF S1<=G3THEN 590
   : REM JUMP IF ANOTHER CARTRIDGE NEEDED
   : M$="Backup done - remove cartridge"
   : GOSUB '160
   : $CLOSE#4
   : GOSUB '153
   : STOP
0590 M$="Insert next cartridge"
   : GOSUB '160
   : GOSUB '152
0600 CONVERT VTO STR(V$(),13,2),(##)
0610 STR(V$(),1,4)="VHDR"
   : GOTO 270
   : REM CONTINUE WITH NEXT CARTRIDGE
9050 PRINT AT(10,0,79);"Tape error ";E
   : PRINT E$
   : $CLOSE
   : STOP
   : GOTO 10