Home » CEEFAX disks » telesoftware14.adl » 27-03-89/SectEd

27-03-89/SectEd

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » CEEFAX disks » telesoftware14.adl
Filename: 27-03-89/SectEd
Read OK:
File size: 2FFE bytes
Load address: FFFF1A00
Exec address: FFFF801F
File contents
   10REM SECTED
   20ON ERROR PROCerror:CLS:GOTO130
   30MODE7:*FX4,1
   40DIM block% 20,ID% 100,buffer% &2000
   50DIM nosects%(4),sectsize%(4),gap3%(4),deleted%(17)
   60hex%=FALSE:idno%=0:logisect%=1
   70FOR I%=0 TO 99:I%?ID%=0:NEXT
   80PRINT"�";CHR$157;CHR$141;"           �DISC EDITOR"
   90PRINT"�";CHR$157;CHR$141;"           �DISC EDITOR"
  100INPUT'''"�Enter drive number:�"sdrv%'
  110IF sdrv%<0 OR sdrv%>3 PRINT"�Please redo":GOTO100
  120PROCinit
  130REPEAT
  140PROCkey
  150UNTIL FALSE
  160END
  170 
  180 
  190DEFPROCinit
  200?block%=sdrv%
  210address%=block%+1
  220!address%=buffer%
  230noparams%=block%+5
  240command%=block%+6
  250param1%=block%+7
  260param2%=block%+8
  270param3%=block%+9
  280param4%=block%+10
  290param5%=block%+11
  300X%=block% AND &FF:Y%=block% DIV &100:A%=&7F
  310FORI%=0TO4:READ nosects%(I%),sectsize%(I%),gap3%(I%):NEXT
  320DATA 17,128,11,9,256,21,4,512,74,1,1024,255,0,2048,0
  330PROCchtrack(&FF)
  340 ENDPROC
  350 
  360 
  370DEFPROCchtrack(N%)
  380IF N%<>&FF trk%=trk%+1*SGN(N%):ELSE INPUT"�Enter physical track number:�"trk$':trk%=EVAL(trk$)
  390 IF trk%>79 trk%=79
  400 IF trk%<0 trk%=0:N%=&FF
  410PROCseek(sdrv%,0)
  420PROCseek(sdrv%,trk%)
  430PROCreadID
  440PROCchregisters(logitrk%)
  450PROCreadtrack
  460IF N%=-1 logisect%=losect%+nosects%(typeno%):ELSE logisect%=losect%
  470sectstart%=buffer%+(logisect%-losect%)*sectsize%(typeno%)
  480startshow%=sectstart%
  490IF N%=-1 AND sectsize%(typeno%)>256 startshow%=sectstart%+sectsize%(typeno%)-256
  500PROCprint
  510ENDPROC
  520 
  530 
  540DEFPROCreadtrack
  550 FOR idno%=0 TO nosects%(typeno%)
  560 logisect%=idno%+losect%
  570sectstart%=buffer%+sectsize%(typeno%)*idno%
  580!address%=sectstart%
  590 deleted%(idno%)=FNsector(logisect%,&57)
  600NEXT
  610!address%=buffer%
  620sectstart%=buffer%
  630 ENDPROC
  640 
  650 
  660DEFPROCchregisters(track%)
  670?command%=&3A
  680?noparams%=2
  690?param1%=&12
  700?param2%=(track%)
  710dummy%=FNsend
  720?param1%=&1A
  730dummy%=FNsend
  740ENDPROC
  750 
  760 
  770DEFPROCchsector(N%)
  780IF sectsize%(typeno%)>256 THEN PROClarge(N%):ENDPROC:REMXXXXXXXXXXXXXXXX
  790logisect%=logisect%+1*N%
  800IF logisect%>(losect%+nosects%(typeno%)) OR logisect%<losect% THEN PROCchtrack(N%):ENDPROC
  810sectstart%=buffer%+(logisect%-losect%)*sectsize%(typeno%)
  820startshow%=sectstart%
  830PROCprint
  840ENDPROC
  850 
  860 
  870DEFPROCseek(drive%,trk%)
  880?block%=drive%
  890?command%=&69
  900?noparams%=1
  910?param1%=trk%
  920dummy%=FNsend
  930ENDPROC
  940 
  950 
  960DEFFNsend
  970dummy%=0
  980REPEAT
  990CALL&FFF1
 1000error%=block%?(7+?noparams%)
 1010IF (error% AND &1E)=&0E AND ?command%=&57 AND idno%=0 PROCretry:REMXXXXXXXXXXXXXXXXXXXXXXXX
 1020IF (error% AND &18)<>0 dummy%=dummy%+1:PRINT"�Error &";~error%;". Retry ";dummy%;CHR$11
 1030UNTIL (error% AND &18)=0 OR dummy%=6
 1040IF dummy%=6 PRINT"�SECTOR ";logisect%;" Error &";error%;". Continuing..."
 1050 IF (error% AND &18)=&10 PRINT"�DRIVE ERROR/DISC WRITE PROTECTED"'"�CONTINUE? ":IF NOT(FNyes) PROCtidy
 1060=error%
 1070 
 1080 
 1090DEFFNsector(sect%,com%)
 1100?command%=com%
 1110?noparams%=3
 1120?param1%=logitrk%
 1130?param2%=sect%
 1140?param3%=typeno%*32+1
 1150dummy% =FNsend:code%=1
 1160IF (dummy% AND &10)<>0 =&FE
 1170IF (dummy% AND &08)<>0 code%=&FF
 1180IF (dummy% AND &20)<>0 code%=-1*code% 
 1190=code%
 1200 
 1210 
 1220DEFPROCreadID
 1230?block%=sdrv%
 1240?command%=&5B
 1250!address%=ID%
 1260?noparams%=3
 1270?param1%=trk%
 1280?param2%=0
 1290?param3%=1
 1300dummy%=FNsend
 1310logitype%=ID%?3:?param3%=nosects%(logitype%)+1:typeno%=logitype%
 1320dummy%=FNsend
 1330!address%=buffer%
 1340logitrk%=?ID%
 1350losect%=&FF:FORidno%=0 TO nosects%(typeno%):IF ID%?(idno%*4+2)<losect% THEN losect%=ID%?(idno%*4+2):NEXT:ELSE NEXT
 1360ENDPROC
 1370 
 1380 
 1390DEFPROCprintID
 1400VDU26,12
 1410PRINT"�";CHR$157;"�Track: ";trk%:PRINT"�";CHR$157;"�";nosects%(typeno%)+1;" sector(s) of ";sectsize%(typeno%);" bytes"
 1420PRINT"�";CHR$157;"�ID sector size ";sectsize%(logitype%);" bytes"
 1430PRINT"�";CHR$157;"�logical physic. logical logical data"
 1440 PRINT"�";CHR$157;"�sector  sector   track   drive  flag"
 1450FOR idno%=0TOnosects%(typeno%)
 1460flag$="� �???"
 1470IFdeleted%(idno%)=&FF flag$="�accur?"
 1480IFdeleted%(idno%)=&FE flag$="�nfound"
 1490IFdeleted%(idno%)=-1 flag$="�  del."
 1500IFdeleted%(idno%)=-&FF flag$="�ac�del"
 1510IFdeleted%(idno%)=1 flag$="�  norm"
 1520PRINT"�";CHR$157;"�  ";idno%;TAB(13);?(idno%*4+2+ID%);TAB(21);?(idno%*4+ID%);TAB(30);?(idno%*4+1+ID%);TAB(32);flag$
 1530NEXT
 1540PRINT'TAB(11,24)"�PRESS ANY KEY";:dummy%=GET:CLS
 1550ENDPROC
 1560 
 1570 
 1580DEFPROCprint
 1590VDU26,12
 1600PRINT"�";CHR$157;"�Physical :";sdrv%;".";trk%;
 1610IF hex% PRINTTAB(29,0);"�HEX  ":ELSE PRINTTAB(29,0);"�ASCII"
 1620PRINT"�";CHR$157;"�Logical  :";ID%?1;".";logitrk%;".";logisect%;
 1630PRINTTAB(30,1);sectsize%(typeno%);" Bytes"
 1640IF ABS(deleted%(logisect%-losect%))=&FF PRINTTAB(1,2)"� Accuracy?"
 1650IF SGN(deleted%(logisect%-losect%))=-1 PRINTTAB(29,2);"�Deleted"
 1660IF deleted%(logisect%-losect%)=&FE PRINTTAB(9,13)"�SECTOR WAS NOT FOUND":GOTO1810
 1670IF hex% PROCwindow(0,3):ELSE PROCwindow(8,3)
 1680 IF hex% PRINT"    0 1 2 3  4 5 6 7  8 9 A B  C D E F";:ELSE PRINT"    0123456789ABCDEF ";
 1690s%=startshow%-sectstart%:lenshow%=sectsize%(typeno%):IF lenshow%>256 lenshow%=256
 1700 FOR H%=s% TO s%+lenshow%-&0F STEP&10
 1710PRINT';~H%;"�";TAB(4);
 1720FOR L%=0TO3
 1730IF L%>0 AND hex% PRINT;" ";
 1740FOR L2%=0TO3
 1750byte%=H%?(L%*4+L2%+sectstart%)
 1760IF hex% GOTO1790
 1770IF byte%<&20 OR byte%>126 PRINTCHR$(255);:ELSE PRINTCHR$(byte%);
 1780GOTO 1800
 1790IF byte%<&10 PRINT;0;~byte%;:ELSE PRINT;~byte%;
 1800NEXT:NEXT:NEXT
 1810PROCwindow(0,21)
 1820ENDPROC
 1830 
 1840 
 1850DEFPROCkey
 1860*FX21,0
 1870*FX202,32,0
 1880 ON(INSTR("SDTRJ0123HPEXIW",GET$)+1) GOTO 1880,1890,1900,1910,1920,1930,1950,1960,1970,1980,1990,2000,2010,2020,2030,2040
 1890PRINT"�Next sector/part sector":PROCchsector(1):ENDPROC
 1900PRINT"�Preceding sector/part sector":PROCchsector(-1):ENDPROC
 1910PRINT"�Next track":PROCchtrack(1):ENDPROC
 1920PRINT"�Preceding track":PROCchtrack(-&FF):ENDPROC
 1930PROCchtrack(&FF):ENDPROC
 1940PRINT"�New drive :";sdrv%:GOTO1930
 1950sdrv%=0:GOTO1940
 1960sdrv%=1:GOTO1940
 1970sdrv%=2:GOTO1940
 1980sdrv%=3:GOTO1940
 1990PRINT"�Hex/ascii":hex%=NOT(hex%):PROCprint:ENDPROC
 2000PROCprintID:PROCprint:ENDPROC
 2010PRINT"�Edit":PROCedit:ENDPROC
 2020PRINT"�Exit program"'"�Are you sure? ";:IF FNyes PROCtidy:ELSE CLS:ENDPROC
 2030PROCinstruct:ENDPROC
 2040PROCwritetrack:ENDPROC
 2050ENDPROC
 2060 
 2070 
 2080DEFPROCwindow(x%,y%)
 2090VDU28,x%,24,39,y%
 2100ENDPROC
 2110 
 2120 
 2130 DEFPROCtidy
 2140*FX4,0
 2150*DR.0
 2160VDU26,12
 2170PRINT''"Program will be exited with memory"'"and variables intact"
 2180STOP
 2190ENDPROC
 2200 
 2210 
 2220DEFFNyes
 2230IF (GET AND &DF)=ASC("Y") THEN PRINT"�Yes":=TRUE
 2240PRINT"�No":=FALSE
 2250 
 2260 
 2270DEFPROCretry
 2280FOR typecode%=0 TO 4
 2290?param3%=typecode%*32+1
 2300CALL&FFF1
 2310error%=block%?(7+?noparams%)
 2320typeno%=typeno%+1
 2330IF (error% AND &18)=0 typeno%=typecode%:typecode%=5
 2340NEXT
 2350IF typeno%>5 typeno%=logitype%:?param3%=typeno%*32+1
 2360ENDPROC
 2370 
 2380 
 2390DEFPROCformat(drive%,track%)
 2400?block%=drive%
 2410!address%=ID%
 2420?command%=&63
 2430?noparams%=5
 2440?param1%=track%
 2450?param2%=gap3%(adsize%)
 2460?param3%=adsize%*32+nosects%(adsize%)+1
 2470?param4%=0
 2480?param5%=16
 2490dummy%=FNsend
 2500ENDPROC
 2510 
 2520 
 2530DEFPROCwritetrack
 2540PROCwindow(0,2):CLS
 2550PRINT'"�";CHR$157;"         �WRITE/COPY TRACK":PROCwindow(0,4)
 2560INPUT'"�Enter destination drive-�"ddrv%
 2570IF ddrv%<0 OR ddrv%>3 PRINT"�Please redo":GOTO2560
 2580INPUT"�Enter destination physical track-�"dtrk$:dtrk%=EVAL(dtrk$)
 2590IF dtrk%>80 OR dtrk%<0 PRINT"�Please redo":GOTO2580
 2600dlogitrk%=logitrk%:dsize%=logitype%:adsize%=typeno%:dlosect%=losect%
 2610PRINT"�Use same ID's and sizes as source?";:IF FNyes GOTO2700
 2620INPUT'"�Enter destination logical track-�"dlogitrk$:dlogitrk%=EVAL(dlogitrk$)
 2630IF dlogitrk%<1 OR dlogitrk%>255 PRINT"�Please redo":GOTO2620
 2640INPUT"�Enter destination"'"�       TRUE sector size code (0-4)-�"adsize%
 2650IF adsize%<0 OR adsize%>4 PRINT"�Please redo":GOTO2640
 2660INPUT"�Enter destination"'"�         ID sector size code (0-4)-�"dsize%
 2670IF dsize%<0 OR dsize%>4 PRINT"�Please redo":GOTO2660
 2680INPUT"�Enter destination start sector-�"dlosect%
 2690IF dlosect%<0 OR dlosect%>255 PRINT"�Please redo":GOTO2680
 2700PRINT'"�Write as deleted or normal or as is?"'"�Type 'D','N' or 'I'-�";:*FX21,0
 2710test$=CHR$(GET AND &DF):PRINTtest$
 2720IF test$<>"N" AND test$<>"D" AND test$<>"I" PRINT"�Please redo":GOTO2700
 2730CLS:PRINT'"�";CHR$157;"�SOURCE:";CHR$156;''"�drive ";sdrv%;" track ";trk%
 2740PRINT'"�";CHR$157;"�DESTINATION:";CHR$156;''"�PHYSICAL INDICES:"
 2750PRINT"�Drive: ";ddrv%;". Track: ";dtrk%
 2760PRINT"�";nosects%(adsize%)+1;" sector(s) of ";sectsize%(adsize%);" bytes"
 2770PRINT'"�LOGICAL INDICES:"'"�Track: ";dlogitrk%;". Start sector ";dlosect%
 2780PRINT"�Sector size: ";sectsize%(dsize%);" bytes"
 2790PRINT'"�OK? ";:IF NOT(FNyes) GOTO2540
 2800FOR idno%=0 TO nosects%(adsize%)
 2810ID%?(idno%*4)=dlogitrk%
 2820?(ID%+2+idno%*4)=(dlosect%+idno%)MOD&100
 2830?(ID%+3+idno%*4)=dsize%
 2840NEXT
 2850CLS:PRINTTAB(0,3)"�DRIVE :";ddrv%;" TRACK ";dtrk%;" CONTENTS WILL BE LOST"
 2860PRINT'"�OK? (type 'N' to abort write) ";:IF NOT(FNyes) GOTO 3020
 2870PRINT'"�INSERT DESTINATION DISC AND PRESS A KEY";:dummy%=GET
 2880PROCseek(ddrv%,0)
 2890PROCseek(ddrv%,dtrk%)
 2900PROCformat(ddrv%,dtrk%)
 2910PROCchregisters(dlogitrk%)
 2920?block%=ddrv%:?param1%=dlogitrk%:?param3%=adsize%*32+1:?noparams%=3
 2930FOR idno%=0 TO nosects%(adsize%)
 2940sect%=(dlosect%+idno%)MOD&100:?param2%=sect%
 2950!address%=buffer%+sectsize%(adsize%)*idno%
 2960IF test$="N" ?command%=&4B:GOTO 2990
 2970IF test$="D" ?command%=&4F:GOTO 2990
 2980IF deleted%(idno%)=TRUE THEN ?command%=&4F:ELSE ?command%=&4B
 2990dummy%=FNsend
 3000NEXT
 3010CLS:PRINT''''"�REINSERT SOURCE DISC AND PRESS A KEY."''"�WARNING.�PROGRAM WILL FAIL IF A"'"�DIFFERENT SOURCE DISC/TRACK IS USED":dummy%=GET
 3020!address%=buffer%:PROCseek(sdrv%,0):PROCseek(sdrv%,trk%)
 3030PROCreadID:PROCchregisters(logitrk%):PROCprint
 3040ENDPROC
 3050 
 3060 
 3070DEFPROClarge(N%)
 3080startshow%=startshow%+256*N%
 3090IF startshow%<sectstart% OR startshow%=sectstart%+sectsize%(typeno%) THEN logisect%=logisect%+1*N%
 3100IF logisect%>(losect%+nosects%(typeno%)) OR logisect%<losect% THEN PROCchtrack(N%):ENDPROC
 3110sectstart%=buffer%+(logisect%-losect%)*sectsize%(typeno%)
 3120PROCprint
 3130ENDPROC
 3140 
 3150 
 3160DEFPROCedit
 3170IF deleted%(logisect%-losect%)=&FE PRINT"�SECTOR NOT FOUND":ENDPROC
 3180 IF sectsize%(typeno%)=128 THEN y%=12:ELSE y%=20
 3190IF hex% VDU28,4,y%,38,4:rx%=34:ELSE VDU28,12,y%,27,4:rx%=15
 3200*FX4,1
 3210REPEAT
 3220char%=GET
 3230IF char%<>0 GOTO3290
 3240   REM Otherwise (if not cntrl. @):
 3250   hex%=NOT(hex%):PROCprint
 3260   IF hex% VDU28,4,y%,38,4:rx%=34:ELSE VDU28,12,y%,27,4:rx%=15
 3270   GOTO3220
 3280   :
 3290IF char%<135 ORchar%>139 GOTO3430
 3300   REM Otherwise (if cursor control code):
 3310   ON(char%-134) GOTO 3440,3320,3350,3380,3400
 3320   IF VPOS=0 AND POS=0 VDU10
 3330   VDU8:IF hex% AND((POS+1) MOD9=0) THEN VDU8
 3340   GOTO3220
 3350   IF VPOS=(y%-5) AND POS=rx% VDU11
 3360   VDU9:IF hex% AND((POS+1) MOD9=0) THEN VDU9
 3370   GOTO3220
 3380   IF VPOS=(y%-5) GOTO3220
 3390   VDU10:GOTO3220
 3400   IF VPOS=0 GOTO3220
 3410   VDU11:GOTO3220
 3420   :
 3430IF hex% PROCedithex: ELSEPROCeditascii
 3440UNTIL char%=135
 3450PROCwindow(0,21)
 3460!address%=sectstart%
 3470PRINT"�Write new sector? ";
 3480IF NOT(FNyes) GOTO3640
 3490PRINT"�ARE YOU SURE? ";
 3500IF NOT(FNyes) GOTO3640
 3510IF ABS(deleted%(logisect%-losect%))<>&FF GOTO3550 
 3520PRINT"�WARNING. Accuracy uncertain"'"�CONTINUE? ";
 3530IF NOT(FNyes) GOTO3640
 3540deleted%(logisect%-losect%)=SGN(deleted%(logisect%-losect%))
 3550CLS:PRINT'"Swap type (deleted to normal"'"and vice versa)? ";
 3560IF FNyes deleted%(logisect%-losect%)=-1*deleted%(logisect%-losect%)
 3570       temp%=typeno%
 3580       PRINT'"Alter size of sector? (New size must be"'"smaller than the old. Only first part"'"of this sect. will be transferred):";
 3590        IF NOT(FNyes) GOTO3620
 3600         PRINT"New size code (0 to ";temp%;:INPUT")? "typeno%
 3610         IF typeno%>temp% PRINT"Please redo":GOTO3600
 3620IF deleted%(logisect%-losect%)=1 THEN dummy%=FNsector(logisect%,&4B):ELSE dummy%=FNsector(logisect%,&4F)
 3630       typeno%=temp%
 3640CLS:PRINT"Rereading sector"
 3650deleted%(logisect%-losect%)=FNsector(logisect%,&57)
 3660!address%=buffer%
 3670PROCprint
 3680ENDPROC
 3690 
 3700 
 3710DEFPROCeditascii
 3720?(startshow%+VPOS*16+POS)=char%
 3730 IF char%<32 OR char%>127 THEN char%=255
 3740PRINTTAB(POS,VPOS);CHR$(char%);
 3750IF VPOS=y%-4 VDU11
 3760ENDPROC
 3770 
 3780 
 3790DEFPROCedithex
 3800IF char%<ASC("0") OR char%>ASC("F") THEN ENDPROC
 3810IF char%<ASC("A") AND char%>ASC("9") THEN ENDPROC
 3820IF char%>=ASC("A") THEN val%=char%-ASC("A")+10:ELSE val%=char%-ASC("0")
 3830IF ((POS+1)MOD9)=0 VDU9 
 3840spaces%=(POS+1)DIV9
 3850 byteno%=(VPOS*16)+(POS-spaces%)DIV2
 3860 IF (POS-spaces%)MOD2=0 THEN startshow%?byteno%=(startshow%?byteno% AND &0F)+val%*16:ELSE startshow%?byteno%=(startshow%?byteno% AND &F0)+val%
 3870PRINTTAB(POS,VPOS);CHR$(char%);
 3880IF VPOS>y%-5 VDU11
 3890ENDPROC
 3900 
 3910 
 3920DEFPROCerror
 3930PROCwindow(0,21)
 3940REPORT
 3950PRINT" at line ";ERL
 3960PRINT"ATTEMPT TO CONTINUE? ";
 3970IF FNyes ENDPROC
 3980PROCtidy
 3990ENDPROC
 4000 
 4010 
 4020DEFPROCinstruct 
 4030VDU26,12
 4040 PRINTTAB(0,0);"�";CHR$157;TAB(12);CHR$141;"�INSTRUCTIONS"
 4041PRINT"�";CHR$157;TAB(12);CHR$141;"�INSTRUCTIONS"
 4042 PRINT"�";CHR$157
 4050 PRINT"�";CHR$157;"�I�---�instructions"
 4060 PRINT"�";CHR$157;"�X�---�exit program"
 4070 PRINT"�";CHR$157;"�S�--- up sector/part sector"
 4080 PRINT"�";CHR$157;"�D�--- down sector/part sector"
 4090 PRINT"�";CHR$157;"�T�--- up track"
 4100 PRINT"�";CHR$157;"�R�--- down track"
 4110 PRINT"�";CHR$157;"�P�--- print track ID's"
 4120 PRINT"�";CHR$157;"�0-3�- to change drive"
 4130 PRINT"�";CHR$157;"�H�--- toggle ascii/hex"
 4140 PRINT"�";CHR$157;"�J�--- jump to track"
 4150 PRINT"�";CHR$157;"�W�--- write/copy track with format"
 4160 PRINT"�";CHR$157;"�E�--- edit sector as follows:"
 4170 PRINT"�";CHR$157;"�  cursor keys to move"
 4180 PRINT"�";CHR$157;"�  enter any char"
 4190 PRINT"�";CHR$157;"�  (except cursor codes"
 4200 PRINT"�";CHR$157;"�  and cntrl @)"
 4210 PRINT"�";CHR$157;"�  or hex (0 to F)"
 4220 PRINT"�";CHR$157;"�  Cntrl.@ to toggle ascii/hex"
 4230 PRINT"�";CHR$157;"�  <copy> to leave edit/write sector"
 4235 PRINT"�";CHR$157
 4240 PRINT"�";CHR$157;TAB(12)"�PRESS ANY KEY";:dummy%=GET
 4250PROCprint
 4260ENDPROC

