Compucolor.org – Virtual Media

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

10 REM  THIS LINE MUST BE THE FIRST LINE
11 REM ******************** CLEAR DISK ************************
12 REM *                                                      *
13 REM * V11.79 - JAMES JOHNSON, P.O. BOX 63, BYRON, NY 14422 *
14 REM *                                                      *
15 REM * THIS PROGRAM WILL CLEAR ANY CCII FORMATTED DISK.     *
16 REM * ALL INFORMATION WILL BE ERASED FROM THE DISK AND     *
17 REM * REPLACED WITH A NEW FORMAT.  THE DISK MUST BE INI-   *
18 REM * TIALIZED AGAIN (SEE FCS COMMANDS).                   *
19 REM * THIS PROGRAM WILL ALSO CORRECT EDCS ERRORS FOUND ON  *
20 REM * BLANK OR REFORMATTED DISKS.                          *
21 REM *                                                      *
22 REM * THIS PROGRAM RUNS IN ABOUT 3K                        *
23 REM *                                                      *
24 REM ********************************************************
25 REM  THIS LINE MUST BE BEFORE PROGRAM LINES START 


110 CLEAR 260
120 PLOT 15,29,12,19,10:PRINT "MOUNT DISK TO BE CLEARED (HIT RETURN ";
130 PLOT 19:INPUT "WHEN READY)";Z$
140 A= 24576:C$= " 6000":B$= " 1900"
150 PLOT 12
160 INPUT "USE 50 BLOCKS OF ANOTHER DISK (Y OR N) ? ";A$
170 IF LEFT$ (A$,1)= "N"GOTO 250
180 INPUT "   MOUNT DISK (HIT RETURN WHEN READY)";Z$
190 INPUT "   TIME DELAY TO SWITCH DISKS (IN SEC.)= ";TD
200 INPUT "   READ STARTING AT BLOCK  ( <350 DEC.)= ";X
210 X= ABS (X):GOSUB 540:IF X> 349THEN PLOT 28,11:GOTO 200
220 PLOT 27,4:PRINT "REA "H$C$B$:PLOT 27,27
230 FOR I= 0TO (TD* 500):NEXT
240 GOTO 440
250 PRINT :INPUT "USE YOUR OWN FORMAT (Y OR N) ? ";A$
260 IF LEFT$ (A$,1)= "N"GOTO 360
270 INPUT "  COLOR CODE (SEE PLOT 6,X) X= ";C
280 PRINT "  INPUT STRING:":INPUT "";S$
290 T$= "":FOR I= 0TO INT (64/ LEN (S$))
300 T$= T$+ S$:NEXT
310 FOR I= 0TO 12:FOR J= 0TO 127STEP 2
320 AD= A+ I* 128+ J
330 POKE AD,ASC (MID$ (T$,J/ 2+ 1,1)):POKE AD+ 1,C
340 NEXT J,I
350 GOTO 380
360 X= 128:Y= 229
370 FOR I= 0TO 1663STEP 2:POKE A+ I,X:POKE A+ I+ 1,Y:NEXT
380 PLOT 27,4:PRINT "WRI 0"C$" 680":PLOT 27,27
390 FOR I= 13TO 39STEP 13
400 X= A+ I* 128
410 GOSUB 540
420 PLOT 27,4:PRINT "REA 0 "H$" 680":PLOT 27,27
430 NEXT I
440 FOR X= 0TO 350STEP 50
450 GOSUB 540
460 PLOT 27,4:PRINT "WRI "H$C$B$:PLOT 27,27
470 NEXT
480 PLOT 12,3,0,20
490 INPUT "ANOTHER DISK TO BE CLEARED (Y OR N) ? ";A$
500 IF LEFT$ (A$,1)= "Y"GOTO 100
510 PRINT
520 PLOT 19:PRINT "MOUNT PROGRAM DISK (HIT RETURN ";
530 PLOT 19:INPUT "WHEN READY)";Z$:PLOT 1
540 REM X = VALUE TO BE HEXED
550 H$= "":XX= X:FOR II= 3TO 0STEP - 1
560 IF II= 0THEN X1= XX:GOTO 580
570 X1= INT (XX/ 16^ II):XX= XX- X1* 16^ II
580 IF X1< 10THEN X1= X1+ 48:GOTO 600
590 X1= X1+ 55
600 H$= H$+ CHR$ (X1):NEXT II:RETURN
610 REM