Compucolor.org – Virtual Media

Listing of file='READSK.BAS;01' on disk='vmedia/chip_22-sector.ccvf'

0 REM  THIS LINE MUST BE THE FIRST LINE
10 REM *************** READ DISK TO DISPLAY *******************
20 REM *                                                      *
22 REM * V11.79 - JAMES JOHNSON, P.O. BOX 63, BYRON, NY 14422 *
24 REM *                                                      *
30 REM * THIS PROGRAM WILL READ ANY CCII FORMATTED DISK,      *
40 REM * LOOKING FOR FCS ERRORS.  YOU MAY START AT ANY BLOCK  *
50 REM * 0-399 (DEC) OR $0000-$018F (HEX).  THE FIRST ERROR   *
60 REM * FOUND IN EACH GROUP OF BLOCKS READ WILL BE STORED    *
70 REM * AND PRINTED AFTER BLOCK 399 IS READ.  NO INFORMATION *
80 REM * ON THE DISK WILL BE LOST OR DESTROYED.               *
81 REM *                                                      *
82 REM * THIS PROGRAM RUNS IN ABOUT 3K                        *
84 REM *                                                      *
98 REM ********************************************************
99 REM  THIS LINE MUST BE BEFORE PROGRAM LINES START 


110 CLEAR 300:DIM E$(13)
120 PLOT 15,12,29,19:PRINT :PRINT "MOUNT DISK TO BE READ (HIT RETURN ";
130 PLOT 19:INPUT "WHEN READY)";Z$
140 PLOT 12:EC= - 1
150 INPUT "START BLOCK (HEX=$.... OR DEC)= ";S$
160 IF LEFT$ (S$,1)= "$"GOTO 190
170 FOR I= 1TO LEN (S$):IF ASC (MID$ (S$,I,1))> 64GOTO 200
180 NEXT I:GOTO 290
190 IF LEN (S$)= 5GOTO 210
200 PRINT :PRINT TAB( 35)"IE. $011F":PLOT 28,28,28,11:GOTO 150
210 ST= 0:REM CHANGE HEX VALUE OF S$ TO DEC
220 FOR I= 0TO 3
230 A= ASC (MID$ (S$,5- I))
240 IF A> 64THEN A= A- 55:GOTO 260
250 A= A- 48
260 ST= ST+ A* 16^ I
270 NEXT I
280 GOTO 300
290 ST= VAL (S$):REM CHANGE S$ TO DEC
300 S2= INT (ST/ 32+ 1)* 32
310 IF S2> 384THEN S2= 400
320 S$= "00":X= INT ((S2- ST)/ 2):IF X* 2< S2- STTHEN S$= "80"
330 GOSUB 680
340 S$= RIGHT$ (H$+ S$,4)
350 X= ST
360 GOSUB 550
370 IF S2> 352GOTO 420
380 S$= "1000"
390 FOR X= S2TO 352STEP 32
400 GOSUB 550
410 NEXT X
420 IF S2= 400GOTO 450
430 X= 384:S$= "800"
440 GOSUB 550
450 IF EC= - 1GOTO 490
460 PLOT 3,0,0:FOR E= 0TO EC:PRINT E$(E):NEXT E
470 PLOT 14,3,0,18
480 PRINT EC+ 1" DISK ERROR(S)!!"
490 PLOT 14,3,0,20
500 INPUT "READ ANOTHER DISK (Y OR N) ? ";A$
510 IF LEFT$ (A$,1)= "Y"GOTO 110
520 PRINT
530 PLOT 19:PRINT "MOUNT PROGAM DISK (HIT RETURN ";
540 PLOT 19:INPUT "WHEN READY)";Z$:PLOT 1
550 REM READ BLOCK
560 GOSUB 680
570 PLOT 15,12,27,4
580 PRINT "REA     "H$" 7000 "S$
590 PLOT 27,27
600 TF= 500
610 EC$= "":FOR E= 24584TO 24590STEP 2
620 EC$= EC$+ CHR$ (PEEK (E)):NEXT E
630 IF EC$< > " CD0"GOTO 670
640 EC$= "":FOR E= 24576TO 24610STEP 2
650 EC$= EC$+ CHR$ (PEEK (E)):NEXT E
660 EC= EC+ 1:E$(EC)= EC$
670 RETURN
680 REM X = VALUE TO BE HEXED
690 H$= "":XX= X:FOR II= 3TO 0STEP - 1
700 IF II= 0THEN X1= XX:GOTO 720
710 X1= INT (XX/ 16^ II):XX= XX- X1* 16^ II
720 IF X1< 10THEN X1= X1+ 48:GOTO 740
730 X1= X1+ 55
740 H$= H$+ CHR$ (X1):NEXT II:RETURN
999 REM