� SECTED
� � �error:�:�tB@

�7:*FX4,1
(%� block% 20,ID% 100,buffer% &2000
24� nosects%(4),sectsize%(4),gap3%(4),deleted%(17)
<hex%=�:idno%=0:logisect%=1
F� I%=0 � 99:I%?ID%=0:�
P,�"�";�157;�141;"           �DISC EDITOR"
Z,�"�";�157;�141;"           �DISC EDITOR"
d%�'''"�Enter drive number:�"sdrv%'
n-� sdrv%<0 � sdrv%>3 �"�Please redo":�Dd@
x	�init
��
��key
�� �
��
� 
� 
�
��init
�?block%=sdrv%
�address%=block%+1
�!address%=buffer%
�noparams%=block%+5
�command%=block%+6
�param1%=block%+7
param2%=block%+8
param3%=block%+9
param4%=block%+10
"param5%=block%+11
,+X%=block% � &FF:Y%=block% � &100:A%=&7F
64�I%=0�4:� nosects%(I%),sectsize%(I%),gap3%(I%):�
@5� 17,128,11,9,256,21,4,512,74,1,1024,255,0,2048,0
J�chtrack(&FF)
T �
^ 
h 
r��chtrack(N%)
|U� N%<>&FF trk%=trk%+1*�(N%):� �"�Enter physical track number:�"trk$':trk%=�(trk$)
� � trk%>79 trk%=79
� � trk%<0 trk%=0:N%=&FF
��seek(sdrv%,0)
��seek(sdrv%,trk%)
��readID
��chregisters(logitrk%)
��readtrack
�C� N%=-1 logisect%=losect%+nosects%(typeno%):� logisect%=losect%
�=sectstart%=buffer%+(logisect%-losect%)*sectsize%(typeno%)
�startshow%=sectstart%
�Q� N%=-1 � sectsize%(typeno%)>256 startshow%=sectstart%+sectsize%(typeno%)-256
�
�print
��
 
 
��readtrack
&" � idno%=0 � nosects%(typeno%)
0 logisect%=idno%+losect%
:/sectstart%=buffer%+sectsize%(typeno%)*idno%
D!address%=sectstart%
N+ deleted%(idno%)=�sector(logisect%,&57)
X�
b!address%=buffer%
lsectstart%=buffer%
v �
� 
� 
���chregisters(track%)
�?command%=&3A
�?noparams%=2
�?param1%=&12
�?param2%=(track%)
�dummy%=�send
�?param1%=&1A
�dummy%=�send
��
� 
� 
��chsector(N%)
=� sectsize%(typeno%)>256 � �large(N%):�:�XXXXXXXXXXXXXXXX
logisect%=logisect%+1*N%
 P� logisect%>(losect%+nosects%(typeno%)) � logisect%<losect% � �chtrack(N%):�
*=sectstart%=buffer%+(logisect%-losect%)*sectsize%(typeno%)
4startshow%=sectstart%
>
�print
H�
R 
\ 
f��seek(drive%,trk%)
p?block%=drive%
z?command%=&69
�?noparams%=1
�?param1%=trk%
�dummy%=�send
��
� 
� 
�
ݤsend
�dummy%=0
��
�
�&FFF1
� error%=block%?(7+?noparams%)
�S� (error% � &1E)=&0E � ?command%=&57 � idno%=0 �retry:�XXXXXXXXXXXXXXXXXXXXXXXX
�Q� (error% � &18)<>0 dummy%=dummy%+1:�"�Error &";~error%;". Retry ";dummy%;�11
!� (error% � &18)=0 � dummy%=6
H� dummy%=6 �"�SECTOR ";logisect%;" Error &";error%;". Continuing..."
\ � (error% � &18)=&10 �"�DRIVE ERROR/DISC WRITE PROTECTED"'"�CONTINUE? ":� �(�yes) �tidy
$=error%
. 
8 
Bݤsector(sect%,com%)
L?command%=com%
V?noparams%=3
`?param1%=logitrk%
j?param2%=sect%
t?param3%=typeno%*32+1
~dummy% =�send:code%=1
�� (dummy% � &10)<>0 =&FE
�!� (dummy% � &08)<>0 code%=&FF
�'� (dummy% � &20)<>0 code%=-1*code% 
�
=code%
� 
� 
���readID
�?block%=sdrv%
�?command%=&5B
�!address%=ID%
�?noparams%=3
�?param1%=trk%
?param2%=0

?param3%=1
dummy%=�send
Dlogitype%=ID%?3:?param3%=nosects%(logitype%)+1:typeno%=logitype%
(dummy%=�send
2!address%=buffer%
<logitrk%=?ID%
Fflosect%=&FF:�idno%=0 � nosects%(typeno%):� ID%?(idno%*4+2)<losect% � losect%=ID%?(idno%*4+2):�:� �
P�
Z 
d 
n
��printID
x
�26,12
�l�"�";�157;"�Track: ";trk%:�"�";�157;"�";nosects%(typeno%)+1;" sector(s) of ";sectsize%(typeno%);" bytes"
�>�"�";�157;"�ID sector size ";sectsize%(logitype%);" bytes"
�5�"�";�157;"�logical physic. logical logical data"
�6 �"�";�157;"�sector  sector   track   drive  flag"
�� idno%=0�nosects%(typeno%)
�flag$="� �???"
�(�deleted%(idno%)=&FF flag$="�accur?"
�(�deleted%(idno%)=&FE flag$="�nfound"
�'�deleted%(idno%)=-1 flag$="�  del."
�)�deleted%(idno%)=-&FF flag$="�ac�del"
�&�deleted%(idno%)=1 flag$="�  norm"
�d�"�";�157;"�  ";idno%;�13);?(idno%*4+2+ID%);�21);?(idno%*4+ID%);�30);?(idno%*4+1+ID%);�32);flag$
��
)�'�11,24)"�PRESS ANY KEY";:dummy%=�:�
�
 
" 
,��print
6
�26,12
@+�"�";�157;"�Physical :";sdrv%;".";trk%;
J.� hex% �29,0);"�HEX  ":� �29,0);"�ASCII"
T=�"�";�157;"�Logical  :";ID%?1;".";logitrk%;".";logisect%;
^'�30,1);sectsize%(typeno%);" Bytes"
h<� �(deleted%(logisect%-losect%))=&FF �1,2)"� Accuracy?"
r:� �(deleted%(logisect%-losect%))=-1 �29,2);"�Deleted"
|J� deleted%(logisect%-losect%)=&FE �9,13)"�SECTOR WAS NOT FOUND":�TRG
�&� hex% �window(0,3):� �window(8,3)
�R � hex% �"    0 1 2 3  4 5 6 7  8 9 A B  C D E F";:� �"    0123456789ABCDEF ";
�Ts%=startshow%-sectstart%:lenshow%=sectsize%(typeno%):� lenshow%>256 lenshow%=256
�# � H%=s% � s%+lenshow%-&0F �&10
��';~H%;"�";�4);
�� L%=0�3
�� L%>0 � hex% �;" ";
�
� L2%=0�3
�"byte%=H%?(L%*4+L2%+sectstart%)
�� hex% �d~F
�1� byte%<&20 � byte%>126 �(255);:� �(byte%);
�
� �THG
�'� byte%<&10 �;0;~byte%;:� �;~byte%;
	�:�:�
�window(0,21)
�
& 
0 
:	��key
D*FX21,0
N*FX202,32,0
Xq �(�"SDTRJ0123HPEXIW",�)+1) � �DXG,�DbG,�DlG,�DvG,�t@G,�tJG,�t^G,�thG,�trG,�t|G,�dFG,�dPG,�dZG,�ddG,�dnG,�dxG
b.�"�Next sector/part sector":�chsector(1):�
l4�"�Preceding sector/part sector":�chsector(-1):�
v �"�Next track":�chtrack(1):�
�(�"�Preceding track":�chtrack(-&FF):�
��chtrack(&FF):�
��"�New drive :";sdrv%:�tJG
�sdrv%=0:�tTG
�sdrv%=1:�tTG
�sdrv%=2:�tTG
�sdrv%=3:�tTG
�'�"�Hex/ascii":hex%=�(hex%):�print:�
��printID:�print:�
��"�Edit":�edit:�
�:�"�Exit program"'"�Are you sure? ";:� �yes �tidy:� �:�
��instruct:�
��writetrack:�
�
 
 
 ��window(x%,y%)
*�28,x%,24,39,y%
4�
> 
H 
R ��tidy
\
*FX4,0
f	*DR.0
p
�26,12
zB�''"Program will be exited with memory"'"and variables intact"
��
��
� 
� 
�	ݤyes
�#� (� � &DF)=�("Y") � �"�Yes":=�
�
�"�No":=�
� 
� 
���retry
�� typecode%=0 � 4
�?param3%=typecode%*32+1
�
�&FFF1
	 error%=block%?(7+?noparams%)
	typeno%=typeno%+1
	4� (error% � &18)=0 typeno%=typecode%:typecode%=5
	$�
	.7� typeno%>5 typeno%=logitype%:?param3%=typeno%*32+1
	8�
	B 
	L 
	V��format(drive%,track%)
	`?block%=drive%
	j!address%=ID%
	t?command%=&63
	~?noparams%=5
	�?param1%=track%
	�?param2%=gap3%(adsize%)
	�+?param3%=adsize%*32+nosects%(adsize%)+1
	�?param4%=0
	�?param5%=16
	�dummy%=�send
	��
	� 
	� 
	���writetrack
	��window(0,2):�
	�8�'"�";�157;"         �WRITE/COPY TRACK":�window(0,4)
'�'"�Enter destination drive-�"ddrv%

-� ddrv%<0 � ddrv%>3 �"�Please redo":�T@J
>�"�Enter destination physical track-�"dtrk$:dtrk%=�(dtrk$)
.� dtrk%>80 � dtrk%<0 �"�Please redo":�TTJ
(Hdlogitrk%=logitrk%:dsize%=logitype%:adsize%=typeno%:dlosect%=losect%
28�"�Use same ID's and sizes as source?";:� �yes �tLJ
<J�'"�Enter destination logical track-�"dlogitrk$:dlogitrk%=�(dlogitrk$)
F7� dlogitrk%<1 � dlogitrk%>255 �"�Please redo":�T|J
PH�"�Enter destination"'"�       TRUE sector size code (0-4)-�"adsize%
Z1� adsize%<0 � adsize%>4 �"�Please redo":�DPJ
dG�"�Enter destination"'"�         ID sector size code (0-4)-�"dsize%
n/� dsize%<0 � dsize%>4 �"�Please redo":�DdJ
x0�"�Enter destination start sector-�"dlosect%
�5� dlosect%<0 � dlosect%>255 �"�Please redo":�DxJ
�O�'"�Write as deleted or normal or as is?"'"�Type 'D','N' or 'I'-�";:*FX21,0
�test$=�(� � &DF):�test$
�@� test$<>"N" � test$<>"D" � test$<>"I" �"�Please redo":�tLJ
�A�:�'"�";�157;"�SOURCE:";�156;''"�drive ";sdrv%;" track ";trk%
�:�'"�";�157;"�DESTINATION:";�156;''"�PHYSICAL INDICES:"
�'�"�Drive: ";ddrv%;". Track: ";dtrk%
�I�"�";nosects%(adsize%)+1;" sector(s) of ";sectsize%(adsize%);" bytes"
�I�'"�LOGICAL INDICES:"'"�Track: ";dlogitrk%;". Start sector ";dlosect%
�0�"�Sector size: ";sectsize%(dsize%);" bytes"
��'"�OK? ";:� �(�yes) �dlI
�!� idno%=0 � nosects%(adsize%)
�ID%?(idno%*4)=dlogitrk%
*?(ID%+2+idno%*4)=(dlosect%+idno%)�&100
?(ID%+3+idno%*4)=dsize%
�
"E�:�0,3)"�DRIVE :";ddrv%;" TRACK ";dtrk%;" CONTENTS WILL BE LOST"
,9�'"�OK? (type 'N' to abort write) ";:� �(�yes) � �dLK
6:�'"�INSERT DESTINATION DISC AND PRESS A KEY";:dummy%=�
@�seek(ddrv%,0)
J�seek(ddrv%,dtrk%)
T�format(ddrv%,dtrk%)
^�chregisters(dlogitrk%)
hG?block%=ddrv%:?param1%=dlogitrk%:?param3%=adsize%*32+1:?noparams%=3
r!� idno%=0 � nosects%(adsize%)
|.sect%=(dlosect%+idno%)�&100:?param2%=sect%
�.!address%=buffer%+sectsize%(adsize%)*idno%
�$� test$="N" ?command%=&4B:� �tnK
�$� test$="D" ?command%=&4F:� �tnK
�7� deleted%(idno%)=� � ?command%=&4F:� ?command%=&4B
�dummy%=�send
��
‡�:�''''"�REINSERT SOURCE DISC AND PRESS A KEY."''"�WARNING.�PROGRAM WILL FAIL IF A"'"�DIFFERENT SOURCE DISC/TRACK IS USED":dummy%=�
�6!address%=buffer%:�seek(sdrv%,0):�seek(sdrv%,trk%)
�)�readID:�chregisters(logitrk%):�print
��
� 
� 
���large(N%)
 startshow%=startshow%+256*N%
