APPENDIX ELEVEN Another method to check for sector use is to see if byte 125 ($7D) shows a sector has data in it; if not zero, it is being used (it records the number of bytes used in a sector). You can examine the sector contents by adding PRINT SEC$ after the read. PRINT PEEK(771) after reading a sector will display the status; 1 means good, any other number means bad. Check for bad sec- tors by PEEKing here after any sector read. The above routine with a few modifications will print a list of all the sectors on a disk with data in them (best directed to your printer, but I use the screen display in the example below). This is a slow and inelegant routine, but you can easily rework it for your own use. 5 DIM SEC$(128),CHK$(128),CNT(720) 10 DATA 104,32,83,228,96 15 SEC$(1)=CHR$(0):SEC$(128)=SEC$:SEC$(2)=S EC$:CHK$(1)=CHR$(0):CHK$(128)=CHK$:CHK$( 2)=CHK$ 16 REM SETS UP ARRAY SPACE AND FILLS IT 17 REM CHK$ IS FULL OF BLANK SPACES - CONTE NTS OF UNUSED SECTORS 18 FOR L00P=0 TO 720:CNT(LOOP)=0:REM EMPTY ARRAY 20 FOR N=1536 TO 1540:READ X:POKE N,X:NEXT N 25 REM THIS 30 POKE 769,1:POKE 770,82 35 TRAP 100 40 FOR SNUM=1 TO 720 50 POKE 778,SNUM-(INT(SNUM/256)*256):POKE 7 79,INT(SNUM/256) 51 REM POKES LSB, MSB OF SECTOR INTO 778, 7 79 55 BUFFER=ADR(SEC$):BUFFL=BUFFER-(INT(BUFFE R/256)*256):BUFFH=INT(BUFFER/256) 56 POKE 772,BUFFL:POKE 773,BUFFH 60 Z=USR(1536) 70 IF SEC$=CHK$ THEN CNT(SNUM)=0:NEXT SNUM: GOTO 100 80 CNT(SNUM)=SNUM:NEXT SNUM 100 FOR LOOP=1 TO 720 110 IF CNT(LOOP)=0 THEN NEXT LOOP:GOTO 150 120 PRINT CNT(LOOP);" ";:NEXT LOOP 150 END To copy one sector to another, use the routine below. Add a loop routine to copy more than one at a time. This routine copies all 128 bytes, including the three "record" bytes.