a� startshow%<sectstart% � startshow%=sectstart%+sectsize%(typeno%) � logisect%=logisect%+1*N%
P� logisect%>(losect%+nosects%(typeno%)) � logisect%<losect% � �chtrack(N%):�
&=sectstart%=buffer%+(logisect%-losect%)*sectsize%(typeno%)
0
�print
:�
D 
N 
X
��edit
b<� deleted%(logisect%-losect%)=&FE �"�SECTOR NOT FOUND":�
l- � sectsize%(typeno%)=128 � y%=12:� y%=20
v7� hex% �28,4,y%,38,4:rx%=34:� �28,12,y%,27,4:rx%=15
�
*FX4,1
��
�char%=�
�� char%<>0 �dZL
�%   � Otherwise (if not cntrl. @):
�   hex%=�(hex%):�print
�:   � hex% �28,4,y%,38,4:rx%=34:� �28,12,y%,27,4:rx%=15
�   �tTL
�   :
� � char%<135 �char%>139 �DfM
�,   � Otherwise (if cursor control code):
�.   �(char%-134) � �DpM,�dxL,�TVM,�TtM,�DHM
�   � �=0 � �=0 �10

#   �8:� hex% �((�+1) �9=0) � �8

   �tTL

   � �=(y%-5) � �=rx% �11

 #   �9:� hex% �((�+1) �9=0) � �9

*   �tTL

4   � �=(y%-5) �tTL

>   �10:�tTL

H   � �=0 �tTL

R   �11:�tTL

\   :

f � hex% �edithex: ��editascii

p� char%=135

z�window(0,21)

�!address%=sectstart%

��"�Write new sector? ";

�� �(�yes) �TxN

��"�ARE YOU SURE? ";

�� �(�yes) �TxN

�0� �(deleted%(logisect%-losect%))<>&FF �d^M 

�2�"�WARNING. Accuracy uncertain"'"�CONTINUE? ";

�� �(�yes) �TxN

�>deleted%(logisect%-losect%)=�(deleted%(logisect%-losect%))

�;�:�'"Swap type (deleted to normal"'"and vice versa)? ";

�E� �yes deleted%(logisect%-losect%)=-1*deleted%(logisect%-losect%)

�       temp%=typeno%

��       �'"Alter size of sector? (New size must be"'"smaller than the old. Only first part"'"of this sect. will be transferred):";
        � �(�yes) �TdN
9         �"New size code (0 to ";temp%;:�")? "typeno%
1         � typeno%>temp% �"Please redo":�TPN
$c� deleted%(logisect%-losect%)=1 � dummy%=�sector(logisect%,&4B):� dummy%=�sector(logisect%,&4F)
.       typeno%=temp%
8�:�"Rereading sector"
B6deleted%(logisect%-losect%)=�sector(logisect%,&57)
L!address%=buffer%
V
�print
`�
j 
t 
~��editascii
�?(startshow%+�*16+�)=char%
�' � char%<32 � char%>127 � char%=255
��,�);�(char%);
�� �=y%-4 �11
��
� 
� 
�
��edithex
�%� char%<�("0") � char%>�("F") � �
�%� char%<�("A") � char%>�("9") � �
�>� char%>=�("A") � val%=char%-�("A")+10:� val%=char%-�("0")
�� ((�+1)�9)=0 �9 
spaces%=(�+1)�9

! byteno%=(�*16)+(�-spaces%)�2
� � (�-spaces%)�2=0 � startshow%?byteno%=(startshow%?byteno% � &0F)+val%*16:� startshow%?byteno%=(startshow%?byteno% � &F0)+val%
�,�);�(char%);
(� �>y%-5 �11
2�
< 
F 
P��error
Z�window(0,21)
d�
n�" at line ";�
x�"ATTEMPT TO CONTINUE? ";
�� �yes �
�	�tidy
��
� 
� 
���instruct 
�
�26,12
�. �0,0);"�";�157;�12);�141;"�INSTRUCTIONS"
�'�"�";�157;�12);�141;"�INSTRUCTIONS"
� �"�";�157
�$ �"�";�157;"�I�---�instructions"
�$ �"�";�157;"�X�---�exit program"
�- �"�";�157;"�S�--- up sector/part sector"
�/ �"�";�157;"�D�--- down sector/part sector"
�  �"�";�157;"�T�--- up track"
" �"�";�157;"�R�--- down track"
( �"�";�157;"�P�--- print track ID's"
' �"�";�157;"�0-3�- to change drive"
"( �"�";�157;"�H�--- toggle ascii/hex"
,% �"�";�157;"�J�--- jump to track"
64 �"�";�157;"�W�--- write/copy track with format"
@/ �"�";�157;"�E�--- edit sector as follows:"
J' �"�";�157;"�  cursor keys to move"
T" �"�";�157;"�  enter any char"
^( �"�";�157;"�  (except cursor codes"
h  �"�";�157;"�  and cntrl @)"
r# �"�";�157;"�  or hex (0 to F)"
|/ �"�";�157;"�  Cntrl.@ to toggle ascii/hex"
�5 �"�";�157;"�  <copy> to leave edit/write sector"
� �"�";�157
�- �"�";�157;�12)"�PRESS ANY KEY";:dummy%=�
�
�print
��
�
00000000  0d 00 0a 0c f4 20 53 45  43 54 45 44 0d 00 14 16  |..... SECTED....|
00000010  ee 20 85 20 f2 65 72 72  6f 72 3a db 3a e5 8d 74  |. . .error:.:..t|
00000020  42 40 0d 00 1e 0d eb 37  3a 2a 46 58 34 2c 31 0d  |B@.....7:*FX4,1.|
00000030  00 28 25 de 20 62 6c 6f  63 6b 25 20 32 30 2c 49  |.(%. block% 20,I|
00000040  44 25 20 31 30 30 2c 62  75 66 66 65 72 25 20 26  |D% 100,buffer% &|
00000050  32 30 30 30 0d 00 32 34  de 20 6e 6f 73 65 63 74  |2000..24. nosect|
00000060  73 25 28 34 29 2c 73 65  63 74 73 69 7a 65 25 28  |s%(4),sectsize%(|
00000070  34 29 2c 67 61 70 33 25  28 34 29 2c 64 65 6c 65  |4),gap3%(4),dele|
00000080  74 65 64 25 28 31 37 29  0d 00 3c 1e 68 65 78 25  |ted%(17)..<.hex%|
00000090  3d a3 3a 69 64 6e 6f 25  3d 30 3a 6c 6f 67 69 73  |=.:idno%=0:logis|
000000a0  65 63 74 25 3d 31 0d 00  46 1a e3 20 49 25 3d 30  |ect%=1..F.. I%=0|
000000b0  20 b8 20 39 39 3a 49 25  3f 49 44 25 3d 30 3a ed  | . 99:I%?ID%=0:.|
000000c0  0d 00 50 2c f1 22 81 22  3b bd 31 35 37 3b bd 31  |..P,.".";.157;.1|
000000d0  34 31 3b 22 20 20 20 20  20 20 20 20 20 20 20 83  |41;"           .|
000000e0  44 49 53 43 20 45 44 49  54 4f 52 22 0d 00 5a 2c  |DISC EDITOR"..Z,|
000000f0  f1 22 81 22 3b bd 31 35  37 3b bd 31 34 31 3b 22  |.".";.157;.141;"|
00000100  20 20 20 20 20 20 20 20  20 20 20 83 44 49 53 43  |           .DISC|
00000110  20 45 44 49 54 4f 52 22  0d 00 64 25 e8 27 27 27  | EDITOR"..d%.'''|
00000120  22 86 45 6e 74 65 72 20  64 72 69 76 65 20 6e 75  |".Enter drive nu|
00000130  6d 62 65 72 3a 84 22 73  64 72 76 25 27 0d 00 6e  |mber:."sdrv%'..n|
00000140  2d e7 20 73 64 72 76 25  3c 30 20 84 20 73 64 72  |-. sdrv%<0 . sdr|
00000150  76 25 3e 33 20 f1 22 81  50 6c 65 61 73 65 20 72  |v%>3 .".Please r|
00000160  65 64 6f 22 3a e5 8d 44  64 40 0d 00 78 09 f2 69  |edo":..Dd@..x..i|
00000170  6e 69 74 0d 00 82 05 f5  0d 00 8c 08 f2 6b 65 79  |nit..........key|
00000180  0d 00 96 07 fd 20 a3 0d  00 a0 05 e0 0d 00 aa 05  |..... ..........|
00000190  20 0d 00 b4 05 20 0d 00  be 0a dd f2 69 6e 69 74  | .... ......init|
000001a0  0d 00 c8 11 3f 62 6c 6f  63 6b 25 3d 73 64 72 76  |....?block%=sdrv|
000001b0  25 0d 00 d2 15 61 64 64  72 65 73 73 25 3d 62 6c  |%....address%=bl|
000001c0  6f 63 6b 25 2b 31 0d 00  dc 15 21 61 64 64 72 65  |ock%+1....!addre|
000001d0  73 73 25 3d 62 75 66 66  65 72 25 0d 00 e6 16 6e  |ss%=buffer%....n|
000001e0  6f 70 61 72 61 6d 73 25  3d 62 6c 6f 63 6b 25 2b  |oparams%=block%+|
000001f0  35 0d 00 f0 15 63 6f 6d  6d 61 6e 64 25 3d 62 6c  |5....command%=bl|
00000200  6f 63 6b 25 2b 36 0d 00  fa 14 70 61 72 61 6d 31  |ock%+6....param1|
00000210  25 3d 62 6c 6f 63 6b 25  2b 37 0d 01 04 14 70 61  |%=block%+7....pa|
00000220  72 61 6d 32 25 3d 62 6c  6f 63 6b 25 2b 38 0d 01  |ram2%=block%+8..|
00000230  0e 14 70 61 72 61 6d 33  25 3d 62 6c 6f 63 6b 25  |..param3%=block%|
00000240  2b 39 0d 01 18 15 70 61  72 61 6d 34 25 3d 62 6c  |+9....param4%=bl|
00000250  6f 63 6b 25 2b 31 30 0d  01 22 15 70 61 72 61 6d  |ock%+10..".param|
00000260  35 25 3d 62 6c 6f 63 6b  25 2b 31 31 0d 01 2c 2b  |5%=block%+11..,+|
00000270  58 25 3d 62 6c 6f 63 6b  25 20 80 20 26 46 46 3a  |X%=block% . &FF:|
00000280  59 25 3d 62 6c 6f 63 6b  25 20 81 20 26 31 30 30  |Y%=block% . &100|
00000290  3a 41 25 3d 26 37 46 0d  01 36 34 e3 49 25 3d 30  |:A%=&7F..64.I%=0|
000002a0  b8 34 3a f3 20 6e 6f 73  65 63 74 73 25 28 49 25  |.4:. nosects%(I%|
000002b0  29 2c 73 65 63 74 73 69  7a 65 25 28 49 25 29 2c  |),sectsize%(I%),|
000002c0  67 61 70 33 25 28 49 25  29 3a ed 0d 01 40 35 dc  |gap3%(I%):...@5.|
000002d0  20 31 37 2c 31 32 38 2c  31 31 2c 39 2c 32 35 36  | 17,128,11,9,256|
000002e0  2c 32 31 2c 34 2c 35 31  32 2c 37 34 2c 31 2c 31  |,21,4,512,74,1,1|
000002f0  30 32 34 2c 32 35 35 2c  30 2c 32 30 34 38 2c 30  |024,255,0,2048,0|
00000300  0d 01 4a 11 f2 63 68 74  72 61 63 6b 28 26 46 46  |..J..chtrack(&FF|
00000310  29 0d 01 54 06 20 e1 0d  01 5e 05 20 0d 01 68 05  |)..T. ...^. ..h.|
00000320  20 0d 01 72 11 dd f2 63  68 74 72 61 63 6b 28 4e  | ..r...chtrack(N|
00000330  25 29 0d 01 7c 55 e7 20  4e 25 3c 3e 26 46 46 20  |%)..|U. N%<>&FF |
00000340  74 72 6b 25 3d 74 72 6b  25 2b 31 2a b4 28 4e 25  |trk%=trk%+1*.(N%|
00000350  29 3a 8b 20 e8 22 86 45  6e 74 65 72 20 70 68 79  |):. .".Enter phy|
00000360  73 69 63 61 6c 20 74 72  61 63 6b 20 6e 75 6d 62  |sical track numb|
00000370  65 72 3a 84 22 74 72 6b  24 27 3a 74 72 6b 25 3d  |er:."trk$':trk%=|
00000380  a0 28 74 72 6b 24 29 0d  01 86 16 20 e7 20 74 72  |.(trk$).... . tr|
00000390  6b 25 3e 37 39 20 74 72  6b 25 3d 37 39 0d 01 90  |k%>79 trk%=79...|
000003a0  1b 20 e7 20 74 72 6b 25  3c 30 20 74 72 6b 25 3d  |. . trk%<0 trk%=|
000003b0  30 3a 4e 25 3d 26 46 46  0d 01 9a 12 f2 73 65 65  |0:N%=&FF.....see|
000003c0  6b 28 73 64 72 76 25 2c  30 29 0d 01 a4 15 f2 73  |k(sdrv%,0).....s|
000003d0  65 65 6b 28 73 64 72 76  25 2c 74 72 6b 25 29 0d  |eek(sdrv%,trk%).|
000003e0  01 ae 0b f2 72 65 61 64  49 44 0d 01 b8 1a f2 63  |....readID.....c|
000003f0  68 72 65 67 69 73 74 65  72 73 28 6c 6f 67 69 74  |hregisters(logit|
00000400  72 6b 25 29 0d 01 c2 0e  f2 72 65 61 64 74 72 61  |rk%).....readtra|
00000410  63 6b 0d 01 cc 43 e7 20  4e 25 3d 2d 31 20 6c 6f  |ck...C. N%=-1 lo|
00000420  67 69 73 65 63 74 25 3d  6c 6f 73 65 63 74 25 2b  |gisect%=losect%+|
00000430  6e 6f 73 65 63 74 73 25  28 74 79 70 65 6e 6f 25  |nosects%(typeno%|
00000440  29 3a 8b 20 6c 6f 67 69  73 65 63 74 25 3d 6c 6f  |):. logisect%=lo|
00000450  73 65 63 74 25 0d 01 d6  3d 73 65 63 74 73 74 61  |sect%...=sectsta|
00000460  72 74 25 3d 62 75 66 66  65 72 25 2b 28 6c 6f 67  |rt%=buffer%+(log|
00000470  69 73 65 63 74 25 2d 6c  6f 73 65 63 74 25 29 2a  |isect%-losect%)*|
00000480  73 65 63 74 73 69 7a 65  25 28 74 79 70 65 6e 6f  |sectsize%(typeno|
00000490  25 29 0d 01 e0 19 73 74  61 72 74 73 68 6f 77 25  |%)....startshow%|
000004a0  3d 73 65 63 74 73 74 61  72 74 25 0d 01 ea 51 e7  |=sectstart%...Q.|
000004b0  20 4e 25 3d 2d 31 20 80  20 73 65 63 74 73 69 7a  | N%=-1 . sectsiz|
000004c0  65 25 28 74 79 70 65 6e  6f 25 29 3e 32 35 36 20  |e%(typeno%)>256 |
000004d0  73 74 61 72 74 73 68 6f  77 25 3d 73 65 63 74 73  |startshow%=sects|
000004e0  74 61 72 74 25 2b 73 65  63 74 73 69 7a 65 25 28  |tart%+sectsize%(|
000004f0  74 79 70 65 6e 6f 25 29  2d 32 35 36 0d 01 f4 0a  |typeno%)-256....|
00000500  f2 70 72 69 6e 74 0d 01  fe 05 e1 0d 02 08 05 20  |.print......... |
00000510  0d 02 12 05 20 0d 02 1c  0f dd f2 72 65 61 64 74  |.... ......readt|
00000520  72 61 63 6b 0d 02 26 22  20 e3 20 69 64 6e 6f 25  |rack..&" . idno%|
00000530  3d 30 20 b8 20 6e 6f 73  65 63 74 73 25 28 74 79  |=0 . nosects%(ty|
00000540  70 65 6e 6f 25 29 0d 02  30 1c 20 6c 6f 67 69 73  |peno%)..0. logis|
00000550  65 63 74 25 3d 69 64 6e  6f 25 2b 6c 6f 73 65 63  |ect%=idno%+losec|
00000560  74 25 0d 02 3a 2f 73 65  63 74 73 74 61 72 74 25  |t%..:/sectstart%|
00000570  3d 62 75 66 66 65 72 25  2b 73 65 63 74 73 69 7a  |=buffer%+sectsiz|
00000580  65 25 28 74 79 70 65 6e  6f 25 29 2a 69 64 6e 6f  |e%(typeno%)*idno|
00000590  25 0d 02 44 18 21 61 64  64 72 65 73 73 25 3d 73  |%..D.!address%=s|
000005a0  65 63 74 73 74 61 72 74  25 0d 02 4e 2b 20 64 65  |ectstart%..N+ de|
000005b0  6c 65 74 65 64 25 28 69  64 6e 6f 25 29 3d a4 73  |leted%(idno%)=.s|
000005c0  65 63 74 6f 72 28 6c 6f  67 69 73 65 63 74 25 2c  |ector(logisect%,|
000005d0  26 35 37 29 0d 02 58 05  ed 0d 02 62 15 21 61 64  |&57)..X....b.!ad|
000005e0  64 72 65 73 73 25 3d 62  75 66 66 65 72 25 0d 02  |dress%=buffer%..|
000005f0  6c 16 73 65 63 74 73 74  61 72 74 25 3d 62 75 66  |l.sectstart%=buf|
00000600  66 65 72 25 0d 02 76 06  20 e1 0d 02 80 05 20 0d  |fer%..v. ..... .|
00000610  02 8a 05 20 0d 02 94 19  dd f2 63 68 72 65 67 69  |... ......chregi|
00000620  73 74 65 72 73 28 74 72  61 63 6b 25 29 0d 02 9e  |sters(track%)...|
00000630  11 3f 63 6f 6d 6d 61 6e  64 25 3d 26 33 41 0d 02  |.?command%=&3A..|
00000640  a8 10 3f 6e 6f 70 61 72  61 6d 73 25 3d 32 0d 02  |..?noparams%=2..|
00000650  b2 10 3f 70 61 72 61 6d  31 25 3d 26 31 32 0d 02  |..?param1%=&12..|
00000660  bc 15 3f 70 61 72 61 6d  32 25 3d 28 74 72 61 63  |..?param2%=(trac|
00000670  6b 25 29 0d 02 c6 10 64  75 6d 6d 79 25 3d a4 73  |k%)....dummy%=.s|
00000680  65 6e 64 0d 02 d0 10 3f  70 61 72 61 6d 31 25 3d  |end....?param1%=|
00000690  26 31 41 0d 02 da 10 64  75 6d 6d 79 25 3d a4 73  |&1A....dummy%=.s|
000006a0  65 6e 64 0d 02 e4 05 e1  0d 02 ee 05 20 0d 02 f8  |end......... ...|
000006b0  05 20 0d 03 02 12 dd f2  63 68 73 65 63 74 6f 72  |. ......chsector|
000006c0  28 4e 25 29 0d 03 0c 3d  e7 20 73 65 63 74 73 69  |(N%)...=. sectsi|
000006d0  7a 65 25 28 74 79 70 65  6e 6f 25 29 3e 32 35 36  |ze%(typeno%)>256|
000006e0  20 8c 20 f2 6c 61 72 67  65 28 4e 25 29 3a e1 3a  | . .large(N%):.:|
000006f0  f4 58 58 58 58 58 58 58  58 58 58 58 58 58 58 58  |.XXXXXXXXXXXXXXX|
00000700  58 0d 03 16 1c 6c 6f 67  69 73 65 63 74 25 3d 6c  |X....logisect%=l|
00000710  6f 67 69 73 65 63 74 25  2b 31 2a 4e 25 0d 03 20  |ogisect%+1*N%.. |
00000720  50 e7 20 6c 6f 67 69 73  65 63 74 25 3e 28 6c 6f  |P. logisect%>(lo|
00000730  73 65 63 74 25 2b 6e 6f  73 65 63 74 73 25 28 74  |sect%+nosects%(t|
00000740  79 70 65 6e 6f 25 29 29  20 84 20 6c 6f 67 69 73  |ypeno%)) . logis|
00000750  65 63 74 25 3c 6c 6f 73  65 63 74 25 20 8c 20 f2  |ect%<losect% . .|
00000760  63 68 74 72 61 63 6b 28  4e 25 29 3a e1 0d 03 2a  |chtrack(N%):...*|
00000770  3d 73 65 63 74 73 74 61  72 74 25 3d 62 75 66 66  |=sectstart%=buff|
00000780  65 72 25 2b 28 6c 6f 67  69 73 65 63 74 25 2d 6c  |er%+(logisect%-l|
00000790  6f 73 65 63 74 25 29 2a  73 65 63 74 73 69 7a 65  |osect%)*sectsize|
000007a0  25 28 74 79 70 65 6e 6f  25 29 0d 03 34 19 73 74  |%(typeno%)..4.st|
000007b0  61 72 74 73 68 6f 77 25  3d 73 65 63 74 73 74 61  |artshow%=sectsta|
000007c0  72 74 25 0d 03 3e 0a f2  70 72 69 6e 74 0d 03 48  |rt%..>..print..H|
000007d0  05 e1 0d 03 52 05 20 0d  03 5c 05 20 0d 03 66 17  |....R. ..\. ..f.|
000007e0  dd f2 73 65 65 6b 28 64  72 69 76 65 25 2c 74 72  |..seek(drive%,tr|
000007f0  6b 25 29 0d 03 70 12 3f  62 6c 6f 63 6b 25 3d 64  |k%)..p.?block%=d|
00000800  72 69 76 65 25 0d 03 7a  11 3f 63 6f 6d 6d 61 6e  |rive%..z.?comman|
00000810  64 25 3d 26 36 39 0d 03  84 10 3f 6e 6f 70 61 72  |d%=&69....?nopar|
00000820  61 6d 73 25 3d 31 0d 03  8e 11 3f 70 61 72 61 6d  |ams%=1....?param|
00000830  31 25 3d 74 72 6b 25 0d  03 98 10 64 75 6d 6d 79  |1%=trk%....dummy|
00000840  25 3d a4 73 65 6e 64 0d  03 a2 05 e1 0d 03 ac 05  |%=.send.........|
00000850  20 0d 03 b6 05 20 0d 03  c0 0a dd a4 73 65 6e 64  | .... ......send|
00000860  0d 03 ca 0c 64 75 6d 6d  79 25 3d 30 0d 03 d4 05  |....dummy%=0....|
00000870  f5 0d 03 de 0a d6 26 46  46 46 31 0d 03 e8 20 65  |......&FFF1... e|
00000880  72 72 6f 72 25 3d 62 6c  6f 63 6b 25 3f 28 37 2b  |rror%=block%?(7+|
00000890  3f 6e 6f 70 61 72 61 6d  73 25 29 0d 03 f2 53 e7  |?noparams%)...S.|
000008a0  20 28 65 72 72 6f 72 25  20 80 20 26 31 45 29 3d  | (error% . &1E)=|
000008b0  26 30 45 20 80 20 3f 63  6f 6d 6d 61 6e 64 25 3d  |&0E . ?command%=|
000008c0  26 35 37 20 80 20 69 64  6e 6f 25 3d 30 20 f2 72  |&57 . idno%=0 .r|
000008d0  65 74 72 79 3a f4 58 58  58 58 58 58 58 58 58 58  |etry:.XXXXXXXXXX|
000008e0  58 58 58 58 58 58 58 58  58 58 58 58 58 58 0d 03  |XXXXXXXXXXXXXX..|
000008f0  fc 51 e7 20 28 65 72 72  6f 72 25 20 80 20 26 31  |.Q. (error% . &1|
00000900  38 29 3c 3e 30 20 64 75  6d 6d 79 25 3d 64 75 6d  |8)<>0 dummy%=dum|
00000910  6d 79 25 2b 31 3a f1 22  81 45 72 72 6f 72 20 26  |my%+1:.".Error &|
00000920  22 3b 7e 65 72 72 6f 72  25 3b 22 2e 20 52 65 74  |";~error%;". Ret|
00000930  72 79 20 22 3b 64 75 6d  6d 79 25 3b bd 31 31 0d  |ry ";dummy%;.11.|
00000940  04 06 21 fd 20 28 65 72  72 6f 72 25 20 80 20 26  |..!. (error% . &|
00000950  31 38 29 3d 30 20 84 20  64 75 6d 6d 79 25 3d 36  |18)=0 . dummy%=6|
00000960  0d 04 10 48 e7 20 64 75  6d 6d 79 25 3d 36 20 f1  |...H. dummy%=6 .|
00000970  22 81 53 45 43 54 4f 52  20 22 3b 6c 6f 67 69 73  |".SECTOR ";logis|
00000980  65 63 74 25 3b 22 20 45  72 72 6f 72 20 26 22 3b  |ect%;" Error &";|
00000990  65 72 72 6f 72 25 3b 22  2e 20 43 6f 6e 74 69 6e  |error%;". Contin|
000009a0  75 69 6e 67 2e 2e 2e 22  0d 04 1a 5c 20 e7 20 28  |uing..."...\ . (|
000009b0  65 72 72 6f 72 25 20 80  20 26 31 38 29 3d 26 31  |error% . &18)=&1|
000009c0  30 20 f1 22 81 44 52 49  56 45 20 45 52 52 4f 52  |0 .".DRIVE ERROR|
000009d0  2f 44 49 53 43 20 57 52  49 54 45 20 50 52 4f 54  |/DISC WRITE PROT|
000009e0  45 43 54 45 44 22 27 22  81 43 4f 4e 54 49 4e 55  |ECTED"'".CONTINU|
000009f0  45 3f 20 22 3a e7 20 ac  28 a4 79 65 73 29 20 f2  |E? ":. .(.yes) .|
00000a00  74 69 64 79 0d 04 24 0b  3d 65 72 72 6f 72 25 0d  |tidy..$.=error%.|
00000a10  04 2e 05 20 0d 04 38 05  20 0d 04 42 18 dd a4 73  |... ..8. ..B...s|
00000a20  65 63 74 6f 72 28 73 65  63 74 25 2c 63 6f 6d 25  |ector(sect%,com%|
00000a30  29 0d 04 4c 12 3f 63 6f  6d 6d 61 6e 64 25 3d 63  |)..L.?command%=c|
00000a40  6f 6d 25 0d 04 56 10 3f  6e 6f 70 61 72 61 6d 73  |om%..V.?noparams|
00000a50  25 3d 33 0d 04 60 15 3f  70 61 72 61 6d 31 25 3d  |%=3..`.?param1%=|
00000a60  6c 6f 67 69 74 72 6b 25  0d 04 6a 12 3f 70 61 72  |logitrk%..j.?par|
00000a70  61 6d 32 25 3d 73 65 63  74 25 0d 04 74 19 3f 70  |am2%=sect%..t.?p|
00000a80  61 72 61 6d 33 25 3d 74  79 70 65 6e 6f 25 2a 33  |aram3%=typeno%*3|
00000a90  32 2b 31 0d 04 7e 19 64  75 6d 6d 79 25 20 3d a4  |2+1..~.dummy% =.|
00000aa0  73 65 6e 64 3a 63 6f 64  65 25 3d 31 0d 04 88 1c  |send:code%=1....|
00000ab0  e7 20 28 64 75 6d 6d 79  25 20 80 20 26 31 30 29  |. (dummy% . &10)|
00000ac0  3c 3e 30 20 3d 26 46 45  0d 04 92 21 e7 20 28 64  |<>0 =&FE...!. (d|
00000ad0  75 6d 6d 79 25 20 80 20  26 30 38 29 3c 3e 30 20  |ummy% . &08)<>0 |
00000ae0  63 6f 64 65 25 3d 26 46  46 0d 04 9c 27 e7 20 28  |code%=&FF...'. (|
00000af0  64 75 6d 6d 79 25 20 80  20 26 32 30 29 3c 3e 30  |dummy% . &20)<>0|
00000b00  20 63 6f 64 65 25 3d 2d  31 2a 63 6f 64 65 25 20  | code%=-1*code% |
00000b10  0d 04 a6 0a 3d 63 6f 64  65 25 0d 04 b0 05 20 0d  |....=code%.... .|
00000b20  04 ba 05 20 0d 04 c4 0c  dd f2 72 65 61 64 49 44  |... ......readID|
00000b30  0d 04 ce 11 3f 62 6c 6f  63 6b 25 3d 73 64 72 76  |....?block%=sdrv|
00000b40  25 0d 04 d8 11 3f 63 6f  6d 6d 61 6e 64 25 3d 26  |%....?command%=&|
00000b50  35 42 0d 04 e2 11 21 61  64 64 72 65 73 73 25 3d  |5B....!address%=|
00000b60  49 44 25 0d 04 ec 10 3f  6e 6f 70 61 72 61 6d 73  |ID%....?noparams|
00000b70  25 3d 33 0d 04 f6 11 3f  70 61 72 61 6d 31 25 3d  |%=3....?param1%=|
00000b80  74 72 6b 25 0d 05 00 0e  3f 70 61 72 61 6d 32 25  |trk%....?param2%|
00000b90  3d 30 0d 05 0a 0e 3f 70  61 72 61 6d 33 25 3d 31  |=0....?param3%=1|
00000ba0  0d 05 14 10 64 75 6d 6d  79 25 3d a4 73 65 6e 64  |....dummy%=.send|
00000bb0  0d 05 1e 44 6c 6f 67 69  74 79 70 65 25 3d 49 44  |...Dlogitype%=ID|
00000bc0  25 3f 33 3a 3f 70 61 72  61 6d 33 25 3d 6e 6f 73  |%?3:?param3%=nos|
00000bd0  65 63 74 73 25 28 6c 6f  67 69 74 79 70 65 25 29  |ects%(logitype%)|
00000be0  2b 31 3a 74 79 70 65 6e  6f 25 3d 6c 6f 67 69 74  |+1:typeno%=logit|
00000bf0  79 70 65 25 0d 05 28 10  64 75 6d 6d 79 25 3d a4  |ype%..(.dummy%=.|
00000c00  73 65 6e 64 0d 05 32 15  21 61 64 64 72 65 73 73  |send..2.!address|
00000c10  25 3d 62 75 66 66 65 72  25 0d 05 3c 11 6c 6f 67  |%=buffer%..<.log|
00000c20  69 74 72 6b 25 3d 3f 49  44 25 0d 05 46 66 6c 6f  |itrk%=?ID%..Fflo|
00000c30  73 65 63 74 25 3d 26 46  46 3a e3 69 64 6e 6f 25  |sect%=&FF:.idno%|
00000c40  3d 30 20 b8 20 6e 6f 73  65 63 74 73 25 28 74 79  |=0 . nosects%(ty|
00000c50  70 65 6e 6f 25 29 3a e7  20 49 44 25 3f 28 69 64  |peno%):. ID%?(id|
00000c60  6e 6f 25 2a 34 2b 32 29  3c 6c 6f 73 65 63 74 25  |no%*4+2)<losect%|
00000c70  20 8c 20 6c 6f 73 65 63  74 25 3d 49 44 25 3f 28  | . losect%=ID%?(|
00000c80  69 64 6e 6f 25 2a 34 2b  32 29 3a ed 3a 8b 20 ed  |idno%*4+2):.:. .|
00000c90  0d 05 50 05 e1 0d 05 5a  05 20 0d 05 64 05 20 0d  |..P....Z. ..d. .|
00000ca0  05 6e 0d dd f2 70 72 69  6e 74 49 44 0d 05 78 0a  |.n...printID..x.|
00000cb0  ef 32 36 2c 31 32 0d 05  82 6c f1 22 84 22 3b bd  |.26,12...l.".";.|
00000cc0  31 35 37 3b 22 83 54 72  61 63 6b 3a 20 22 3b 74  |157;".Track: ";t|
00000cd0  72 6b 25 3a f1 22 84 22  3b bd 31 35 37 3b 22 83  |rk%:.".";.157;".|
00000ce0  22 3b 6e 6f 73 65 63 74  73 25 28 74 79 70 65 6e  |";nosects%(typen|
00000cf0  6f 25 29 2b 31 3b 22 20  73 65 63 74 6f 72 28 73  |o%)+1;" sector(s|
00000d00  29 20 6f 66 20 22 3b 73  65 63 74 73 69 7a 65 25  |) of ";sectsize%|
00000d10  28 74 79 70 65 6e 6f 25  29 3b 22 20 62 79 74 65  |(typeno%);" byte|
00000d20  73 22 0d 05 8c 3e f1 22  84 22 3b bd 31 35 37 3b  |s"...>.".";.157;|
00000d30  22 83 49 44 20 73 65 63  74 6f 72 20 73 69 7a 65  |".ID sector size|
00000d40  20 22 3b 73 65 63 74 73  69 7a 65 25 28 6c 6f 67  | ";sectsize%(log|
00000d50  69 74 79 70 65 25 29 3b  22 20 62 79 74 65 73 22  |itype%);" bytes"|
00000d60  0d 05 96 35 f1 22 81 22  3b bd 31 35 37 3b 22 84  |...5.".";.157;".|
00000d70  6c 6f 67 69 63 61 6c 20  70 68 79 73 69 63 2e 20  |logical physic. |
00000d80  6c 6f 67 69 63 61 6c 20  6c 6f 67 69 63 61 6c 20  |logical logical |
00000d90  64 61 74 61 22 0d 05 a0  36 20 f1 22 81 22 3b bd  |data"...6 .".";.|
00000da0  31 35 37 3b 22 84 73 65  63 74 6f 72 20 20 73 65  |157;".sector  se|
00000db0  63 74 6f 72 20 20 20 74  72 61 63 6b 20 20 20 64  |ctor   track   d|
00000dc0  72 69 76 65 20 20 66 6c  61 67 22 0d 05 aa 1f e3  |rive  flag".....|
00000dd0  20 69 64 6e 6f 25 3d 30  b8 6e 6f 73 65 63 74 73  | idno%=0.nosects|
00000de0  25 28 74 79 70 65 6e 6f  25 29 0d 05 b4 12 66 6c  |%(typeno%)....fl|
00000df0  61 67 24 3d 22 83 20 88  3f 3f 3f 22 0d 05 be 28  |ag$=". .???"...(|
00000e00  e7 64 65 6c 65 74 65 64  25 28 69 64 6e 6f 25 29  |.deleted%(idno%)|
00000e10  3d 26 46 46 20 66 6c 61  67 24 3d 22 83 61 63 63  |=&FF flag$=".acc|
00000e20  75 72 3f 22 0d 05 c8 28  e7 64 65 6c 65 74 65 64  |ur?"...(.deleted|
00000e30  25 28 69 64 6e 6f 25 29  3d 26 46 45 20 66 6c 61  |%(idno%)=&FE fla|
00000e40  67 24 3d 22 82 6e 66 6f  75 6e 64 22 0d 05 d2 27  |g$=".nfound"...'|
00000e50  e7 64 65 6c 65 74 65 64  25 28 69 64 6e 6f 25 29  |.deleted%(idno%)|
00000e60  3d 2d 31 20 66 6c 61 67  24 3d 22 85 20 20 64 65  |=-1 flag$=".  de|
00000e70  6c 2e 22 0d 05 dc 29 e7  64 65 6c 65 74 65 64 25  |l."...).deleted%|
00000e80  28 69 64 6e 6f 25 29 3d  2d 26 46 46 20 66 6c 61  |(idno%)=-&FF fla|
00000e90  67 24 3d 22 83 61 63 85  64 65 6c 22 0d 05 e6 26  |g$=".ac.del"...&|
00000ea0  e7 64 65 6c 65 74 65 64  25 28 69 64 6e 6f 25 29  |.deleted%(idno%)|
00000eb0  3d 31 20 66 6c 61 67 24  3d 22 86 20 20 6e 6f 72  |=1 flag$=".  nor|
00000ec0  6d 22 0d 05 f0 64 f1 22  81 22 3b bd 31 35 37 3b  |m"...d.".";.157;|
00000ed0  22 84 20 20 22 3b 69 64  6e 6f 25 3b 8a 31 33 29  |".  ";idno%;.13)|
00000ee0  3b 3f 28 69 64 6e 6f 25  2a 34 2b 32 2b 49 44 25  |;?(idno%*4+2+ID%|
00000ef0  29 3b 8a 32 31 29 3b 3f  28 69 64 6e 6f 25 2a 34  |);.21);?(idno%*4|
00000f00  2b 49 44 25 29 3b 8a 33  30 29 3b 3f 28 69 64 6e  |+ID%);.30);?(idn|
00000f10  6f 25 2a 34 2b 31 2b 49  44 25 29 3b 8a 33 32 29  |o%*4+1+ID%);.32)|
00000f20  3b 66 6c 61 67 24 0d 05  fa 05 ed 0d 06 04 29 f1  |;flag$........).|
00000f30  27 8a 31 31 2c 32 34 29  22 85 50 52 45 53 53 20  |'.11,24)".PRESS |
00000f40  41 4e 59 20 4b 45 59 22  3b 3a 64 75 6d 6d 79 25  |ANY KEY";:dummy%|
00000f50  3d a5 3a db 0d 06 0e 05  e1 0d 06 18 05 20 0d 06  |=.:.......... ..|
00000f60  22 05 20 0d 06 2c 0b dd  f2 70 72 69 6e 74 0d 06  |". ..,...print..|
00000f70  36 0a ef 32 36 2c 31 32  0d 06 40 2b f1 22 81 22  |6..26,12..@+."."|
00000f80  3b bd 31 35 37 3b 22 84  50 68 79 73 69 63 61 6c  |;.157;".Physical|
00000f90  20 3a 22 3b 73 64 72 76  25 3b 22 2e 22 3b 74 72  | :";sdrv%;".";tr|
00000fa0  6b 25 3b 0d 06 4a 2e e7  20 68 65 78 25 20 f1 8a  |k%;..J.. hex% ..|
00000fb0  32 39 2c 30 29 3b 22 83  48 45 58 20 20 22 3a 8b  |29,0);".HEX  ":.|
00000fc0  20 f1 8a 32 39 2c 30 29  3b 22 83 41 53 43 49 49  | ..29,0);".ASCII|
00000fd0  22 0d 06 54 3d f1 22 81  22 3b bd 31 35 37 3b 22  |"..T=.".";.157;"|
00000fe0  84 4c 6f 67 69 63 61 6c  20 20 3a 22 3b 49 44 25  |.Logical  :";ID%|
00000ff0  3f 31 3b 22 2e 22 3b 6c  6f 67 69 74 72 6b 25 3b  |?1;".";logitrk%;|
00001000  22 2e 22 3b 6c 6f 67 69  73 65 63 74 25 3b 0d 06  |".";logisect%;..|
00001010  5e 27 f1 8a 33 30 2c 31  29 3b 73 65 63 74 73 69  |^'..30,1);sectsi|
00001020  7a 65 25 28 74 79 70 65  6e 6f 25 29 3b 22 20 42  |ze%(typeno%);" B|
00001030  79 74 65 73 22 0d 06 68  3c e7 20 94 28 64 65 6c  |ytes"..h<. .(del|
00001040  65 74 65 64 25 28 6c 6f  67 69 73 65 63 74 25 2d  |eted%(logisect%-|
00001050  6c 6f 73 65 63 74 25 29  29 3d 26 46 46 20 f1 8a  |losect%))=&FF ..|
00001060  31 2c 32 29 22 82 20 41  63 63 75 72 61 63 79 3f  |1,2)". Accuracy?|
00001070  22 0d 06 72 3a e7 20 b4  28 64 65 6c 65 74 65 64  |"..r:. .(deleted|
00001080  25 28 6c 6f 67 69 73 65  63 74 25 2d 6c 6f 73 65  |%(logisect%-lose|
00001090  63 74 25 29 29 3d 2d 31  20 f1 8a 32 39 2c 32 29  |ct%))=-1 ..29,2)|
000010a0  3b 22 82 44 65 6c 65 74  65 64 22 0d 06 7c 4a e7  |;".Deleted"..|J.|
000010b0  20 64 65 6c 65 74 65 64  25 28 6c 6f 67 69 73 65  | deleted%(logise|
000010c0  63 74 25 2d 6c 6f 73 65  63 74 25 29 3d 26 46 45  |ct%-losect%)=&FE|
000010d0  20 f1 8a 39 2c 31 33 29  22 81 53 45 43 54 4f 52  | ..9,13)".SECTOR|
000010e0  20 57 41 53 20 4e 4f 54  20 46 4f 55 4e 44 22 3a  | WAS NOT FOUND":|
000010f0  e5 8d 54 52 47 0d 06 86  26 e7 20 68 65 78 25 20  |..TRG...&. hex% |
00001100  f2 77 69 6e 64 6f 77 28  30 2c 33 29 3a 8b 20 f2  |.window(0,3):. .|
00001110  77 69 6e 64 6f 77 28 38  2c 33 29 0d 06 90 52 20  |window(8,3)...R |
00001120  e7 20 68 65 78 25 20 f1  22 20 20 20 20 30 20 31  |. hex% ."    0 1|
00001130  20 32 20 33 20 20 34 20  35 20 36 20 37 20 20 38  | 2 3  4 5 6 7  8|
00001140  20 39 20 41 20 42 20 20  43 20 44 20 45 20 46 22  | 9 A B  C D E F"|
00001150  3b 3a 8b 20 f1 22 20 20  20 20 30 31 32 33 34 35  |;:. ."    012345|
00001160  36 37 38 39 41 42 43 44  45 46 20 22 3b 0d 06 9a  |6789ABCDEF ";...|
00001170  54 73 25 3d 73 74 61 72  74 73 68 6f 77 25 2d 73  |Ts%=startshow%-s|
00001180  65 63 74 73 74 61 72 74  25 3a 6c 65 6e 73 68 6f  |ectstart%:lensho|
00001190  77 25 3d 73 65 63 74 73  69 7a 65 25 28 74 79 70  |w%=sectsize%(typ|
000011a0  65 6e 6f 25 29 3a e7 20  6c 65 6e 73 68 6f 77 25  |eno%):. lenshow%|
000011b0  3e 32 35 36 20 6c 65 6e  73 68 6f 77 25 3d 32 35  |>256 lenshow%=25|
000011c0  36 0d 06 a4 23 20 e3 20  48 25 3d 73 25 20 b8 20  |6...# . H%=s% . |
000011d0  73 25 2b 6c 65 6e 73 68  6f 77 25 2d 26 30 46 20  |s%+lenshow%-&0F |
000011e0  88 26 31 30 0d 06 ae 13  f1 27 3b 7e 48 25 3b 22  |.&10.....';~H%;"|
000011f0  86 22 3b 8a 34 29 3b 0d  06 b8 0c e3 20 4c 25 3d  |.";.4);..... L%=|
00001200  30 b8 33 0d 06 c2 18 e7  20 4c 25 3e 30 20 80 20  |0.3..... L%>0 . |
00001210  68 65 78 25 20 f1 3b 22  20 22 3b 0d 06 cc 0d e3  |hex% .;" ";.....|
00001220  20 4c 32 25 3d 30 b8 33  0d 06 d6 22 62 79 74 65  | L2%=0.3..."byte|
00001230  25 3d 48 25 3f 28 4c 25  2a 34 2b 4c 32 25 2b 73  |%=H%?(L%*4+L2%+s|
00001240  65 63 74 73 74 61 72 74  25 29 0d 06 e0 10 e7 20  |ectstart%)..... |
00001250  68 65 78 25 20 e5 8d 64  7e 46 0d 06 ea 31 e7 20  |hex% ..d~F...1. |
00001260  62 79 74 65 25 3c 26 32  30 20 84 20 62 79 74 65  |byte%<&20 . byte|
00001270  25 3e 31 32 36 20 f1 bd  28 32 35 35 29 3b 3a 8b  |%>126 ..(255);:.|
00001280  20 f1 bd 28 62 79 74 65  25 29 3b 0d 06 f4 0a e5  | ..(byte%);.....|
00001290  20 8d 54 48 47 0d 06 fe  27 e7 20 62 79 74 65 25  | .THG...'. byte%|
000012a0  3c 26 31 30 20 f1 3b 30  3b 7e 62 79 74 65 25 3b  |<&10 .;0;~byte%;|
000012b0  3a 8b 20 f1 3b 7e 62 79  74 65 25 3b 0d 07 08 09  |:. .;~byte%;....|
000012c0  ed 3a ed 3a ed 0d 07 12  11 f2 77 69 6e 64 6f 77  |.:.:......window|
000012d0  28 30 2c 32 31 29 0d 07  1c 05 e1 0d 07 26 05 20  |(0,21).......&. |
000012e0  0d 07 30 05 20 0d 07 3a  09 dd f2 6b 65 79 0d 07  |..0. ..:...key..|
000012f0  44 0b 2a 46 58 32 31 2c  30 0d 07 4e 0f 2a 46 58  |D.*FX21,0..N.*FX|
00001300  32 30 32 2c 33 32 2c 30  0d 07 58 71 20 ee 28 a7  |202,32,0..Xq .(.|
00001310  22 53 44 54 52 4a 30 31  32 33 48 50 45 58 49 57  |"SDTRJ0123HPEXIW|
00001320  22 2c be 29 2b 31 29 20  e5 20 8d 44 58 47 2c 8d  |",.)+1) . .DXG,.|
00001330  44 62 47 2c 8d 44 6c 47  2c 8d 44 76 47 2c 8d 74  |DbG,.DlG,.DvG,.t|
00001340  40 47 2c 8d 74 4a 47 2c  8d 74 5e 47 2c 8d 74 68  |@G,.tJG,.t^G,.th|
00001350  47 2c 8d 74 72 47 2c 8d  74 7c 47 2c 8d 64 46 47  |G,.trG,.t|G,.dFG|
00001360  2c 8d 64 50 47 2c 8d 64  5a 47 2c 8d 64 64 47 2c  |,.dPG,.dZG,.ddG,|
00001370  8d 64 6e 47 2c 8d 64 78  47 0d 07 62 2e f1 22 86  |.dnG,.dxG..b..".|
00001380  4e 65 78 74 20 73 65 63  74 6f 72 2f 70 61 72 74  |Next sector/part|
00001390  20 73 65 63 74 6f 72 22  3a f2 63 68 73 65 63 74  | sector":.chsect|
000013a0  6f 72 28 31 29 3a e1 0d  07 6c 34 f1 22 86 50 72  |or(1):...l4.".Pr|
000013b0  65 63 65 64 69 6e 67 20  73 65 63 74 6f 72 2f 70  |eceding sector/p|
000013c0  61 72 74 20 73 65 63 74  6f 72 22 3a f2 63 68 73  |art sector":.chs|
000013d0  65 63 74 6f 72 28 2d 31  29 3a e1 0d 07 76 20 f1  |ector(-1):...v .|
000013e0  22 86 4e 65 78 74 20 74  72 61 63 6b 22 3a f2 63  |".Next track":.c|
000013f0  68 74 72 61 63 6b 28 31  29 3a e1 0d 07 80 28 f1  |htrack(1):....(.|
00001400  22 86 50 72 65 63 65 64  69 6e 67 20 74 72 61 63  |".Preceding trac|
00001410  6b 22 3a f2 63 68 74 72  61 63 6b 28 2d 26 46 46  |k":.chtrack(-&FF|
00001420  29 3a e1 0d 07 8a 13 f2  63 68 74 72 61 63 6b 28  |):......chtrack(|
00001430  26 46 46 29 3a e1 0d 07  94 1f f1 22 86 4e 65 77  |&FF):......".New|
00001440  20 64 72 69 76 65 20 3a  22 3b 73 64 72 76 25 3a  | drive :";sdrv%:|
00001450  e5 8d 74 4a 47 0d 07 9e  11 73 64 72 76 25 3d 30  |..tJG....sdrv%=0|
00001460  3a e5 8d 74 54 47 0d 07  a8 11 73 64 72 76 25 3d  |:..tTG....sdrv%=|
00001470  31 3a e5 8d 74 54 47 0d  07 b2 11 73 64 72 76 25  |1:..tTG....sdrv%|
00001480  3d 32 3a e5 8d 74 54 47  0d 07 bc 11 73 64 72 76  |=2:..tTG....sdrv|
00001490  25 3d 33 3a e5 8d 74 54  47 0d 07 c6 27 f1 22 86  |%=3:..tTG...'.".|
000014a0  48 65 78 2f 61 73 63 69  69 22 3a 68 65 78 25 3d  |Hex/ascii":hex%=|
000014b0  ac 28 68 65 78 25 29 3a  f2 70 72 69 6e 74 3a e1  |.(hex%):.print:.|
000014c0  0d 07 d0 15 f2 70 72 69  6e 74 49 44 3a f2 70 72  |.....printID:.pr|
000014d0  69 6e 74 3a e1 0d 07 da  14 f1 22 81 45 64 69 74  |int:......".Edit|
000014e0  22 3a f2 65 64 69 74 3a  e1 0d 07 e4 3a f1 22 81  |":.edit:....:.".|
000014f0  45 78 69 74 20 70 72 6f  67 72 61 6d 22 27 22 81  |Exit program"'".|
00001500  41 72 65 20 79 6f 75 20  73 75 72 65 3f 20 22 3b  |Are you sure? ";|
00001510  3a e7 20 a4 79 65 73 20  f2 74 69 64 79 3a 8b 20  |:. .yes .tidy:. |
00001520  db 3a e1 0d 07 ee 0f f2  69 6e 73 74 72 75 63 74  |.:......instruct|
00001530  3a e1 0d 07 f8 11 f2 77  72 69 74 65 74 72 61 63  |:......writetrac|
00001540  6b 3a e1 0d 08 02 05 e1  0d 08 0c 05 20 0d 08 16  |k:.......... ...|
00001550  05 20 0d 08 20 13 dd f2  77 69 6e 64 6f 77 28 78  |. .. ...window(x|
00001560  25 2c 79 25 29 0d 08 2a  13 ef 32 38 2c 78 25 2c  |%,y%)..*..28,x%,|
00001570  32 34 2c 33 39 2c 79 25  0d 08 34 05 e1 0d 08 3e  |24,39,y%..4....>|
00001580  05 20 0d 08 48 05 20 0d  08 52 0b 20 dd f2 74 69  |. ..H. ..R. ..ti|
00001590  64 79 0d 08 5c 0a 2a 46  58 34 2c 30 0d 08 66 09  |dy..\.*FX4,0..f.|
000015a0  2a 44 52 2e 30 0d 08 70  0a ef 32 36 2c 31 32 0d  |*DR.0..p..26,12.|
000015b0  08 7a 42 f1 27 27 22 50  72 6f 67 72 61 6d 20 77  |.zB.''"Program w|
000015c0  69 6c 6c 20 62 65 20 65  78 69 74 65 64 20 77 69  |ill be exited wi|
000015d0  74 68 20 6d 65 6d 6f 72  79 22 27 22 61 6e 64 20  |th memory"'"and |
000015e0  76 61 72 69 61 62 6c 65  73 20 69 6e 74 61 63 74  |variables intact|
000015f0  22 0d 08 84 05 fa 0d 08  8e 05 e1 0d 08 98 05 20  |".............. |
00001600  0d 08 a2 05 20 0d 08 ac  09 dd a4 79 65 73 0d 08  |.... ......yes..|
00001610  b6 23 e7 20 28 a5 20 80  20 26 44 46 29 3d 97 28  |.#. (. . &DF)=.(|
00001620  22 59 22 29 20 8c 20 f1  22 82 59 65 73 22 3a 3d  |"Y") . .".Yes":=|
00001630  b9 0d 08 c0 0d f1 22 81  4e 6f 22 3a 3d a3 0d 08  |......".No":=...|
00001640  ca 05 20 0d 08 d4 05 20  0d 08 de 0b dd f2 72 65  |.. .... ......re|
00001650  74 72 79 0d 08 e8 15 e3  20 74 79 70 65 63 6f 64  |try..... typecod|
00001660  65 25 3d 30 20 b8 20 34  0d 08 f2 1b 3f 70 61 72  |e%=0 . 4....?par|
00001670  61 6d 33 25 3d 74 79 70  65 63 6f 64 65 25 2a 33  |am3%=typecode%*3|
00001680  32 2b 31 0d 08 fc 0a d6  26 46 46 46 31 0d 09 06  |2+1.....&FFF1...|
00001690  20 65 72 72 6f 72 25 3d  62 6c 6f 63 6b 25 3f 28  | error%=block%?(|
000016a0  37 2b 3f 6e 6f 70 61 72  61 6d 73 25 29 0d 09 10  |7+?noparams%)...|
000016b0  15 74 79 70 65 6e 6f 25  3d 74 79 70 65 6e 6f 25  |.typeno%=typeno%|
000016c0  2b 31 0d 09 1a 34 e7 20  28 65 72 72 6f 72 25 20  |+1...4. (error% |
000016d0  80 20 26 31 38 29 3d 30  20 74 79 70 65 6e 6f 25  |. &18)=0 typeno%|
000016e0  3d 74 79 70 65 63 6f 64  65 25 3a 74 79 70 65 63  |=typecode%:typec|
000016f0  6f 64 65 25 3d 35 0d 09  24 05 ed 0d 09 2e 37 e7  |ode%=5..$.....7.|
00001700  20 74 79 70 65 6e 6f 25  3e 35 20 74 79 70 65 6e  | typeno%>5 typen|
00001710  6f 25 3d 6c 6f 67 69 74  79 70 65 25 3a 3f 70 61  |o%=logitype%:?pa|
00001720  72 61 6d 33 25 3d 74 79  70 65 6e 6f 25 2a 33 32  |ram3%=typeno%*32|
00001730  2b 31 0d 09 38 05 e1 0d  09 42 05 20 0d 09 4c 05  |+1..8....B. ..L.|
00001740  20 0d 09 56 1b dd f2 66  6f 72 6d 61 74 28 64 72  | ..V...format(dr|
00001750  69 76 65 25 2c 74 72 61  63 6b 25 29 0d 09 60 12  |ive%,track%)..`.|
00001760  3f 62 6c 6f 63 6b 25 3d  64 72 69 76 65 25 0d 09  |?block%=drive%..|
00001770  6a 11 21 61 64 64 72 65  73 73 25 3d 49 44 25 0d  |j.!address%=ID%.|
00001780  09 74 11 3f 63 6f 6d 6d  61 6e 64 25 3d 26 36 33  |.t.?command%=&63|
00001790  0d 09 7e 10 3f 6e 6f 70  61 72 61 6d 73 25 3d 35  |..~.?noparams%=5|
000017a0  0d 09 88 13 3f 70 61 72  61 6d 31 25 3d 74 72 61  |....?param1%=tra|
000017b0  63 6b 25 0d 09 92 1b 3f  70 61 72 61 6d 32 25 3d  |ck%....?param2%=|
000017c0  67 61 70 33 25 28 61 64  73 69 7a 65 25 29 0d 09  |gap3%(adsize%)..|
000017d0  9c 2b 3f 70 61 72 61 6d  33 25 3d 61 64 73 69 7a  |.+?param3%=adsiz|
000017e0  65 25 2a 33 32 2b 6e 6f  73 65 63 74 73 25 28 61  |e%*32+nosects%(a|
000017f0  64 73 69 7a 65 25 29 2b  31 0d 09 a6 0e 3f 70 61  |dsize%)+1....?pa|
00001800  72 61 6d 34 25 3d 30 0d  09 b0 0f 3f 70 61 72 61  |ram4%=0....?para|
00001810  6d 35 25 3d 31 36 0d 09  ba 10 64 75 6d 6d 79 25  |m5%=16....dummy%|
00001820  3d a4 73 65 6e 64 0d 09  c4 05 e1 0d 09 ce 05 20  |=.send......... |
00001830  0d 09 d8 05 20 0d 09 e2  10 dd f2 77 72 69 74 65  |.... ......write|
00001840  74 72 61 63 6b 0d 09 ec  12 f2 77 69 6e 64 6f 77  |track.....window|
00001850  28 30 2c 32 29 3a db 0d  09 f6 38 f1 27 22 81 22  |(0,2):....8.'"."|
00001860  3b bd 31 35 37 3b 22 20  20 20 20 20 20 20 20 20  |;.157;"         |
00001870  83 57 52 49 54 45 2f 43  4f 50 59 20 54 52 41 43  |.WRITE/COPY TRAC|
00001880  4b 22 3a f2 77 69 6e 64  6f 77 28 30 2c 34 29 0d  |K":.window(0,4).|
00001890  0a 00 27 e8 27 22 86 45  6e 74 65 72 20 64 65 73  |..'.'".Enter des|
000018a0  74 69 6e 61 74 69 6f 6e  20 64 72 69 76 65 2d 84  |tination drive-.|
000018b0  22 64 64 72 76 25 0d 0a  0a 2d e7 20 64 64 72 76  |"ddrv%...-. ddrv|
000018c0  25 3c 30 20 84 20 64 64  72 76 25 3e 33 20 f1 22  |%<0 . ddrv%>3 ."|
000018d0  81 50 6c 65 61 73 65 20  72 65 64 6f 22 3a e5 8d  |.Please redo":..|
000018e0  54 40 4a 0d 0a 14 3e e8  22 86 45 6e 74 65 72 20  |T@J...>.".Enter |
000018f0  64 65 73 74 69 6e 61 74  69 6f 6e 20 70 68 79 73  |destination phys|
00001900  69 63 61 6c 20 74 72 61  63 6b 2d 84 22 64 74 72  |ical track-."dtr|
00001910  6b 24 3a 64 74 72 6b 25  3d a0 28 64 74 72 6b 24  |k$:dtrk%=.(dtrk$|
00001920  29 0d 0a 1e 2e e7 20 64  74 72 6b 25 3e 38 30 20  |)..... dtrk%>80 |
00001930  84 20 64 74 72 6b 25 3c  30 20 f1 22 81 50 6c 65  |. dtrk%<0 .".Ple|
00001940  61 73 65 20 72 65 64 6f  22 3a e5 8d 54 54 4a 0d  |ase redo":..TTJ.|
00001950  0a 28 48 64 6c 6f 67 69  74 72 6b 25 3d 6c 6f 67  |.(Hdlogitrk%=log|
00001960  69 74 72 6b 25 3a 64 73  69 7a 65 25 3d 6c 6f 67  |itrk%:dsize%=log|
00001970  69 74 79 70 65 25 3a 61  64 73 69 7a 65 25 3d 74  |itype%:adsize%=t|
00001980  79 70 65 6e 6f 25 3a 64  6c 6f 73 65 63 74 25 3d  |ypeno%:dlosect%=|
00001990  6c 6f 73 65 63 74 25 0d  0a 32 38 f1 22 86 55 73  |losect%..28.".Us|
000019a0  65 20 73 61 6d 65 20 49  44 27 73 20 61 6e 64 20  |e same ID's and |
000019b0  73 69 7a 65 73 20 61 73  20 73 6f 75 72 63 65 3f  |sizes as source?|
000019c0  22 3b 3a e7 20 a4 79 65  73 20 e5 8d 74 4c 4a 0d  |";:. .yes ..tLJ.|
000019d0  0a 3c 4a e8 27 22 86 45  6e 74 65 72 20 64 65 73  |.<J.'".Enter des|
000019e0  74 69 6e 61 74 69 6f 6e  20 6c 6f 67 69 63 61 6c  |tination logical|
000019f0  20 74 72 61 63 6b 2d 84  22 64 6c 6f 67 69 74 72  | track-."dlogitr|
00001a00  6b 24 3a 64 6c 6f 67 69  74 72 6b 25 3d a0 28 64  |k$:dlogitrk%=.(d|
00001a10  6c 6f 67 69 74 72 6b 24  29 0d 0a 46 37 e7 20 64  |logitrk$)..F7. d|
00001a20  6c 6f 67 69 74 72 6b 25  3c 31 20 84 20 64 6c 6f  |logitrk%<1 . dlo|
00001a30  67 69 74 72 6b 25 3e 32  35 35 20 f1 22 81 50 6c  |gitrk%>255 .".Pl|
00001a40  65 61 73 65 20 72 65 64  6f 22 3a e5 8d 54 7c 4a  |ease redo":..T|J|
00001a50  0d 0a 50 48 e8 22 86 45  6e 74 65 72 20 64 65 73  |..PH.".Enter des|
00001a60  74 69 6e 61 74 69 6f 6e  22 27 22 86 20 20 20 20  |tination"'".    |
00001a70  20 20 20 54 52 55 45 20  73 65 63 74 6f 72 20 73  |   TRUE sector s|
00001a80  69 7a 65 20 63 6f 64 65  20 28 30 2d 34 29 2d 84  |ize code (0-4)-.|
00001a90  22 61 64 73 69 7a 65 25  0d 0a 5a 31 e7 20 61 64  |"adsize%..Z1. ad|
00001aa0  73 69 7a 65 25 3c 30 20  84 20 61 64 73 69 7a 65  |size%<0 . adsize|
00001ab0  25 3e 34 20 f1 22 81 50  6c 65 61 73 65 20 72 65  |%>4 .".Please re|
00001ac0  64 6f 22 3a e5 8d 44 50  4a 0d 0a 64 47 e8 22 86  |do":..DPJ..dG.".|
00001ad0  45 6e 74 65 72 20 64 65  73 74 69 6e 61 74 69 6f  |Enter destinatio|
00001ae0  6e 22 27 22 86 20 20 20  20 20 20 20 20 20 49 44  |n"'".         ID|
00001af0  20 73 65 63 74 6f 72 20  73 69 7a 65 20 63 6f 64  | sector size cod|
00001b00  65 20 28 30 2d 34 29 2d  84 22 64 73 69 7a 65 25  |e (0-4)-."dsize%|
00001b10  0d 0a 6e 2f e7 20 64 73  69 7a 65 25 3c 30 20 84  |..n/. dsize%<0 .|
00001b20  20 64 73 69 7a 65 25 3e  34 20 f1 22 81 50 6c 65  | dsize%>4 .".Ple|
00001b30  61 73 65 20 72 65 64 6f  22 3a e5 8d 44 64 4a 0d  |ase redo":..DdJ.|
00001b40  0a 78 30 e8 22 86 45 6e  74 65 72 20 64 65 73 74  |.x0.".Enter dest|
00001b50  69 6e 61 74 69 6f 6e 20  73 74 61 72 74 20 73 65  |ination start se|
00001b60  63 74 6f 72 2d 84 22 64  6c 6f 73 65 63 74 25 0d  |ctor-."dlosect%.|
00001b70  0a 82 35 e7 20 64 6c 6f  73 65 63 74 25 3c 30 20  |..5. dlosect%<0 |
00001b80  84 20 64 6c 6f 73 65 63  74 25 3e 32 35 35 20 f1  |. dlosect%>255 .|
00001b90  22 81 50 6c 65 61 73 65  20 72 65 64 6f 22 3a e5  |".Please redo":.|
00001ba0  8d 44 78 4a 0d 0a 8c 4f  f1 27 22 86 57 72 69 74  |.DxJ...O.'".Writ|
00001bb0  65 20 61 73 20 64 65 6c  65 74 65 64 20 6f 72 20  |e as deleted or |
00001bc0  6e 6f 72 6d 61 6c 20 6f  72 20 61 73 20 69 73 3f  |normal or as is?|
00001bd0  22 27 22 86 54 79 70 65  20 27 44 27 2c 27 4e 27  |"'".Type 'D','N'|
00001be0  20 6f 72 20 27 49 27 2d  84 22 3b 3a 2a 46 58 32  | or 'I'-.";:*FX2|
00001bf0  31 2c 30 0d 0a 96 1b 74  65 73 74 24 3d bd 28 a5  |1,0....test$=.(.|
00001c00  20 80 20 26 44 46 29 3a  f1 74 65 73 74 24 0d 0a  | . &DF):.test$..|
00001c10  a0 40 e7 20 74 65 73 74  24 3c 3e 22 4e 22 20 80  |.@. test$<>"N" .|
00001c20  20 74 65 73 74 24 3c 3e  22 44 22 20 80 20 74 65  | test$<>"D" . te|
00001c30  73 74 24 3c 3e 22 49 22  20 f1 22 81 50 6c 65 61  |st$<>"I" .".Plea|
00001c40  73 65 20 72 65 64 6f 22  3a e5 8d 74 4c 4a 0d 0a  |se redo":..tLJ..|
00001c50  aa 41 db 3a f1 27 22 86  22 3b bd 31 35 37 3b 22  |.A.:.'".";.157;"|
00001c60  84 53 4f 55 52 43 45 3a  22 3b bd 31 35 36 3b 27  |.SOURCE:";.156;'|
00001c70  27 22 86 64 72 69 76 65  20 22 3b 73 64 72 76 25  |'".drive ";sdrv%|
00001c80  3b 22 20 74 72 61 63 6b  20 22 3b 74 72 6b 25 0d  |;" track ";trk%.|
00001c90  0a b4 3a f1 27 22 86 22  3b bd 31 35 37 3b 22 84  |..:.'".";.157;".|
00001ca0  44 45 53 54 49 4e 41 54  49 4f 4e 3a 22 3b bd 31  |DESTINATION:";.1|
00001cb0  35 36 3b 27 27 22 86 50  48 59 53 49 43 41 4c 20  |56;''".PHYSICAL |
00001cc0  49 4e 44 49 43 45 53 3a  22 0d 0a be 27 f1 22 86  |INDICES:"...'.".|
00001cd0  44 72 69 76 65 3a 20 22  3b 64 64 72 76 25 3b 22  |Drive: ";ddrv%;"|
00001ce0  2e 20 54 72 61 63 6b 3a  20 22 3b 64 74 72 6b 25  |. Track: ";dtrk%|
00001cf0  0d 0a c8 49 f1 22 86 22  3b 6e 6f 73 65 63 74 73  |...I.".";nosects|
00001d00  25 28 61 64 73 69 7a 65  25 29 2b 31 3b 22 20 73  |%(adsize%)+1;" s|
00001d10  65 63 74 6f 72 28 73 29  20 6f 66 20 22 3b 73 65  |ector(s) of ";se|
00001d20  63 74 73 69 7a 65 25 28  61 64 73 69 7a 65 25 29  |ctsize%(adsize%)|
00001d30  3b 22 20 62 79 74 65 73  22 0d 0a d2 49 f1 27 22  |;" bytes"...I.'"|
00001d40  86 4c 4f 47 49 43 41 4c  20 49 4e 44 49 43 45 53  |.LOGICAL INDICES|
00001d50  3a 22 27 22 86 54 72 61  63 6b 3a 20 22 3b 64 6c  |:"'".Track: ";dl|
00001d60  6f 67 69 74 72 6b 25 3b  22 2e 20 53 74 61 72 74  |ogitrk%;". Start|
00001d70  20 73 65 63 74 6f 72 20  22 3b 64 6c 6f 73 65 63  | sector ";dlosec|
00001d80  74 25 0d 0a dc 30 f1 22  86 53 65 63 74 6f 72 20  |t%...0.".Sector |
00001d90  73 69 7a 65 3a 20 22 3b  73 65 63 74 73 69 7a 65  |size: ";sectsize|
00001da0  25 28 64 73 69 7a 65 25  29 3b 22 20 62 79 74 65  |%(dsize%);" byte|
00001db0  73 22 0d 0a e6 1e f1 27  22 85 4f 4b 3f 20 22 3b  |s".....'".OK? ";|
00001dc0  3a e7 20 ac 28 a4 79 65  73 29 20 e5 8d 64 6c 49  |:. .(.yes) ..dlI|
00001dd0  0d 0a f0 21 e3 20 69 64  6e 6f 25 3d 30 20 b8 20  |...!. idno%=0 . |
00001de0  6e 6f 73 65 63 74 73 25  28 61 64 73 69 7a 65 25  |nosects%(adsize%|
00001df0  29 0d 0a fa 1b 49 44 25  3f 28 69 64 6e 6f 25 2a  |)....ID%?(idno%*|
00001e00  34 29 3d 64 6c 6f 67 69  74 72 6b 25 0d 0b 04 2a  |4)=dlogitrk%...*|
00001e10  3f 28 49 44 25 2b 32 2b  69 64 6e 6f 25 2a 34 29  |?(ID%+2+idno%*4)|
00001e20  3d 28 64 6c 6f 73 65 63  74 25 2b 69 64 6e 6f 25  |=(dlosect%+idno%|
00001e30  29 83 26 31 30 30 0d 0b  0e 1b 3f 28 49 44 25 2b  |).&100....?(ID%+|
00001e40  33 2b 69 64 6e 6f 25 2a  34 29 3d 64 73 69 7a 65  |3+idno%*4)=dsize|
00001e50  25 0d 0b 18 05 ed 0d 0b  22 45 db 3a f1 8a 30 2c  |%......."E.:..0,|
00001e60  33 29 22 81 44 52 49 56  45 20 3a 22 3b 64 64 72  |3)".DRIVE :";ddr|
00001e70  76 25 3b 22 20 54 52 41  43 4b 20 22 3b 64 74 72  |v%;" TRACK ";dtr|
00001e80  6b 25 3b 22 20 43 4f 4e  54 45 4e 54 53 20 57 49  |k%;" CONTENTS WI|
00001e90  4c 4c 20 42 45 20 4c 4f  53 54 22 0d 0b 2c 39 f1  |LL BE LOST"..,9.|
00001ea0  27 22 81 4f 4b 3f 20 28  74 79 70 65 20 27 4e 27  |'".OK? (type 'N'|
00001eb0  20 74 6f 20 61 62 6f 72  74 20 77 72 69 74 65 29  | to abort write)|
00001ec0  20 22 3b 3a e7 20 ac 28  a4 79 65 73 29 20 e5 20  | ";:. .(.yes) . |
00001ed0  8d 64 4c 4b 0d 0b 36 3a  f1 27 22 81 49 4e 53 45  |.dLK..6:.'".INSE|
00001ee0  52 54 20 44 45 53 54 49  4e 41 54 49 4f 4e 20 44  |RT DESTINATION D|
00001ef0  49 53 43 20 41 4e 44 20  50 52 45 53 53 20 41 20  |ISC AND PRESS A |
00001f00  4b 45 59 22 3b 3a 64 75  6d 6d 79 25 3d a5 0d 0b  |KEY";:dummy%=...|
00001f10  40 12 f2 73 65 65 6b 28  64 64 72 76 25 2c 30 29  |@..seek(ddrv%,0)|
00001f20  0d 0b 4a 16 f2 73 65 65  6b 28 64 64 72 76 25 2c  |..J..seek(ddrv%,|
00001f30  64 74 72 6b 25 29 0d 0b  54 18 f2 66 6f 72 6d 61  |dtrk%)..T..forma|
00001f40  74 28 64 64 72 76 25 2c  64 74 72 6b 25 29 0d 0b  |t(ddrv%,dtrk%)..|
00001f50  5e 1b f2 63 68 72 65 67  69 73 74 65 72 73 28 64  |^..chregisters(d|
00001f60  6c 6f 67 69 74 72 6b 25  29 0d 0b 68 47 3f 62 6c  |logitrk%)..hG?bl|
00001f70  6f 63 6b 25 3d 64 64 72  76 25 3a 3f 70 61 72 61  |ock%=ddrv%:?para|
00001f80  6d 31 25 3d 64 6c 6f 67  69 74 72 6b 25 3a 3f 70  |m1%=dlogitrk%:?p|
00001f90  61 72 61 6d 33 25 3d 61  64 73 69 7a 65 25 2a 33  |aram3%=adsize%*3|
00001fa0  32 2b 31 3a 3f 6e 6f 70  61 72 61 6d 73 25 3d 33  |2+1:?noparams%=3|
00001fb0  0d 0b 72 21 e3 20 69 64  6e 6f 25 3d 30 20 b8 20  |..r!. idno%=0 . |
00001fc0  6e 6f 73 65 63 74 73 25  28 61 64 73 69 7a 65 25  |nosects%(adsize%|
00001fd0  29 0d 0b 7c 2e 73 65 63  74 25 3d 28 64 6c 6f 73  |)..|.sect%=(dlos|
00001fe0  65 63 74 25 2b 69 64 6e  6f 25 29 83 26 31 30 30  |ect%+idno%).&100|
00001ff0  3a 3f 70 61 72 61 6d 32  25 3d 73 65 63 74 25 0d  |:?param2%=sect%.|
00002000  0b 86 2e 21 61 64 64 72  65 73 73 25 3d 62 75 66  |...!address%=buf|
00002010  66 65 72 25 2b 73 65 63  74 73 69 7a 65 25 28 61  |fer%+sectsize%(a|
00002020  64 73 69 7a 65 25 29 2a  69 64 6e 6f 25 0d 0b 90  |dsize%)*idno%...|
00002030  24 e7 20 74 65 73 74 24  3d 22 4e 22 20 3f 63 6f  |$. test$="N" ?co|
00002040  6d 6d 61 6e 64 25 3d 26  34 42 3a e5 20 8d 74 6e  |mmand%=&4B:. .tn|
00002050  4b 0d 0b 9a 24 e7 20 74  65 73 74 24 3d 22 44 22  |K...$. test$="D"|
00002060  20 3f 63 6f 6d 6d 61 6e  64 25 3d 26 34 46 3a e5  | ?command%=&4F:.|
00002070  20 8d 74 6e 4b 0d 0b a4  37 e7 20 64 65 6c 65 74  | .tnK...7. delet|
00002080  65 64 25 28 69 64 6e 6f  25 29 3d b9 20 8c 20 3f  |ed%(idno%)=. . ?|
00002090  63 6f 6d 6d 61 6e 64 25  3d 26 34 46 3a 8b 20 3f  |command%=&4F:. ?|
000020a0  63 6f 6d 6d 61 6e 64 25  3d 26 34 42 0d 0b ae 10  |command%=&4B....|
000020b0  64 75 6d 6d 79 25 3d a4  73 65 6e 64 0d 0b b8 05  |dummy%=.send....|
000020c0  ed 0d 0b c2 87 db 3a f1  27 27 27 27 22 86 52 45  |......:.''''".RE|
000020d0  49 4e 53 45 52 54 20 53  4f 55 52 43 45 20 44 49  |INSERT SOURCE DI|
000020e0  53 43 20 41 4e 44 20 50  52 45 53 53 20 41 20 4b  |SC AND PRESS A K|
000020f0  45 59 2e 22 27 27 22 81  57 41 52 4e 49 4e 47 2e  |EY."''".WARNING.|
00002100  86 50 52 4f 47 52 41 4d  20 57 49 4c 4c 20 46 41  |.PROGRAM WILL FA|
00002110  49 4c 20 49 46 20 41 22  27 22 86 44 49 46 46 45  |IL IF A"'".DIFFE|
00002120  52 45 4e 54 20 53 4f 55  52 43 45 20 44 49 53 43  |RENT SOURCE DISC|
00002130  2f 54 52 41 43 4b 20 49  53 20 55 53 45 44 22 3a  |/TRACK IS USED":|
00002140  64 75 6d 6d 79 25 3d a5  0d 0b cc 36 21 61 64 64  |dummy%=....6!add|
00002150  72 65 73 73 25 3d 62 75  66 66 65 72 25 3a f2 73  |ress%=buffer%:.s|
00002160  65 65 6b 28 73 64 72 76  25 2c 30 29 3a f2 73 65  |eek(sdrv%,0):.se|
00002170  65 6b 28 73 64 72 76 25  2c 74 72 6b 25 29 0d 0b  |ek(sdrv%,trk%)..|
00002180  d6 29 f2 72 65 61 64 49  44 3a f2 63 68 72 65 67  |.).readID:.chreg|
00002190  69 73 74 65 72 73 28 6c  6f 67 69 74 72 6b 25 29  |isters(logitrk%)|
000021a0  3a f2 70 72 69 6e 74 0d  0b e0 05 e1 0d 0b ea 05  |:.print.........|
000021b0  20 0d 0b f4 05 20 0d 0b  fe 0f dd f2 6c 61 72 67  | .... ......larg|
000021c0  65 28 4e 25 29 0d 0c 08  20 73 74 61 72 74 73 68  |e(N%)... startsh|
000021d0  6f 77 25 3d 73 74 61 72  74 73 68 6f 77 25 2b 32  |ow%=startshow%+2|
000021e0  35 36 2a 4e 25 0d 0c 12  61 e7 20 73 74 61 72 74  |56*N%...a. start|
000021f0  73 68 6f 77 25 3c 73 65  63 74 73 74 61 72 74 25  |show%<sectstart%|
00002200  20 84 20 73 74 61 72 74  73 68 6f 77 25 3d 73 65  | . startshow%=se|
00002210  63 74 73 74 61 72 74 25  2b 73 65 63 74 73 69 7a  |ctstart%+sectsiz|
00002220  65 25 28 74 79 70 65 6e  6f 25 29 20 8c 20 6c 6f  |e%(typeno%) . lo|
00002230  67 69 73 65 63 74 25 3d  6c 6f 67 69 73 65 63 74  |gisect%=logisect|
00002240  25 2b 31 2a 4e 25 0d 0c  1c 50 e7 20 6c 6f 67 69  |%+1*N%...P. logi|
00002250  73 65 63 74 25 3e 28 6c  6f 73 65 63 74 25 2b 6e  |sect%>(losect%+n|
00002260  6f 73 65 63 74 73 25 28  74 79 70 65 6e 6f 25 29  |osects%(typeno%)|
00002270  29 20 84 20 6c 6f 67 69  73 65 63 74 25 3c 6c 6f  |) . logisect%<lo|
00002280  73 65 63 74 25 20 8c 20  f2 63 68 74 72 61 63 6b  |sect% . .chtrack|
00002290  28 4e 25 29 3a e1 0d 0c  26 3d 73 65 63 74 73 74  |(N%):...&=sectst|
000022a0  61 72 74 25 3d 62 75 66  66 65 72 25 2b 28 6c 6f  |art%=buffer%+(lo|
000022b0  67 69 73 65 63 74 25 2d  6c 6f 73 65 63 74 25 29  |gisect%-losect%)|
000022c0  2a 73 65 63 74 73 69 7a  65 25 28 74 79 70 65 6e  |*sectsize%(typen|
000022d0  6f 25 29 0d 0c 30 0a f2  70 72 69 6e 74 0d 0c 3a  |o%)..0..print..:|
000022e0  05 e1 0d 0c 44 05 20 0d  0c 4e 05 20 0d 0c 58 0a  |....D. ..N. ..X.|
000022f0  dd f2 65 64 69 74 0d 0c  62 3c e7 20 64 65 6c 65  |..edit..b<. dele|
00002300  74 65 64 25 28 6c 6f 67  69 73 65 63 74 25 2d 6c  |ted%(logisect%-l|
00002310  6f 73 65 63 74 25 29 3d  26 46 45 20 f1 22 81 53  |osect%)=&FE .".S|
00002320  45 43 54 4f 52 20 4e 4f  54 20 46 4f 55 4e 44 22  |ECTOR NOT FOUND"|
00002330  3a e1 0d 0c 6c 2d 20 e7  20 73 65 63 74 73 69 7a  |:...l- . sectsiz|
00002340  65 25 28 74 79 70 65 6e  6f 25 29 3d 31 32 38 20  |e%(typeno%)=128 |
00002350  8c 20 79 25 3d 31 32 3a  8b 20 79 25 3d 32 30 0d  |. y%=12:. y%=20.|
00002360  0c 76 37 e7 20 68 65 78  25 20 ef 32 38 2c 34 2c  |.v7. hex% .28,4,|
00002370  79 25 2c 33 38 2c 34 3a  72 78 25 3d 33 34 3a 8b  |y%,38,4:rx%=34:.|
00002380  20 ef 32 38 2c 31 32 2c  79 25 2c 32 37 2c 34 3a  | .28,12,y%,27,4:|
00002390  72 78 25 3d 31 35 0d 0c  80 0a 2a 46 58 34 2c 31  |rx%=15....*FX4,1|
000023a0  0d 0c 8a 05 f5 0d 0c 94  0b 63 68 61 72 25 3d a5  |.........char%=.|
000023b0  0d 0c 9e 14 e7 20 63 68  61 72 25 3c 3e 30 20 e5  |..... char%<>0 .|
000023c0  8d 64 5a 4c 0d 0c a8 25  20 20 20 f4 20 4f 74 68  |.dZL...%   . Oth|
000023d0  65 72 77 69 73 65 20 28  69 66 20 6e 6f 74 20 63  |erwise (if not c|
000023e0  6e 74 72 6c 2e 20 40 29  3a 0d 0c b2 1a 20 20 20  |ntrl. @):....   |
000023f0  68 65 78 25 3d ac 28 68  65 78 25 29 3a f2 70 72  |hex%=.(hex%):.pr|
00002400  69 6e 74 0d 0c bc 3a 20  20 20 e7 20 68 65 78 25  |int...:   . hex%|
00002410  20 ef 32 38 2c 34 2c 79  25 2c 33 38 2c 34 3a 72  | .28,4,y%,38,4:r|
00002420  78 25 3d 33 34 3a 8b 20  ef 32 38 2c 31 32 2c 79  |x%=34:. .28,12,y|
00002430  25 2c 32 37 2c 34 3a 72  78 25 3d 31 35 0d 0c c6  |%,27,4:rx%=15...|
00002440  0c 20 20 20 e5 8d 74 54  4c 0d 0c d0 08 20 20 20  |.   ..tTL....   |
00002450  3a 0d 0c da 20 e7 20 63  68 61 72 25 3c 31 33 35  |:... . char%<135|
00002460  20 84 63 68 61 72 25 3e  31 33 39 20 e5 8d 44 66  | .char%>139 ..Df|
00002470  4d 0d 0c e4 2c 20 20 20  f4 20 4f 74 68 65 72 77  |M...,   . Otherw|
00002480  69 73 65 20 28 69 66 20  63 75 72 73 6f 72 20 63  |ise (if cursor c|
00002490  6f 6e 74 72 6f 6c 20 63  6f 64 65 29 3a 0d 0c ee  |ontrol code):...|
000024a0  2e 20 20 20 ee 28 63 68  61 72 25 2d 31 33 34 29  |.   .(char%-134)|
000024b0  20 e5 20 8d 44 70 4d 2c  8d 64 78 4c 2c 8d 54 56  | . .DpM,.dxL,.TV|
000024c0  4d 2c 8d 54 74 4d 2c 8d  44 48 4d 0d 0c f8 16 20  |M,.TtM,.DHM.... |
000024d0  20 20 e7 20 bc 3d 30 20  80 20 b1 3d 30 20 ef 31  |  . .=0 . .=0 .1|
000024e0  30 0d 0d 02 23 20 20 20  ef 38 3a e7 20 68 65 78  |0...#   .8:. hex|
000024f0  25 20 80 28 28 b1 2b 31  29 20 83 39 3d 30 29 20  |% .((.+1) .9=0) |
00002500  8c 20 ef 38 0d 0d 0c 0c  20 20 20 e5 8d 74 54 4c  |. .8....   ..tTL|
00002510  0d 0d 16 1d 20 20 20 e7  20 bc 3d 28 79 25 2d 35  |....   . .=(y%-5|
00002520  29 20 80 20 b1 3d 72 78  25 20 ef 31 31 0d 0d 20  |) . .=rx% .11.. |
00002530  23 20 20 20 ef 39 3a e7  20 68 65 78 25 20 80 28  |#   .9:. hex% .(|
00002540  28 b1 2b 31 29 20 83 39  3d 30 29 20 8c 20 ef 39  |(.+1) .9=0) . .9|
00002550  0d 0d 2a 0c 20 20 20 e5  8d 74 54 4c 0d 0d 34 17  |..*.   ..tTL..4.|
00002560  20 20 20 e7 20 bc 3d 28  79 25 2d 35 29 20 e5 8d  |   . .=(y%-5) ..|
00002570  74 54 4c 0d 0d 3e 10 20  20 20 ef 31 30 3a e5 8d  |tTL..>.   .10:..|
00002580  74 54 4c 0d 0d 48 12 20  20 20 e7 20 bc 3d 30 20  |tTL..H.   . .=0 |
00002590  e5 8d 74 54 4c 0d 0d 52  10 20 20 20 ef 31 31 3a  |..tTL..R.   .11:|
000025a0  e5 8d 74 54 4c 0d 0d 5c  08 20 20 20 3a 0d 0d 66  |..tTL..\.   :..f|
000025b0  20 e7 20 68 65 78 25 20  f2 65 64 69 74 68 65 78  | . hex% .edithex|
000025c0  3a 20 8b f2 65 64 69 74  61 73 63 69 69 0d 0d 70  |: ..editascii..p|
000025d0  0f fd 20 63 68 61 72 25  3d 31 33 35 0d 0d 7a 11  |.. char%=135..z.|
000025e0  f2 77 69 6e 64 6f 77 28  30 2c 32 31 29 0d 0d 84  |.window(0,21)...|
000025f0  18 21 61 64 64 72 65 73  73 25 3d 73 65 63 74 73  |.!address%=sects|
00002600  74 61 72 74 25 0d 0d 8e  1b f1 22 86 57 72 69 74  |tart%.....".Writ|
00002610  65 20 6e 65 77 20 73 65  63 74 6f 72 3f 20 22 3b  |e new sector? ";|
00002620  0d 0d 98 13 e7 20 ac 28  a4 79 65 73 29 20 e5 8d  |..... .(.yes) ..|
00002630  54 78 4e 0d 0d a2 17 f1  22 86 41 52 45 20 59 4f  |TxN.....".ARE YO|
00002640  55 20 53 55 52 45 3f 20  22 3b 0d 0d ac 13 e7 20  |U SURE? ";..... |
00002650  ac 28 a4 79 65 73 29 20  e5 8d 54 78 4e 0d 0d b6  |.(.yes) ..TxN...|
00002660  30 e7 20 94 28 64 65 6c  65 74 65 64 25 28 6c 6f  |0. .(deleted%(lo|
00002670  67 69 73 65 63 74 25 2d  6c 6f 73 65 63 74 25 29  |gisect%-losect%)|
00002680  29 3c 3e 26 46 46 20 e5  8d 64 5e 4d 20 0d 0d c0  |)<>&FF ..d^M ...|
00002690  32 f1 22 81 57 41 52 4e  49 4e 47 2e 20 41 63 63  |2.".WARNING. Acc|
000026a0  75 72 61 63 79 20 75 6e  63 65 72 74 61 69 6e 22  |uracy uncertain"|
000026b0  27 22 81 43 4f 4e 54 49  4e 55 45 3f 20 22 3b 0d  |'".CONTINUE? ";.|
000026c0  0d ca 13 e7 20 ac 28 a4  79 65 73 29 20 e5 8d 54  |.... .(.yes) ..T|
000026d0  78 4e 0d 0d d4 3e 64 65  6c 65 74 65 64 25 28 6c  |xN...>deleted%(l|
000026e0  6f 67 69 73 65 63 74 25  2d 6c 6f 73 65 63 74 25  |ogisect%-losect%|
000026f0  29 3d b4 28 64 65 6c 65  74 65 64 25 28 6c 6f 67  |)=.(deleted%(log|
00002700  69 73 65 63 74 25 2d 6c  6f 73 65 63 74 25 29 29  |isect%-losect%))|
00002710  0d 0d de 3b db 3a f1 27  22 53 77 61 70 20 74 79  |...;.:.'"Swap ty|
00002720  70 65 20 28 64 65 6c 65  74 65 64 20 74 6f 20 6e  |pe (deleted to n|
00002730  6f 72 6d 61 6c 22 27 22  61 6e 64 20 76 69 63 65  |ormal"'"and vice|
00002740  20 76 65 72 73 61 29 3f  20 22 3b 0d 0d e8 45 e7  | versa)? ";...E.|
00002750  20 a4 79 65 73 20 64 65  6c 65 74 65 64 25 28 6c  | .yes deleted%(l|
00002760  6f 67 69 73 65 63 74 25  2d 6c 6f 73 65 63 74 25  |ogisect%-losect%|
00002770  29 3d 2d 31 2a 64 65 6c  65 74 65 64 25 28 6c 6f  |)=-1*deleted%(lo|
00002780  67 69 73 65 63 74 25 2d  6c 6f 73 65 63 74 25 29  |gisect%-losect%)|
00002790  0d 0d f2 18 20 20 20 20  20 20 20 74 65 6d 70 25  |....       temp%|
000027a0  3d 74 79 70 65 6e 6f 25  0d 0d fc 85 20 20 20 20  |=typeno%....    |
000027b0  20 20 20 f1 27 22 41 6c  74 65 72 20 73 69 7a 65  |   .'"Alter size|
000027c0  20 6f 66 20 73 65 63 74  6f 72 3f 20 28 4e 65 77  | of sector? (New|
000027d0  20 73 69 7a 65 20 6d 75  73 74 20 62 65 22 27 22  | size must be"'"|
000027e0  73 6d 61 6c 6c 65 72 20  74 68 61 6e 20 74 68 65  |smaller than the|
000027f0  20 6f 6c 64 2e 20 4f 6e  6c 79 20 66 69 72 73 74  | old. Only first|
00002800  20 70 61 72 74 22 27 22  6f 66 20 74 68 69 73 20  | part"'"of this |
00002810  73 65 63 74 2e 20 77 69  6c 6c 20 62 65 20 74 72  |sect. will be tr|
00002820  61 6e 73 66 65 72 72 65  64 29 3a 22 3b 0d 0e 06  |ansferred):";...|
00002830  1b 20 20 20 20 20 20 20  20 e7 20 ac 28 a4 79 65  |.        . .(.ye|
00002840  73 29 20 e5 8d 54 64 4e  0d 0e 10 39 20 20 20 20  |s) ..TdN...9    |
00002850  20 20 20 20 20 f1 22 4e  65 77 20 73 69 7a 65 20  |     ."New size |
00002860  63 6f 64 65 20 28 30 20  74 6f 20 22 3b 74 65 6d  |code (0 to ";tem|
00002870  70 25 3b 3a e8 22 29 3f  20 22 74 79 70 65 6e 6f  |p%;:.")? "typeno|
00002880  25 0d 0e 1a 31 20 20 20  20 20 20 20 20 20 e7 20  |%...1         . |
00002890  74 79 70 65 6e 6f 25 3e  74 65 6d 70 25 20 f1 22  |typeno%>temp% ."|
000028a0  50 6c 65 61 73 65 20 72  65 64 6f 22 3a e5 8d 54  |Please redo":..T|
000028b0  50 4e 0d 0e 24 63 e7 20  64 65 6c 65 74 65 64 25  |PN..$c. deleted%|
000028c0  28 6c 6f 67 69 73 65 63  74 25 2d 6c 6f 73 65 63  |(logisect%-losec|
000028d0  74 25 29 3d 31 20 8c 20  64 75 6d 6d 79 25 3d a4  |t%)=1 . dummy%=.|
000028e0  73 65 63 74 6f 72 28 6c  6f 67 69 73 65 63 74 25  |sector(logisect%|
000028f0  2c 26 34 42 29 3a 8b 20  64 75 6d 6d 79 25 3d a4  |,&4B):. dummy%=.|
00002900  73 65 63 74 6f 72 28 6c  6f 67 69 73 65 63 74 25  |sector(logisect%|
00002910  2c 26 34 46 29 0d 0e 2e  18 20 20 20 20 20 20 20  |,&4F)....       |
00002920  74 79 70 65 6e 6f 25 3d  74 65 6d 70 25 0d 0e 38  |typeno%=temp%..8|
00002930  19 db 3a f1 22 52 65 72  65 61 64 69 6e 67 20 73  |..:."Rereading s|
00002940  65 63 74 6f 72 22 0d 0e  42 36 64 65 6c 65 74 65  |ector"..B6delete|
00002950  64 25 28 6c 6f 67 69 73  65 63 74 25 2d 6c 6f 73  |d%(logisect%-los|
00002960  65 63 74 25 29 3d a4 73  65 63 74 6f 72 28 6c 6f  |ect%)=.sector(lo|
00002970  67 69 73 65 63 74 25 2c  26 35 37 29 0d 0e 4c 15  |gisect%,&57)..L.|
00002980  21 61 64 64 72 65 73 73  25 3d 62 75 66 66 65 72  |!address%=buffer|
00002990  25 0d 0e 56 0a f2 70 72  69 6e 74 0d 0e 60 05 e1  |%..V..print..`..|
000029a0  0d 0e 6a 05 20 0d 0e 74  05 20 0d 0e 7e 0f dd f2  |..j. ..t. ..~...|
000029b0  65 64 69 74 61 73 63 69  69 0d 0e 88 1e 3f 28 73  |editascii....?(s|
000029c0  74 61 72 74 73 68 6f 77  25 2b bc 2a 31 36 2b b1  |tartshow%+.*16+.|
000029d0  29 3d 63 68 61 72 25 0d  0e 92 27 20 e7 20 63 68  |)=char%...' . ch|
000029e0  61 72 25 3c 33 32 20 84  20 63 68 61 72 25 3e 31  |ar%<32 . char%>1|
000029f0  32 37 20 8c 20 63 68 61  72 25 3d 32 35 35 0d 0e  |27 . char%=255..|
00002a00  9c 14 f1 8a b1 2c bc 29  3b bd 28 63 68 61 72 25  |.....,.);.(char%|
00002a10  29 3b 0d 0e a6 10 e7 20  bc 3d 79 25 2d 34 20 ef  |);..... .=y%-4 .|
00002a20  31 31 0d 0e b0 05 e1 0d  0e ba 05 20 0d 0e c4 05  |11......... ....|
00002a30  20 0d 0e ce 0d dd f2 65  64 69 74 68 65 78 0d 0e  | ......edithex..|
00002a40  d8 25 e7 20 63 68 61 72  25 3c 97 28 22 30 22 29  |.%. char%<.("0")|
00002a50  20 84 20 63 68 61 72 25  3e 97 28 22 46 22 29 20  | . char%>.("F") |
00002a60  8c 20 e1 0d 0e e2 25 e7  20 63 68 61 72 25 3c 97  |. ....%. char%<.|
00002a70  28 22 41 22 29 20 80 20  63 68 61 72 25 3e 97 28  |("A") . char%>.(|
00002a80  22 39 22 29 20 8c 20 e1  0d 0e ec 3e e7 20 63 68  |"9") . ....>. ch|
00002a90  61 72 25 3e 3d 97 28 22  41 22 29 20 8c 20 76 61  |ar%>=.("A") . va|
00002aa0  6c 25 3d 63 68 61 72 25  2d 97 28 22 41 22 29 2b  |l%=char%-.("A")+|
00002ab0  31 30 3a 8b 20 76 61 6c  25 3d 63 68 61 72 25 2d  |10:. val%=char%-|
00002ac0  97 28 22 30 22 29 0d 0e  f6 15 e7 20 28 28 b1 2b  |.("0")..... ((.+|
00002ad0  31 29 83 39 29 3d 30 20  ef 39 20 0d 0f 00 13 73  |1).9)=0 .9 ....s|
00002ae0  70 61 63 65 73 25 3d 28  b1 2b 31 29 81 39 0d 0f  |paces%=(.+1).9..|
00002af0  0a 21 20 62 79 74 65 6e  6f 25 3d 28 bc 2a 31 36  |.! byteno%=(.*16|
00002b00  29 2b 28 b1 2d 73 70 61  63 65 73 25 29 81 32 0d  |)+(.-spaces%).2.|
00002b10  0f 14 83 20 e7 20 28 b1  2d 73 70 61 63 65 73 25  |... . (.-spaces%|
00002b20  29 83 32 3d 30 20 8c 20  73 74 61 72 74 73 68 6f  |).2=0 . startsho|
00002b30  77 25 3f 62 79 74 65 6e  6f 25 3d 28 73 74 61 72  |w%?byteno%=(star|
00002b40  74 73 68 6f 77 25 3f 62  79 74 65 6e 6f 25 20 80  |tshow%?byteno% .|
00002b50  20 26 30 46 29 2b 76 61  6c 25 2a 31 36 3a 8b 20  | &0F)+val%*16:. |
00002b60  73 74 61 72 74 73 68 6f  77 25 3f 62 79 74 65 6e  |startshow%?byten|
00002b70  6f 25 3d 28 73 74 61 72  74 73 68 6f 77 25 3f 62  |o%=(startshow%?b|
00002b80  79 74 65 6e 6f 25 20 80  20 26 46 30 29 2b 76 61  |yteno% . &F0)+va|
00002b90  6c 25 0d 0f 1e 14 f1 8a  b1 2c bc 29 3b bd 28 63  |l%.......,.);.(c|
00002ba0  68 61 72 25 29 3b 0d 0f  28 10 e7 20 bc 3e 79 25  |har%);..(.. .>y%|
00002bb0  2d 35 20 ef 31 31 0d 0f  32 05 e1 0d 0f 3c 05 20  |-5 .11..2....<. |
00002bc0  0d 0f 46 05 20 0d 0f 50  0b dd f2 65 72 72 6f 72  |..F. ..P...error|
00002bd0  0d 0f 5a 11 f2 77 69 6e  64 6f 77 28 30 2c 32 31  |..Z..window(0,21|
00002be0  29 0d 0f 64 05 f6 0d 0f  6e 12 f1 22 20 61 74 20  |)..d....n.." at |
00002bf0  6c 69 6e 65 20 22 3b 9e  0d 0f 78 1d f1 22 41 54  |line ";...x.."AT|
00002c00  54 45 4d 50 54 20 54 4f  20 43 4f 4e 54 49 4e 55  |TEMPT TO CONTINU|
00002c10  45 3f 20 22 3b 0d 0f 82  0c e7 20 a4 79 65 73 20  |E? ";..... .yes |
00002c20  e1 0d 0f 8c 09 f2 74 69  64 79 0d 0f 96 05 e1 0d  |......tidy......|
00002c30  0f a0 05 20 0d 0f aa 05  20 0d 0f b4 0f dd f2 69  |... .... ......i|
00002c40  6e 73 74 72 75 63 74 20  0d 0f be 0a ef 32 36 2c  |nstruct .....26,|
00002c50  31 32 0d 0f c8 2e 20 f1  8a 30 2c 30 29 3b 22 81  |12.... ..0,0);".|
00002c60  22 3b bd 31 35 37 3b 8a  31 32 29 3b bd 31 34 31  |";.157;.12);.141|
00002c70  3b 22 84 49 4e 53 54 52  55 43 54 49 4f 4e 53 22  |;".INSTRUCTIONS"|
00002c80  0d 0f c9 27 f1 22 81 22  3b bd 31 35 37 3b 8a 31  |...'.".";.157;.1|
00002c90  32 29 3b bd 31 34 31 3b  22 84 49 4e 53 54 52 55  |2);.141;".INSTRU|
00002ca0  43 54 49 4f 4e 53 22 0d  0f ca 0e 20 f1 22 81 22  |CTIONS".... ."."|
00002cb0  3b bd 31 35 37 0d 0f d2  24 20 f1 22 81 22 3b bd  |;.157...$ .".";.|
00002cc0  31 35 37 3b 22 84 49 86  2d 2d 2d 86 69 6e 73 74  |157;".I.---.inst|
00002cd0  72 75 63 74 69 6f 6e 73  22 0d 0f dc 24 20 f1 22  |ructions"...$ ."|
00002ce0  81 22 3b bd 31 35 37 3b  22 84 58 86 2d 2d 2d 86  |.";.157;".X.---.|
00002cf0  65 78 69 74 20 70 72 6f  67 72 61 6d 22 0d 0f e6  |exit program"...|
00002d00  2d 20 f1 22 81 22 3b bd  31 35 37 3b 22 84 53 86  |- .".";.157;".S.|
00002d10  2d 2d 2d 20 75 70 20 73  65 63 74 6f 72 2f 70 61  |--- up sector/pa|
00002d20  72 74 20 73 65 63 74 6f  72 22 0d 0f f0 2f 20 f1  |rt sector".../ .|
00002d30  22 81 22 3b bd 31 35 37  3b 22 84 44 86 2d 2d 2d  |".";.157;".D.---|
00002d40  20 64 6f 77 6e 20 73 65  63 74 6f 72 2f 70 61 72  | down sector/par|
00002d50  74 20 73 65 63 74 6f 72  22 0d 0f fa 20 20 f1 22  |t sector"...  ."|
00002d60  81 22 3b bd 31 35 37 3b  22 84 54 86 2d 2d 2d 20  |.";.157;".T.--- |
00002d70  75 70 20 74 72 61 63 6b  22 0d 10 04 22 20 f1 22  |up track"..." ."|
00002d80  81 22 3b bd 31 35 37 3b  22 84 52 86 2d 2d 2d 20  |.";.157;".R.--- |
00002d90  64 6f 77 6e 20 74 72 61  63 6b 22 0d 10 0e 28 20  |down track"...( |
00002da0  f1 22 81 22 3b bd 31 35  37 3b 22 84 50 86 2d 2d  |.".";.157;".P.--|
00002db0  2d 20 70 72 69 6e 74 20  74 72 61 63 6b 20 49 44  |- print track ID|
00002dc0  27 73 22 0d 10 18 27 20  f1 22 81 22 3b bd 31 35  |'s"...' .".";.15|
00002dd0  37 3b 22 84 30 2d 33 86  2d 20 74 6f 20 63 68 61  |7;".0-3.- to cha|
00002de0  6e 67 65 20 64 72 69 76  65 22 0d 10 22 28 20 f1  |nge drive".."( .|
00002df0  22 81 22 3b bd 31 35 37  3b 22 84 48 86 2d 2d 2d  |".";.157;".H.---|
00002e00  20 74 6f 67 67 6c 65 20  61 73 63 69 69 2f 68 65  | toggle ascii/he|
00002e10  78 22 0d 10 2c 25 20 f1  22 81 22 3b bd 31 35 37  |x"..,% .".";.157|
00002e20  3b 22 84 4a 86 2d 2d 2d  20 6a 75 6d 70 20 74 6f  |;".J.--- jump to|
00002e30  20 74 72 61 63 6b 22 0d  10 36 34 20 f1 22 81 22  | track"..64 ."."|
00002e40  3b bd 31 35 37 3b 22 84  57 86 2d 2d 2d 20 77 72  |;.157;".W.--- wr|
00002e50  69 74 65 2f 63 6f 70 79  20 74 72 61 63 6b 20 77  |ite/copy track w|
00002e60  69 74 68 20 66 6f 72 6d  61 74 22 0d 10 40 2f 20  |ith format"..@/ |
00002e70  f1 22 81 22 3b bd 31 35  37 3b 22 84 45 86 2d 2d  |.".";.157;".E.--|
00002e80  2d 20 65 64 69 74 20 73  65 63 74 6f 72 20 61 73  |- edit sector as|
00002e90  20 66 6f 6c 6c 6f 77 73  3a 22 0d 10 4a 27 20 f1  | follows:"..J' .|
00002ea0  22 81 22 3b bd 31 35 37  3b 22 86 20 20 63 75 72  |".";.157;".  cur|
00002eb0  73 6f 72 20 6b 65 79 73  20 74 6f 20 6d 6f 76 65  |sor keys to move|
00002ec0  22 0d 10 54 22 20 f1 22  81 22 3b bd 31 35 37 3b  |"..T" .".";.157;|
00002ed0  22 86 20 20 65 6e 74 65  72 20 61 6e 79 20 63 68  |".  enter any ch|
00002ee0  61 72 22 0d 10 5e 28 20  f1 22 81 22 3b bd 31 35  |ar"..^( .".";.15|
00002ef0  37 3b 22 86 20 20 28 65  78 63 65 70 74 20 63 75  |7;".  (except cu|
00002f00  72 73 6f 72 20 63 6f 64  65 73 22 0d 10 68 20 20  |rsor codes"..h  |
00002f10  f1 22 81 22 3b bd 31 35  37 3b 22 86 20 20 61 6e  |.".";.157;".  an|
00002f20  64 20 63 6e 74 72 6c 20  40 29 22 0d 10 72 23 20  |d cntrl @)"..r# |
00002f30  f1 22 81 22 3b bd 31 35  37 3b 22 86 20 20 6f 72  |.".";.157;".  or|
00002f40  20 68 65 78 20 28 30 20  74 6f 20 46 29 22 0d 10  | hex (0 to F)"..|
00002f50  7c 2f 20 f1 22 81 22 3b  bd 31 35 37 3b 22 86 20  ||/ .".";.157;". |
00002f60  20 43 6e 74 72 6c 2e 40  20 74 6f 20 74 6f 67 67  | Cntrl.@ to togg|
00002f70  6c 65 20 61 73 63 69 69  2f 68 65 78 22 0d 10 86  |le ascii/hex"...|
00002f80  35 20 f1 22 81 22 3b bd  31 35 37 3b 22 86 20 20  |5 .".";.157;".  |
00002f90  3c 63 6f 70 79 3e 20 74  6f 20 6c 65 61 76 65 20  |<copy> to leave |
00002fa0  65 64 69 74 2f 77 72 69  74 65 20 73 65 63 74 6f  |edit/write secto|
00002fb0  72 22 0d 10 8b 0e 20 f1  22 81 22 3b bd 31 35 37  |r".... .".";.157|
00002fc0  0d 10 90 2d 20 f1 22 81  22 3b bd 31 35 37 3b 8a  |...- .".";.157;.|
00002fd0  31 32 29 22 83 50 52 45  53 53 20 41 4e 59 20 4b  |12)".PRESS ANY K|
00002fe0  45 59 22 3b 3a 64 75 6d  6d 79 25 3d a5 0d 10 9a  |EY";:dummy%=....|
00002ff0  0a f2 70 72 69 6e 74 0d  10 a4 05 e1 0d ff        |..print.......|
00002ffe
27-03-89/SectEd.m0
27-03-89/SectEd.m1
27-03-89/SectEd.m2
27-03-89/SectEd.m4
27-03-89/SectEd.m5