Home » CEEFAX disks » telesoftware9.adl » 26-09-88/T\DFS07

26-09-88/T\DFS07

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 » telesoftware9.adl
Filename: 26-09-88/T\DFS07
Read OK:
File size: 7726 bytes
Load address: 0000
Exec address: FFFFFFFF
File contents
The Acorn DFS Osword commands  -  by  -  Gordon Horsington
----------------------------------------------------------

Module 7. Duplicating copy-protected single density discs
---------------------------------------------------------

      +----------------------------------------------------------+
      | All the DFS modules in  this  series  use programs which |
      | experiment  with the format and contents of discs. These |
      | experiments may  have disasterous effects if you use any |
      | of the programs  on  discs  which store programs or data |
      | which you cannot afford to lose.  You  should  first try |
      | out  the  programs  using  discs  that  have either been |
      | duplicated or, better still, have not been used at all.  |
      +----------------------------------------------------------+


This module deals with duplicating copy-protected single density discs. As
with the previous module, which dealt with producing this type of disc,
you should use the information in this module as a starting point for your
own program designs. The two disc duplication programs used to illustrate
this module will copy most, but not all, single density discs. They have
been designed simply to illustrate the techniques used to achieve this
objective and, for that reason, they are not the fastest disc duplication
programs available. The program COPYDFS is quite slow because it reads and
writes a track at a time, but the program COPYALL is even slower because
it reads and writes a sector at a time. Both programs require either 40 or
80 track dual disc drives because they copy from drive 0 to drive 1.

One of the many techniques used to copy-protect single density discs is to
include unformatted tracks on the disc. The programs which use this type
of disc then look at a particular physical track and, if they find that
the track has been formatted, they reject the disc as an illegal copy. If
formatted discs are to be used for duplicating protected software it may
be necessary to be able to de-format some tracks on the disc. This means
that when an attempt is made to read from or write to the disc a 'Sector
not found' error should be produced.

This error will be generated if an attempt is made to read from or write
to a track formatted with one sector of 2048 bytes. The program DEFORM can
be used to demonstrate this idea. DEFORM must be used with great care
because it removes track &00 from the disc in the current drive. Again,
you have been warned!


   10 REM: DEFORM
   20 osword=&FFF1
   30 DIM mcode &100
   40 FORpass=0TO3STEP3
   50 P%=mcode
   60 [       OPT pass
   70         LDA #&7F
   80         LDX #block MOD 256
   90         LDY #block DIV 256
  100         JSR osword
  110         LDA result
  120         BNE error
  130         RTS
  140 .error
  150         BRK
  160         BRK
  170         EQUS "De-format error"
  180         BRK
  190 .block
  200         EQUB &FF      \ current drive
  210         EQUD buffer   \ sector table
  220         EQUB &05      \ 5 parameters
  230         EQUB &63      \ format command
  240         EQUB &00      \ physical track
  250         EQUB &00      \ gap 3
  260         EQUB &C1      \ sectors/size
  270         EQUB &00      \ gap 5
  280         EQUB &10      \ gap 1
  290 .result
  300         EQUB &00      \ result byte
  310 .buffer
  320         EQUD &04000000
  330 ]
  340 NEXT
  350 CALL mcode


The de-formatting technique illustrated in the program DEFORM is used in
both COPYDFS and COPYALL to ensure that any unformatted tracks on the
source disc are unformatted on the destination disc even if the
destination disc has been previously formatted.

Both the copy programs use a similar algorithm to duplicate copy-protected
discs. These programs have been written to make them as easy to understand
as possible. They are both well structured and well commented and you
should make every effort to understand how they work. It is only when you
fully understand how disc duplicators work that you can design a disc
format which will defeat disc duplication programs.

The program COPYDFS uses the following algorithm to duplicate each track:


1) Seek the physical track on the source disc.

2) Read one sector ID from the physical track. If a 'Sector not Found'
   error is generated the track has not been formatted and the destination
   track should be de-formatted.

3) If the source track has been formatted, extract the number of sectors
   on the track from the data read in step 2) and read all the sector IDs
   on the track.

4) Format the destination disc using the sector ID data from step 3).

5) Read every sector on the source track using the Read Data and Deleted
   Data command and the sector ID data from step 3). Check for deleted
   data on the track.

6) If deleted data is used on the source track then use the Write Deleted
   Data command to write the data onto the destination track, otherwise
   use the Write Data command to write the data onto the destination
   track.


This simple algorithm will, somewhat surprisingly, duplicate many
commercially protected discs but it is reletively easy to design a disc
format which cannot be copied using this method. You might like to
consider what would happen if, for example, you use a mixture of deleted
and normal sectors on one track and use a !BOOT program which uses the
appropriate command to read individual sectors rather than simply use the
Read Data and Deleted Data command for all sectors. If you design a !BOOT
program which does this on a copy-protected disc, then that disc could not
be copied successfully using this algorithm. If you intend to take a
serious interest in copy-protection then your first task should be to
design a disc format which can not be copied by COPYDFS.


   10 REM: COPYDFS
   20 osnewl=&FFE7
   30 oswrch=&FFEE
   40 osword=&FFF1
   50 osbyte=&FFF4
   60 DIM table &50
   70 DIM mcode &500
   80 DIM buffer &1000
   90 FOR pass=0 TO 2 STEP 2
  100 P%=mcode
  110 [       OPT pass
  120         JSR osnewl
  130 .mainloop
  140         JSR escape    \ check escape flag
  150         JSR seek      \ seek physical tracks 0 - 40
  160         JSR firstsector \ read sector id first sector
  170         BNE notformatted \ if error then track not formatted
  180         JSR sectorids \ read all sector ids
  190         JSR format    \ format sector on drive 1
  200         JSR copytrack \ read and write sector
  210         JMP output
  220 .notformatted
  230         JSR deform    \ de-format this track
  240 .output
  250         JSR printbyte \ print track number
  260         INC physical  \ increment physical track number
  270         LDA physical  \ load physical track number
  280         CMP last      \ all done?
  290         BNE mainloop  \ if not copy next track
  300         JSR osnewl
  310         RTS           \ return to BASIC
  320 .escape
  330         LDA &FF       \ escape flag
  340         BMI pressed   \ bit 7 set if pressed
  350         RTS
  360 .pressed
  370         LDA #&7E
  380         JSR osbyte    \ acknowledge Escape
  390         BRK
  400         BRK
  410         EQUS "Escape"
  420         BRK
  430 .seek
  440         LDA physical  \ physical track number
  450         STA seekblock+7
  460         LDA #&00      \ drive 0
  470         STA seekblock \ store drive number
  480         LDA #&7F
  490         LDX #seekblock MOD 256
  500         LDY #seekblock DIV 256
  510         JSR osword
  520         LDA seekblock+8 \ result
  530         BNE seekerror \ = 0 if OK
  540         LDA #&01      \ drive 1
  550         STA seekblock \ store drive number
  560         LDA #&7F
  570         LDX #seekblock MOD 256
  580         LDY #seekblock DIV 256
  590         JSR osword
  600         LDA seekblock+8 \ result
  610         BNE seekerror \ = 0 if OK
  620         RTS
  630 .seekerror
  640         BRK
  650         BRK
  660         EQUS "Seek error"
  670         BRK
  680 .format
  690         LDA physical  \ physical track number
  700         STA formblock+7 \ store physical track
  710         LDX table+3   \ data size code
  720         LDA gap,X     \ load gap 3 for these sectors
  730         STA formblock+8 \ store for formatting
  740         LDA #&7F
  750         LDX #formblock MOD 256
  760         LDY #formblock DIV 256
  770         JSR osword
  780         LDA formblock+12 \ result
  790         BNE formerror \ = 0 if OK
  800         RTS
  810 .formerror
  820         BRK
  830         BRK
  840         EQUS "Format error"
  850         BRK
  860 .deform
  870         LDA physical  \ load physical track number
  880         STA deblock+7 \ store physical track
  890         LDA #&7F
  900         LDX #deblock MOD 256
  910         LDY #deblock DIV 256
  920         JSR osword    \ de-format track
  930         LDA deblock+12 \ result
  940         BNE deerror   \ = 0 if OK
  950         RTS
  960 .deerror
  970         BRK
  980         BRK
  990         EQUS "De-format error"
 1000         BRK
 1010 .register
 1020         STA regblock+8 \ value to put in register
 1030         LDA #&00      \ drive 0
 1040         STA regblock
 1050         LDA #&12      \ write track register 0/2
 1060         STA regblock+7 \ register number
 1070         LDA #&7F
 1080         LDX #regblock MOD 256
 1090         LDY #regblock DIV 256
 1100         JSR osword
 1110         LDA regblock+9 \ result
 1120         BNE regerror  \ = 0 if OK
 1130         LDA #&01      \ drive 1
 1140         STA regblock
 1150         LDA #&1A      \ write track register 1/3
 1160         STA regblock+7 \ register number
 1170         LDA #&7F
 1180         LDX #regblock MOD 256
 1190         LDY #regblock DIV 256
 1200         JSR osword
 1210         LDA regblock+9 \ result
 1220         BNE regerror  \ = 0 if OK
 1230         RTS
 1240 .regerror
 1250         BRK
 1260         BRK
 1270         EQUS "Special register error"
 1280         BRK
 1290 .firstsector
 1300         LDA physical  \ physical track number
 1310         STA idsblock+7 \ store physical track
 1320         LDA #&01      \ one sector
 1330         STA idsblock+9 \ number of ids
 1340         LDA #&7F
 1350         LDX #idsblock MOD 256
 1360         LDY #idsblock DIV 256
 1370         JSR osword
 1380         LDA idsblock+10 \ result
 1390         AND #&1E      \ = 0 if formatted
 1400         RTS
 1410 .sectorids
 1420         LDX table+3   \ load data size code
 1430         LDA sizes,X   \ load number of sectors
 1440         STA idsblock+9 \ store number of sectors
 1450         ASL A         \ *2
 1460         ASL A         \ *4
 1470         SEC
 1480         SBC #&04      \ sectors*4-4
 1490         STA sectornumber \ store index on sectors
 1500         TXA           \ transfer data size code
 1510         ASL A         \ *2
 1520         ASL A         \ *4
 1530         ASL A         \ *8
 1540         ASL A         \ *16
 1550         ASL A         \ *32
 1560         ORA idsblock+9 \ add number of sectors
 1570         STA copyblock+9 \ sector size/number
 1580         STA formblock+9 \ sector size/number
 1590         LDA #&7F
 1600         LDX #idsblock MOD 256
 1610         LDY #idsblock DIV 256
 1620         JSR osword
 1630         LDA idsblock+10 \ result
 1640         AND #&1E
 1650         BNE idserror  \ = 0 if OK
 1660         RTS
 1670 .idserror
 1680         BRK
 1690         BRK
 1700         EQUS "Sector ID Error"
 1710         BRK
 1720 .copytrack
 1730         LDX sectornumber \ load index on table
 1740         LDA table+2,X \ load logical sector number
 1750         STA copyblock+8 \ store for read sector
 1760 .lowest
 1770         DEX
 1780         DEX
 1790         DEX
 1800         DEX
 1810         BMI finished
 1820         LDA table+2,X \ load logical sector number
 1830         CMP copyblock+8 \ is it lower than the last one?
 1840         BCS lowest    \ branch if not lowest sector
 1850         STA copyblock+8 \ store if it is lower
 1860         BCC lowest    \ look for lower sector number
 1870 .finished
 1880         LDA table     \ load logical track number
 1890         STA copyblock+7 \ and store for read
 1900         JSR register  \ write track register
 1910         LDA #&00      \ drive 0
 1920         STA copyblock
 1930         LDA #&57      \ read sector command
 1940         STA copyblock+6
 1950         LDA #&7F
 1960         LDX #copyblock MOD 256
 1970         LDY #copyblock DIV 256
 1980         JSR osword
 1990         LDA copyblock+10 \ result
 2000         BEQ notdel    \ not deleted data
 2010         CMP #&20      \ deleted data result
 2020         BNE readerror \ error if not &20
 2030         LDA #&4F      \ write deleted data command
 2040         BNE savecom
 2050 .notdel
 2060         LDA #&4B      \ write data command
 2070 .savecom
 2080         STA copyblock+6
 2090         LDA #&01      \ drive 1
 2100         STA copyblock
 2110         LDA #&7F
 2120         LDX #copyblock MOD 256
 2130         LDY #copyblock DIV 256
 2140         JSR osword
 2150         LDA copyblock+10 \ result
 2160         BNE writeerror \ = 0 if OK
 2170         LDA physical
 2180         JSR register  \ write track register
 2190         RTS
 2200 .readerror
 2210         LDA physical
 2220         JSR register
 2230         BRK
 2240         BRK
 2250         EQUS "Read error"
 2260         BRK
 2270 .writeerror
 2280         LDA physical
 2290         JSR register
 2300         BRK
 2310         BRK
 2320         EQUS "Write error"
 2330         BRK
 2340 .printbyte
 2350         LDA physical  \ print physical track number
 2360         PHA
 2370         LSR A
 2380         LSR A
 2390         LSR A
 2400         LSR A
 2410         JSR nybble    \ print MS nybble
 2420         PLA
 2430         JSR nybble    \ print LS nybble
 2440         LDA #ASC(" ")
 2450         JSR oswrch    \ print space
 2460         JMP oswrch    \ print space and return
 2470 .nybble
 2480         AND #&0F
 2490         SED
 2500         CLC
 2510         ADC #&90
 2520         ADC #&40
 2530         CLD
 2540         JMP oswrch    \ print nybble and return
 2550 .seekblock
 2560         EQUB &00      \ drive 0/1
 2570         EQUD &00      \ does not matter
 2580         EQUB &01      \ 1 parameter
 2590         EQUB &69      \ seek command
 2600         EQUB &00      \ physical track number
 2610         EQUB &00      \ result byte
 2620 .regblock
 2630         EQUB &00      \ drive 0/1
 2640         EQUD &00      \ does not matter
 2650         EQUB &02      \ 2 parameters
 2660         EQUB &7A      \ write special register
 2670         EQUB &00      \ register number
 2680         EQUB &00      \ value to put in register
 2690         EQUB &00      \ result byte
 2700 .idsblock
 2710         EQUB &00      \ drive 0
 2720         EQUD table    \ address of buffer
 2730         EQUB &03      \ 3 parameters
 2740         EQUB &5B      \ read sector IDs command
 2750         EQUB &00      \ physical track number
 2760         EQUB &00      \ always &00
 2770         EQUB &00      \ number of IDs to be read
 2780         EQUB &00      \ result byte
 2790 .copyblock
 2800         EQUB &00      \ drive 0/1
 2810         EQUD buffer   \ address of buffer
 2820         EQUB &03      \ 3 parameters
 2830         EQUB &57      \ read data and deleted data
 2840         EQUB &00      \ logical track number
 2850         EQUB &00      \ logical sector number
 2860         EQUB &00      \ sector size/number
 2870         EQUB &00      \ result byte
 2880 .formblock
 2890         EQUB &01      \ drive 1
 2900         EQUD table    \ sector table
 2910         EQUB &05      \ 5 parameters
 2920         EQUB &63      \ format track command
 2930         EQUB &00      \ physical track number
 2940         EQUB &00      \ gap 3 size
 2950         EQUB &00      \ sector size/number
 2960         EQUB &00      \ gap 5 size
 2970         EQUB &10      \ gap 1 size
 2980         EQUB &00      \ result byte
 2990 .deblock
 3000         EQUB &01      \ drive 1
 3010         EQUD detable  \ sector table
 3020         EQUB &05      \ 5 parameters
 3030         EQUB &63      \ format track command
 3040         EQUB &00      \ physical track number
 3050         EQUB &00      \ gap 3 size
 3060         EQUB &C1      \ sector size/number
 3070         EQUB &00      \ gap 5 size
 3080         EQUB &10      \ gap 1 size
 3090         EQUB &00      \ result byte
 3100 .detable
 3110         EQUD &04000000
 3120 .gap
 3130         EQUB 11       \ Gap 3, 18 sectors
 3140         EQUB 21       \ Gap 3, 10 sectors
 3150         EQUB 74       \ Gap 3, 5 sectors
 3160         EQUB 255      \ Gap 3, 2 sectors
 3170         EQUB 0        \ Gap 3, 1 sector
 3180 .sizes
 3190         EQUB 18
 3200         EQUB 10
 3210         EQUB 5
 3220         EQUB 2
 3230         EQUB 1
 3240 .physical
 3250         EQUB &00
 3260 .sectornumber
 3270         EQUB &00
 3280 .last
 3290         EQUB &00
 3300 ]
 3310 NEXT
 3320 INPUT'"Number of tracks (40/80) "tracks$
 3330 IF tracks$="40" ?last=40 ELSE ?last=80
 3340 PRINT'"Insert ";?last;" track source disc in :0"
 3350 PRINT"Insert ";?last;" track destination disc in :1"
 3360 PRINT'"Press Spacebar to copy from :0 to :1"
 3370 REPEAT
 3380 UNTIL GET=32
 3390 CALL mcode


When you have designed a disc format and a data storage and retrievel
system which cannot be copied with COPYDFS you should attempt to copy the
disc using COPYALL. This program uses a similar algorithm to that used by
COPYDFS but, instead of copying a track at a time, it attempts to copy the
disc a sector at a time. This method of copying takes much longer but it
does allow the program to check if deleted data is being used on an
individual sector rather than on a track as a whole. This will give a
better copy of the original disc but it is not a fool-proof method of
duplicating 'difficult' discs.

When you start to think about designing a disc format which can not be
copied by COPYALL I suggest that you should think carefully about using
unusual logical track and sector combinations in unusual or unexpected
ways. I cannot tell you what to do because everyone else who reads this
module will then know what you have done. You can not make a disc
unhackable (if there is such a word) but it is possible to make a disc
uncopyable by either of these programs or any of the commercial disc
duplication programs available at the time of writing (November 1987). All
the information you need to do it has been presented in these DFS modules.
You will have to look carefully at the information provided and think hard
about what a program would need to do to duplicate your disc.


   10 REM: COPYALL
   20 osnewl=&FFE7
   30 oswrch=&FFEE
   40 osword=&FFF1
   50 osbyte=&FFF4
   60 DIM table &50
   70 DIM mcode &500
   80 DIM buffer &1000
   90 FOR pass=0 TO 2 STEP 2
  100 P%=mcode
  110 [       OPT pass
  120         JSR osnewl
  130 .mainloop
  140         JSR escape    \ check escape flag
  150         JSR seek      \ seek physical tracks 0 - 40
  160         JSR firstsector \ read sector id first sector
  170         BNE notformatted \ if error then track not formatted
  180         JSR sectorids \ read all sector ids
  190         JSR format    \ format sector on drive 1
  200 .loopsector
  210         JSR escape    \ check escape flag
  220         JSR copysector \ read and write sector
  230         BPL loopsector \ copy next sector
  240         LDA physical  \ physical track number
  250         JSR register  \ write track register
  260         JMP output
  270 .notformatted
  280         JSR deform    \ de-format this track
  290 .output
  300         JSR printbyte \ print track number
  310         INC physical  \ increment physical track number
  320         LDA physical  \ load physical track number
  330         CMP last      \ all done?
  340         BNE mainloop  \ if not copy next track
  350         JSR osnewl
  360         RTS           \ return to BASIC
  370 .escape
  380         LDA &FF       \ escape flag
  390         BMI pressed   \ bit 7 set if pressed
  400         RTS
  410 .pressed
  420         LDA #&7E
  430         JSR osbyte    \ acknowledge Escape
  440         BRK
  450         BRK
  460         EQUS "Escape"
  470         BRK
  480 .seek
  490         LDA physical  \ physical track number
  500         STA seekblock+7
  510         LDA #&00      \ drive 0
  520         STA seekblock \ store drive number
  530         LDA #&7F
  540         LDX #seekblock MOD 256
  550         LDY #seekblock DIV 256
  560         JSR osword
  570         LDA seekblock+8 \ result
  580         BNE seekerror \ = 0 if OK
  590         LDA #&01      \ drive 1
  600         STA seekblock \ store drive number
  610         LDA #&7F
  620         LDX #seekblock MOD 256
  630         LDY #seekblock DIV 256
  640         JSR osword
  650         LDA seekblock+8 \ result
  660         BNE seekerror \ = 0 if OK
  670         RTS
  680 .seekerror
  690         BRK
  700         BRK
  710         EQUS "Seek error"
  720         BRK
  730 .format
  740         LDA physical  \ physical track number
  750         STA formblock+7 \ store physical track
  760         LDA table+3   \ data size code
  770         TAX           \ used as index later
  780         ASL A         \ *2
  790         ASL A         \ *4
  800         ASL A         \ *8
  810         ASL A         \ *16
  820         ASL A         \ *32
  830         STA formblock+9 \ store datacode*32
  840         ORA #&01      \ add 1
  850         STA copyblock+9 \ store datacode*32+1
  860         LDA sizes,X   \ load number of sectors
  870         ORA formblock+9 \ add datacode*32
  880         STA formblock+9 \ store datacode*32+numbersectors
  890         LDA gap,X     \ load gap 3 for these sectors
  900         STA formblock+8 \ store for formatting
  910         LDA #&7F
  920         LDX #formblock MOD 256
  930         LDY #formblock DIV 256
  940         JSR osword
  950         LDA formblock+12 \ result
  960         BNE formerror \ = 0 if OK
  970         LDX table+3   \ load data size code
  980         LDA sizes,X   \ load number of sectors
  990         ASL A         \ *2
 1000         ASL A         \ *4
 1010         SEC
 1020         SBC #&04      \ sectors*4-4
 1030         STA sectornumber \ store index on sectors
 1040         RTS
 1050 .formerror
 1060         BRK
 1070         BRK
 1080         EQUS "Format error"
 1090         BRK
 1100 .deform
 1110         LDA physical  \ load physical track number
 1120         STA deblock+7 \ store physical track
 1130         LDA #&7F
 1140         LDX #deblock MOD 256
 1150         LDY #deblock DIV 256
 1160         JSR osword    \ de-format track
 1170         LDA deblock+12 \ result
 1180         BNE deerror   \ = 0 if OK
 1190         RTS
 1200 .deerror
 1210         BRK
 1220         BRK
 1230         EQUS "De-format error"
 1240         BRK
 1250 .register
 1260         STA regblock+8 \ value to put in register
 1270         LDA #&00      \ drive 0
 1280         STA regblock
 1290         LDA #&12      \ write track register 0/2
 1300         STA regblock+7 \ register number
 1310         LDA #&7F
 1320         LDX #regblock MOD 256
 1330         LDY #regblock DIV 256
 1340         JSR osword
 1350         LDA regblock+9 \ result
 1360         BNE regerror  \ = 0 if OK
 1370         LDA #&01      \ drive 1
 1380         STA regblock
 1390         LDA #&1A      \ write track register 1/3
 1400         STA regblock+7 \ register number
 1410         LDA #&7F
 1420         LDX #regblock MOD 256
 1430         LDY #regblock DIV 256
 1440         JSR osword
 1450         LDA regblock+9 \ result
 1460         BNE regerror  \ = 0 if OK
 1470         RTS
 1480 .regerror
 1490         BRK
 1500         BRK
 1510         EQUS "Special register error"
 1520         BRK
 1530 .firstsector
 1540         LDA physical  \ physical track number
 1550         STA idsblock+7 \ store physical track
 1560         LDA #&01      \ one sector
 1570         STA idsblock+9 \ number of ids
 1580         LDA #&7F
 1590         LDX #idsblock MOD 256
 1600         LDY #idsblock DIV 256
 1610         JSR osword
 1620         LDA idsblock+10 \ result
 1630         AND #&1E      \ = 0 if formatted
 1640         RTS
 1650 .sectorids
 1660         LDX table+3   \ load data size code
 1670         LDA sizes,X   \ load number of sectors
 1680         STA idsblock+9 \ store number of sectors
 1690         LDA #&7F
 1700         LDX #idsblock MOD 256
 1710         LDY #idsblock DIV 256
 1720         JSR osword
 1730         LDA idsblock+10 \ result
 1740         AND #&1E
 1750         BNE idserror  \ = 0 if OK
 1760         RTS
 1770 .idserror
 1780         BRK
 1790         BRK
 1800         EQUS "Sector ID Error"
 1810         BRK
 1820 .copysector
 1830         LDX sectornumber \ load index on table
 1840         LDA table+2,X \ load logical sector number
 1850         STA copyblock+8 \ store for read sector
 1860         LDA table,X   \ load logical track number
 1870         STA copyblock+7 \ and store for read
 1880         JSR register  \ write track register
 1890         LDA #&00      \ drive 0
 1900         STA copyblock
 1910         LDA #&57      \ read sector command
 1920         STA copyblock+6
 1930         LDA #&7F
 1940         LDX #copyblock MOD 256
 1950         LDY #copyblock DIV 256
 1960         JSR osword
 1970         LDA copyblock+10
 1980         BEQ notdel    \ not deleted data
 1990         CMP #&20      \ deleted data result
 2000         BNE readerror \ error if not &20
 2010         LDA #&4F      \ write deleted data command
 2020         BNE savecom
 2030 .notdel
 2040         LDA #&4B      \ write data command
 2050 .savecom
 2060         STA copyblock+6
 2070         LDA #&01      \ drive 1
 2080         STA copyblock
 2090         LDA #&7F
 2100         LDX #copyblock MOD 256
 2110         LDY #copyblock DIV 256
 2120         JSR osword
 2130         LDA copyblock+10 \ result
 2140         BNE writeerror \ = 0 if OK
 2150         SEC
 2160         LDA sectornumber \ sector index on table
 2170         SBC #&04
 2180         STA sectornumber \ index=index-4
 2190         RTS
 2200 .readerror
 2210         LDA physical  \ physical track number
 2220         JSR register  \ write track register
 2230         BRK
 2240         BRK
 2250         EQUS "Read error"
 2260         BRK
 2270 .writeerror
 2280         LDA physical  \ physical track number
 2290         JSR register  \ write track register
 2300         BRK
 2310         BRK
 2320         EQUS "Write error"
 2330         BRK
 2340 .printbyte
 2350         LDA physical  \ print physical track number
 2360         PHA
 2370         LSR A
 2380         LSR A
 2390         LSR A
 2400         LSR A
 2410         JSR nybble    \ print MS nybble
 2420         PLA
 2430         JSR nybble    \ print LS nybble
 2440         LDA #ASC(" ")
 2450         JSR oswrch    \ print space
 2460         JMP oswrch    \ print space and return
 2470 .nybble
 2480         AND #&0F
 2490         SED
 2500         CLC
 2510         ADC #&90
 2520         ADC #&40
 2530         CLD
 2540         JMP oswrch    \ print nybble and return
 2550 .seekblock
 2560         EQUB &00      \ drive 0/1
 2570         EQUD &00      \ does not matter
 2580         EQUB &01      \ 1 parameter
 2582         EQUB &69      \ seek command
 2584         EQUB &00      \ physical track number
 2586         EQUB &00      \ result byte
 2590 .regblock
 2600         EQUB &00      \ drive 0/1
 2610         EQUD &00      \ does not matter
 2620         EQUB &02      \ 2 parameters
 2622         EQUB &7A      \ write special register
 2624         EQUB &00      \ register number
 2626         EQUB &00      \ value to put in register
 2630         EQUB &00      \ result byte
 2640 .idsblock
 2650         EQUB &00      \ drive 0
 2660         EQUD table    \ address of buffer
 2670         EQUB &03      \ 3 parameters
 2672         EQUB &5B      \ read sector IDs
 2674         EQUB &00      \ physical track number
 2676         EQUB &00      \ always &00
 2678         EQUB &00      \ number of IDs to be read
 2680         EQUB &00      \ result byte
 2690 .copyblock
 2700         EQUB &00      \ drive 0/1
 2710         EQUD buffer   \ address of buffer
 2720         EQUB &03      \ 3 parameters
 2722         EQUB &57      \ read data and deleted data
 2724         EQUB &00      \ logical track number
 2726         EQUB &00      \ logical sector number
 2728         EQUB &00      \ sector size/number
 2730         EQUB &00      \ result byte
 2740 .formblock
 2750         EQUB &01      \ drive 1
 2760         EQUD table    \ sector table
 2770         EQUB &05      \ 5 parameters
 2772         EQUB &63      \ format track command
 2774         EQUB &00      \ physical track number
 2776         EQUB &00      \ gap 3 size
 2778         EQUB &00      \ sector size/number
 2780         EQUB &00      \ gap 5 size
 2782         EQUB &10      \ gap 1 size
 2784         EQUB &00      \ result byte
 2790 .deblock
 2800         EQUB &01      \ drive 1
 2810         EQUD detable  \ sector table
 2820         EQUB &05      \ 5 parameters
 2822         EQUB &63      \ format track command
 2824         EQUB &00      \ physical track number
 2826         EQUB &00      \ gap 3 size
 2828         EQUB &C1      \ sector size/number
 2830         EQUB &00      \ gap 5 size
 2832         EQUB &10      \ gap 1 size
 2834         EQUB &00      \ result byte
 2840 .detable
 2850         EQUD &04000000
 2860 .gap
 2870         EQUB 11       \ Gap 3, 18 sectors
 2880         EQUB 21       \ Gap 3, 10 sectors
 2890         EQUB 74       \ Gap 3, 5 sectors
 2900         EQUB 255      \ Gap 3, 2 sectors
 2910         EQUB 0        \ Gap 3, 1 sector
 2920 .sizes
 2930         EQUB 18
 2940         EQUB 10
 2950         EQUB 5
 2960         EQUB 2
 2970         EQUB 1
 2980 .physical
 2990         EQUB &00
 3000 .sectornumber
 3010         EQUB &00
 3020 .last
 3030         EQUB &00
 3040 ]
 3050 NEXT
 3060 INPUT'"Number of tracks (40/80) "tracks$
 3070 IF tracks$="40" ?last=40 ELSE ?last=80
 3080 PRINT'"Insert ";?last;" track source disc in :0"
 3090 PRINT"Insert ";?last;" track destination disc in :1"
 3100 PRINT'"Press Spacebar to copy from :0 to :1"
 3110 REPEAT
 3120 UNTIL GET=32
 3130 CALL mcode
00000000  54 68 65 20 41 63 6f 72  6e 20 44 46 53 20 4f 73  |The Acorn DFS Os|
00000010  77 6f 72 64 20 63 6f 6d  6d 61 6e 64 73 20 20 2d  |word commands  -|
00000020  20 20 62 79 20 20 2d 20  20 47 6f 72 64 6f 6e 20  |  by  -  Gordon |
00000030  48 6f 72 73 69 6e 67 74  6f 6e 0d 2d 2d 2d 2d 2d  |Horsington.-----|
00000040  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00000070  2d 2d 2d 2d 2d 0d 0d 4d  6f 64 75 6c 65 20 37 2e  |-----..Module 7.|
00000080  20 44 75 70 6c 69 63 61  74 69 6e 67 20 63 6f 70  | Duplicating cop|
00000090  79 2d 70 72 6f 74 65 63  74 65 64 20 73 69 6e 67  |y-protected sing|
000000a0  6c 65 20 64 65 6e 73 69  74 79 20 64 69 73 63 73  |le density discs|
000000b0  0d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |.---------------|
000000c0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
000000e0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 0d 0d 20 20 20 20  |----------..    |
000000f0  20 20 2b 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |  +-------------|
00000100  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00000120  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2b 0d 20  |-------------+. |
00000130  20 20 20 20 20 7c 20 41  6c 6c 20 74 68 65 20 44  |     | All the D|
00000140  46 53 20 6d 6f 64 75 6c  65 73 20 69 6e 20 20 74  |FS modules in  t|
00000150  68 69 73 20 20 73 65 72  69 65 73 20 20 75 73 65  |his  series  use|
00000160  20 70 72 6f 67 72 61 6d  73 20 77 68 69 63 68 20  | programs which |
00000170  7c 0d 20 20 20 20 20 20  7c 20 65 78 70 65 72 69  ||.      | experi|
00000180  6d 65 6e 74 20 20 77 69  74 68 20 74 68 65 20 66  |ment  with the f|
00000190  6f 72 6d 61 74 20 61 6e  64 20 63 6f 6e 74 65 6e  |ormat and conten|
000001a0  74 73 20 6f 66 20 64 69  73 63 73 2e 20 54 68 65  |ts of discs. The|
000001b0  73 65 20 7c 0d 20 20 20  20 20 20 7c 20 65 78 70  |se |.      | exp|
000001c0  65 72 69 6d 65 6e 74 73  20 6d 61 79 20 20 68 61  |eriments may  ha|
000001d0  76 65 20 64 69 73 61 73  74 65 72 6f 75 73 20 65  |ve disasterous e|
000001e0  66 66 65 63 74 73 20 69  66 20 79 6f 75 20 75 73  |ffects if you us|
000001f0  65 20 61 6e 79 20 7c 0d  20 20 20 20 20 20 7c 20  |e any |.      | |
00000200  6f 66 20 74 68 65 20 70  72 6f 67 72 61 6d 73 20  |of the programs |
00000210  20 6f 6e 20 20 64 69 73  63 73 20 20 77 68 69 63  | on  discs  whic|
00000220  68 20 73 74 6f 72 65 20  70 72 6f 67 72 61 6d 73  |h store programs|
00000230  20 6f 72 20 64 61 74 61  20 7c 0d 20 20 20 20 20  | or data |.     |
00000240  20 7c 20 77 68 69 63 68  20 79 6f 75 20 63 61 6e  | | which you can|
00000250  6e 6f 74 20 61 66 66 6f  72 64 20 74 6f 20 6c 6f  |not afford to lo|
00000260  73 65 2e 20 20 59 6f 75  20 20 73 68 6f 75 6c 64  |se.  You  should|
00000270  20 20 66 69 72 73 74 20  74 72 79 20 7c 0d 20 20  |  first try |.  |
00000280  20 20 20 20 7c 20 6f 75  74 20 20 74 68 65 20 20  |    | out  the  |
00000290  70 72 6f 67 72 61 6d 73  20 20 75 73 69 6e 67 20  |programs  using |
000002a0  20 64 69 73 63 73 20 20  74 68 61 74 20 20 68 61  | discs  that  ha|
000002b0  76 65 20 65 69 74 68 65  72 20 62 65 65 6e 20 7c  |ve either been ||
000002c0  0d 20 20 20 20 20 20 7c  20 64 75 70 6c 69 63 61  |.      | duplica|
000002d0  74 65 64 20 6f 72 2c 20  62 65 74 74 65 72 20 73  |ted or, better s|
000002e0  74 69 6c 6c 2c 20 68 61  76 65 20 6e 6f 74 20 62  |till, have not b|
000002f0  65 65 6e 20 75 73 65 64  20 61 74 20 61 6c 6c 2e  |een used at all.|
00000300  20 20 7c 0d 20 20 20 20  20 20 2b 2d 2d 2d 2d 2d  |  |.      +-----|
00000310  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00000340  2d 2d 2d 2d 2d 2b 0d 0d  0d 54 68 69 73 20 6d 6f  |-----+...This mo|
00000350  64 75 6c 65 20 64 65 61  6c 73 20 77 69 74 68 20  |dule deals with |
00000360  64 75 70 6c 69 63 61 74  69 6e 67 20 63 6f 70 79  |duplicating copy|
00000370  2d 70 72 6f 74 65 63 74  65 64 20 73 69 6e 67 6c  |-protected singl|
00000380  65 20 64 65 6e 73 69 74  79 20 64 69 73 63 73 2e  |e density discs.|
00000390  20 41 73 0d 77 69 74 68  20 74 68 65 20 70 72 65  | As.with the pre|
000003a0  76 69 6f 75 73 20 6d 6f  64 75 6c 65 2c 20 77 68  |vious module, wh|
000003b0  69 63 68 20 64 65 61 6c  74 20 77 69 74 68 20 70  |ich dealt with p|
000003c0  72 6f 64 75 63 69 6e 67  20 74 68 69 73 20 74 79  |roducing this ty|
000003d0  70 65 20 6f 66 20 64 69  73 63 2c 0d 79 6f 75 20  |pe of disc,.you |
000003e0  73 68 6f 75 6c 64 20 75  73 65 20 74 68 65 20 69  |should use the i|
000003f0  6e 66 6f 72 6d 61 74 69  6f 6e 20 69 6e 20 74 68  |nformation in th|
00000400  69 73 20 6d 6f 64 75 6c  65 20 61 73 20 61 20 73  |is module as a s|
00000410  74 61 72 74 69 6e 67 20  70 6f 69 6e 74 20 66 6f  |tarting point fo|
00000420  72 20 79 6f 75 72 0d 6f  77 6e 20 70 72 6f 67 72  |r your.own progr|
00000430  61 6d 20 64 65 73 69 67  6e 73 2e 20 54 68 65 20  |am designs. The |
00000440  74 77 6f 20 64 69 73 63  20 64 75 70 6c 69 63 61  |two disc duplica|
00000450  74 69 6f 6e 20 70 72 6f  67 72 61 6d 73 20 75 73  |tion programs us|
00000460  65 64 20 74 6f 20 69 6c  6c 75 73 74 72 61 74 65  |ed to illustrate|
00000470  0d 74 68 69 73 20 6d 6f  64 75 6c 65 20 77 69 6c  |.this module wil|
00000480  6c 20 63 6f 70 79 20 6d  6f 73 74 2c 20 62 75 74  |l copy most, but|
00000490  20 6e 6f 74 20 61 6c 6c  2c 20 73 69 6e 67 6c 65  | not all, single|
000004a0  20 64 65 6e 73 69 74 79  20 64 69 73 63 73 2e 20  | density discs. |
000004b0  54 68 65 79 20 68 61 76  65 0d 62 65 65 6e 20 64  |They have.been d|
000004c0  65 73 69 67 6e 65 64 20  73 69 6d 70 6c 79 20 74  |esigned simply t|
000004d0  6f 20 69 6c 6c 75 73 74  72 61 74 65 20 74 68 65  |o illustrate the|
000004e0  20 74 65 63 68 6e 69 71  75 65 73 20 75 73 65 64  | techniques used|
000004f0  20 74 6f 20 61 63 68 69  65 76 65 20 74 68 69 73  | to achieve this|
00000500  0d 6f 62 6a 65 63 74 69  76 65 20 61 6e 64 2c 20  |.objective and, |
00000510  66 6f 72 20 74 68 61 74  20 72 65 61 73 6f 6e 2c  |for that reason,|
00000520  20 74 68 65 79 20 61 72  65 20 6e 6f 74 20 74 68  | they are not th|
00000530  65 20 66 61 73 74 65 73  74 20 64 69 73 63 20 64  |e fastest disc d|
00000540  75 70 6c 69 63 61 74 69  6f 6e 0d 70 72 6f 67 72  |uplication.progr|
00000550  61 6d 73 20 61 76 61 69  6c 61 62 6c 65 2e 20 54  |ams available. T|
00000560  68 65 20 70 72 6f 67 72  61 6d 20 43 4f 50 59 44  |he program COPYD|
00000570  46 53 20 69 73 20 71 75  69 74 65 20 73 6c 6f 77  |FS is quite slow|
00000580  20 62 65 63 61 75 73 65  20 69 74 20 72 65 61 64  | because it read|
00000590  73 20 61 6e 64 0d 77 72  69 74 65 73 20 61 20 74  |s and.writes a t|
000005a0  72 61 63 6b 20 61 74 20  61 20 74 69 6d 65 2c 20  |rack at a time, |
000005b0  62 75 74 20 74 68 65 20  70 72 6f 67 72 61 6d 20  |but the program |
000005c0  43 4f 50 59 41 4c 4c 20  69 73 20 65 76 65 6e 20  |COPYALL is even |
000005d0  73 6c 6f 77 65 72 20 62  65 63 61 75 73 65 0d 69  |slower because.i|
000005e0  74 20 72 65 61 64 73 20  61 6e 64 20 77 72 69 74  |t reads and writ|
000005f0  65 73 20 61 20 73 65 63  74 6f 72 20 61 74 20 61  |es a sector at a|
00000600  20 74 69 6d 65 2e 20 42  6f 74 68 20 70 72 6f 67  | time. Both prog|
00000610  72 61 6d 73 20 72 65 71  75 69 72 65 20 65 69 74  |rams require eit|
00000620  68 65 72 20 34 30 20 6f  72 0d 38 30 20 74 72 61  |her 40 or.80 tra|
00000630  63 6b 20 64 75 61 6c 20  64 69 73 63 20 64 72 69  |ck dual disc dri|
00000640  76 65 73 20 62 65 63 61  75 73 65 20 74 68 65 79  |ves because they|
00000650  20 63 6f 70 79 20 66 72  6f 6d 20 64 72 69 76 65  | copy from drive|
00000660  20 30 20 74 6f 20 64 72  69 76 65 20 31 2e 0d 0d  | 0 to drive 1...|
00000670  4f 6e 65 20 6f 66 20 74  68 65 20 6d 61 6e 79 20  |One of the many |
00000680  74 65 63 68 6e 69 71 75  65 73 20 75 73 65 64 20  |techniques used |
00000690  74 6f 20 63 6f 70 79 2d  70 72 6f 74 65 63 74 20  |to copy-protect |
000006a0  73 69 6e 67 6c 65 20 64  65 6e 73 69 74 79 20 64  |single density d|
000006b0  69 73 63 73 20 69 73 20  74 6f 0d 69 6e 63 6c 75  |iscs is to.inclu|
000006c0  64 65 20 75 6e 66 6f 72  6d 61 74 74 65 64 20 74  |de unformatted t|
000006d0  72 61 63 6b 73 20 6f 6e  20 74 68 65 20 64 69 73  |racks on the dis|
000006e0  63 2e 20 54 68 65 20 70  72 6f 67 72 61 6d 73 20  |c. The programs |
000006f0  77 68 69 63 68 20 75 73  65 20 74 68 69 73 20 74  |which use this t|
00000700  79 70 65 0d 6f 66 20 64  69 73 63 20 74 68 65 6e  |ype.of disc then|
00000710  20 6c 6f 6f 6b 20 61 74  20 61 20 70 61 72 74 69  | look at a parti|
00000720  63 75 6c 61 72 20 70 68  79 73 69 63 61 6c 20 74  |cular physical t|
00000730  72 61 63 6b 20 61 6e 64  2c 20 69 66 20 74 68 65  |rack and, if the|
00000740  79 20 66 69 6e 64 20 74  68 61 74 0d 74 68 65 20  |y find that.the |
00000750  74 72 61 63 6b 20 68 61  73 20 62 65 65 6e 20 66  |track has been f|
00000760  6f 72 6d 61 74 74 65 64  2c 20 74 68 65 79 20 72  |ormatted, they r|
00000770  65 6a 65 63 74 20 74 68  65 20 64 69 73 63 20 61  |eject the disc a|
00000780  73 20 61 6e 20 69 6c 6c  65 67 61 6c 20 63 6f 70  |s an illegal cop|
00000790  79 2e 20 49 66 0d 66 6f  72 6d 61 74 74 65 64 20  |y. If.formatted |
000007a0  64 69 73 63 73 20 61 72  65 20 74 6f 20 62 65 20  |discs are to be |
000007b0  75 73 65 64 20 66 6f 72  20 64 75 70 6c 69 63 61  |used for duplica|
000007c0  74 69 6e 67 20 70 72 6f  74 65 63 74 65 64 20 73  |ting protected s|
000007d0  6f 66 74 77 61 72 65 20  69 74 20 6d 61 79 0d 62  |oftware it may.b|
000007e0  65 20 6e 65 63 65 73 73  61 72 79 20 74 6f 20 62  |e necessary to b|
000007f0  65 20 61 62 6c 65 20 74  6f 20 64 65 2d 66 6f 72  |e able to de-for|
00000800  6d 61 74 20 73 6f 6d 65  20 74 72 61 63 6b 73 20  |mat some tracks |
00000810  6f 6e 20 74 68 65 20 64  69 73 63 2e 20 54 68 69  |on the disc. Thi|
00000820  73 20 6d 65 61 6e 73 0d  74 68 61 74 20 77 68 65  |s means.that whe|
00000830  6e 20 61 6e 20 61 74 74  65 6d 70 74 20 69 73 20  |n an attempt is |
00000840  6d 61 64 65 20 74 6f 20  72 65 61 64 20 66 72 6f  |made to read fro|
00000850  6d 20 6f 72 20 77 72 69  74 65 20 74 6f 20 74 68  |m or write to th|
00000860  65 20 64 69 73 63 20 61  20 27 53 65 63 74 6f 72  |e disc a 'Sector|
00000870  0d 6e 6f 74 20 66 6f 75  6e 64 27 20 65 72 72 6f  |.not found' erro|
00000880  72 20 73 68 6f 75 6c 64  20 62 65 20 70 72 6f 64  |r should be prod|
00000890  75 63 65 64 2e 0d 0d 54  68 69 73 20 65 72 72 6f  |uced...This erro|
000008a0  72 20 77 69 6c 6c 20 62  65 20 67 65 6e 65 72 61  |r will be genera|
000008b0  74 65 64 20 69 66 20 61  6e 20 61 74 74 65 6d 70  |ted if an attemp|
000008c0  74 20 69 73 20 6d 61 64  65 20 74 6f 20 72 65 61  |t is made to rea|
000008d0  64 20 66 72 6f 6d 20 6f  72 20 77 72 69 74 65 0d  |d from or write.|
000008e0  74 6f 20 61 20 74 72 61  63 6b 20 66 6f 72 6d 61  |to a track forma|
000008f0  74 74 65 64 20 77 69 74  68 20 6f 6e 65 20 73 65  |tted with one se|
00000900  63 74 6f 72 20 6f 66 20  32 30 34 38 20 62 79 74  |ctor of 2048 byt|
00000910  65 73 2e 20 54 68 65 20  70 72 6f 67 72 61 6d 20  |es. The program |
00000920  44 45 46 4f 52 4d 20 63  61 6e 0d 62 65 20 75 73  |DEFORM can.be us|
00000930  65 64 20 74 6f 20 64 65  6d 6f 6e 73 74 72 61 74  |ed to demonstrat|
00000940  65 20 74 68 69 73 20 69  64 65 61 2e 20 44 45 46  |e this idea. DEF|
00000950  4f 52 4d 20 6d 75 73 74  20 62 65 20 75 73 65 64  |ORM must be used|
00000960  20 77 69 74 68 20 67 72  65 61 74 20 63 61 72 65  | with great care|
00000970  0d 62 65 63 61 75 73 65  20 69 74 20 72 65 6d 6f  |.because it remo|
00000980  76 65 73 20 74 72 61 63  6b 20 26 30 30 20 66 72  |ves track &00 fr|
00000990  6f 6d 20 74 68 65 20 64  69 73 63 20 69 6e 20 74  |om the disc in t|
000009a0  68 65 20 63 75 72 72 65  6e 74 20 64 72 69 76 65  |he current drive|
000009b0  2e 20 41 67 61 69 6e 2c  0d 79 6f 75 20 68 61 76  |. Again,.you hav|
000009c0  65 20 62 65 65 6e 20 77  61 72 6e 65 64 21 0d 0d  |e been warned!..|
000009d0  0d 20 20 20 31 30 20 52  45 4d 3a 20 44 45 46 4f  |.   10 REM: DEFO|
000009e0  52 4d 0d 20 20 20 32 30  20 6f 73 77 6f 72 64 3d  |RM.   20 osword=|
000009f0  26 46 46 46 31 0d 20 20  20 33 30 20 44 49 4d 20  |&FFF1.   30 DIM |
00000a00  6d 63 6f 64 65 20 26 31  30 30 0d 20 20 20 34 30  |mcode &100.   40|
00000a10  20 46 4f 52 70 61 73 73  3d 30 54 4f 33 53 54 45  | FORpass=0TO3STE|
00000a20  50 33 0d 20 20 20 35 30  20 50 25 3d 6d 63 6f 64  |P3.   50 P%=mcod|
00000a30  65 0d 20 20 20 36 30 20  5b 20 20 20 20 20 20 20  |e.   60 [       |
00000a40  4f 50 54 20 70 61 73 73  0d 20 20 20 37 30 20 20  |OPT pass.   70  |
00000a50  20 20 20 20 20 20 20 4c  44 41 20 23 26 37 46 0d  |       LDA #&7F.|
00000a60  20 20 20 38 30 20 20 20  20 20 20 20 20 20 4c 44  |   80         LD|
00000a70  58 20 23 62 6c 6f 63 6b  20 4d 4f 44 20 32 35 36  |X #block MOD 256|
00000a80  0d 20 20 20 39 30 20 20  20 20 20 20 20 20 20 4c  |.   90         L|
00000a90  44 59 20 23 62 6c 6f 63  6b 20 44 49 56 20 32 35  |DY #block DIV 25|
00000aa0  36 0d 20 20 31 30 30 20  20 20 20 20 20 20 20 20  |6.  100         |
00000ab0  4a 53 52 20 6f 73 77 6f  72 64 0d 20 20 31 31 30  |JSR osword.  110|
00000ac0  20 20 20 20 20 20 20 20  20 4c 44 41 20 72 65 73  |         LDA res|
00000ad0  75 6c 74 0d 20 20 31 32  30 20 20 20 20 20 20 20  |ult.  120       |
00000ae0  20 20 42 4e 45 20 65 72  72 6f 72 0d 20 20 31 33  |  BNE error.  13|
00000af0  30 20 20 20 20 20 20 20  20 20 52 54 53 0d 20 20  |0         RTS.  |
00000b00  31 34 30 20 2e 65 72 72  6f 72 0d 20 20 31 35 30  |140 .error.  150|
00000b10  20 20 20 20 20 20 20 20  20 42 52 4b 0d 20 20 31  |         BRK.  1|
00000b20  36 30 20 20 20 20 20 20  20 20 20 42 52 4b 0d 20  |60         BRK. |
00000b30  20 31 37 30 20 20 20 20  20 20 20 20 20 45 51 55  | 170         EQU|
00000b40  53 20 22 44 65 2d 66 6f  72 6d 61 74 20 65 72 72  |S "De-format err|
00000b50  6f 72 22 0d 20 20 31 38  30 20 20 20 20 20 20 20  |or".  180       |
00000b60  20 20 42 52 4b 0d 20 20  31 39 30 20 2e 62 6c 6f  |  BRK.  190 .blo|
00000b70  63 6b 0d 20 20 32 30 30  20 20 20 20 20 20 20 20  |ck.  200        |
00000b80  20 45 51 55 42 20 26 46  46 20 20 20 20 20 20 5c  | EQUB &FF      \|
00000b90  20 63 75 72 72 65 6e 74  20 64 72 69 76 65 0d 20  | current drive. |
00000ba0  20 32 31 30 20 20 20 20  20 20 20 20 20 45 51 55  | 210         EQU|
00000bb0  44 20 62 75 66 66 65 72  20 20 20 5c 20 73 65 63  |D buffer   \ sec|
00000bc0  74 6f 72 20 74 61 62 6c  65 0d 20 20 32 32 30 20  |tor table.  220 |
00000bd0  20 20 20 20 20 20 20 20  45 51 55 42 20 26 30 35  |        EQUB &05|
00000be0  20 20 20 20 20 20 5c 20  35 20 70 61 72 61 6d 65  |      \ 5 parame|
00000bf0  74 65 72 73 0d 20 20 32  33 30 20 20 20 20 20 20  |ters.  230      |
00000c00  20 20 20 45 51 55 42 20  26 36 33 20 20 20 20 20  |   EQUB &63     |
00000c10  20 5c 20 66 6f 72 6d 61  74 20 63 6f 6d 6d 61 6e  | \ format comman|
00000c20  64 0d 20 20 32 34 30 20  20 20 20 20 20 20 20 20  |d.  240         |
00000c30  45 51 55 42 20 26 30 30  20 20 20 20 20 20 5c 20  |EQUB &00      \ |
00000c40  70 68 79 73 69 63 61 6c  20 74 72 61 63 6b 0d 20  |physical track. |
00000c50  20 32 35 30 20 20 20 20  20 20 20 20 20 45 51 55  | 250         EQU|
00000c60  42 20 26 30 30 20 20 20  20 20 20 5c 20 67 61 70  |B &00      \ gap|
00000c70  20 33 0d 20 20 32 36 30  20 20 20 20 20 20 20 20  | 3.  260        |
00000c80  20 45 51 55 42 20 26 43  31 20 20 20 20 20 20 5c  | EQUB &C1      \|
00000c90  20 73 65 63 74 6f 72 73  2f 73 69 7a 65 0d 20 20  | sectors/size.  |
00000ca0  32 37 30 20 20 20 20 20  20 20 20 20 45 51 55 42  |270         EQUB|
00000cb0  20 26 30 30 20 20 20 20  20 20 5c 20 67 61 70 20  | &00      \ gap |
00000cc0  35 0d 20 20 32 38 30 20  20 20 20 20 20 20 20 20  |5.  280         |
00000cd0  45 51 55 42 20 26 31 30  20 20 20 20 20 20 5c 20  |EQUB &10      \ |
00000ce0  67 61 70 20 31 0d 20 20  32 39 30 20 2e 72 65 73  |gap 1.  290 .res|
00000cf0  75 6c 74 0d 20 20 33 30  30 20 20 20 20 20 20 20  |ult.  300       |
00000d00  20 20 45 51 55 42 20 26  30 30 20 20 20 20 20 20  |  EQUB &00      |
00000d10  5c 20 72 65 73 75 6c 74  20 62 79 74 65 0d 20 20  |\ result byte.  |
00000d20  33 31 30 20 2e 62 75 66  66 65 72 0d 20 20 33 32  |310 .buffer.  32|
00000d30  30 20 20 20 20 20 20 20  20 20 45 51 55 44 20 26  |0         EQUD &|
00000d40  30 34 30 30 30 30 30 30  0d 20 20 33 33 30 20 5d  |04000000.  330 ]|
00000d50  0d 20 20 33 34 30 20 4e  45 58 54 0d 20 20 33 35  |.  340 NEXT.  35|
00000d60  30 20 43 41 4c 4c 20 6d  63 6f 64 65 0d 0d 0d 54  |0 CALL mcode...T|
00000d70  68 65 20 64 65 2d 66 6f  72 6d 61 74 74 69 6e 67  |he de-formatting|
00000d80  20 74 65 63 68 6e 69 71  75 65 20 69 6c 6c 75 73  | technique illus|
00000d90  74 72 61 74 65 64 20 69  6e 20 74 68 65 20 70 72  |trated in the pr|
00000da0  6f 67 72 61 6d 20 44 45  46 4f 52 4d 20 69 73 20  |ogram DEFORM is |
00000db0  75 73 65 64 20 69 6e 0d  62 6f 74 68 20 43 4f 50  |used in.both COP|
00000dc0  59 44 46 53 20 61 6e 64  20 43 4f 50 59 41 4c 4c  |YDFS and COPYALL|
00000dd0  20 74 6f 20 65 6e 73 75  72 65 20 74 68 61 74 20  | to ensure that |
00000de0  61 6e 79 20 75 6e 66 6f  72 6d 61 74 74 65 64 20  |any unformatted |
00000df0  74 72 61 63 6b 73 20 6f  6e 20 74 68 65 0d 73 6f  |tracks on the.so|
00000e00  75 72 63 65 20 64 69 73  63 20 61 72 65 20 75 6e  |urce disc are un|
00000e10  66 6f 72 6d 61 74 74 65  64 20 6f 6e 20 74 68 65  |formatted on the|
00000e20  20 64 65 73 74 69 6e 61  74 69 6f 6e 20 64 69 73  | destination dis|
00000e30  63 20 65 76 65 6e 20 69  66 20 74 68 65 0d 64 65  |c even if the.de|
00000e40  73 74 69 6e 61 74 69 6f  6e 20 64 69 73 63 20 68  |stination disc h|
00000e50  61 73 20 62 65 65 6e 20  70 72 65 76 69 6f 75 73  |as been previous|
00000e60  6c 79 20 66 6f 72 6d 61  74 74 65 64 2e 0d 0d 42  |ly formatted...B|
00000e70  6f 74 68 20 74 68 65 20  63 6f 70 79 20 70 72 6f  |oth the copy pro|
00000e80  67 72 61 6d 73 20 75 73  65 20 61 20 73 69 6d 69  |grams use a simi|
00000e90  6c 61 72 20 61 6c 67 6f  72 69 74 68 6d 20 74 6f  |lar algorithm to|
00000ea0  20 64 75 70 6c 69 63 61  74 65 20 63 6f 70 79 2d  | duplicate copy-|
00000eb0  70 72 6f 74 65 63 74 65  64 0d 64 69 73 63 73 2e  |protected.discs.|
00000ec0  20 54 68 65 73 65 20 70  72 6f 67 72 61 6d 73 20  | These programs |
00000ed0  68 61 76 65 20 62 65 65  6e 20 77 72 69 74 74 65  |have been writte|
00000ee0  6e 20 74 6f 20 6d 61 6b  65 20 74 68 65 6d 20 61  |n to make them a|
00000ef0  73 20 65 61 73 79 20 74  6f 20 75 6e 64 65 72 73  |s easy to unders|
00000f00  74 61 6e 64 0d 61 73 20  70 6f 73 73 69 62 6c 65  |tand.as possible|
00000f10  2e 20 54 68 65 79 20 61  72 65 20 62 6f 74 68 20  |. They are both |
00000f20  77 65 6c 6c 20 73 74 72  75 63 74 75 72 65 64 20  |well structured |
00000f30  61 6e 64 20 77 65 6c 6c  20 63 6f 6d 6d 65 6e 74  |and well comment|
00000f40  65 64 20 61 6e 64 20 79  6f 75 0d 73 68 6f 75 6c  |ed and you.shoul|
00000f50  64 20 6d 61 6b 65 20 65  76 65 72 79 20 65 66 66  |d make every eff|
00000f60  6f 72 74 20 74 6f 20 75  6e 64 65 72 73 74 61 6e  |ort to understan|
00000f70  64 20 68 6f 77 20 74 68  65 79 20 77 6f 72 6b 2e  |d how they work.|
00000f80  20 49 74 20 69 73 20 6f  6e 6c 79 20 77 68 65 6e  | It is only when|
00000f90  20 79 6f 75 0d 66 75 6c  6c 79 20 75 6e 64 65 72  | you.fully under|
00000fa0  73 74 61 6e 64 20 68 6f  77 20 64 69 73 63 20 64  |stand how disc d|
00000fb0  75 70 6c 69 63 61 74 6f  72 73 20 77 6f 72 6b 20  |uplicators work |
00000fc0  74 68 61 74 20 79 6f 75  20 63 61 6e 20 64 65 73  |that you can des|
00000fd0  69 67 6e 20 61 20 64 69  73 63 0d 66 6f 72 6d 61  |ign a disc.forma|
00000fe0  74 20 77 68 69 63 68 20  77 69 6c 6c 20 64 65 66  |t which will def|
00000ff0  65 61 74 20 64 69 73 63  20 64 75 70 6c 69 63 61  |eat disc duplica|
00001000  74 69 6f 6e 20 70 72 6f  67 72 61 6d 73 2e 0d 0d  |tion programs...|
00001010  54 68 65 20 70 72 6f 67  72 61 6d 20 43 4f 50 59  |The program COPY|
00001020  44 46 53 20 75 73 65 73  20 74 68 65 20 66 6f 6c  |DFS uses the fol|
00001030  6c 6f 77 69 6e 67 20 61  6c 67 6f 72 69 74 68 6d  |lowing algorithm|
00001040  20 74 6f 20 64 75 70 6c  69 63 61 74 65 20 65 61  | to duplicate ea|
00001050  63 68 20 74 72 61 63 6b  3a 0d 0d 0d 31 29 20 53  |ch track:...1) S|
00001060  65 65 6b 20 74 68 65 20  70 68 79 73 69 63 61 6c  |eek the physical|
00001070  20 74 72 61 63 6b 20 6f  6e 20 74 68 65 20 73 6f  | track on the so|
00001080  75 72 63 65 20 64 69 73  63 2e 0d 0d 32 29 20 52  |urce disc...2) R|
00001090  65 61 64 20 6f 6e 65 20  73 65 63 74 6f 72 20 49  |ead one sector I|
000010a0  44 20 66 72 6f 6d 20 74  68 65 20 70 68 79 73 69  |D from the physi|
000010b0  63 61 6c 20 74 72 61 63  6b 2e 20 49 66 20 61 20  |cal track. If a |
000010c0  27 53 65 63 74 6f 72 20  6e 6f 74 20 46 6f 75 6e  |'Sector not Foun|
000010d0  64 27 0d 20 20 20 65 72  72 6f 72 20 69 73 20 67  |d'.   error is g|
000010e0  65 6e 65 72 61 74 65 64  20 74 68 65 20 74 72 61  |enerated the tra|
000010f0  63 6b 20 68 61 73 20 6e  6f 74 20 62 65 65 6e 20  |ck has not been |
00001100  66 6f 72 6d 61 74 74 65  64 20 61 6e 64 20 74 68  |formatted and th|
00001110  65 20 64 65 73 74 69 6e  61 74 69 6f 6e 0d 20 20  |e destination.  |
00001120  20 74 72 61 63 6b 20 73  68 6f 75 6c 64 20 62 65  | track should be|
00001130  20 64 65 2d 66 6f 72 6d  61 74 74 65 64 2e 0d 0d  | de-formatted...|
00001140  33 29 20 49 66 20 74 68  65 20 73 6f 75 72 63 65  |3) If the source|
00001150  20 74 72 61 63 6b 20 68  61 73 20 62 65 65 6e 20  | track has been |
00001160  66 6f 72 6d 61 74 74 65  64 2c 20 65 78 74 72 61  |formatted, extra|
00001170  63 74 20 74 68 65 20 6e  75 6d 62 65 72 20 6f 66  |ct the number of|
00001180  20 73 65 63 74 6f 72 73  0d 20 20 20 6f 6e 20 74  | sectors.   on t|
00001190  68 65 20 74 72 61 63 6b  20 66 72 6f 6d 20 74 68  |he track from th|
000011a0  65 20 64 61 74 61 20 72  65 61 64 20 69 6e 20 73  |e data read in s|
000011b0  74 65 70 20 32 29 20 61  6e 64 20 72 65 61 64 20  |tep 2) and read |
000011c0  61 6c 6c 20 74 68 65 20  73 65 63 74 6f 72 20 49  |all the sector I|
000011d0  44 73 0d 20 20 20 6f 6e  20 74 68 65 20 74 72 61  |Ds.   on the tra|
000011e0  63 6b 2e 0d 0d 34 29 20  46 6f 72 6d 61 74 20 74  |ck...4) Format t|
000011f0  68 65 20 64 65 73 74 69  6e 61 74 69 6f 6e 20 64  |he destination d|
00001200  69 73 63 20 75 73 69 6e  67 20 74 68 65 20 73 65  |isc using the se|
00001210  63 74 6f 72 20 49 44 20  64 61 74 61 20 66 72 6f  |ctor ID data fro|
00001220  6d 20 73 74 65 70 20 33  29 2e 0d 0d 35 29 20 52  |m step 3)...5) R|
00001230  65 61 64 20 65 76 65 72  79 20 73 65 63 74 6f 72  |ead every sector|
00001240  20 6f 6e 20 74 68 65 20  73 6f 75 72 63 65 20 74  | on the source t|
00001250  72 61 63 6b 20 75 73 69  6e 67 20 74 68 65 20 52  |rack using the R|
00001260  65 61 64 20 44 61 74 61  20 61 6e 64 20 44 65 6c  |ead Data and Del|
00001270  65 74 65 64 0d 20 20 20  44 61 74 61 20 63 6f 6d  |eted.   Data com|
00001280  6d 61 6e 64 20 61 6e 64  20 74 68 65 20 73 65 63  |mand and the sec|
00001290  74 6f 72 20 49 44 20 64  61 74 61 20 66 72 6f 6d  |tor ID data from|
000012a0  20 73 74 65 70 20 33 29  2e 20 43 68 65 63 6b 20  | step 3). Check |
000012b0  66 6f 72 20 64 65 6c 65  74 65 64 0d 20 20 20 64  |for deleted.   d|
000012c0  61 74 61 20 6f 6e 20 74  68 65 20 74 72 61 63 6b  |ata on the track|
000012d0  2e 0d 0d 36 29 20 49 66  20 64 65 6c 65 74 65 64  |...6) If deleted|
000012e0  20 64 61 74 61 20 69 73  20 75 73 65 64 20 6f 6e  | data is used on|
000012f0  20 74 68 65 20 73 6f 75  72 63 65 20 74 72 61 63  | the source trac|
00001300  6b 20 74 68 65 6e 20 75  73 65 20 74 68 65 20 57  |k then use the W|
00001310  72 69 74 65 20 44 65 6c  65 74 65 64 0d 20 20 20  |rite Deleted.   |
00001320  44 61 74 61 20 63 6f 6d  6d 61 6e 64 20 74 6f 20  |Data command to |
00001330  77 72 69 74 65 20 74 68  65 20 64 61 74 61 20 6f  |write the data o|
00001340  6e 74 6f 20 74 68 65 20  64 65 73 74 69 6e 61 74  |nto the destinat|
00001350  69 6f 6e 20 74 72 61 63  6b 2c 20 6f 74 68 65 72  |ion track, other|
00001360  77 69 73 65 0d 20 20 20  75 73 65 20 74 68 65 20  |wise.   use the |
00001370  57 72 69 74 65 20 44 61  74 61 20 63 6f 6d 6d 61  |Write Data comma|
00001380  6e 64 20 74 6f 20 77 72  69 74 65 20 74 68 65 20  |nd to write the |
00001390  64 61 74 61 20 6f 6e 74  6f 20 74 68 65 20 64 65  |data onto the de|
000013a0  73 74 69 6e 61 74 69 6f  6e 0d 20 20 20 74 72 61  |stination.   tra|
000013b0  63 6b 2e 0d 0d 0d 54 68  69 73 20 73 69 6d 70 6c  |ck....This simpl|
000013c0  65 20 61 6c 67 6f 72 69  74 68 6d 20 77 69 6c 6c  |e algorithm will|
000013d0  2c 20 73 6f 6d 65 77 68  61 74 20 73 75 72 70 72  |, somewhat surpr|
000013e0  69 73 69 6e 67 6c 79 2c  20 64 75 70 6c 69 63 61  |isingly, duplica|
000013f0  74 65 20 6d 61 6e 79 0d  63 6f 6d 6d 65 72 63 69  |te many.commerci|
00001400  61 6c 6c 79 20 70 72 6f  74 65 63 74 65 64 20 64  |ally protected d|
00001410  69 73 63 73 20 62 75 74  20 69 74 20 69 73 20 72  |iscs but it is r|
00001420  65 6c 65 74 69 76 65 6c  79 20 65 61 73 79 20 74  |eletively easy t|
00001430  6f 20 64 65 73 69 67 6e  20 61 20 64 69 73 63 0d  |o design a disc.|
00001440  66 6f 72 6d 61 74 20 77  68 69 63 68 20 63 61 6e  |format which can|
00001450  6e 6f 74 20 62 65 20 63  6f 70 69 65 64 20 75 73  |not be copied us|
00001460  69 6e 67 20 74 68 69 73  20 6d 65 74 68 6f 64 2e  |ing this method.|
00001470  20 59 6f 75 20 6d 69 67  68 74 20 6c 69 6b 65 20  | You might like |
00001480  74 6f 0d 63 6f 6e 73 69  64 65 72 20 77 68 61 74  |to.consider what|
00001490  20 77 6f 75 6c 64 20 68  61 70 70 65 6e 20 69 66  | would happen if|
000014a0  2c 20 66 6f 72 20 65 78  61 6d 70 6c 65 2c 20 79  |, for example, y|
000014b0  6f 75 20 75 73 65 20 61  20 6d 69 78 74 75 72 65  |ou use a mixture|
000014c0  20 6f 66 20 64 65 6c 65  74 65 64 0d 61 6e 64 20  | of deleted.and |
000014d0  6e 6f 72 6d 61 6c 20 73  65 63 74 6f 72 73 20 6f  |normal sectors o|
000014e0  6e 20 6f 6e 65 20 74 72  61 63 6b 20 61 6e 64 20  |n one track and |
000014f0  75 73 65 20 61 20 21 42  4f 4f 54 20 70 72 6f 67  |use a !BOOT prog|
00001500  72 61 6d 20 77 68 69 63  68 20 75 73 65 73 20 74  |ram which uses t|
00001510  68 65 0d 61 70 70 72 6f  70 72 69 61 74 65 20 63  |he.appropriate c|
00001520  6f 6d 6d 61 6e 64 20 74  6f 20 72 65 61 64 20 69  |ommand to read i|
00001530  6e 64 69 76 69 64 75 61  6c 20 73 65 63 74 6f 72  |ndividual sector|
00001540  73 20 72 61 74 68 65 72  20 74 68 61 6e 20 73 69  |s rather than si|
00001550  6d 70 6c 79 20 75 73 65  20 74 68 65 0d 52 65 61  |mply use the.Rea|
00001560  64 20 44 61 74 61 20 61  6e 64 20 44 65 6c 65 74  |d Data and Delet|
00001570  65 64 20 44 61 74 61 20  63 6f 6d 6d 61 6e 64 20  |ed Data command |
00001580  66 6f 72 20 61 6c 6c 20  73 65 63 74 6f 72 73 2e  |for all sectors.|
00001590  20 49 66 20 79 6f 75 20  64 65 73 69 67 6e 20 61  | If you design a|
000015a0  20 21 42 4f 4f 54 0d 70  72 6f 67 72 61 6d 20 77  | !BOOT.program w|
000015b0  68 69 63 68 20 64 6f 65  73 20 74 68 69 73 20 6f  |hich does this o|
000015c0  6e 20 61 20 63 6f 70 79  2d 70 72 6f 74 65 63 74  |n a copy-protect|
000015d0  65 64 20 64 69 73 63 2c  20 74 68 65 6e 20 74 68  |ed disc, then th|
000015e0  61 74 20 64 69 73 63 20  63 6f 75 6c 64 20 6e 6f  |at disc could no|
000015f0  74 0d 62 65 20 63 6f 70  69 65 64 20 73 75 63 63  |t.be copied succ|
00001600  65 73 73 66 75 6c 6c 79  20 75 73 69 6e 67 20 74  |essfully using t|
00001610  68 69 73 20 61 6c 67 6f  72 69 74 68 6d 2e 20 49  |his algorithm. I|
00001620  66 20 79 6f 75 20 69 6e  74 65 6e 64 20 74 6f 20  |f you intend to |
00001630  74 61 6b 65 20 61 0d 73  65 72 69 6f 75 73 20 69  |take a.serious i|
00001640  6e 74 65 72 65 73 74 20  69 6e 20 63 6f 70 79 2d  |nterest in copy-|
00001650  70 72 6f 74 65 63 74 69  6f 6e 20 74 68 65 6e 20  |protection then |
00001660  79 6f 75 72 20 66 69 72  73 74 20 74 61 73 6b 20  |your first task |
00001670  73 68 6f 75 6c 64 20 62  65 20 74 6f 0d 64 65 73  |should be to.des|
00001680  69 67 6e 20 61 20 64 69  73 63 20 66 6f 72 6d 61  |ign a disc forma|
00001690  74 20 77 68 69 63 68 20  63 61 6e 20 6e 6f 74 20  |t which can not |
000016a0  62 65 20 63 6f 70 69 65  64 20 62 79 20 43 4f 50  |be copied by COP|
000016b0  59 44 46 53 2e 0d 0d 0d  20 20 20 31 30 20 52 45  |YDFS....   10 RE|
000016c0  4d 3a 20 43 4f 50 59 44  46 53 0d 20 20 20 32 30  |M: COPYDFS.   20|
000016d0  20 6f 73 6e 65 77 6c 3d  26 46 46 45 37 0d 20 20  | osnewl=&FFE7.  |
000016e0  20 33 30 20 6f 73 77 72  63 68 3d 26 46 46 45 45  | 30 oswrch=&FFEE|
000016f0  0d 20 20 20 34 30 20 6f  73 77 6f 72 64 3d 26 46  |.   40 osword=&F|
00001700  46 46 31 0d 20 20 20 35  30 20 6f 73 62 79 74 65  |FF1.   50 osbyte|
00001710  3d 26 46 46 46 34 0d 20  20 20 36 30 20 44 49 4d  |=&FFF4.   60 DIM|
00001720  20 74 61 62 6c 65 20 26  35 30 0d 20 20 20 37 30  | table &50.   70|
00001730  20 44 49 4d 20 6d 63 6f  64 65 20 26 35 30 30 0d  | DIM mcode &500.|
00001740  20 20 20 38 30 20 44 49  4d 20 62 75 66 66 65 72  |   80 DIM buffer|
00001750  20 26 31 30 30 30 0d 20  20 20 39 30 20 46 4f 52  | &1000.   90 FOR|
00001760  20 70 61 73 73 3d 30 20  54 4f 20 32 20 53 54 45  | pass=0 TO 2 STE|
00001770  50 20 32 0d 20 20 31 30  30 20 50 25 3d 6d 63 6f  |P 2.  100 P%=mco|
00001780  64 65 0d 20 20 31 31 30  20 5b 20 20 20 20 20 20  |de.  110 [      |
00001790  20 4f 50 54 20 70 61 73  73 0d 20 20 31 32 30 20  | OPT pass.  120 |
000017a0  20 20 20 20 20 20 20 20  4a 53 52 20 6f 73 6e 65  |        JSR osne|
000017b0  77 6c 0d 20 20 31 33 30  20 2e 6d 61 69 6e 6c 6f  |wl.  130 .mainlo|
000017c0  6f 70 0d 20 20 31 34 30  20 20 20 20 20 20 20 20  |op.  140        |
000017d0  20 4a 53 52 20 65 73 63  61 70 65 20 20 20 20 5c  | JSR escape    \|
000017e0  20 63 68 65 63 6b 20 65  73 63 61 70 65 20 66 6c  | check escape fl|
000017f0  61 67 0d 20 20 31 35 30  20 20 20 20 20 20 20 20  |ag.  150        |
00001800  20 4a 53 52 20 73 65 65  6b 20 20 20 20 20 20 5c  | JSR seek      \|
00001810  20 73 65 65 6b 20 70 68  79 73 69 63 61 6c 20 74  | seek physical t|
00001820  72 61 63 6b 73 20 30 20  2d 20 34 30 0d 20 20 31  |racks 0 - 40.  1|
00001830  36 30 20 20 20 20 20 20  20 20 20 4a 53 52 20 66  |60         JSR f|
00001840  69 72 73 74 73 65 63 74  6f 72 20 5c 20 72 65 61  |irstsector \ rea|
00001850  64 20 73 65 63 74 6f 72  20 69 64 20 66 69 72 73  |d sector id firs|
00001860  74 20 73 65 63 74 6f 72  0d 20 20 31 37 30 20 20  |t sector.  170  |
00001870  20 20 20 20 20 20 20 42  4e 45 20 6e 6f 74 66 6f  |       BNE notfo|
00001880  72 6d 61 74 74 65 64 20  5c 20 69 66 20 65 72 72  |rmatted \ if err|
00001890  6f 72 20 74 68 65 6e 20  74 72 61 63 6b 20 6e 6f  |or then track no|
000018a0  74 20 66 6f 72 6d 61 74  74 65 64 0d 20 20 31 38  |t formatted.  18|
000018b0  30 20 20 20 20 20 20 20  20 20 4a 53 52 20 73 65  |0         JSR se|
000018c0  63 74 6f 72 69 64 73 20  5c 20 72 65 61 64 20 61  |ctorids \ read a|
000018d0  6c 6c 20 73 65 63 74 6f  72 20 69 64 73 0d 20 20  |ll sector ids.  |
000018e0  31 39 30 20 20 20 20 20  20 20 20 20 4a 53 52 20  |190         JSR |
000018f0  66 6f 72 6d 61 74 20 20  20 20 5c 20 66 6f 72 6d  |format    \ form|
00001900  61 74 20 73 65 63 74 6f  72 20 6f 6e 20 64 72 69  |at sector on dri|
00001910  76 65 20 31 0d 20 20 32  30 30 20 20 20 20 20 20  |ve 1.  200      |
00001920  20 20 20 4a 53 52 20 63  6f 70 79 74 72 61 63 6b  |   JSR copytrack|
00001930  20 5c 20 72 65 61 64 20  61 6e 64 20 77 72 69 74  | \ read and writ|
00001940  65 20 73 65 63 74 6f 72  0d 20 20 32 31 30 20 20  |e sector.  210  |
00001950  20 20 20 20 20 20 20 4a  4d 50 20 6f 75 74 70 75  |       JMP outpu|
00001960  74 0d 20 20 32 32 30 20  2e 6e 6f 74 66 6f 72 6d  |t.  220 .notform|
00001970  61 74 74 65 64 0d 20 20  32 33 30 20 20 20 20 20  |atted.  230     |
00001980  20 20 20 20 4a 53 52 20  64 65 66 6f 72 6d 20 20  |    JSR deform  |
00001990  20 20 5c 20 64 65 2d 66  6f 72 6d 61 74 20 74 68  |  \ de-format th|
000019a0  69 73 20 74 72 61 63 6b  0d 20 20 32 34 30 20 2e  |is track.  240 .|
000019b0  6f 75 74 70 75 74 0d 20  20 32 35 30 20 20 20 20  |output.  250    |
000019c0  20 20 20 20 20 4a 53 52  20 70 72 69 6e 74 62 79  |     JSR printby|
000019d0  74 65 20 5c 20 70 72 69  6e 74 20 74 72 61 63 6b  |te \ print track|
000019e0  20 6e 75 6d 62 65 72 0d  20 20 32 36 30 20 20 20  | number.  260   |
000019f0  20 20 20 20 20 20 49 4e  43 20 70 68 79 73 69 63  |      INC physic|
00001a00  61 6c 20 20 5c 20 69 6e  63 72 65 6d 65 6e 74 20  |al  \ increment |
00001a10  70 68 79 73 69 63 61 6c  20 74 72 61 63 6b 20 6e  |physical track n|
00001a20  75 6d 62 65 72 0d 20 20  32 37 30 20 20 20 20 20  |umber.  270     |
00001a30  20 20 20 20 4c 44 41 20  70 68 79 73 69 63 61 6c  |    LDA physical|
00001a40  20 20 5c 20 6c 6f 61 64  20 70 68 79 73 69 63 61  |  \ load physica|
00001a50  6c 20 74 72 61 63 6b 20  6e 75 6d 62 65 72 0d 20  |l track number. |
00001a60  20 32 38 30 20 20 20 20  20 20 20 20 20 43 4d 50  | 280         CMP|
00001a70  20 6c 61 73 74 20 20 20  20 20 20 5c 20 61 6c 6c  | last      \ all|
00001a80  20 64 6f 6e 65 3f 0d 20  20 32 39 30 20 20 20 20  | done?.  290    |
00001a90  20 20 20 20 20 42 4e 45  20 6d 61 69 6e 6c 6f 6f  |     BNE mainloo|
00001aa0  70 20 20 5c 20 69 66 20  6e 6f 74 20 63 6f 70 79  |p  \ if not copy|
00001ab0  20 6e 65 78 74 20 74 72  61 63 6b 0d 20 20 33 30  | next track.  30|
00001ac0  30 20 20 20 20 20 20 20  20 20 4a 53 52 20 6f 73  |0         JSR os|
00001ad0  6e 65 77 6c 0d 20 20 33  31 30 20 20 20 20 20 20  |newl.  310      |
00001ae0  20 20 20 52 54 53 20 20  20 20 20 20 20 20 20 20  |   RTS          |
00001af0  20 5c 20 72 65 74 75 72  6e 20 74 6f 20 42 41 53  | \ return to BAS|
00001b00  49 43 0d 20 20 33 32 30  20 2e 65 73 63 61 70 65  |IC.  320 .escape|
00001b10  0d 20 20 33 33 30 20 20  20 20 20 20 20 20 20 4c  |.  330         L|
00001b20  44 41 20 26 46 46 20 20  20 20 20 20 20 5c 20 65  |DA &FF       \ e|
00001b30  73 63 61 70 65 20 66 6c  61 67 0d 20 20 33 34 30  |scape flag.  340|
00001b40  20 20 20 20 20 20 20 20  20 42 4d 49 20 70 72 65  |         BMI pre|
00001b50  73 73 65 64 20 20 20 5c  20 62 69 74 20 37 20 73  |ssed   \ bit 7 s|
00001b60  65 74 20 69 66 20 70 72  65 73 73 65 64 0d 20 20  |et if pressed.  |
00001b70  33 35 30 20 20 20 20 20  20 20 20 20 52 54 53 0d  |350         RTS.|
00001b80  20 20 33 36 30 20 2e 70  72 65 73 73 65 64 0d 20  |  360 .pressed. |
00001b90  20 33 37 30 20 20 20 20  20 20 20 20 20 4c 44 41  | 370         LDA|
00001ba0  20 23 26 37 45 0d 20 20  33 38 30 20 20 20 20 20  | #&7E.  380     |
00001bb0  20 20 20 20 4a 53 52 20  6f 73 62 79 74 65 20 20  |    JSR osbyte  |
00001bc0  20 20 5c 20 61 63 6b 6e  6f 77 6c 65 64 67 65 20  |  \ acknowledge |
00001bd0  45 73 63 61 70 65 0d 20  20 33 39 30 20 20 20 20  |Escape.  390    |
00001be0  20 20 20 20 20 42 52 4b  0d 20 20 34 30 30 20 20  |     BRK.  400  |
00001bf0  20 20 20 20 20 20 20 42  52 4b 0d 20 20 34 31 30  |       BRK.  410|
00001c00  20 20 20 20 20 20 20 20  20 45 51 55 53 20 22 45  |         EQUS "E|
00001c10  73 63 61 70 65 22 0d 20  20 34 32 30 20 20 20 20  |scape".  420    |
00001c20  20 20 20 20 20 42 52 4b  0d 20 20 34 33 30 20 2e  |     BRK.  430 .|
00001c30  73 65 65 6b 0d 20 20 34  34 30 20 20 20 20 20 20  |seek.  440      |
00001c40  20 20 20 4c 44 41 20 70  68 79 73 69 63 61 6c 20  |   LDA physical |
00001c50  20 5c 20 70 68 79 73 69  63 61 6c 20 74 72 61 63  | \ physical trac|
00001c60  6b 20 6e 75 6d 62 65 72  0d 20 20 34 35 30 20 20  |k number.  450  |
00001c70  20 20 20 20 20 20 20 53  54 41 20 73 65 65 6b 62  |       STA seekb|
00001c80  6c 6f 63 6b 2b 37 0d 20  20 34 36 30 20 20 20 20  |lock+7.  460    |
00001c90  20 20 20 20 20 4c 44 41  20 23 26 30 30 20 20 20  |     LDA #&00   |
00001ca0  20 20 20 5c 20 64 72 69  76 65 20 30 0d 20 20 34  |   \ drive 0.  4|
00001cb0  37 30 20 20 20 20 20 20  20 20 20 53 54 41 20 73  |70         STA s|
00001cc0  65 65 6b 62 6c 6f 63 6b  20 5c 20 73 74 6f 72 65  |eekblock \ store|
00001cd0  20 64 72 69 76 65 20 6e  75 6d 62 65 72 0d 20 20  | drive number.  |
00001ce0  34 38 30 20 20 20 20 20  20 20 20 20 4c 44 41 20  |480         LDA |
00001cf0  23 26 37 46 0d 20 20 34  39 30 20 20 20 20 20 20  |#&7F.  490      |
00001d00  20 20 20 4c 44 58 20 23  73 65 65 6b 62 6c 6f 63  |   LDX #seekbloc|
00001d10  6b 20 4d 4f 44 20 32 35  36 0d 20 20 35 30 30 20  |k MOD 256.  500 |
00001d20  20 20 20 20 20 20 20 20  4c 44 59 20 23 73 65 65  |        LDY #see|
00001d30  6b 62 6c 6f 63 6b 20 44  49 56 20 32 35 36 0d 20  |kblock DIV 256. |
00001d40  20 35 31 30 20 20 20 20  20 20 20 20 20 4a 53 52  | 510         JSR|
00001d50  20 6f 73 77 6f 72 64 0d  20 20 35 32 30 20 20 20  | osword.  520   |
00001d60  20 20 20 20 20 20 4c 44  41 20 73 65 65 6b 62 6c  |      LDA seekbl|
00001d70  6f 63 6b 2b 38 20 5c 20  72 65 73 75 6c 74 0d 20  |ock+8 \ result. |
00001d80  20 35 33 30 20 20 20 20  20 20 20 20 20 42 4e 45  | 530         BNE|
00001d90  20 73 65 65 6b 65 72 72  6f 72 20 5c 20 3d 20 30  | seekerror \ = 0|
00001da0  20 69 66 20 4f 4b 0d 20  20 35 34 30 20 20 20 20  | if OK.  540    |
00001db0  20 20 20 20 20 4c 44 41  20 23 26 30 31 20 20 20  |     LDA #&01   |
00001dc0  20 20 20 5c 20 64 72 69  76 65 20 31 0d 20 20 35  |   \ drive 1.  5|
00001dd0  35 30 20 20 20 20 20 20  20 20 20 53 54 41 20 73  |50         STA s|
00001de0  65 65 6b 62 6c 6f 63 6b  20 5c 20 73 74 6f 72 65  |eekblock \ store|
00001df0  20 64 72 69 76 65 20 6e  75 6d 62 65 72 0d 20 20  | drive number.  |
00001e00  35 36 30 20 20 20 20 20  20 20 20 20 4c 44 41 20  |560         LDA |
00001e10  23 26 37 46 0d 20 20 35  37 30 20 20 20 20 20 20  |#&7F.  570      |
00001e20  20 20 20 4c 44 58 20 23  73 65 65 6b 62 6c 6f 63  |   LDX #seekbloc|
00001e30  6b 20 4d 4f 44 20 32 35  36 0d 20 20 35 38 30 20  |k MOD 256.  580 |
00001e40  20 20 20 20 20 20 20 20  4c 44 59 20 23 73 65 65  |        LDY #see|
00001e50  6b 62 6c 6f 63 6b 20 44  49 56 20 32 35 36 0d 20  |kblock DIV 256. |
00001e60  20 35 39 30 20 20 20 20  20 20 20 20 20 4a 53 52  | 590         JSR|
00001e70  20 6f 73 77 6f 72 64 0d  20 20 36 30 30 20 20 20  | osword.  600   |
00001e80  20 20 20 20 20 20 4c 44  41 20 73 65 65 6b 62 6c  |      LDA seekbl|
00001e90  6f 63 6b 2b 38 20 5c 20  72 65 73 75 6c 74 0d 20  |ock+8 \ result. |
00001ea0  20 36 31 30 20 20 20 20  20 20 20 20 20 42 4e 45  | 610         BNE|
00001eb0  20 73 65 65 6b 65 72 72  6f 72 20 5c 20 3d 20 30  | seekerror \ = 0|
00001ec0  20 69 66 20 4f 4b 0d 20  20 36 32 30 20 20 20 20  | if OK.  620    |
00001ed0  20 20 20 20 20 52 54 53  0d 20 20 36 33 30 20 2e  |     RTS.  630 .|
00001ee0  73 65 65 6b 65 72 72 6f  72 0d 20 20 36 34 30 20  |seekerror.  640 |
00001ef0  20 20 20 20 20 20 20 20  42 52 4b 0d 20 20 36 35  |        BRK.  65|
00001f00  30 20 20 20 20 20 20 20  20 20 42 52 4b 0d 20 20  |0         BRK.  |
00001f10  36 36 30 20 20 20 20 20  20 20 20 20 45 51 55 53  |660         EQUS|
00001f20  20 22 53 65 65 6b 20 65  72 72 6f 72 22 0d 20 20  | "Seek error".  |
00001f30  36 37 30 20 20 20 20 20  20 20 20 20 42 52 4b 0d  |670         BRK.|
00001f40  20 20 36 38 30 20 2e 66  6f 72 6d 61 74 0d 20 20  |  680 .format.  |
00001f50  36 39 30 20 20 20 20 20  20 20 20 20 4c 44 41 20  |690         LDA |
00001f60  70 68 79 73 69 63 61 6c  20 20 5c 20 70 68 79 73  |physical  \ phys|
00001f70  69 63 61 6c 20 74 72 61  63 6b 20 6e 75 6d 62 65  |ical track numbe|
00001f80  72 0d 20 20 37 30 30 20  20 20 20 20 20 20 20 20  |r.  700         |
00001f90  53 54 41 20 66 6f 72 6d  62 6c 6f 63 6b 2b 37 20  |STA formblock+7 |
00001fa0  5c 20 73 74 6f 72 65 20  70 68 79 73 69 63 61 6c  |\ store physical|
00001fb0  20 74 72 61 63 6b 0d 20  20 37 31 30 20 20 20 20  | track.  710    |
00001fc0  20 20 20 20 20 4c 44 58  20 74 61 62 6c 65 2b 33  |     LDX table+3|
00001fd0  20 20 20 5c 20 64 61 74  61 20 73 69 7a 65 20 63  |   \ data size c|
00001fe0  6f 64 65 0d 20 20 37 32  30 20 20 20 20 20 20 20  |ode.  720       |
00001ff0  20 20 4c 44 41 20 67 61  70 2c 58 20 20 20 20 20  |  LDA gap,X     |
00002000  5c 20 6c 6f 61 64 20 67  61 70 20 33 20 66 6f 72  |\ load gap 3 for|
00002010  20 74 68 65 73 65 20 73  65 63 74 6f 72 73 0d 20  | these sectors. |
00002020  20 37 33 30 20 20 20 20  20 20 20 20 20 53 54 41  | 730         STA|
00002030  20 66 6f 72 6d 62 6c 6f  63 6b 2b 38 20 5c 20 73  | formblock+8 \ s|
00002040  74 6f 72 65 20 66 6f 72  20 66 6f 72 6d 61 74 74  |tore for formatt|
00002050  69 6e 67 0d 20 20 37 34  30 20 20 20 20 20 20 20  |ing.  740       |
00002060  20 20 4c 44 41 20 23 26  37 46 0d 20 20 37 35 30  |  LDA #&7F.  750|
00002070  20 20 20 20 20 20 20 20  20 4c 44 58 20 23 66 6f  |         LDX #fo|
00002080  72 6d 62 6c 6f 63 6b 20  4d 4f 44 20 32 35 36 0d  |rmblock MOD 256.|
00002090  20 20 37 36 30 20 20 20  20 20 20 20 20 20 4c 44  |  760         LD|
000020a0  59 20 23 66 6f 72 6d 62  6c 6f 63 6b 20 44 49 56  |Y #formblock DIV|
000020b0  20 32 35 36 0d 20 20 37  37 30 20 20 20 20 20 20  | 256.  770      |
000020c0  20 20 20 4a 53 52 20 6f  73 77 6f 72 64 0d 20 20  |   JSR osword.  |
000020d0  37 38 30 20 20 20 20 20  20 20 20 20 4c 44 41 20  |780         LDA |
000020e0  66 6f 72 6d 62 6c 6f 63  6b 2b 31 32 20 5c 20 72  |formblock+12 \ r|
000020f0  65 73 75 6c 74 0d 20 20  37 39 30 20 20 20 20 20  |esult.  790     |
00002100  20 20 20 20 42 4e 45 20  66 6f 72 6d 65 72 72 6f  |    BNE formerro|
00002110  72 20 5c 20 3d 20 30 20  69 66 20 4f 4b 0d 20 20  |r \ = 0 if OK.  |
00002120  38 30 30 20 20 20 20 20  20 20 20 20 52 54 53 0d  |800         RTS.|
00002130  20 20 38 31 30 20 2e 66  6f 72 6d 65 72 72 6f 72  |  810 .formerror|
00002140  0d 20 20 38 32 30 20 20  20 20 20 20 20 20 20 42  |.  820         B|
00002150  52 4b 0d 20 20 38 33 30  20 20 20 20 20 20 20 20  |RK.  830        |
00002160  20 42 52 4b 0d 20 20 38  34 30 20 20 20 20 20 20  | BRK.  840      |
00002170  20 20 20 45 51 55 53 20  22 46 6f 72 6d 61 74 20  |   EQUS "Format |
00002180  65 72 72 6f 72 22 0d 20  20 38 35 30 20 20 20 20  |error".  850    |
00002190  20 20 20 20 20 42 52 4b  0d 20 20 38 36 30 20 2e  |     BRK.  860 .|
000021a0  64 65 66 6f 72 6d 0d 20  20 38 37 30 20 20 20 20  |deform.  870    |
000021b0  20 20 20 20 20 4c 44 41  20 70 68 79 73 69 63 61  |     LDA physica|
000021c0  6c 20 20 5c 20 6c 6f 61  64 20 70 68 79 73 69 63  |l  \ load physic|
000021d0  61 6c 20 74 72 61 63 6b  20 6e 75 6d 62 65 72 0d  |al track number.|
000021e0  20 20 38 38 30 20 20 20  20 20 20 20 20 20 53 54  |  880         ST|
000021f0  41 20 64 65 62 6c 6f 63  6b 2b 37 20 5c 20 73 74  |A deblock+7 \ st|
00002200  6f 72 65 20 70 68 79 73  69 63 61 6c 20 74 72 61  |ore physical tra|
00002210  63 6b 0d 20 20 38 39 30  20 20 20 20 20 20 20 20  |ck.  890        |
00002220  20 4c 44 41 20 23 26 37  46 0d 20 20 39 30 30 20  | LDA #&7F.  900 |
00002230  20 20 20 20 20 20 20 20  4c 44 58 20 23 64 65 62  |        LDX #deb|
00002240  6c 6f 63 6b 20 4d 4f 44  20 32 35 36 0d 20 20 39  |lock MOD 256.  9|
00002250  31 30 20 20 20 20 20 20  20 20 20 4c 44 59 20 23  |10         LDY #|
00002260  64 65 62 6c 6f 63 6b 20  44 49 56 20 32 35 36 0d  |deblock DIV 256.|
00002270  20 20 39 32 30 20 20 20  20 20 20 20 20 20 4a 53  |  920         JS|
00002280  52 20 6f 73 77 6f 72 64  20 20 20 20 5c 20 64 65  |R osword    \ de|
00002290  2d 66 6f 72 6d 61 74 20  74 72 61 63 6b 0d 20 20  |-format track.  |
000022a0  39 33 30 20 20 20 20 20  20 20 20 20 4c 44 41 20  |930         LDA |
000022b0  64 65 62 6c 6f 63 6b 2b  31 32 20 5c 20 72 65 73  |deblock+12 \ res|
000022c0  75 6c 74 0d 20 20 39 34  30 20 20 20 20 20 20 20  |ult.  940       |
000022d0  20 20 42 4e 45 20 64 65  65 72 72 6f 72 20 20 20  |  BNE deerror   |
000022e0  5c 20 3d 20 30 20 69 66  20 4f 4b 0d 20 20 39 35  |\ = 0 if OK.  95|
000022f0  30 20 20 20 20 20 20 20  20 20 52 54 53 0d 20 20  |0         RTS.  |
00002300  39 36 30 20 2e 64 65 65  72 72 6f 72 0d 20 20 39  |960 .deerror.  9|
00002310  37 30 20 20 20 20 20 20  20 20 20 42 52 4b 0d 20  |70         BRK. |
00002320  20 39 38 30 20 20 20 20  20 20 20 20 20 42 52 4b  | 980         BRK|
00002330  0d 20 20 39 39 30 20 20  20 20 20 20 20 20 20 45  |.  990         E|
00002340  51 55 53 20 22 44 65 2d  66 6f 72 6d 61 74 20 65  |QUS "De-format e|
00002350  72 72 6f 72 22 0d 20 31  30 30 30 20 20 20 20 20  |rror". 1000     |
00002360  20 20 20 20 42 52 4b 0d  20 31 30 31 30 20 2e 72  |    BRK. 1010 .r|
00002370  65 67 69 73 74 65 72 0d  20 31 30 32 30 20 20 20  |egister. 1020   |
00002380  20 20 20 20 20 20 53 54  41 20 72 65 67 62 6c 6f  |      STA regblo|
00002390  63 6b 2b 38 20 5c 20 76  61 6c 75 65 20 74 6f 20  |ck+8 \ value to |
000023a0  70 75 74 20 69 6e 20 72  65 67 69 73 74 65 72 0d  |put in register.|
000023b0  20 31 30 33 30 20 20 20  20 20 20 20 20 20 4c 44  | 1030         LD|
000023c0  41 20 23 26 30 30 20 20  20 20 20 20 5c 20 64 72  |A #&00      \ dr|
000023d0  69 76 65 20 30 0d 20 31  30 34 30 20 20 20 20 20  |ive 0. 1040     |
000023e0  20 20 20 20 53 54 41 20  72 65 67 62 6c 6f 63 6b  |    STA regblock|
000023f0  0d 20 31 30 35 30 20 20  20 20 20 20 20 20 20 4c  |. 1050         L|
00002400  44 41 20 23 26 31 32 20  20 20 20 20 20 5c 20 77  |DA #&12      \ w|
00002410  72 69 74 65 20 74 72 61  63 6b 20 72 65 67 69 73  |rite track regis|
00002420  74 65 72 20 30 2f 32 0d  20 31 30 36 30 20 20 20  |ter 0/2. 1060   |
00002430  20 20 20 20 20 20 53 54  41 20 72 65 67 62 6c 6f  |      STA regblo|
00002440  63 6b 2b 37 20 5c 20 72  65 67 69 73 74 65 72 20  |ck+7 \ register |
00002450  6e 75 6d 62 65 72 0d 20  31 30 37 30 20 20 20 20  |number. 1070    |
00002460  20 20 20 20 20 4c 44 41  20 23 26 37 46 0d 20 31  |     LDA #&7F. 1|
00002470  30 38 30 20 20 20 20 20  20 20 20 20 4c 44 58 20  |080         LDX |
00002480  23 72 65 67 62 6c 6f 63  6b 20 4d 4f 44 20 32 35  |#regblock MOD 25|
00002490  36 0d 20 31 30 39 30 20  20 20 20 20 20 20 20 20  |6. 1090         |
000024a0  4c 44 59 20 23 72 65 67  62 6c 6f 63 6b 20 44 49  |LDY #regblock DI|
000024b0  56 20 32 35 36 0d 20 31  31 30 30 20 20 20 20 20  |V 256. 1100     |
000024c0  20 20 20 20 4a 53 52 20  6f 73 77 6f 72 64 0d 20  |    JSR osword. |
000024d0  31 31 31 30 20 20 20 20  20 20 20 20 20 4c 44 41  |1110         LDA|
000024e0  20 72 65 67 62 6c 6f 63  6b 2b 39 20 5c 20 72 65  | regblock+9 \ re|
000024f0  73 75 6c 74 0d 20 31 31  32 30 20 20 20 20 20 20  |sult. 1120      |
00002500  20 20 20 42 4e 45 20 72  65 67 65 72 72 6f 72 20  |   BNE regerror |
00002510  20 5c 20 3d 20 30 20 69  66 20 4f 4b 0d 20 31 31  | \ = 0 if OK. 11|
00002520  33 30 20 20 20 20 20 20  20 20 20 4c 44 41 20 23  |30         LDA #|
00002530  26 30 31 20 20 20 20 20  20 5c 20 64 72 69 76 65  |&01      \ drive|
00002540  20 31 0d 20 31 31 34 30  20 20 20 20 20 20 20 20  | 1. 1140        |
00002550  20 53 54 41 20 72 65 67  62 6c 6f 63 6b 0d 20 31  | STA regblock. 1|
00002560  31 35 30 20 20 20 20 20  20 20 20 20 4c 44 41 20  |150         LDA |
00002570  23 26 31 41 20 20 20 20  20 20 5c 20 77 72 69 74  |#&1A      \ writ|
00002580  65 20 74 72 61 63 6b 20  72 65 67 69 73 74 65 72  |e track register|
00002590  20 31 2f 33 0d 20 31 31  36 30 20 20 20 20 20 20  | 1/3. 1160      |
000025a0  20 20 20 53 54 41 20 72  65 67 62 6c 6f 63 6b 2b  |   STA regblock+|
000025b0  37 20 5c 20 72 65 67 69  73 74 65 72 20 6e 75 6d  |7 \ register num|
000025c0  62 65 72 0d 20 31 31 37  30 20 20 20 20 20 20 20  |ber. 1170       |
000025d0  20 20 4c 44 41 20 23 26  37 46 0d 20 31 31 38 30  |  LDA #&7F. 1180|
000025e0  20 20 20 20 20 20 20 20  20 4c 44 58 20 23 72 65  |         LDX #re|
000025f0  67 62 6c 6f 63 6b 20 4d  4f 44 20 32 35 36 0d 20  |gblock MOD 256. |
00002600  31 31 39 30 20 20 20 20  20 20 20 20 20 4c 44 59  |1190         LDY|
00002610  20 23 72 65 67 62 6c 6f  63 6b 20 44 49 56 20 32  | #regblock DIV 2|
00002620  35 36 0d 20 31 32 30 30  20 20 20 20 20 20 20 20  |56. 1200        |
00002630  20 4a 53 52 20 6f 73 77  6f 72 64 0d 20 31 32 31  | JSR osword. 121|
00002640  30 20 20 20 20 20 20 20  20 20 4c 44 41 20 72 65  |0         LDA re|
00002650  67 62 6c 6f 63 6b 2b 39  20 5c 20 72 65 73 75 6c  |gblock+9 \ resul|
00002660  74 0d 20 31 32 32 30 20  20 20 20 20 20 20 20 20  |t. 1220         |
00002670  42 4e 45 20 72 65 67 65  72 72 6f 72 20 20 5c 20  |BNE regerror  \ |
00002680  3d 20 30 20 69 66 20 4f  4b 0d 20 31 32 33 30 20  |= 0 if OK. 1230 |
00002690  20 20 20 20 20 20 20 20  52 54 53 0d 20 31 32 34  |        RTS. 124|
000026a0  30 20 2e 72 65 67 65 72  72 6f 72 0d 20 31 32 35  |0 .regerror. 125|
000026b0  30 20 20 20 20 20 20 20  20 20 42 52 4b 0d 20 31  |0         BRK. 1|
000026c0  32 36 30 20 20 20 20 20  20 20 20 20 42 52 4b 0d  |260         BRK.|
000026d0  20 31 32 37 30 20 20 20  20 20 20 20 20 20 45 51  | 1270         EQ|
000026e0  55 53 20 22 53 70 65 63  69 61 6c 20 72 65 67 69  |US "Special regi|
000026f0  73 74 65 72 20 65 72 72  6f 72 22 0d 20 31 32 38  |ster error". 128|
00002700  30 20 20 20 20 20 20 20  20 20 42 52 4b 0d 20 31  |0         BRK. 1|
00002710  32 39 30 20 2e 66 69 72  73 74 73 65 63 74 6f 72  |290 .firstsector|
00002720  0d 20 31 33 30 30 20 20  20 20 20 20 20 20 20 4c  |. 1300         L|
00002730  44 41 20 70 68 79 73 69  63 61 6c 20 20 5c 20 70  |DA physical  \ p|
00002740  68 79 73 69 63 61 6c 20  74 72 61 63 6b 20 6e 75  |hysical track nu|
00002750  6d 62 65 72 0d 20 31 33  31 30 20 20 20 20 20 20  |mber. 1310      |
00002760  20 20 20 53 54 41 20 69  64 73 62 6c 6f 63 6b 2b  |   STA idsblock+|
00002770  37 20 5c 20 73 74 6f 72  65 20 70 68 79 73 69 63  |7 \ store physic|
00002780  61 6c 20 74 72 61 63 6b  0d 20 31 33 32 30 20 20  |al track. 1320  |
00002790  20 20 20 20 20 20 20 4c  44 41 20 23 26 30 31 20  |       LDA #&01 |
000027a0  20 20 20 20 20 5c 20 6f  6e 65 20 73 65 63 74 6f  |     \ one secto|
000027b0  72 0d 20 31 33 33 30 20  20 20 20 20 20 20 20 20  |r. 1330         |
000027c0  53 54 41 20 69 64 73 62  6c 6f 63 6b 2b 39 20 5c  |STA idsblock+9 \|
000027d0  20 6e 75 6d 62 65 72 20  6f 66 20 69 64 73 0d 20  | number of ids. |
000027e0  31 33 34 30 20 20 20 20  20 20 20 20 20 4c 44 41  |1340         LDA|
000027f0  20 23 26 37 46 0d 20 31  33 35 30 20 20 20 20 20  | #&7F. 1350     |
00002800  20 20 20 20 4c 44 58 20  23 69 64 73 62 6c 6f 63  |    LDX #idsbloc|
00002810  6b 20 4d 4f 44 20 32 35  36 0d 20 31 33 36 30 20  |k MOD 256. 1360 |
00002820  20 20 20 20 20 20 20 20  4c 44 59 20 23 69 64 73  |        LDY #ids|
00002830  62 6c 6f 63 6b 20 44 49  56 20 32 35 36 0d 20 31  |block DIV 256. 1|
00002840  33 37 30 20 20 20 20 20  20 20 20 20 4a 53 52 20  |370         JSR |
00002850  6f 73 77 6f 72 64 0d 20  31 33 38 30 20 20 20 20  |osword. 1380    |
00002860  20 20 20 20 20 4c 44 41  20 69 64 73 62 6c 6f 63  |     LDA idsbloc|
00002870  6b 2b 31 30 20 5c 20 72  65 73 75 6c 74 0d 20 31  |k+10 \ result. 1|
00002880  33 39 30 20 20 20 20 20  20 20 20 20 41 4e 44 20  |390         AND |
00002890  23 26 31 45 20 20 20 20  20 20 5c 20 3d 20 30 20  |#&1E      \ = 0 |
000028a0  69 66 20 66 6f 72 6d 61  74 74 65 64 0d 20 31 34  |if formatted. 14|
000028b0  30 30 20 20 20 20 20 20  20 20 20 52 54 53 0d 20  |00         RTS. |
000028c0  31 34 31 30 20 2e 73 65  63 74 6f 72 69 64 73 0d  |1410 .sectorids.|
000028d0  20 31 34 32 30 20 20 20  20 20 20 20 20 20 4c 44  | 1420         LD|
000028e0  58 20 74 61 62 6c 65 2b  33 20 20 20 5c 20 6c 6f  |X table+3   \ lo|
000028f0  61 64 20 64 61 74 61 20  73 69 7a 65 20 63 6f 64  |ad data size cod|
00002900  65 0d 20 31 34 33 30 20  20 20 20 20 20 20 20 20  |e. 1430         |
00002910  4c 44 41 20 73 69 7a 65  73 2c 58 20 20 20 5c 20  |LDA sizes,X   \ |
00002920  6c 6f 61 64 20 6e 75 6d  62 65 72 20 6f 66 20 73  |load number of s|
00002930  65 63 74 6f 72 73 0d 20  31 34 34 30 20 20 20 20  |ectors. 1440    |
00002940  20 20 20 20 20 53 54 41  20 69 64 73 62 6c 6f 63  |     STA idsbloc|
00002950  6b 2b 39 20 5c 20 73 74  6f 72 65 20 6e 75 6d 62  |k+9 \ store numb|
00002960  65 72 20 6f 66 20 73 65  63 74 6f 72 73 0d 20 31  |er of sectors. 1|
00002970  34 35 30 20 20 20 20 20  20 20 20 20 41 53 4c 20  |450         ASL |
00002980  41 20 20 20 20 20 20 20  20 20 5c 20 2a 32 0d 20  |A         \ *2. |
00002990  31 34 36 30 20 20 20 20  20 20 20 20 20 41 53 4c  |1460         ASL|
000029a0  20 41 20 20 20 20 20 20  20 20 20 5c 20 2a 34 0d  | A         \ *4.|
000029b0  20 31 34 37 30 20 20 20  20 20 20 20 20 20 53 45  | 1470         SE|
000029c0  43 0d 20 31 34 38 30 20  20 20 20 20 20 20 20 20  |C. 1480         |
000029d0  53 42 43 20 23 26 30 34  20 20 20 20 20 20 5c 20  |SBC #&04      \ |
000029e0  73 65 63 74 6f 72 73 2a  34 2d 34 0d 20 31 34 39  |sectors*4-4. 149|
000029f0  30 20 20 20 20 20 20 20  20 20 53 54 41 20 73 65  |0         STA se|
00002a00  63 74 6f 72 6e 75 6d 62  65 72 20 5c 20 73 74 6f  |ctornumber \ sto|
00002a10  72 65 20 69 6e 64 65 78  20 6f 6e 20 73 65 63 74  |re index on sect|
00002a20  6f 72 73 0d 20 31 35 30  30 20 20 20 20 20 20 20  |ors. 1500       |
00002a30  20 20 54 58 41 20 20 20  20 20 20 20 20 20 20 20  |  TXA           |
00002a40  5c 20 74 72 61 6e 73 66  65 72 20 64 61 74 61 20  |\ transfer data |
00002a50  73 69 7a 65 20 63 6f 64  65 0d 20 31 35 31 30 20  |size code. 1510 |
00002a60  20 20 20 20 20 20 20 20  41 53 4c 20 41 20 20 20  |        ASL A   |
00002a70  20 20 20 20 20 20 5c 20  2a 32 0d 20 31 35 32 30  |      \ *2. 1520|
00002a80  20 20 20 20 20 20 20 20  20 41 53 4c 20 41 20 20  |         ASL A  |
00002a90  20 20 20 20 20 20 20 5c  20 2a 34 0d 20 31 35 33  |       \ *4. 153|
00002aa0  30 20 20 20 20 20 20 20  20 20 41 53 4c 20 41 20  |0         ASL A |
00002ab0  20 20 20 20 20 20 20 20  5c 20 2a 38 0d 20 31 35  |        \ *8. 15|
00002ac0  34 30 20 20 20 20 20 20  20 20 20 41 53 4c 20 41  |40         ASL A|
00002ad0  20 20 20 20 20 20 20 20  20 5c 20 2a 31 36 0d 20  |         \ *16. |
00002ae0  31 35 35 30 20 20 20 20  20 20 20 20 20 41 53 4c  |1550         ASL|
00002af0  20 41 20 20 20 20 20 20  20 20 20 5c 20 2a 33 32  | A         \ *32|
00002b00  0d 20 31 35 36 30 20 20  20 20 20 20 20 20 20 4f  |. 1560         O|
00002b10  52 41 20 69 64 73 62 6c  6f 63 6b 2b 39 20 5c 20  |RA idsblock+9 \ |
00002b20  61 64 64 20 6e 75 6d 62  65 72 20 6f 66 20 73 65  |add number of se|
00002b30  63 74 6f 72 73 0d 20 31  35 37 30 20 20 20 20 20  |ctors. 1570     |
00002b40  20 20 20 20 53 54 41 20  63 6f 70 79 62 6c 6f 63  |    STA copybloc|
00002b50  6b 2b 39 20 5c 20 73 65  63 74 6f 72 20 73 69 7a  |k+9 \ sector siz|
00002b60  65 2f 6e 75 6d 62 65 72  0d 20 31 35 38 30 20 20  |e/number. 1580  |
00002b70  20 20 20 20 20 20 20 53  54 41 20 66 6f 72 6d 62  |       STA formb|
00002b80  6c 6f 63 6b 2b 39 20 5c  20 73 65 63 74 6f 72 20  |lock+9 \ sector |
00002b90  73 69 7a 65 2f 6e 75 6d  62 65 72 0d 20 31 35 39  |size/number. 159|
00002ba0  30 20 20 20 20 20 20 20  20 20 4c 44 41 20 23 26  |0         LDA #&|
00002bb0  37 46 0d 20 31 36 30 30  20 20 20 20 20 20 20 20  |7F. 1600        |
00002bc0  20 4c 44 58 20 23 69 64  73 62 6c 6f 63 6b 20 4d  | LDX #idsblock M|
00002bd0  4f 44 20 32 35 36 0d 20  31 36 31 30 20 20 20 20  |OD 256. 1610    |
00002be0  20 20 20 20 20 4c 44 59  20 23 69 64 73 62 6c 6f  |     LDY #idsblo|
00002bf0  63 6b 20 44 49 56 20 32  35 36 0d 20 31 36 32 30  |ck DIV 256. 1620|
00002c00  20 20 20 20 20 20 20 20  20 4a 53 52 20 6f 73 77  |         JSR osw|
00002c10  6f 72 64 0d 20 31 36 33  30 20 20 20 20 20 20 20  |ord. 1630       |
00002c20  20 20 4c 44 41 20 69 64  73 62 6c 6f 63 6b 2b 31  |  LDA idsblock+1|
00002c30  30 20 5c 20 72 65 73 75  6c 74 0d 20 31 36 34 30  |0 \ result. 1640|
00002c40  20 20 20 20 20 20 20 20  20 41 4e 44 20 23 26 31  |         AND #&1|
00002c50  45 0d 20 31 36 35 30 20  20 20 20 20 20 20 20 20  |E. 1650         |
00002c60  42 4e 45 20 69 64 73 65  72 72 6f 72 20 20 5c 20  |BNE idserror  \ |
00002c70  3d 20 30 20 69 66 20 4f  4b 0d 20 31 36 36 30 20  |= 0 if OK. 1660 |
00002c80  20 20 20 20 20 20 20 20  52 54 53 0d 20 31 36 37  |        RTS. 167|
00002c90  30 20 2e 69 64 73 65 72  72 6f 72 0d 20 31 36 38  |0 .idserror. 168|
00002ca0  30 20 20 20 20 20 20 20  20 20 42 52 4b 0d 20 31  |0         BRK. 1|
00002cb0  36 39 30 20 20 20 20 20  20 20 20 20 42 52 4b 0d  |690         BRK.|
00002cc0  20 31 37 30 30 20 20 20  20 20 20 20 20 20 45 51  | 1700         EQ|
00002cd0  55 53 20 22 53 65 63 74  6f 72 20 49 44 20 45 72  |US "Sector ID Er|
00002ce0  72 6f 72 22 0d 20 31 37  31 30 20 20 20 20 20 20  |ror". 1710      |
00002cf0  20 20 20 42 52 4b 0d 20  31 37 32 30 20 2e 63 6f  |   BRK. 1720 .co|
00002d00  70 79 74 72 61 63 6b 0d  20 31 37 33 30 20 20 20  |pytrack. 1730   |
00002d10  20 20 20 20 20 20 4c 44  58 20 73 65 63 74 6f 72  |      LDX sector|
00002d20  6e 75 6d 62 65 72 20 5c  20 6c 6f 61 64 20 69 6e  |number \ load in|
00002d30  64 65 78 20 6f 6e 20 74  61 62 6c 65 0d 20 31 37  |dex on table. 17|
00002d40  34 30 20 20 20 20 20 20  20 20 20 4c 44 41 20 74  |40         LDA t|
00002d50  61 62 6c 65 2b 32 2c 58  20 5c 20 6c 6f 61 64 20  |able+2,X \ load |
00002d60  6c 6f 67 69 63 61 6c 20  73 65 63 74 6f 72 20 6e  |logical sector n|
00002d70  75 6d 62 65 72 0d 20 31  37 35 30 20 20 20 20 20  |umber. 1750     |
00002d80  20 20 20 20 53 54 41 20  63 6f 70 79 62 6c 6f 63  |    STA copybloc|
00002d90  6b 2b 38 20 5c 20 73 74  6f 72 65 20 66 6f 72 20  |k+8 \ store for |
00002da0  72 65 61 64 20 73 65 63  74 6f 72 0d 20 31 37 36  |read sector. 176|
00002db0  30 20 2e 6c 6f 77 65 73  74 0d 20 31 37 37 30 20  |0 .lowest. 1770 |
00002dc0  20 20 20 20 20 20 20 20  44 45 58 0d 20 31 37 38  |        DEX. 178|
00002dd0  30 20 20 20 20 20 20 20  20 20 44 45 58 0d 20 31  |0         DEX. 1|
00002de0  37 39 30 20 20 20 20 20  20 20 20 20 44 45 58 0d  |790         DEX.|
00002df0  20 31 38 30 30 20 20 20  20 20 20 20 20 20 44 45  | 1800         DE|
00002e00  58 0d 20 31 38 31 30 20  20 20 20 20 20 20 20 20  |X. 1810         |
00002e10  42 4d 49 20 66 69 6e 69  73 68 65 64 0d 20 31 38  |BMI finished. 18|
00002e20  32 30 20 20 20 20 20 20  20 20 20 4c 44 41 20 74  |20         LDA t|
00002e30  61 62 6c 65 2b 32 2c 58  20 5c 20 6c 6f 61 64 20  |able+2,X \ load |
00002e40  6c 6f 67 69 63 61 6c 20  73 65 63 74 6f 72 20 6e  |logical sector n|
00002e50  75 6d 62 65 72 0d 20 31  38 33 30 20 20 20 20 20  |umber. 1830     |
00002e60  20 20 20 20 43 4d 50 20  63 6f 70 79 62 6c 6f 63  |    CMP copybloc|
00002e70  6b 2b 38 20 5c 20 69 73  20 69 74 20 6c 6f 77 65  |k+8 \ is it lowe|
00002e80  72 20 74 68 61 6e 20 74  68 65 20 6c 61 73 74 20  |r than the last |
00002e90  6f 6e 65 3f 0d 20 31 38  34 30 20 20 20 20 20 20  |one?. 1840      |
00002ea0  20 20 20 42 43 53 20 6c  6f 77 65 73 74 20 20 20  |   BCS lowest   |
00002eb0  20 5c 20 62 72 61 6e 63  68 20 69 66 20 6e 6f 74  | \ branch if not|
00002ec0  20 6c 6f 77 65 73 74 20  73 65 63 74 6f 72 0d 20  | lowest sector. |
00002ed0  31 38 35 30 20 20 20 20  20 20 20 20 20 53 54 41  |1850         STA|
00002ee0  20 63 6f 70 79 62 6c 6f  63 6b 2b 38 20 5c 20 73  | copyblock+8 \ s|
00002ef0  74 6f 72 65 20 69 66 20  69 74 20 69 73 20 6c 6f  |tore if it is lo|
00002f00  77 65 72 0d 20 31 38 36  30 20 20 20 20 20 20 20  |wer. 1860       |
00002f10  20 20 42 43 43 20 6c 6f  77 65 73 74 20 20 20 20  |  BCC lowest    |
00002f20  5c 20 6c 6f 6f 6b 20 66  6f 72 20 6c 6f 77 65 72  |\ look for lower|
00002f30  20 73 65 63 74 6f 72 20  6e 75 6d 62 65 72 0d 20  | sector number. |
00002f40  31 38 37 30 20 2e 66 69  6e 69 73 68 65 64 0d 20  |1870 .finished. |
00002f50  31 38 38 30 20 20 20 20  20 20 20 20 20 4c 44 41  |1880         LDA|
00002f60  20 74 61 62 6c 65 20 20  20 20 20 5c 20 6c 6f 61  | table     \ loa|
00002f70  64 20 6c 6f 67 69 63 61  6c 20 74 72 61 63 6b 20  |d logical track |
00002f80  6e 75 6d 62 65 72 0d 20  31 38 39 30 20 20 20 20  |number. 1890    |
00002f90  20 20 20 20 20 53 54 41  20 63 6f 70 79 62 6c 6f  |     STA copyblo|
00002fa0  63 6b 2b 37 20 5c 20 61  6e 64 20 73 74 6f 72 65  |ck+7 \ and store|
00002fb0  20 66 6f 72 20 72 65 61  64 0d 20 31 39 30 30 20  | for read. 1900 |
00002fc0  20 20 20 20 20 20 20 20  4a 53 52 20 72 65 67 69  |        JSR regi|
00002fd0  73 74 65 72 20 20 5c 20  77 72 69 74 65 20 74 72  |ster  \ write tr|
00002fe0  61 63 6b 20 72 65 67 69  73 74 65 72 0d 20 31 39  |ack register. 19|
00002ff0  31 30 20 20 20 20 20 20  20 20 20 4c 44 41 20 23  |10         LDA #|
00003000  26 30 30 20 20 20 20 20  20 5c 20 64 72 69 76 65  |&00      \ drive|
00003010  20 30 0d 20 31 39 32 30  20 20 20 20 20 20 20 20  | 0. 1920        |
00003020  20 53 54 41 20 63 6f 70  79 62 6c 6f 63 6b 0d 20  | STA copyblock. |
00003030  31 39 33 30 20 20 20 20  20 20 20 20 20 4c 44 41  |1930         LDA|
00003040  20 23 26 35 37 20 20 20  20 20 20 5c 20 72 65 61  | #&57      \ rea|
00003050  64 20 73 65 63 74 6f 72  20 63 6f 6d 6d 61 6e 64  |d sector command|
00003060  0d 20 31 39 34 30 20 20  20 20 20 20 20 20 20 53  |. 1940         S|
00003070  54 41 20 63 6f 70 79 62  6c 6f 63 6b 2b 36 0d 20  |TA copyblock+6. |
00003080  31 39 35 30 20 20 20 20  20 20 20 20 20 4c 44 41  |1950         LDA|
00003090  20 23 26 37 46 0d 20 31  39 36 30 20 20 20 20 20  | #&7F. 1960     |
000030a0  20 20 20 20 4c 44 58 20  23 63 6f 70 79 62 6c 6f  |    LDX #copyblo|
000030b0  63 6b 20 4d 4f 44 20 32  35 36 0d 20 31 39 37 30  |ck MOD 256. 1970|
000030c0  20 20 20 20 20 20 20 20  20 4c 44 59 20 23 63 6f  |         LDY #co|
000030d0  70 79 62 6c 6f 63 6b 20  44 49 56 20 32 35 36 0d  |pyblock DIV 256.|
000030e0  20 31 39 38 30 20 20 20  20 20 20 20 20 20 4a 53  | 1980         JS|
000030f0  52 20 6f 73 77 6f 72 64  0d 20 31 39 39 30 20 20  |R osword. 1990  |
00003100  20 20 20 20 20 20 20 4c  44 41 20 63 6f 70 79 62  |       LDA copyb|
00003110  6c 6f 63 6b 2b 31 30 20  5c 20 72 65 73 75 6c 74  |lock+10 \ result|
00003120  0d 20 32 30 30 30 20 20  20 20 20 20 20 20 20 42  |. 2000         B|
00003130  45 51 20 6e 6f 74 64 65  6c 20 20 20 20 5c 20 6e  |EQ notdel    \ n|
00003140  6f 74 20 64 65 6c 65 74  65 64 20 64 61 74 61 0d  |ot deleted data.|
00003150  20 32 30 31 30 20 20 20  20 20 20 20 20 20 43 4d  | 2010         CM|
00003160  50 20 23 26 32 30 20 20  20 20 20 20 5c 20 64 65  |P #&20      \ de|
00003170  6c 65 74 65 64 20 64 61  74 61 20 72 65 73 75 6c  |leted data resul|
00003180  74 0d 20 32 30 32 30 20  20 20 20 20 20 20 20 20  |t. 2020         |
00003190  42 4e 45 20 72 65 61 64  65 72 72 6f 72 20 5c 20  |BNE readerror \ |
000031a0  65 72 72 6f 72 20 69 66  20 6e 6f 74 20 26 32 30  |error if not &20|
000031b0  0d 20 32 30 33 30 20 20  20 20 20 20 20 20 20 4c  |. 2030         L|
000031c0  44 41 20 23 26 34 46 20  20 20 20 20 20 5c 20 77  |DA #&4F      \ w|
000031d0  72 69 74 65 20 64 65 6c  65 74 65 64 20 64 61 74  |rite deleted dat|
000031e0  61 20 63 6f 6d 6d 61 6e  64 0d 20 32 30 34 30 20  |a command. 2040 |
000031f0  20 20 20 20 20 20 20 20  42 4e 45 20 73 61 76 65  |        BNE save|
00003200  63 6f 6d 0d 20 32 30 35  30 20 2e 6e 6f 74 64 65  |com. 2050 .notde|
00003210  6c 0d 20 32 30 36 30 20  20 20 20 20 20 20 20 20  |l. 2060         |
00003220  4c 44 41 20 23 26 34 42  20 20 20 20 20 20 5c 20  |LDA #&4B      \ |
00003230  77 72 69 74 65 20 64 61  74 61 20 63 6f 6d 6d 61  |write data comma|
00003240  6e 64 0d 20 32 30 37 30  20 2e 73 61 76 65 63 6f  |nd. 2070 .saveco|
00003250  6d 0d 20 32 30 38 30 20  20 20 20 20 20 20 20 20  |m. 2080         |
00003260  53 54 41 20 63 6f 70 79  62 6c 6f 63 6b 2b 36 0d  |STA copyblock+6.|
00003270  20 32 30 39 30 20 20 20  20 20 20 20 20 20 4c 44  | 2090         LD|
00003280  41 20 23 26 30 31 20 20  20 20 20 20 5c 20 64 72  |A #&01      \ dr|
00003290  69 76 65 20 31 0d 20 32  31 30 30 20 20 20 20 20  |ive 1. 2100     |
000032a0  20 20 20 20 53 54 41 20  63 6f 70 79 62 6c 6f 63  |    STA copybloc|
000032b0  6b 0d 20 32 31 31 30 20  20 20 20 20 20 20 20 20  |k. 2110         |
000032c0  4c 44 41 20 23 26 37 46  0d 20 32 31 32 30 20 20  |LDA #&7F. 2120  |
000032d0  20 20 20 20 20 20 20 4c  44 58 20 23 63 6f 70 79  |       LDX #copy|
000032e0  62 6c 6f 63 6b 20 4d 4f  44 20 32 35 36 0d 20 32  |block MOD 256. 2|
000032f0  31 33 30 20 20 20 20 20  20 20 20 20 4c 44 59 20  |130         LDY |
00003300  23 63 6f 70 79 62 6c 6f  63 6b 20 44 49 56 20 32  |#copyblock DIV 2|
00003310  35 36 0d 20 32 31 34 30  20 20 20 20 20 20 20 20  |56. 2140        |
00003320  20 4a 53 52 20 6f 73 77  6f 72 64 0d 20 32 31 35  | JSR osword. 215|
00003330  30 20 20 20 20 20 20 20  20 20 4c 44 41 20 63 6f  |0         LDA co|
00003340  70 79 62 6c 6f 63 6b 2b  31 30 20 5c 20 72 65 73  |pyblock+10 \ res|
00003350  75 6c 74 0d 20 32 31 36  30 20 20 20 20 20 20 20  |ult. 2160       |
00003360  20 20 42 4e 45 20 77 72  69 74 65 65 72 72 6f 72  |  BNE writeerror|
00003370  20 5c 20 3d 20 30 20 69  66 20 4f 4b 0d 20 32 31  | \ = 0 if OK. 21|
00003380  37 30 20 20 20 20 20 20  20 20 20 4c 44 41 20 70  |70         LDA p|
00003390  68 79 73 69 63 61 6c 0d  20 32 31 38 30 20 20 20  |hysical. 2180   |
000033a0  20 20 20 20 20 20 4a 53  52 20 72 65 67 69 73 74  |      JSR regist|
000033b0  65 72 20 20 5c 20 77 72  69 74 65 20 74 72 61 63  |er  \ write trac|
000033c0  6b 20 72 65 67 69 73 74  65 72 0d 20 32 31 39 30  |k register. 2190|
000033d0  20 20 20 20 20 20 20 20  20 52 54 53 0d 20 32 32  |         RTS. 22|
000033e0  30 30 20 2e 72 65 61 64  65 72 72 6f 72 0d 20 32  |00 .readerror. 2|
000033f0  32 31 30 20 20 20 20 20  20 20 20 20 4c 44 41 20  |210         LDA |
00003400  70 68 79 73 69 63 61 6c  0d 20 32 32 32 30 20 20  |physical. 2220  |
00003410  20 20 20 20 20 20 20 4a  53 52 20 72 65 67 69 73  |       JSR regis|
00003420  74 65 72 0d 20 32 32 33  30 20 20 20 20 20 20 20  |ter. 2230       |
00003430  20 20 42 52 4b 0d 20 32  32 34 30 20 20 20 20 20  |  BRK. 2240     |
00003440  20 20 20 20 42 52 4b 0d  20 32 32 35 30 20 20 20  |    BRK. 2250   |
00003450  20 20 20 20 20 20 45 51  55 53 20 22 52 65 61 64  |      EQUS "Read|
00003460  20 65 72 72 6f 72 22 0d  20 32 32 36 30 20 20 20  | error". 2260   |
00003470  20 20 20 20 20 20 42 52  4b 0d 20 32 32 37 30 20  |      BRK. 2270 |
00003480  2e 77 72 69 74 65 65 72  72 6f 72 0d 20 32 32 38  |.writeerror. 228|
00003490  30 20 20 20 20 20 20 20  20 20 4c 44 41 20 70 68  |0         LDA ph|
000034a0  79 73 69 63 61 6c 0d 20  32 32 39 30 20 20 20 20  |ysical. 2290    |
000034b0  20 20 20 20 20 4a 53 52  20 72 65 67 69 73 74 65  |     JSR registe|
000034c0  72 0d 20 32 33 30 30 20  20 20 20 20 20 20 20 20  |r. 2300         |
000034d0  42 52 4b 0d 20 32 33 31  30 20 20 20 20 20 20 20  |BRK. 2310       |
000034e0  20 20 42 52 4b 0d 20 32  33 32 30 20 20 20 20 20  |  BRK. 2320     |
000034f0  20 20 20 20 45 51 55 53  20 22 57 72 69 74 65 20  |    EQUS "Write |
00003500  65 72 72 6f 72 22 0d 20  32 33 33 30 20 20 20 20  |error". 2330    |
00003510  20 20 20 20 20 42 52 4b  0d 20 32 33 34 30 20 2e  |     BRK. 2340 .|
00003520  70 72 69 6e 74 62 79 74  65 0d 20 32 33 35 30 20  |printbyte. 2350 |
00003530  20 20 20 20 20 20 20 20  4c 44 41 20 70 68 79 73  |        LDA phys|
00003540  69 63 61 6c 20 20 5c 20  70 72 69 6e 74 20 70 68  |ical  \ print ph|
00003550  79 73 69 63 61 6c 20 74  72 61 63 6b 20 6e 75 6d  |ysical track num|
00003560  62 65 72 0d 20 32 33 36  30 20 20 20 20 20 20 20  |ber. 2360       |
00003570  20 20 50 48 41 0d 20 32  33 37 30 20 20 20 20 20  |  PHA. 2370     |
00003580  20 20 20 20 4c 53 52 20  41 0d 20 32 33 38 30 20  |    LSR A. 2380 |
00003590  20 20 20 20 20 20 20 20  4c 53 52 20 41 0d 20 32  |        LSR A. 2|
000035a0  33 39 30 20 20 20 20 20  20 20 20 20 4c 53 52 20  |390         LSR |
000035b0  41 0d 20 32 34 30 30 20  20 20 20 20 20 20 20 20  |A. 2400         |
000035c0  4c 53 52 20 41 0d 20 32  34 31 30 20 20 20 20 20  |LSR A. 2410     |
000035d0  20 20 20 20 4a 53 52 20  6e 79 62 62 6c 65 20 20  |    JSR nybble  |
000035e0  20 20 5c 20 70 72 69 6e  74 20 4d 53 20 6e 79 62  |  \ print MS nyb|
000035f0  62 6c 65 0d 20 32 34 32  30 20 20 20 20 20 20 20  |ble. 2420       |
00003600  20 20 50 4c 41 0d 20 32  34 33 30 20 20 20 20 20  |  PLA. 2430     |
00003610  20 20 20 20 4a 53 52 20  6e 79 62 62 6c 65 20 20  |    JSR nybble  |
00003620  20 20 5c 20 70 72 69 6e  74 20 4c 53 20 6e 79 62  |  \ print LS nyb|
00003630  62 6c 65 0d 20 32 34 34  30 20 20 20 20 20 20 20  |ble. 2440       |
00003640  20 20 4c 44 41 20 23 41  53 43 28 22 20 22 29 0d  |  LDA #ASC(" ").|
00003650  20 32 34 35 30 20 20 20  20 20 20 20 20 20 4a 53  | 2450         JS|
00003660  52 20 6f 73 77 72 63 68  20 20 20 20 5c 20 70 72  |R oswrch    \ pr|
00003670  69 6e 74 20 73 70 61 63  65 0d 20 32 34 36 30 20  |int space. 2460 |
00003680  20 20 20 20 20 20 20 20  4a 4d 50 20 6f 73 77 72  |        JMP oswr|
00003690  63 68 20 20 20 20 5c 20  70 72 69 6e 74 20 73 70  |ch    \ print sp|
000036a0  61 63 65 20 61 6e 64 20  72 65 74 75 72 6e 0d 20  |ace and return. |
000036b0  32 34 37 30 20 2e 6e 79  62 62 6c 65 0d 20 32 34  |2470 .nybble. 24|
000036c0  38 30 20 20 20 20 20 20  20 20 20 41 4e 44 20 23  |80         AND #|
000036d0  26 30 46 0d 20 32 34 39  30 20 20 20 20 20 20 20  |&0F. 2490       |
000036e0  20 20 53 45 44 0d 20 32  35 30 30 20 20 20 20 20  |  SED. 2500     |
000036f0  20 20 20 20 43 4c 43 0d  20 32 35 31 30 20 20 20  |    CLC. 2510   |
00003700  20 20 20 20 20 20 41 44  43 20 23 26 39 30 0d 20  |      ADC #&90. |
00003710  32 35 32 30 20 20 20 20  20 20 20 20 20 41 44 43  |2520         ADC|
00003720  20 23 26 34 30 0d 20 32  35 33 30 20 20 20 20 20  | #&40. 2530     |
00003730  20 20 20 20 43 4c 44 0d  20 32 35 34 30 20 20 20  |    CLD. 2540   |
00003740  20 20 20 20 20 20 4a 4d  50 20 6f 73 77 72 63 68  |      JMP oswrch|
00003750  20 20 20 20 5c 20 70 72  69 6e 74 20 6e 79 62 62  |    \ print nybb|
00003760  6c 65 20 61 6e 64 20 72  65 74 75 72 6e 0d 20 32  |le and return. 2|
00003770  35 35 30 20 2e 73 65 65  6b 62 6c 6f 63 6b 0d 20  |550 .seekblock. |
00003780  32 35 36 30 20 20 20 20  20 20 20 20 20 45 51 55  |2560         EQU|
00003790  42 20 26 30 30 20 20 20  20 20 20 5c 20 64 72 69  |B &00      \ dri|
000037a0  76 65 20 30 2f 31 0d 20  32 35 37 30 20 20 20 20  |ve 0/1. 2570    |
000037b0  20 20 20 20 20 45 51 55  44 20 26 30 30 20 20 20  |     EQUD &00   |
000037c0  20 20 20 5c 20 64 6f 65  73 20 6e 6f 74 20 6d 61  |   \ does not ma|
000037d0  74 74 65 72 0d 20 32 35  38 30 20 20 20 20 20 20  |tter. 2580      |
000037e0  20 20 20 45 51 55 42 20  26 30 31 20 20 20 20 20  |   EQUB &01     |
000037f0  20 5c 20 31 20 70 61 72  61 6d 65 74 65 72 0d 20  | \ 1 parameter. |
00003800  32 35 39 30 20 20 20 20  20 20 20 20 20 45 51 55  |2590         EQU|
00003810  42 20 26 36 39 20 20 20  20 20 20 5c 20 73 65 65  |B &69      \ see|
00003820  6b 20 63 6f 6d 6d 61 6e  64 0d 20 32 36 30 30 20  |k command. 2600 |
00003830  20 20 20 20 20 20 20 20  45 51 55 42 20 26 30 30  |        EQUB &00|
00003840  20 20 20 20 20 20 5c 20  70 68 79 73 69 63 61 6c  |      \ physical|
00003850  20 74 72 61 63 6b 20 6e  75 6d 62 65 72 0d 20 32  | track number. 2|
00003860  36 31 30 20 20 20 20 20  20 20 20 20 45 51 55 42  |610         EQUB|
00003870  20 26 30 30 20 20 20 20  20 20 5c 20 72 65 73 75  | &00      \ resu|
00003880  6c 74 20 62 79 74 65 0d  20 32 36 32 30 20 2e 72  |lt byte. 2620 .r|
00003890  65 67 62 6c 6f 63 6b 0d  20 32 36 33 30 20 20 20  |egblock. 2630   |
000038a0  20 20 20 20 20 20 45 51  55 42 20 26 30 30 20 20  |      EQUB &00  |
000038b0  20 20 20 20 5c 20 64 72  69 76 65 20 30 2f 31 0d  |    \ drive 0/1.|
000038c0  20 32 36 34 30 20 20 20  20 20 20 20 20 20 45 51  | 2640         EQ|
000038d0  55 44 20 26 30 30 20 20  20 20 20 20 5c 20 64 6f  |UD &00      \ do|
000038e0  65 73 20 6e 6f 74 20 6d  61 74 74 65 72 0d 20 32  |es not matter. 2|
000038f0  36 35 30 20 20 20 20 20  20 20 20 20 45 51 55 42  |650         EQUB|
00003900  20 26 30 32 20 20 20 20  20 20 5c 20 32 20 70 61  | &02      \ 2 pa|
00003910  72 61 6d 65 74 65 72 73  0d 20 32 36 36 30 20 20  |rameters. 2660  |
00003920  20 20 20 20 20 20 20 45  51 55 42 20 26 37 41 20  |       EQUB &7A |
00003930  20 20 20 20 20 5c 20 77  72 69 74 65 20 73 70 65  |     \ write spe|
00003940  63 69 61 6c 20 72 65 67  69 73 74 65 72 0d 20 32  |cial register. 2|
00003950  36 37 30 20 20 20 20 20  20 20 20 20 45 51 55 42  |670         EQUB|
00003960  20 26 30 30 20 20 20 20  20 20 5c 20 72 65 67 69  | &00      \ regi|
00003970  73 74 65 72 20 6e 75 6d  62 65 72 0d 20 32 36 38  |ster number. 268|
00003980  30 20 20 20 20 20 20 20  20 20 45 51 55 42 20 26  |0         EQUB &|
00003990  30 30 20 20 20 20 20 20  5c 20 76 61 6c 75 65 20  |00      \ value |
000039a0  74 6f 20 70 75 74 20 69  6e 20 72 65 67 69 73 74  |to put in regist|
000039b0  65 72 0d 20 32 36 39 30  20 20 20 20 20 20 20 20  |er. 2690        |
000039c0  20 45 51 55 42 20 26 30  30 20 20 20 20 20 20 5c  | EQUB &00      \|
000039d0  20 72 65 73 75 6c 74 20  62 79 74 65 0d 20 32 37  | result byte. 27|
000039e0  30 30 20 2e 69 64 73 62  6c 6f 63 6b 0d 20 32 37  |00 .idsblock. 27|
000039f0  31 30 20 20 20 20 20 20  20 20 20 45 51 55 42 20  |10         EQUB |
00003a00  26 30 30 20 20 20 20 20  20 5c 20 64 72 69 76 65  |&00      \ drive|
00003a10  20 30 0d 20 32 37 32 30  20 20 20 20 20 20 20 20  | 0. 2720        |
00003a20  20 45 51 55 44 20 74 61  62 6c 65 20 20 20 20 5c  | EQUD table    \|
00003a30  20 61 64 64 72 65 73 73  20 6f 66 20 62 75 66 66  | address of buff|
00003a40  65 72 0d 20 32 37 33 30  20 20 20 20 20 20 20 20  |er. 2730        |
00003a50  20 45 51 55 42 20 26 30  33 20 20 20 20 20 20 5c  | EQUB &03      \|
00003a60  20 33 20 70 61 72 61 6d  65 74 65 72 73 0d 20 32  | 3 parameters. 2|
00003a70  37 34 30 20 20 20 20 20  20 20 20 20 45 51 55 42  |740         EQUB|
00003a80  20 26 35 42 20 20 20 20  20 20 5c 20 72 65 61 64  | &5B      \ read|
00003a90  20 73 65 63 74 6f 72 20  49 44 73 20 63 6f 6d 6d  | sector IDs comm|
00003aa0  61 6e 64 0d 20 32 37 35  30 20 20 20 20 20 20 20  |and. 2750       |
00003ab0  20 20 45 51 55 42 20 26  30 30 20 20 20 20 20 20  |  EQUB &00      |
00003ac0  5c 20 70 68 79 73 69 63  61 6c 20 74 72 61 63 6b  |\ physical track|
00003ad0  20 6e 75 6d 62 65 72 0d  20 32 37 36 30 20 20 20  | number. 2760   |
00003ae0  20 20 20 20 20 20 45 51  55 42 20 26 30 30 20 20  |      EQUB &00  |
00003af0  20 20 20 20 5c 20 61 6c  77 61 79 73 20 26 30 30  |    \ always &00|
00003b00  0d 20 32 37 37 30 20 20  20 20 20 20 20 20 20 45  |. 2770         E|
00003b10  51 55 42 20 26 30 30 20  20 20 20 20 20 5c 20 6e  |QUB &00      \ n|
00003b20  75 6d 62 65 72 20 6f 66  20 49 44 73 20 74 6f 20  |umber of IDs to |
00003b30  62 65 20 72 65 61 64 0d  20 32 37 38 30 20 20 20  |be read. 2780   |
00003b40  20 20 20 20 20 20 45 51  55 42 20 26 30 30 20 20  |      EQUB &00  |
00003b50  20 20 20 20 5c 20 72 65  73 75 6c 74 20 62 79 74  |    \ result byt|
00003b60  65 0d 20 32 37 39 30 20  2e 63 6f 70 79 62 6c 6f  |e. 2790 .copyblo|
00003b70  63 6b 0d 20 32 38 30 30  20 20 20 20 20 20 20 20  |ck. 2800        |
00003b80  20 45 51 55 42 20 26 30  30 20 20 20 20 20 20 5c  | EQUB &00      \|
00003b90  20 64 72 69 76 65 20 30  2f 31 0d 20 32 38 31 30  | drive 0/1. 2810|
00003ba0  20 20 20 20 20 20 20 20  20 45 51 55 44 20 62 75  |         EQUD bu|
00003bb0  66 66 65 72 20 20 20 5c  20 61 64 64 72 65 73 73  |ffer   \ address|
00003bc0  20 6f 66 20 62 75 66 66  65 72 0d 20 32 38 32 30  | of buffer. 2820|
00003bd0  20 20 20 20 20 20 20 20  20 45 51 55 42 20 26 30  |         EQUB &0|
00003be0  33 20 20 20 20 20 20 5c  20 33 20 70 61 72 61 6d  |3      \ 3 param|
00003bf0  65 74 65 72 73 0d 20 32  38 33 30 20 20 20 20 20  |eters. 2830     |
00003c00  20 20 20 20 45 51 55 42  20 26 35 37 20 20 20 20  |    EQUB &57    |
00003c10  20 20 5c 20 72 65 61 64  20 64 61 74 61 20 61 6e  |  \ read data an|
00003c20  64 20 64 65 6c 65 74 65  64 20 64 61 74 61 0d 20  |d deleted data. |
00003c30  32 38 34 30 20 20 20 20  20 20 20 20 20 45 51 55  |2840         EQU|
00003c40  42 20 26 30 30 20 20 20  20 20 20 5c 20 6c 6f 67  |B &00      \ log|
00003c50  69 63 61 6c 20 74 72 61  63 6b 20 6e 75 6d 62 65  |ical track numbe|
00003c60  72 0d 20 32 38 35 30 20  20 20 20 20 20 20 20 20  |r. 2850         |
00003c70  45 51 55 42 20 26 30 30  20 20 20 20 20 20 5c 20  |EQUB &00      \ |
00003c80  6c 6f 67 69 63 61 6c 20  73 65 63 74 6f 72 20 6e  |logical sector n|
00003c90  75 6d 62 65 72 0d 20 32  38 36 30 20 20 20 20 20  |umber. 2860     |
00003ca0  20 20 20 20 45 51 55 42  20 26 30 30 20 20 20 20  |    EQUB &00    |
00003cb0  20 20 5c 20 73 65 63 74  6f 72 20 73 69 7a 65 2f  |  \ sector size/|
00003cc0  6e 75 6d 62 65 72 0d 20  32 38 37 30 20 20 20 20  |number. 2870    |
00003cd0  20 20 20 20 20 45 51 55  42 20 26 30 30 20 20 20  |     EQUB &00   |
00003ce0  20 20 20 5c 20 72 65 73  75 6c 74 20 62 79 74 65  |   \ result byte|
00003cf0  0d 20 32 38 38 30 20 2e  66 6f 72 6d 62 6c 6f 63  |. 2880 .formbloc|
00003d00  6b 0d 20 32 38 39 30 20  20 20 20 20 20 20 20 20  |k. 2890         |
00003d10  45 51 55 42 20 26 30 31  20 20 20 20 20 20 5c 20  |EQUB &01      \ |
00003d20  64 72 69 76 65 20 31 0d  20 32 39 30 30 20 20 20  |drive 1. 2900   |
00003d30  20 20 20 20 20 20 45 51  55 44 20 74 61 62 6c 65  |      EQUD table|
00003d40  20 20 20 20 5c 20 73 65  63 74 6f 72 20 74 61 62  |    \ sector tab|
00003d50  6c 65 0d 20 32 39 31 30  20 20 20 20 20 20 20 20  |le. 2910        |
00003d60  20 45 51 55 42 20 26 30  35 20 20 20 20 20 20 5c  | EQUB &05      \|
00003d70  20 35 20 70 61 72 61 6d  65 74 65 72 73 0d 20 32  | 5 parameters. 2|
00003d80  39 32 30 20 20 20 20 20  20 20 20 20 45 51 55 42  |920         EQUB|
00003d90  20 26 36 33 20 20 20 20  20 20 5c 20 66 6f 72 6d  | &63      \ form|
00003da0  61 74 20 74 72 61 63 6b  20 63 6f 6d 6d 61 6e 64  |at track command|
00003db0  0d 20 32 39 33 30 20 20  20 20 20 20 20 20 20 45  |. 2930         E|
00003dc0  51 55 42 20 26 30 30 20  20 20 20 20 20 5c 20 70  |QUB &00      \ p|
00003dd0  68 79 73 69 63 61 6c 20  74 72 61 63 6b 20 6e 75  |hysical track nu|
00003de0  6d 62 65 72 0d 20 32 39  34 30 20 20 20 20 20 20  |mber. 2940      |
00003df0  20 20 20 45 51 55 42 20  26 30 30 20 20 20 20 20  |   EQUB &00     |
00003e00  20 5c 20 67 61 70 20 33  20 73 69 7a 65 0d 20 32  | \ gap 3 size. 2|
00003e10  39 35 30 20 20 20 20 20  20 20 20 20 45 51 55 42  |950         EQUB|
00003e20  20 26 30 30 20 20 20 20  20 20 5c 20 73 65 63 74  | &00      \ sect|
00003e30  6f 72 20 73 69 7a 65 2f  6e 75 6d 62 65 72 0d 20  |or size/number. |
00003e40  32 39 36 30 20 20 20 20  20 20 20 20 20 45 51 55  |2960         EQU|
00003e50  42 20 26 30 30 20 20 20  20 20 20 5c 20 67 61 70  |B &00      \ gap|
00003e60  20 35 20 73 69 7a 65 0d  20 32 39 37 30 20 20 20  | 5 size. 2970   |
00003e70  20 20 20 20 20 20 45 51  55 42 20 26 31 30 20 20  |      EQUB &10  |
00003e80  20 20 20 20 5c 20 67 61  70 20 31 20 73 69 7a 65  |    \ gap 1 size|
00003e90  0d 20 32 39 38 30 20 20  20 20 20 20 20 20 20 45  |. 2980         E|
00003ea0  51 55 42 20 26 30 30 20  20 20 20 20 20 5c 20 72  |QUB &00      \ r|
00003eb0  65 73 75 6c 74 20 62 79  74 65 0d 20 32 39 39 30  |esult byte. 2990|
00003ec0  20 2e 64 65 62 6c 6f 63  6b 0d 20 33 30 30 30 20  | .deblock. 3000 |
00003ed0  20 20 20 20 20 20 20 20  45 51 55 42 20 26 30 31  |        EQUB &01|
00003ee0  20 20 20 20 20 20 5c 20  64 72 69 76 65 20 31 0d  |      \ drive 1.|
00003ef0  20 33 30 31 30 20 20 20  20 20 20 20 20 20 45 51  | 3010         EQ|
00003f00  55 44 20 64 65 74 61 62  6c 65 20 20 5c 20 73 65  |UD detable  \ se|
00003f10  63 74 6f 72 20 74 61 62  6c 65 0d 20 33 30 32 30  |ctor table. 3020|
00003f20  20 20 20 20 20 20 20 20  20 45 51 55 42 20 26 30  |         EQUB &0|
00003f30  35 20 20 20 20 20 20 5c  20 35 20 70 61 72 61 6d  |5      \ 5 param|
00003f40  65 74 65 72 73 0d 20 33  30 33 30 20 20 20 20 20  |eters. 3030     |
00003f50  20 20 20 20 45 51 55 42  20 26 36 33 20 20 20 20  |    EQUB &63    |
00003f60  20 20 5c 20 66 6f 72 6d  61 74 20 74 72 61 63 6b  |  \ format track|
00003f70  20 63 6f 6d 6d 61 6e 64  0d 20 33 30 34 30 20 20  | command. 3040  |
00003f80  20 20 20 20 20 20 20 45  51 55 42 20 26 30 30 20  |       EQUB &00 |
00003f90  20 20 20 20 20 5c 20 70  68 79 73 69 63 61 6c 20  |     \ physical |
00003fa0  74 72 61 63 6b 20 6e 75  6d 62 65 72 0d 20 33 30  |track number. 30|
00003fb0  35 30 20 20 20 20 20 20  20 20 20 45 51 55 42 20  |50         EQUB |
00003fc0  26 30 30 20 20 20 20 20  20 5c 20 67 61 70 20 33  |&00      \ gap 3|
00003fd0  20 73 69 7a 65 0d 20 33  30 36 30 20 20 20 20 20  | size. 3060     |
00003fe0  20 20 20 20 45 51 55 42  20 26 43 31 20 20 20 20  |    EQUB &C1    |
00003ff0  20 20 5c 20 73 65 63 74  6f 72 20 73 69 7a 65 2f  |  \ sector size/|
00004000  6e 75 6d 62 65 72 0d 20  33 30 37 30 20 20 20 20  |number. 3070    |
00004010  20 20 20 20 20 45 51 55  42 20 26 30 30 20 20 20  |     EQUB &00   |
00004020  20 20 20 5c 20 67 61 70  20 35 20 73 69 7a 65 0d  |   \ gap 5 size.|
00004030  20 33 30 38 30 20 20 20  20 20 20 20 20 20 45 51  | 3080         EQ|
00004040  55 42 20 26 31 30 20 20  20 20 20 20 5c 20 67 61  |UB &10      \ ga|
00004050  70 20 31 20 73 69 7a 65  0d 20 33 30 39 30 20 20  |p 1 size. 3090  |
00004060  20 20 20 20 20 20 20 45  51 55 42 20 26 30 30 20  |       EQUB &00 |
00004070  20 20 20 20 20 5c 20 72  65 73 75 6c 74 20 62 79  |     \ result by|
00004080  74 65 0d 20 33 31 30 30  20 2e 64 65 74 61 62 6c  |te. 3100 .detabl|
00004090  65 0d 20 33 31 31 30 20  20 20 20 20 20 20 20 20  |e. 3110         |
000040a0  45 51 55 44 20 26 30 34  30 30 30 30 30 30 0d 20  |EQUD &04000000. |
000040b0  33 31 32 30 20 2e 67 61  70 0d 20 33 31 33 30 20  |3120 .gap. 3130 |
000040c0  20 20 20 20 20 20 20 20  45 51 55 42 20 31 31 20  |        EQUB 11 |
000040d0  20 20 20 20 20 20 5c 20  47 61 70 20 33 2c 20 31  |      \ Gap 3, 1|
000040e0  38 20 73 65 63 74 6f 72  73 0d 20 33 31 34 30 20  |8 sectors. 3140 |
000040f0  20 20 20 20 20 20 20 20  45 51 55 42 20 32 31 20  |        EQUB 21 |
00004100  20 20 20 20 20 20 5c 20  47 61 70 20 33 2c 20 31  |      \ Gap 3, 1|
00004110  30 20 73 65 63 74 6f 72  73 0d 20 33 31 35 30 20  |0 sectors. 3150 |
00004120  20 20 20 20 20 20 20 20  45 51 55 42 20 37 34 20  |        EQUB 74 |
00004130  20 20 20 20 20 20 5c 20  47 61 70 20 33 2c 20 35  |      \ Gap 3, 5|
00004140  20 73 65 63 74 6f 72 73  0d 20 33 31 36 30 20 20  | sectors. 3160  |
00004150  20 20 20 20 20 20 20 45  51 55 42 20 32 35 35 20  |       EQUB 255 |
00004160  20 20 20 20 20 5c 20 47  61 70 20 33 2c 20 32 20  |     \ Gap 3, 2 |
00004170  73 65 63 74 6f 72 73 0d  20 33 31 37 30 20 20 20  |sectors. 3170   |
00004180  20 20 20 20 20 20 45 51  55 42 20 30 20 20 20 20  |      EQUB 0    |
00004190  20 20 20 20 5c 20 47 61  70 20 33 2c 20 31 20 73  |    \ Gap 3, 1 s|
000041a0  65 63 74 6f 72 0d 20 33  31 38 30 20 2e 73 69 7a  |ector. 3180 .siz|
000041b0  65 73 0d 20 33 31 39 30  20 20 20 20 20 20 20 20  |es. 3190        |
000041c0  20 45 51 55 42 20 31 38  0d 20 33 32 30 30 20 20  | EQUB 18. 3200  |
000041d0  20 20 20 20 20 20 20 45  51 55 42 20 31 30 0d 20  |       EQUB 10. |
000041e0  33 32 31 30 20 20 20 20  20 20 20 20 20 45 51 55  |3210         EQU|
000041f0  42 20 35 0d 20 33 32 32  30 20 20 20 20 20 20 20  |B 5. 3220       |
00004200  20 20 45 51 55 42 20 32  0d 20 33 32 33 30 20 20  |  EQUB 2. 3230  |
00004210  20 20 20 20 20 20 20 45  51 55 42 20 31 0d 20 33  |       EQUB 1. 3|
00004220  32 34 30 20 2e 70 68 79  73 69 63 61 6c 0d 20 33  |240 .physical. 3|
00004230  32 35 30 20 20 20 20 20  20 20 20 20 45 51 55 42  |250         EQUB|
00004240  20 26 30 30 0d 20 33 32  36 30 20 2e 73 65 63 74  | &00. 3260 .sect|
00004250  6f 72 6e 75 6d 62 65 72  0d 20 33 32 37 30 20 20  |ornumber. 3270  |
00004260  20 20 20 20 20 20 20 45  51 55 42 20 26 30 30 0d  |       EQUB &00.|
00004270  20 33 32 38 30 20 2e 6c  61 73 74 0d 20 33 32 39  | 3280 .last. 329|
00004280  30 20 20 20 20 20 20 20  20 20 45 51 55 42 20 26  |0         EQUB &|
00004290  30 30 0d 20 33 33 30 30  20 5d 0d 20 33 33 31 30  |00. 3300 ]. 3310|
000042a0  20 4e 45 58 54 0d 20 33  33 32 30 20 49 4e 50 55  | NEXT. 3320 INPU|
000042b0  54 27 22 4e 75 6d 62 65  72 20 6f 66 20 74 72 61  |T'"Number of tra|
000042c0  63 6b 73 20 28 34 30 2f  38 30 29 20 22 74 72 61  |cks (40/80) "tra|
000042d0  63 6b 73 24 0d 20 33 33  33 30 20 49 46 20 74 72  |cks$. 3330 IF tr|
000042e0  61 63 6b 73 24 3d 22 34  30 22 20 3f 6c 61 73 74  |acks$="40" ?last|
000042f0  3d 34 30 20 45 4c 53 45  20 3f 6c 61 73 74 3d 38  |=40 ELSE ?last=8|
00004300  30 0d 20 33 33 34 30 20  50 52 49 4e 54 27 22 49  |0. 3340 PRINT'"I|
00004310  6e 73 65 72 74 20 22 3b  3f 6c 61 73 74 3b 22 20  |nsert ";?last;" |
00004320  74 72 61 63 6b 20 73 6f  75 72 63 65 20 64 69 73  |track source dis|
00004330  63 20 69 6e 20 3a 30 22  0d 20 33 33 35 30 20 50  |c in :0". 3350 P|
00004340  52 49 4e 54 22 49 6e 73  65 72 74 20 22 3b 3f 6c  |RINT"Insert ";?l|
00004350  61 73 74 3b 22 20 74 72  61 63 6b 20 64 65 73 74  |ast;" track dest|
00004360  69 6e 61 74 69 6f 6e 20  64 69 73 63 20 69 6e 20  |ination disc in |
00004370  3a 31 22 0d 20 33 33 36  30 20 50 52 49 4e 54 27  |:1". 3360 PRINT'|
00004380  22 50 72 65 73 73 20 53  70 61 63 65 62 61 72 20  |"Press Spacebar |
00004390  74 6f 20 63 6f 70 79 20  66 72 6f 6d 20 3a 30 20  |to copy from :0 |
000043a0  74 6f 20 3a 31 22 0d 20  33 33 37 30 20 52 45 50  |to :1". 3370 REP|
000043b0  45 41 54 0d 20 33 33 38  30 20 55 4e 54 49 4c 20  |EAT. 3380 UNTIL |
000043c0  47 45 54 3d 33 32 0d 20  33 33 39 30 20 43 41 4c  |GET=32. 3390 CAL|
000043d0  4c 20 6d 63 6f 64 65 0d  0d 0d 57 68 65 6e 20 79  |L mcode...When y|
000043e0  6f 75 20 68 61 76 65 20  64 65 73 69 67 6e 65 64  |ou have designed|
000043f0  20 61 20 64 69 73 63 20  66 6f 72 6d 61 74 20 61  | a disc format a|
00004400  6e 64 20 61 20 64 61 74  61 20 73 74 6f 72 61 67  |nd a data storag|
00004410  65 20 61 6e 64 20 72 65  74 72 69 65 76 65 6c 0d  |e and retrievel.|
00004420  73 79 73 74 65 6d 20 77  68 69 63 68 20 63 61 6e  |system which can|
00004430  6e 6f 74 20 62 65 20 63  6f 70 69 65 64 20 77 69  |not be copied wi|
00004440  74 68 20 43 4f 50 59 44  46 53 20 79 6f 75 20 73  |th COPYDFS you s|
00004450  68 6f 75 6c 64 20 61 74  74 65 6d 70 74 20 74 6f  |hould attempt to|
00004460  20 63 6f 70 79 20 74 68  65 0d 64 69 73 63 20 75  | copy the.disc u|
00004470  73 69 6e 67 20 43 4f 50  59 41 4c 4c 2e 20 54 68  |sing COPYALL. Th|
00004480  69 73 20 70 72 6f 67 72  61 6d 20 75 73 65 73 20  |is program uses |
00004490  61 20 73 69 6d 69 6c 61  72 20 61 6c 67 6f 72 69  |a similar algori|
000044a0  74 68 6d 20 74 6f 20 74  68 61 74 20 75 73 65 64  |thm to that used|
000044b0  20 62 79 0d 43 4f 50 59  44 46 53 20 62 75 74 2c  | by.COPYDFS but,|
000044c0  20 69 6e 73 74 65 61 64  20 6f 66 20 63 6f 70 79  | instead of copy|
000044d0  69 6e 67 20 61 20 74 72  61 63 6b 20 61 74 20 61  |ing a track at a|
000044e0  20 74 69 6d 65 2c 20 69  74 20 61 74 74 65 6d 70  | time, it attemp|
000044f0  74 73 20 74 6f 20 63 6f  70 79 20 74 68 65 0d 64  |ts to copy the.d|
00004500  69 73 63 20 61 20 73 65  63 74 6f 72 20 61 74 20  |isc a sector at |
00004510  61 20 74 69 6d 65 2e 20  54 68 69 73 20 6d 65 74  |a time. This met|
00004520  68 6f 64 20 6f 66 20 63  6f 70 79 69 6e 67 20 74  |hod of copying t|
00004530  61 6b 65 73 20 6d 75 63  68 20 6c 6f 6e 67 65 72  |akes much longer|
00004540  20 62 75 74 20 69 74 0d  64 6f 65 73 20 61 6c 6c  | but it.does all|
00004550  6f 77 20 74 68 65 20 70  72 6f 67 72 61 6d 20 74  |ow the program t|
00004560  6f 20 63 68 65 63 6b 20  69 66 20 64 65 6c 65 74  |o check if delet|
00004570  65 64 20 64 61 74 61 20  69 73 20 62 65 69 6e 67  |ed data is being|
00004580  20 75 73 65 64 20 6f 6e  20 61 6e 0d 69 6e 64 69  | used on an.indi|
00004590  76 69 64 75 61 6c 20 73  65 63 74 6f 72 20 72 61  |vidual sector ra|
000045a0  74 68 65 72 20 74 68 61  6e 20 6f 6e 20 61 20 74  |ther than on a t|
000045b0  72 61 63 6b 20 61 73 20  61 20 77 68 6f 6c 65 2e  |rack as a whole.|
000045c0  20 54 68 69 73 20 77 69  6c 6c 20 67 69 76 65 20  | This will give |
000045d0  61 0d 62 65 74 74 65 72  20 63 6f 70 79 20 6f 66  |a.better copy of|
000045e0  20 74 68 65 20 6f 72 69  67 69 6e 61 6c 20 64 69  | the original di|
000045f0  73 63 20 62 75 74 20 69  74 20 69 73 20 6e 6f 74  |sc but it is not|
00004600  20 61 20 66 6f 6f 6c 2d  70 72 6f 6f 66 20 6d 65  | a fool-proof me|
00004610  74 68 6f 64 20 6f 66 0d  64 75 70 6c 69 63 61 74  |thod of.duplicat|
00004620  69 6e 67 20 27 64 69 66  66 69 63 75 6c 74 27 20  |ing 'difficult' |
00004630  64 69 73 63 73 2e 0d 0d  57 68 65 6e 20 79 6f 75  |discs...When you|
00004640  20 73 74 61 72 74 20 74  6f 20 74 68 69 6e 6b 20  | start to think |
00004650  61 62 6f 75 74 20 64 65  73 69 67 6e 69 6e 67 20  |about designing |
00004660  61 20 64 69 73 63 20 66  6f 72 6d 61 74 20 77 68  |a disc format wh|
00004670  69 63 68 20 63 61 6e 20  6e 6f 74 20 62 65 0d 63  |ich can not be.c|
00004680  6f 70 69 65 64 20 62 79  20 43 4f 50 59 41 4c 4c  |opied by COPYALL|
00004690  20 49 20 73 75 67 67 65  73 74 20 74 68 61 74 20  | I suggest that |
000046a0  79 6f 75 20 73 68 6f 75  6c 64 20 74 68 69 6e 6b  |you should think|
000046b0  20 63 61 72 65 66 75 6c  6c 79 20 61 62 6f 75 74  | carefully about|
000046c0  20 75 73 69 6e 67 0d 75  6e 75 73 75 61 6c 20 6c  | using.unusual l|
000046d0  6f 67 69 63 61 6c 20 74  72 61 63 6b 20 61 6e 64  |ogical track and|
000046e0  20 73 65 63 74 6f 72 20  63 6f 6d 62 69 6e 61 74  | sector combinat|
000046f0  69 6f 6e 73 20 69 6e 20  75 6e 75 73 75 61 6c 20  |ions in unusual |
00004700  6f 72 20 75 6e 65 78 70  65 63 74 65 64 0d 77 61  |or unexpected.wa|
00004710  79 73 2e 20 49 20 63 61  6e 6e 6f 74 20 74 65 6c  |ys. I cannot tel|
00004720  6c 20 79 6f 75 20 77 68  61 74 20 74 6f 20 64 6f  |l you what to do|
00004730  20 62 65 63 61 75 73 65  20 65 76 65 72 79 6f 6e  | because everyon|
00004740  65 20 65 6c 73 65 20 77  68 6f 20 72 65 61 64 73  |e else who reads|
00004750  20 74 68 69 73 0d 6d 6f  64 75 6c 65 20 77 69 6c  | this.module wil|
00004760  6c 20 74 68 65 6e 20 6b  6e 6f 77 20 77 68 61 74  |l then know what|
00004770  20 79 6f 75 20 68 61 76  65 20 64 6f 6e 65 2e 20  | you have done. |
00004780  59 6f 75 20 63 61 6e 20  6e 6f 74 20 6d 61 6b 65  |You can not make|
00004790  20 61 20 64 69 73 63 0d  75 6e 68 61 63 6b 61 62  | a disc.unhackab|
000047a0  6c 65 20 28 69 66 20 74  68 65 72 65 20 69 73 20  |le (if there is |
000047b0  73 75 63 68 20 61 20 77  6f 72 64 29 20 62 75 74  |such a word) but|
000047c0  20 69 74 20 69 73 20 70  6f 73 73 69 62 6c 65 20  | it is possible |
000047d0  74 6f 20 6d 61 6b 65 20  61 20 64 69 73 63 0d 75  |to make a disc.u|
000047e0  6e 63 6f 70 79 61 62 6c  65 20 62 79 20 65 69 74  |ncopyable by eit|
000047f0  68 65 72 20 6f 66 20 74  68 65 73 65 20 70 72 6f  |her of these pro|
00004800  67 72 61 6d 73 20 6f 72  20 61 6e 79 20 6f 66 20  |grams or any of |
00004810  74 68 65 20 63 6f 6d 6d  65 72 63 69 61 6c 20 64  |the commercial d|
00004820  69 73 63 0d 64 75 70 6c  69 63 61 74 69 6f 6e 20  |isc.duplication |
00004830  70 72 6f 67 72 61 6d 73  20 61 76 61 69 6c 61 62  |programs availab|
00004840  6c 65 20 61 74 20 74 68  65 20 74 69 6d 65 20 6f  |le at the time o|
00004850  66 20 77 72 69 74 69 6e  67 20 28 4e 6f 76 65 6d  |f writing (Novem|
00004860  62 65 72 20 31 39 38 37  29 2e 20 41 6c 6c 0d 74  |ber 1987). All.t|
00004870  68 65 20 69 6e 66 6f 72  6d 61 74 69 6f 6e 20 79  |he information y|
00004880  6f 75 20 6e 65 65 64 20  74 6f 20 64 6f 20 69 74  |ou need to do it|
00004890  20 68 61 73 20 62 65 65  6e 20 70 72 65 73 65 6e  | has been presen|
000048a0  74 65 64 20 69 6e 20 74  68 65 73 65 20 44 46 53  |ted in these DFS|
000048b0  20 6d 6f 64 75 6c 65 73  2e 0d 59 6f 75 20 77 69  | modules..You wi|
000048c0  6c 6c 20 68 61 76 65 20  74 6f 20 6c 6f 6f 6b 20  |ll have to look |
000048d0  63 61 72 65 66 75 6c 6c  79 20 61 74 20 74 68 65  |carefully at the|
000048e0  20 69 6e 66 6f 72 6d 61  74 69 6f 6e 20 70 72 6f  | information pro|
000048f0  76 69 64 65 64 20 61 6e  64 20 74 68 69 6e 6b 20  |vided and think |
00004900  68 61 72 64 0d 61 62 6f  75 74 20 77 68 61 74 20  |hard.about what |
00004910  61 20 70 72 6f 67 72 61  6d 20 77 6f 75 6c 64 20  |a program would |
00004920  6e 65 65 64 20 74 6f 20  64 6f 20 74 6f 20 64 75  |need to do to du|
00004930  70 6c 69 63 61 74 65 20  79 6f 75 72 20 64 69 73  |plicate your dis|
00004940  63 2e 0d 0d 0d 20 20 20  31 30 20 52 45 4d 3a 20  |c....   10 REM: |
00004950  43 4f 50 59 41 4c 4c 0d  20 20 20 32 30 20 6f 73  |COPYALL.   20 os|
00004960  6e 65 77 6c 3d 26 46 46  45 37 0d 20 20 20 33 30  |newl=&FFE7.   30|
00004970  20 6f 73 77 72 63 68 3d  26 46 46 45 45 0d 20 20  | oswrch=&FFEE.  |
00004980  20 34 30 20 6f 73 77 6f  72 64 3d 26 46 46 46 31  | 40 osword=&FFF1|
00004990  0d 20 20 20 35 30 20 6f  73 62 79 74 65 3d 26 46  |.   50 osbyte=&F|
000049a0  46 46 34 0d 20 20 20 36  30 20 44 49 4d 20 74 61  |FF4.   60 DIM ta|
000049b0  62 6c 65 20 26 35 30 0d  20 20 20 37 30 20 44 49  |ble &50.   70 DI|
000049c0  4d 20 6d 63 6f 64 65 20  26 35 30 30 0d 20 20 20  |M mcode &500.   |
000049d0  38 30 20 44 49 4d 20 62  75 66 66 65 72 20 26 31  |80 DIM buffer &1|
000049e0  30 30 30 0d 20 20 20 39  30 20 46 4f 52 20 70 61  |000.   90 FOR pa|
000049f0  73 73 3d 30 20 54 4f 20  32 20 53 54 45 50 20 32  |ss=0 TO 2 STEP 2|
00004a00  0d 20 20 31 30 30 20 50  25 3d 6d 63 6f 64 65 0d  |.  100 P%=mcode.|
00004a10  20 20 31 31 30 20 5b 20  20 20 20 20 20 20 4f 50  |  110 [       OP|
00004a20  54 20 70 61 73 73 0d 20  20 31 32 30 20 20 20 20  |T pass.  120    |
00004a30  20 20 20 20 20 4a 53 52  20 6f 73 6e 65 77 6c 0d  |     JSR osnewl.|
00004a40  20 20 31 33 30 20 2e 6d  61 69 6e 6c 6f 6f 70 0d  |  130 .mainloop.|
00004a50  20 20 31 34 30 20 20 20  20 20 20 20 20 20 4a 53  |  140         JS|
00004a60  52 20 65 73 63 61 70 65  20 20 20 20 5c 20 63 68  |R escape    \ ch|
00004a70  65 63 6b 20 65 73 63 61  70 65 20 66 6c 61 67 0d  |eck escape flag.|
00004a80  20 20 31 35 30 20 20 20  20 20 20 20 20 20 4a 53  |  150         JS|
00004a90  52 20 73 65 65 6b 20 20  20 20 20 20 5c 20 73 65  |R seek      \ se|
00004aa0  65 6b 20 70 68 79 73 69  63 61 6c 20 74 72 61 63  |ek physical trac|
00004ab0  6b 73 20 30 20 2d 20 34  30 0d 20 20 31 36 30 20  |ks 0 - 40.  160 |
00004ac0  20 20 20 20 20 20 20 20  4a 53 52 20 66 69 72 73  |        JSR firs|
00004ad0  74 73 65 63 74 6f 72 20  5c 20 72 65 61 64 20 73  |tsector \ read s|
00004ae0  65 63 74 6f 72 20 69 64  20 66 69 72 73 74 20 73  |ector id first s|
00004af0  65 63 74 6f 72 0d 20 20  31 37 30 20 20 20 20 20  |ector.  170     |
00004b00  20 20 20 20 42 4e 45 20  6e 6f 74 66 6f 72 6d 61  |    BNE notforma|
00004b10  74 74 65 64 20 5c 20 69  66 20 65 72 72 6f 72 20  |tted \ if error |
00004b20  74 68 65 6e 20 74 72 61  63 6b 20 6e 6f 74 20 66  |then track not f|
00004b30  6f 72 6d 61 74 74 65 64  0d 20 20 31 38 30 20 20  |ormatted.  180  |
00004b40  20 20 20 20 20 20 20 4a  53 52 20 73 65 63 74 6f  |       JSR secto|
00004b50  72 69 64 73 20 5c 20 72  65 61 64 20 61 6c 6c 20  |rids \ read all |
00004b60  73 65 63 74 6f 72 20 69  64 73 0d 20 20 31 39 30  |sector ids.  190|
00004b70  20 20 20 20 20 20 20 20  20 4a 53 52 20 66 6f 72  |         JSR for|
00004b80  6d 61 74 20 20 20 20 5c  20 66 6f 72 6d 61 74 20  |mat    \ format |
00004b90  73 65 63 74 6f 72 20 6f  6e 20 64 72 69 76 65 20  |sector on drive |
00004ba0  31 0d 20 20 32 30 30 20  2e 6c 6f 6f 70 73 65 63  |1.  200 .loopsec|
00004bb0  74 6f 72 0d 20 20 32 31  30 20 20 20 20 20 20 20  |tor.  210       |
00004bc0  20 20 4a 53 52 20 65 73  63 61 70 65 20 20 20 20  |  JSR escape    |
00004bd0  5c 20 63 68 65 63 6b 20  65 73 63 61 70 65 20 66  |\ check escape f|
00004be0  6c 61 67 0d 20 20 32 32  30 20 20 20 20 20 20 20  |lag.  220       |
00004bf0  20 20 4a 53 52 20 63 6f  70 79 73 65 63 74 6f 72  |  JSR copysector|
00004c00  20 5c 20 72 65 61 64 20  61 6e 64 20 77 72 69 74  | \ read and writ|
00004c10  65 20 73 65 63 74 6f 72  0d 20 20 32 33 30 20 20  |e sector.  230  |
00004c20  20 20 20 20 20 20 20 42  50 4c 20 6c 6f 6f 70 73  |       BPL loops|
00004c30  65 63 74 6f 72 20 5c 20  63 6f 70 79 20 6e 65 78  |ector \ copy nex|
00004c40  74 20 73 65 63 74 6f 72  0d 20 20 32 34 30 20 20  |t sector.  240  |
00004c50  20 20 20 20 20 20 20 4c  44 41 20 70 68 79 73 69  |       LDA physi|
00004c60  63 61 6c 20 20 5c 20 70  68 79 73 69 63 61 6c 20  |cal  \ physical |
00004c70  74 72 61 63 6b 20 6e 75  6d 62 65 72 0d 20 20 32  |track number.  2|
00004c80  35 30 20 20 20 20 20 20  20 20 20 4a 53 52 20 72  |50         JSR r|
00004c90  65 67 69 73 74 65 72 20  20 5c 20 77 72 69 74 65  |egister  \ write|
00004ca0  20 74 72 61 63 6b 20 72  65 67 69 73 74 65 72 0d  | track register.|
00004cb0  20 20 32 36 30 20 20 20  20 20 20 20 20 20 4a 4d  |  260         JM|
00004cc0  50 20 6f 75 74 70 75 74  0d 20 20 32 37 30 20 2e  |P output.  270 .|
00004cd0  6e 6f 74 66 6f 72 6d 61  74 74 65 64 0d 20 20 32  |notformatted.  2|
00004ce0  38 30 20 20 20 20 20 20  20 20 20 4a 53 52 20 64  |80         JSR d|
00004cf0  65 66 6f 72 6d 20 20 20  20 5c 20 64 65 2d 66 6f  |eform    \ de-fo|
00004d00  72 6d 61 74 20 74 68 69  73 20 74 72 61 63 6b 0d  |rmat this track.|
00004d10  20 20 32 39 30 20 2e 6f  75 74 70 75 74 0d 20 20  |  290 .output.  |
00004d20  33 30 30 20 20 20 20 20  20 20 20 20 4a 53 52 20  |300         JSR |
00004d30  70 72 69 6e 74 62 79 74  65 20 5c 20 70 72 69 6e  |printbyte \ prin|
00004d40  74 20 74 72 61 63 6b 20  6e 75 6d 62 65 72 0d 20  |t track number. |
00004d50  20 33 31 30 20 20 20 20  20 20 20 20 20 49 4e 43  | 310         INC|
00004d60  20 70 68 79 73 69 63 61  6c 20 20 5c 20 69 6e 63  | physical  \ inc|
00004d70  72 65 6d 65 6e 74 20 70  68 79 73 69 63 61 6c 20  |rement physical |
00004d80  74 72 61 63 6b 20 6e 75  6d 62 65 72 0d 20 20 33  |track number.  3|
00004d90  32 30 20 20 20 20 20 20  20 20 20 4c 44 41 20 70  |20         LDA p|
00004da0  68 79 73 69 63 61 6c 20  20 5c 20 6c 6f 61 64 20  |hysical  \ load |
00004db0  70 68 79 73 69 63 61 6c  20 74 72 61 63 6b 20 6e  |physical track n|
00004dc0  75 6d 62 65 72 0d 20 20  33 33 30 20 20 20 20 20  |umber.  330     |
00004dd0  20 20 20 20 43 4d 50 20  6c 61 73 74 20 20 20 20  |    CMP last    |
00004de0  20 20 5c 20 61 6c 6c 20  64 6f 6e 65 3f 0d 20 20  |  \ all done?.  |
00004df0  33 34 30 20 20 20 20 20  20 20 20 20 42 4e 45 20  |340         BNE |
00004e00  6d 61 69 6e 6c 6f 6f 70  20 20 5c 20 69 66 20 6e  |mainloop  \ if n|
00004e10  6f 74 20 63 6f 70 79 20  6e 65 78 74 20 74 72 61  |ot copy next tra|
00004e20  63 6b 0d 20 20 33 35 30  20 20 20 20 20 20 20 20  |ck.  350        |
00004e30  20 4a 53 52 20 6f 73 6e  65 77 6c 0d 20 20 33 36  | JSR osnewl.  36|
00004e40  30 20 20 20 20 20 20 20  20 20 52 54 53 20 20 20  |0         RTS   |
00004e50  20 20 20 20 20 20 20 20  5c 20 72 65 74 75 72 6e  |        \ return|
00004e60  20 74 6f 20 42 41 53 49  43 0d 20 20 33 37 30 20  | to BASIC.  370 |
00004e70  2e 65 73 63 61 70 65 0d  20 20 33 38 30 20 20 20  |.escape.  380   |
00004e80  20 20 20 20 20 20 4c 44  41 20 26 46 46 20 20 20  |      LDA &FF   |
00004e90  20 20 20 20 5c 20 65 73  63 61 70 65 20 66 6c 61  |    \ escape fla|
00004ea0  67 0d 20 20 33 39 30 20  20 20 20 20 20 20 20 20  |g.  390         |
00004eb0  42 4d 49 20 70 72 65 73  73 65 64 20 20 20 5c 20  |BMI pressed   \ |
00004ec0  62 69 74 20 37 20 73 65  74 20 69 66 20 70 72 65  |bit 7 set if pre|
00004ed0  73 73 65 64 0d 20 20 34  30 30 20 20 20 20 20 20  |ssed.  400      |
00004ee0  20 20 20 52 54 53 0d 20  20 34 31 30 20 2e 70 72  |   RTS.  410 .pr|
00004ef0  65 73 73 65 64 0d 20 20  34 32 30 20 20 20 20 20  |essed.  420     |
00004f00  20 20 20 20 4c 44 41 20  23 26 37 45 0d 20 20 34  |    LDA #&7E.  4|
00004f10  33 30 20 20 20 20 20 20  20 20 20 4a 53 52 20 6f  |30         JSR o|
00004f20  73 62 79 74 65 20 20 20  20 5c 20 61 63 6b 6e 6f  |sbyte    \ ackno|
00004f30  77 6c 65 64 67 65 20 45  73 63 61 70 65 0d 20 20  |wledge Escape.  |
00004f40  34 34 30 20 20 20 20 20  20 20 20 20 42 52 4b 0d  |440         BRK.|
00004f50  20 20 34 35 30 20 20 20  20 20 20 20 20 20 42 52  |  450         BR|
00004f60  4b 0d 20 20 34 36 30 20  20 20 20 20 20 20 20 20  |K.  460         |
00004f70  45 51 55 53 20 22 45 73  63 61 70 65 22 0d 20 20  |EQUS "Escape".  |
00004f80  34 37 30 20 20 20 20 20  20 20 20 20 42 52 4b 0d  |470         BRK.|
00004f90  20 20 34 38 30 20 2e 73  65 65 6b 0d 20 20 34 39  |  480 .seek.  49|
00004fa0  30 20 20 20 20 20 20 20  20 20 4c 44 41 20 70 68  |0         LDA ph|
00004fb0  79 73 69 63 61 6c 20 20  5c 20 70 68 79 73 69 63  |ysical  \ physic|
00004fc0  61 6c 20 74 72 61 63 6b  20 6e 75 6d 62 65 72 0d  |al track number.|
00004fd0  20 20 35 30 30 20 20 20  20 20 20 20 20 20 53 54  |  500         ST|
00004fe0  41 20 73 65 65 6b 62 6c  6f 63 6b 2b 37 0d 20 20  |A seekblock+7.  |
00004ff0  35 31 30 20 20 20 20 20  20 20 20 20 4c 44 41 20  |510         LDA |
00005000  23 26 30 30 20 20 20 20  20 20 5c 20 64 72 69 76  |#&00      \ driv|
00005010  65 20 30 0d 20 20 35 32  30 20 20 20 20 20 20 20  |e 0.  520       |
00005020  20 20 53 54 41 20 73 65  65 6b 62 6c 6f 63 6b 20  |  STA seekblock |
00005030  5c 20 73 74 6f 72 65 20  64 72 69 76 65 20 6e 75  |\ store drive nu|
00005040  6d 62 65 72 0d 20 20 35  33 30 20 20 20 20 20 20  |mber.  530      |
00005050  20 20 20 4c 44 41 20 23  26 37 46 0d 20 20 35 34  |   LDA #&7F.  54|
00005060  30 20 20 20 20 20 20 20  20 20 4c 44 58 20 23 73  |0         LDX #s|
00005070  65 65 6b 62 6c 6f 63 6b  20 4d 4f 44 20 32 35 36  |eekblock MOD 256|
00005080  0d 20 20 35 35 30 20 20  20 20 20 20 20 20 20 4c  |.  550         L|
00005090  44 59 20 23 73 65 65 6b  62 6c 6f 63 6b 20 44 49  |DY #seekblock DI|
000050a0  56 20 32 35 36 0d 20 20  35 36 30 20 20 20 20 20  |V 256.  560     |
000050b0  20 20 20 20 4a 53 52 20  6f 73 77 6f 72 64 0d 20  |    JSR osword. |
000050c0  20 35 37 30 20 20 20 20  20 20 20 20 20 4c 44 41  | 570         LDA|
000050d0  20 73 65 65 6b 62 6c 6f  63 6b 2b 38 20 5c 20 72  | seekblock+8 \ r|
000050e0  65 73 75 6c 74 0d 20 20  35 38 30 20 20 20 20 20  |esult.  580     |
000050f0  20 20 20 20 42 4e 45 20  73 65 65 6b 65 72 72 6f  |    BNE seekerro|
00005100  72 20 5c 20 3d 20 30 20  69 66 20 4f 4b 0d 20 20  |r \ = 0 if OK.  |
00005110  35 39 30 20 20 20 20 20  20 20 20 20 4c 44 41 20  |590         LDA |
00005120  23 26 30 31 20 20 20 20  20 20 5c 20 64 72 69 76  |#&01      \ driv|
00005130  65 20 31 0d 20 20 36 30  30 20 20 20 20 20 20 20  |e 1.  600       |
00005140  20 20 53 54 41 20 73 65  65 6b 62 6c 6f 63 6b 20  |  STA seekblock |
00005150  5c 20 73 74 6f 72 65 20  64 72 69 76 65 20 6e 75  |\ store drive nu|
00005160  6d 62 65 72 0d 20 20 36  31 30 20 20 20 20 20 20  |mber.  610      |
00005170  20 20 20 4c 44 41 20 23  26 37 46 0d 20 20 36 32  |   LDA #&7F.  62|
00005180  30 20 20 20 20 20 20 20  20 20 4c 44 58 20 23 73  |0         LDX #s|
00005190  65 65 6b 62 6c 6f 63 6b  20 4d 4f 44 20 32 35 36  |eekblock MOD 256|
000051a0  0d 20 20 36 33 30 20 20  20 20 20 20 20 20 20 4c  |.  630         L|
000051b0  44 59 20 23 73 65 65 6b  62 6c 6f 63 6b 20 44 49  |DY #seekblock DI|
000051c0  56 20 32 35 36 0d 20 20  36 34 30 20 20 20 20 20  |V 256.  640     |
000051d0  20 20 20 20 4a 53 52 20  6f 73 77 6f 72 64 0d 20  |    JSR osword. |
000051e0  20 36 35 30 20 20 20 20  20 20 20 20 20 4c 44 41  | 650         LDA|
000051f0  20 73 65 65 6b 62 6c 6f  63 6b 2b 38 20 5c 20 72  | seekblock+8 \ r|
00005200  65 73 75 6c 74 0d 20 20  36 36 30 20 20 20 20 20  |esult.  660     |
00005210  20 20 20 20 42 4e 45 20  73 65 65 6b 65 72 72 6f  |    BNE seekerro|
00005220  72 20 5c 20 3d 20 30 20  69 66 20 4f 4b 0d 20 20  |r \ = 0 if OK.  |
00005230  36 37 30 20 20 20 20 20  20 20 20 20 52 54 53 0d  |670         RTS.|
00005240  20 20 36 38 30 20 2e 73  65 65 6b 65 72 72 6f 72  |  680 .seekerror|
00005250  0d 20 20 36 39 30 20 20  20 20 20 20 20 20 20 42  |.  690         B|
00005260  52 4b 0d 20 20 37 30 30  20 20 20 20 20 20 20 20  |RK.  700        |
00005270  20 42 52 4b 0d 20 20 37  31 30 20 20 20 20 20 20  | BRK.  710      |
00005280  20 20 20 45 51 55 53 20  22 53 65 65 6b 20 65 72  |   EQUS "Seek er|
00005290  72 6f 72 22 0d 20 20 37  32 30 20 20 20 20 20 20  |ror".  720      |
000052a0  20 20 20 42 52 4b 0d 20  20 37 33 30 20 2e 66 6f  |   BRK.  730 .fo|
000052b0  72 6d 61 74 0d 20 20 37  34 30 20 20 20 20 20 20  |rmat.  740      |
000052c0  20 20 20 4c 44 41 20 70  68 79 73 69 63 61 6c 20  |   LDA physical |
000052d0  20 5c 20 70 68 79 73 69  63 61 6c 20 74 72 61 63  | \ physical trac|
000052e0  6b 20 6e 75 6d 62 65 72  0d 20 20 37 35 30 20 20  |k number.  750  |
000052f0  20 20 20 20 20 20 20 53  54 41 20 66 6f 72 6d 62  |       STA formb|
00005300  6c 6f 63 6b 2b 37 20 5c  20 73 74 6f 72 65 20 70  |lock+7 \ store p|
00005310  68 79 73 69 63 61 6c 20  74 72 61 63 6b 0d 20 20  |hysical track.  |
00005320  37 36 30 20 20 20 20 20  20 20 20 20 4c 44 41 20  |760         LDA |
00005330  74 61 62 6c 65 2b 33 20  20 20 5c 20 64 61 74 61  |table+3   \ data|
00005340  20 73 69 7a 65 20 63 6f  64 65 0d 20 20 37 37 30  | size code.  770|
00005350  20 20 20 20 20 20 20 20  20 54 41 58 20 20 20 20  |         TAX    |
00005360  20 20 20 20 20 20 20 5c  20 75 73 65 64 20 61 73  |       \ used as|
00005370  20 69 6e 64 65 78 20 6c  61 74 65 72 0d 20 20 37  | index later.  7|
00005380  38 30 20 20 20 20 20 20  20 20 20 41 53 4c 20 41  |80         ASL A|
00005390  20 20 20 20 20 20 20 20  20 5c 20 2a 32 0d 20 20  |         \ *2.  |
000053a0  37 39 30 20 20 20 20 20  20 20 20 20 41 53 4c 20  |790         ASL |
000053b0  41 20 20 20 20 20 20 20  20 20 5c 20 2a 34 0d 20  |A         \ *4. |
000053c0  20 38 30 30 20 20 20 20  20 20 20 20 20 41 53 4c  | 800         ASL|
000053d0  20 41 20 20 20 20 20 20  20 20 20 5c 20 2a 38 0d  | A         \ *8.|
000053e0  20 20 38 31 30 20 20 20  20 20 20 20 20 20 41 53  |  810         AS|
000053f0  4c 20 41 20 20 20 20 20  20 20 20 20 5c 20 2a 31  |L A         \ *1|
00005400  36 0d 20 20 38 32 30 20  20 20 20 20 20 20 20 20  |6.  820         |
00005410  41 53 4c 20 41 20 20 20  20 20 20 20 20 20 5c 20  |ASL A         \ |
00005420  2a 33 32 0d 20 20 38 33  30 20 20 20 20 20 20 20  |*32.  830       |
00005430  20 20 53 54 41 20 66 6f  72 6d 62 6c 6f 63 6b 2b  |  STA formblock+|
00005440  39 20 5c 20 73 74 6f 72  65 20 64 61 74 61 63 6f  |9 \ store dataco|
00005450  64 65 2a 33 32 0d 20 20  38 34 30 20 20 20 20 20  |de*32.  840     |
00005460  20 20 20 20 4f 52 41 20  23 26 30 31 20 20 20 20  |    ORA #&01    |
00005470  20 20 5c 20 61 64 64 20  31 0d 20 20 38 35 30 20  |  \ add 1.  850 |
00005480  20 20 20 20 20 20 20 20  53 54 41 20 63 6f 70 79  |        STA copy|
00005490  62 6c 6f 63 6b 2b 39 20  5c 20 73 74 6f 72 65 20  |block+9 \ store |
000054a0  64 61 74 61 63 6f 64 65  2a 33 32 2b 31 0d 20 20  |datacode*32+1.  |
000054b0  38 36 30 20 20 20 20 20  20 20 20 20 4c 44 41 20  |860         LDA |
000054c0  73 69 7a 65 73 2c 58 20  20 20 5c 20 6c 6f 61 64  |sizes,X   \ load|
000054d0  20 6e 75 6d 62 65 72 20  6f 66 20 73 65 63 74 6f  | number of secto|
000054e0  72 73 0d 20 20 38 37 30  20 20 20 20 20 20 20 20  |rs.  870        |
000054f0  20 4f 52 41 20 66 6f 72  6d 62 6c 6f 63 6b 2b 39  | ORA formblock+9|
00005500  20 5c 20 61 64 64 20 64  61 74 61 63 6f 64 65 2a  | \ add datacode*|
00005510  33 32 0d 20 20 38 38 30  20 20 20 20 20 20 20 20  |32.  880        |
00005520  20 53 54 41 20 66 6f 72  6d 62 6c 6f 63 6b 2b 39  | STA formblock+9|
00005530  20 5c 20 73 74 6f 72 65  20 64 61 74 61 63 6f 64  | \ store datacod|
00005540  65 2a 33 32 2b 6e 75 6d  62 65 72 73 65 63 74 6f  |e*32+numbersecto|
00005550  72 73 0d 20 20 38 39 30  20 20 20 20 20 20 20 20  |rs.  890        |
00005560  20 4c 44 41 20 67 61 70  2c 58 20 20 20 20 20 5c  | LDA gap,X     \|
00005570  20 6c 6f 61 64 20 67 61  70 20 33 20 66 6f 72 20  | load gap 3 for |
00005580  74 68 65 73 65 20 73 65  63 74 6f 72 73 0d 20 20  |these sectors.  |
00005590  39 30 30 20 20 20 20 20  20 20 20 20 53 54 41 20  |900         STA |
000055a0  66 6f 72 6d 62 6c 6f 63  6b 2b 38 20 5c 20 73 74  |formblock+8 \ st|
000055b0  6f 72 65 20 66 6f 72 20  66 6f 72 6d 61 74 74 69  |ore for formatti|
000055c0  6e 67 0d 20 20 39 31 30  20 20 20 20 20 20 20 20  |ng.  910        |
000055d0  20 4c 44 41 20 23 26 37  46 0d 20 20 39 32 30 20  | LDA #&7F.  920 |
000055e0  20 20 20 20 20 20 20 20  4c 44 58 20 23 66 6f 72  |        LDX #for|
000055f0  6d 62 6c 6f 63 6b 20 4d  4f 44 20 32 35 36 0d 20  |mblock MOD 256. |
00005600  20 39 33 30 20 20 20 20  20 20 20 20 20 4c 44 59  | 930         LDY|
00005610  20 23 66 6f 72 6d 62 6c  6f 63 6b 20 44 49 56 20  | #formblock DIV |
00005620  32 35 36 0d 20 20 39 34  30 20 20 20 20 20 20 20  |256.  940       |
00005630  20 20 4a 53 52 20 6f 73  77 6f 72 64 0d 20 20 39  |  JSR osword.  9|
00005640  35 30 20 20 20 20 20 20  20 20 20 4c 44 41 20 66  |50         LDA f|
00005650  6f 72 6d 62 6c 6f 63 6b  2b 31 32 20 5c 20 72 65  |ormblock+12 \ re|
00005660  73 75 6c 74 0d 20 20 39  36 30 20 20 20 20 20 20  |sult.  960      |
00005670  20 20 20 42 4e 45 20 66  6f 72 6d 65 72 72 6f 72  |   BNE formerror|
00005680  20 5c 20 3d 20 30 20 69  66 20 4f 4b 0d 20 20 39  | \ = 0 if OK.  9|
00005690  37 30 20 20 20 20 20 20  20 20 20 4c 44 58 20 74  |70         LDX t|
000056a0  61 62 6c 65 2b 33 20 20  20 5c 20 6c 6f 61 64 20  |able+3   \ load |
000056b0  64 61 74 61 20 73 69 7a  65 20 63 6f 64 65 0d 20  |data size code. |
000056c0  20 39 38 30 20 20 20 20  20 20 20 20 20 4c 44 41  | 980         LDA|
000056d0  20 73 69 7a 65 73 2c 58  20 20 20 5c 20 6c 6f 61  | sizes,X   \ loa|
000056e0  64 20 6e 75 6d 62 65 72  20 6f 66 20 73 65 63 74  |d number of sect|
000056f0  6f 72 73 0d 20 20 39 39  30 20 20 20 20 20 20 20  |ors.  990       |
00005700  20 20 41 53 4c 20 41 20  20 20 20 20 20 20 20 20  |  ASL A         |
00005710  5c 20 2a 32 0d 20 31 30  30 30 20 20 20 20 20 20  |\ *2. 1000      |
00005720  20 20 20 41 53 4c 20 41  20 20 20 20 20 20 20 20  |   ASL A        |
00005730  20 5c 20 2a 34 0d 20 31  30 31 30 20 20 20 20 20  | \ *4. 1010     |
00005740  20 20 20 20 53 45 43 0d  20 31 30 32 30 20 20 20  |    SEC. 1020   |
00005750  20 20 20 20 20 20 53 42  43 20 23 26 30 34 20 20  |      SBC #&04  |
00005760  20 20 20 20 5c 20 73 65  63 74 6f 72 73 2a 34 2d  |    \ sectors*4-|
00005770  34 0d 20 31 30 33 30 20  20 20 20 20 20 20 20 20  |4. 1030         |
00005780  53 54 41 20 73 65 63 74  6f 72 6e 75 6d 62 65 72  |STA sectornumber|
00005790  20 5c 20 73 74 6f 72 65  20 69 6e 64 65 78 20 6f  | \ store index o|
000057a0  6e 20 73 65 63 74 6f 72  73 0d 20 31 30 34 30 20  |n sectors. 1040 |
000057b0  20 20 20 20 20 20 20 20  52 54 53 0d 20 31 30 35  |        RTS. 105|
000057c0  30 20 2e 66 6f 72 6d 65  72 72 6f 72 0d 20 31 30  |0 .formerror. 10|
000057d0  36 30 20 20 20 20 20 20  20 20 20 42 52 4b 0d 20  |60         BRK. |
000057e0  31 30 37 30 20 20 20 20  20 20 20 20 20 42 52 4b  |1070         BRK|
000057f0  0d 20 31 30 38 30 20 20  20 20 20 20 20 20 20 45  |. 1080         E|
00005800  51 55 53 20 22 46 6f 72  6d 61 74 20 65 72 72 6f  |QUS "Format erro|
00005810  72 22 0d 20 31 30 39 30  20 20 20 20 20 20 20 20  |r". 1090        |
00005820  20 42 52 4b 0d 20 31 31  30 30 20 2e 64 65 66 6f  | BRK. 1100 .defo|
00005830  72 6d 0d 20 31 31 31 30  20 20 20 20 20 20 20 20  |rm. 1110        |
00005840  20 4c 44 41 20 70 68 79  73 69 63 61 6c 20 20 5c  | LDA physical  \|
00005850  20 6c 6f 61 64 20 70 68  79 73 69 63 61 6c 20 74  | load physical t|
00005860  72 61 63 6b 20 6e 75 6d  62 65 72 0d 20 31 31 32  |rack number. 112|
00005870  30 20 20 20 20 20 20 20  20 20 53 54 41 20 64 65  |0         STA de|
00005880  62 6c 6f 63 6b 2b 37 20  5c 20 73 74 6f 72 65 20  |block+7 \ store |
00005890  70 68 79 73 69 63 61 6c  20 74 72 61 63 6b 0d 20  |physical track. |
000058a0  31 31 33 30 20 20 20 20  20 20 20 20 20 4c 44 41  |1130         LDA|
000058b0  20 23 26 37 46 0d 20 31  31 34 30 20 20 20 20 20  | #&7F. 1140     |
000058c0  20 20 20 20 4c 44 58 20  23 64 65 62 6c 6f 63 6b  |    LDX #deblock|
000058d0  20 4d 4f 44 20 32 35 36  0d 20 31 31 35 30 20 20  | MOD 256. 1150  |
000058e0  20 20 20 20 20 20 20 4c  44 59 20 23 64 65 62 6c  |       LDY #debl|
000058f0  6f 63 6b 20 44 49 56 20  32 35 36 0d 20 31 31 36  |ock DIV 256. 116|
00005900  30 20 20 20 20 20 20 20  20 20 4a 53 52 20 6f 73  |0         JSR os|
00005910  77 6f 72 64 20 20 20 20  5c 20 64 65 2d 66 6f 72  |word    \ de-for|
00005920  6d 61 74 20 74 72 61 63  6b 0d 20 31 31 37 30 20  |mat track. 1170 |
00005930  20 20 20 20 20 20 20 20  4c 44 41 20 64 65 62 6c  |        LDA debl|
00005940  6f 63 6b 2b 31 32 20 5c  20 72 65 73 75 6c 74 0d  |ock+12 \ result.|
00005950  20 31 31 38 30 20 20 20  20 20 20 20 20 20 42 4e  | 1180         BN|
00005960  45 20 64 65 65 72 72 6f  72 20 20 20 5c 20 3d 20  |E deerror   \ = |
00005970  30 20 69 66 20 4f 4b 0d  20 31 31 39 30 20 20 20  |0 if OK. 1190   |
00005980  20 20 20 20 20 20 52 54  53 0d 20 31 32 30 30 20  |      RTS. 1200 |
00005990  2e 64 65 65 72 72 6f 72  0d 20 31 32 31 30 20 20  |.deerror. 1210  |
000059a0  20 20 20 20 20 20 20 42  52 4b 0d 20 31 32 32 30  |       BRK. 1220|
000059b0  20 20 20 20 20 20 20 20  20 42 52 4b 0d 20 31 32  |         BRK. 12|
000059c0  33 30 20 20 20 20 20 20  20 20 20 45 51 55 53 20  |30         EQUS |
000059d0  22 44 65 2d 66 6f 72 6d  61 74 20 65 72 72 6f 72  |"De-format error|
000059e0  22 0d 20 31 32 34 30 20  20 20 20 20 20 20 20 20  |". 1240         |
000059f0  42 52 4b 0d 20 31 32 35  30 20 2e 72 65 67 69 73  |BRK. 1250 .regis|
00005a00  74 65 72 0d 20 31 32 36  30 20 20 20 20 20 20 20  |ter. 1260       |
00005a10  20 20 53 54 41 20 72 65  67 62 6c 6f 63 6b 2b 38  |  STA regblock+8|
00005a20  20 5c 20 76 61 6c 75 65  20 74 6f 20 70 75 74 20  | \ value to put |
00005a30  69 6e 20 72 65 67 69 73  74 65 72 0d 20 31 32 37  |in register. 127|
00005a40  30 20 20 20 20 20 20 20  20 20 4c 44 41 20 23 26  |0         LDA #&|
00005a50  30 30 20 20 20 20 20 20  5c 20 64 72 69 76 65 20  |00      \ drive |
00005a60  30 0d 20 31 32 38 30 20  20 20 20 20 20 20 20 20  |0. 1280         |
00005a70  53 54 41 20 72 65 67 62  6c 6f 63 6b 0d 20 31 32  |STA regblock. 12|
00005a80  39 30 20 20 20 20 20 20  20 20 20 4c 44 41 20 23  |90         LDA #|
00005a90  26 31 32 20 20 20 20 20  20 5c 20 77 72 69 74 65  |&12      \ write|
00005aa0  20 74 72 61 63 6b 20 72  65 67 69 73 74 65 72 20  | track register |
00005ab0  30 2f 32 0d 20 31 33 30  30 20 20 20 20 20 20 20  |0/2. 1300       |
00005ac0  20 20 53 54 41 20 72 65  67 62 6c 6f 63 6b 2b 37  |  STA regblock+7|
00005ad0  20 5c 20 72 65 67 69 73  74 65 72 20 6e 75 6d 62  | \ register numb|
00005ae0  65 72 0d 20 31 33 31 30  20 20 20 20 20 20 20 20  |er. 1310        |
00005af0  20 4c 44 41 20 23 26 37  46 0d 20 31 33 32 30 20  | LDA #&7F. 1320 |
00005b00  20 20 20 20 20 20 20 20  4c 44 58 20 23 72 65 67  |        LDX #reg|
00005b10  62 6c 6f 63 6b 20 4d 4f  44 20 32 35 36 0d 20 31  |block MOD 256. 1|
00005b20  33 33 30 20 20 20 20 20  20 20 20 20 4c 44 59 20  |330         LDY |
00005b30  23 72 65 67 62 6c 6f 63  6b 20 44 49 56 20 32 35  |#regblock DIV 25|
00005b40  36 0d 20 31 33 34 30 20  20 20 20 20 20 20 20 20  |6. 1340         |
00005b50  4a 53 52 20 6f 73 77 6f  72 64 0d 20 31 33 35 30  |JSR osword. 1350|
00005b60  20 20 20 20 20 20 20 20  20 4c 44 41 20 72 65 67  |         LDA reg|
00005b70  62 6c 6f 63 6b 2b 39 20  5c 20 72 65 73 75 6c 74  |block+9 \ result|
00005b80  0d 20 31 33 36 30 20 20  20 20 20 20 20 20 20 42  |. 1360         B|
00005b90  4e 45 20 72 65 67 65 72  72 6f 72 20 20 5c 20 3d  |NE regerror  \ =|
00005ba0  20 30 20 69 66 20 4f 4b  0d 20 31 33 37 30 20 20  | 0 if OK. 1370  |
00005bb0  20 20 20 20 20 20 20 4c  44 41 20 23 26 30 31 20  |       LDA #&01 |
00005bc0  20 20 20 20 20 5c 20 64  72 69 76 65 20 31 0d 20  |     \ drive 1. |
00005bd0  31 33 38 30 20 20 20 20  20 20 20 20 20 53 54 41  |1380         STA|
00005be0  20 72 65 67 62 6c 6f 63  6b 0d 20 31 33 39 30 20  | regblock. 1390 |
00005bf0  20 20 20 20 20 20 20 20  4c 44 41 20 23 26 31 41  |        LDA #&1A|
00005c00  20 20 20 20 20 20 5c 20  77 72 69 74 65 20 74 72  |      \ write tr|
00005c10  61 63 6b 20 72 65 67 69  73 74 65 72 20 31 2f 33  |ack register 1/3|
00005c20  0d 20 31 34 30 30 20 20  20 20 20 20 20 20 20 53  |. 1400         S|
00005c30  54 41 20 72 65 67 62 6c  6f 63 6b 2b 37 20 5c 20  |TA regblock+7 \ |
00005c40  72 65 67 69 73 74 65 72  20 6e 75 6d 62 65 72 0d  |register number.|
00005c50  20 31 34 31 30 20 20 20  20 20 20 20 20 20 4c 44  | 1410         LD|
00005c60  41 20 23 26 37 46 0d 20  31 34 32 30 20 20 20 20  |A #&7F. 1420    |
00005c70  20 20 20 20 20 4c 44 58  20 23 72 65 67 62 6c 6f  |     LDX #regblo|
00005c80  63 6b 20 4d 4f 44 20 32  35 36 0d 20 31 34 33 30  |ck MOD 256. 1430|
00005c90  20 20 20 20 20 20 20 20  20 4c 44 59 20 23 72 65  |         LDY #re|
00005ca0  67 62 6c 6f 63 6b 20 44  49 56 20 32 35 36 0d 20  |gblock DIV 256. |
00005cb0  31 34 34 30 20 20 20 20  20 20 20 20 20 4a 53 52  |1440         JSR|
00005cc0  20 6f 73 77 6f 72 64 0d  20 31 34 35 30 20 20 20  | osword. 1450   |
00005cd0  20 20 20 20 20 20 4c 44  41 20 72 65 67 62 6c 6f  |      LDA regblo|
00005ce0  63 6b 2b 39 20 5c 20 72  65 73 75 6c 74 0d 20 31  |ck+9 \ result. 1|
00005cf0  34 36 30 20 20 20 20 20  20 20 20 20 42 4e 45 20  |460         BNE |
00005d00  72 65 67 65 72 72 6f 72  20 20 5c 20 3d 20 30 20  |regerror  \ = 0 |
00005d10  69 66 20 4f 4b 0d 20 31  34 37 30 20 20 20 20 20  |if OK. 1470     |
00005d20  20 20 20 20 52 54 53 0d  20 31 34 38 30 20 2e 72  |    RTS. 1480 .r|
00005d30  65 67 65 72 72 6f 72 0d  20 31 34 39 30 20 20 20  |egerror. 1490   |
00005d40  20 20 20 20 20 20 42 52  4b 0d 20 31 35 30 30 20  |      BRK. 1500 |
00005d50  20 20 20 20 20 20 20 20  42 52 4b 0d 20 31 35 31  |        BRK. 151|
00005d60  30 20 20 20 20 20 20 20  20 20 45 51 55 53 20 22  |0         EQUS "|
00005d70  53 70 65 63 69 61 6c 20  72 65 67 69 73 74 65 72  |Special register|
00005d80  20 65 72 72 6f 72 22 0d  20 31 35 32 30 20 20 20  | error". 1520   |
00005d90  20 20 20 20 20 20 42 52  4b 0d 20 31 35 33 30 20  |      BRK. 1530 |
00005da0  2e 66 69 72 73 74 73 65  63 74 6f 72 0d 20 31 35  |.firstsector. 15|
00005db0  34 30 20 20 20 20 20 20  20 20 20 4c 44 41 20 70  |40         LDA p|
00005dc0  68 79 73 69 63 61 6c 20  20 5c 20 70 68 79 73 69  |hysical  \ physi|
00005dd0  63 61 6c 20 74 72 61 63  6b 20 6e 75 6d 62 65 72  |cal track number|
00005de0  0d 20 31 35 35 30 20 20  20 20 20 20 20 20 20 53  |. 1550         S|
00005df0  54 41 20 69 64 73 62 6c  6f 63 6b 2b 37 20 5c 20  |TA idsblock+7 \ |
00005e00  73 74 6f 72 65 20 70 68  79 73 69 63 61 6c 20 74  |store physical t|
00005e10  72 61 63 6b 0d 20 31 35  36 30 20 20 20 20 20 20  |rack. 1560      |
00005e20  20 20 20 4c 44 41 20 23  26 30 31 20 20 20 20 20  |   LDA #&01     |
00005e30  20 5c 20 6f 6e 65 20 73  65 63 74 6f 72 0d 20 31  | \ one sector. 1|
00005e40  35 37 30 20 20 20 20 20  20 20 20 20 53 54 41 20  |570         STA |
00005e50  69 64 73 62 6c 6f 63 6b  2b 39 20 5c 20 6e 75 6d  |idsblock+9 \ num|
00005e60  62 65 72 20 6f 66 20 69  64 73 0d 20 31 35 38 30  |ber of ids. 1580|
00005e70  20 20 20 20 20 20 20 20  20 4c 44 41 20 23 26 37  |         LDA #&7|
00005e80  46 0d 20 31 35 39 30 20  20 20 20 20 20 20 20 20  |F. 1590         |
00005e90  4c 44 58 20 23 69 64 73  62 6c 6f 63 6b 20 4d 4f  |LDX #idsblock MO|
00005ea0  44 20 32 35 36 0d 20 31  36 30 30 20 20 20 20 20  |D 256. 1600     |
00005eb0  20 20 20 20 4c 44 59 20  23 69 64 73 62 6c 6f 63  |    LDY #idsbloc|
00005ec0  6b 20 44 49 56 20 32 35  36 0d 20 31 36 31 30 20  |k DIV 256. 1610 |
00005ed0  20 20 20 20 20 20 20 20  4a 53 52 20 6f 73 77 6f  |        JSR oswo|
00005ee0  72 64 0d 20 31 36 32 30  20 20 20 20 20 20 20 20  |rd. 1620        |
00005ef0  20 4c 44 41 20 69 64 73  62 6c 6f 63 6b 2b 31 30  | LDA idsblock+10|
00005f00  20 5c 20 72 65 73 75 6c  74 0d 20 31 36 33 30 20  | \ result. 1630 |
00005f10  20 20 20 20 20 20 20 20  41 4e 44 20 23 26 31 45  |        AND #&1E|
00005f20  20 20 20 20 20 20 5c 20  3d 20 30 20 69 66 20 66  |      \ = 0 if f|
00005f30  6f 72 6d 61 74 74 65 64  0d 20 31 36 34 30 20 20  |ormatted. 1640  |
00005f40  20 20 20 20 20 20 20 52  54 53 0d 20 31 36 35 30  |       RTS. 1650|
00005f50  20 2e 73 65 63 74 6f 72  69 64 73 0d 20 31 36 36  | .sectorids. 166|
00005f60  30 20 20 20 20 20 20 20  20 20 4c 44 58 20 74 61  |0         LDX ta|
00005f70  62 6c 65 2b 33 20 20 20  5c 20 6c 6f 61 64 20 64  |ble+3   \ load d|
00005f80  61 74 61 20 73 69 7a 65  20 63 6f 64 65 0d 20 31  |ata size code. 1|
00005f90  36 37 30 20 20 20 20 20  20 20 20 20 4c 44 41 20  |670         LDA |
00005fa0  73 69 7a 65 73 2c 58 20  20 20 5c 20 6c 6f 61 64  |sizes,X   \ load|
00005fb0  20 6e 75 6d 62 65 72 20  6f 66 20 73 65 63 74 6f  | number of secto|
00005fc0  72 73 0d 20 31 36 38 30  20 20 20 20 20 20 20 20  |rs. 1680        |
00005fd0  20 53 54 41 20 69 64 73  62 6c 6f 63 6b 2b 39 20  | STA idsblock+9 |
00005fe0  5c 20 73 74 6f 72 65 20  6e 75 6d 62 65 72 20 6f  |\ store number o|
00005ff0  66 20 73 65 63 74 6f 72  73 0d 20 31 36 39 30 20  |f sectors. 1690 |
00006000  20 20 20 20 20 20 20 20  4c 44 41 20 23 26 37 46  |        LDA #&7F|
00006010  0d 20 31 37 30 30 20 20  20 20 20 20 20 20 20 4c  |. 1700         L|
00006020  44 58 20 23 69 64 73 62  6c 6f 63 6b 20 4d 4f 44  |DX #idsblock MOD|
00006030  20 32 35 36 0d 20 31 37  31 30 20 20 20 20 20 20  | 256. 1710      |
00006040  20 20 20 4c 44 59 20 23  69 64 73 62 6c 6f 63 6b  |   LDY #idsblock|
00006050  20 44 49 56 20 32 35 36  0d 20 31 37 32 30 20 20  | DIV 256. 1720  |
00006060  20 20 20 20 20 20 20 4a  53 52 20 6f 73 77 6f 72  |       JSR oswor|
00006070  64 0d 20 31 37 33 30 20  20 20 20 20 20 20 20 20  |d. 1730         |
00006080  4c 44 41 20 69 64 73 62  6c 6f 63 6b 2b 31 30 20  |LDA idsblock+10 |
00006090  5c 20 72 65 73 75 6c 74  0d 20 31 37 34 30 20 20  |\ result. 1740  |
000060a0  20 20 20 20 20 20 20 41  4e 44 20 23 26 31 45 0d  |       AND #&1E.|
000060b0  20 31 37 35 30 20 20 20  20 20 20 20 20 20 42 4e  | 1750         BN|
000060c0  45 20 69 64 73 65 72 72  6f 72 20 20 5c 20 3d 20  |E idserror  \ = |
000060d0  30 20 69 66 20 4f 4b 0d  20 31 37 36 30 20 20 20  |0 if OK. 1760   |
000060e0  20 20 20 20 20 20 52 54  53 0d 20 31 37 37 30 20  |      RTS. 1770 |
000060f0  2e 69 64 73 65 72 72 6f  72 0d 20 31 37 38 30 20  |.idserror. 1780 |
00006100  20 20 20 20 20 20 20 20  42 52 4b 0d 20 31 37 39  |        BRK. 179|
00006110  30 20 20 20 20 20 20 20  20 20 42 52 4b 0d 20 31  |0         BRK. 1|
00006120  38 30 30 20 20 20 20 20  20 20 20 20 45 51 55 53  |800         EQUS|
00006130  20 22 53 65 63 74 6f 72  20 49 44 20 45 72 72 6f  | "Sector ID Erro|
00006140  72 22 0d 20 31 38 31 30  20 20 20 20 20 20 20 20  |r". 1810        |
00006150  20 42 52 4b 0d 20 31 38  32 30 20 2e 63 6f 70 79  | BRK. 1820 .copy|
00006160  73 65 63 74 6f 72 0d 20  31 38 33 30 20 20 20 20  |sector. 1830    |
00006170  20 20 20 20 20 4c 44 58  20 73 65 63 74 6f 72 6e  |     LDX sectorn|
00006180  75 6d 62 65 72 20 5c 20  6c 6f 61 64 20 69 6e 64  |umber \ load ind|
00006190  65 78 20 6f 6e 20 74 61  62 6c 65 0d 20 31 38 34  |ex on table. 184|
000061a0  30 20 20 20 20 20 20 20  20 20 4c 44 41 20 74 61  |0         LDA ta|
000061b0  62 6c 65 2b 32 2c 58 20  5c 20 6c 6f 61 64 20 6c  |ble+2,X \ load l|
000061c0  6f 67 69 63 61 6c 20 73  65 63 74 6f 72 20 6e 75  |ogical sector nu|
000061d0  6d 62 65 72 0d 20 31 38  35 30 20 20 20 20 20 20  |mber. 1850      |
000061e0  20 20 20 53 54 41 20 63  6f 70 79 62 6c 6f 63 6b  |   STA copyblock|
000061f0  2b 38 20 5c 20 73 74 6f  72 65 20 66 6f 72 20 72  |+8 \ store for r|
00006200  65 61 64 20 73 65 63 74  6f 72 0d 20 31 38 36 30  |ead sector. 1860|
00006210  20 20 20 20 20 20 20 20  20 4c 44 41 20 74 61 62  |         LDA tab|
00006220  6c 65 2c 58 20 20 20 5c  20 6c 6f 61 64 20 6c 6f  |le,X   \ load lo|
00006230  67 69 63 61 6c 20 74 72  61 63 6b 20 6e 75 6d 62  |gical track numb|
00006240  65 72 0d 20 31 38 37 30  20 20 20 20 20 20 20 20  |er. 1870        |
00006250  20 53 54 41 20 63 6f 70  79 62 6c 6f 63 6b 2b 37  | STA copyblock+7|
00006260  20 5c 20 61 6e 64 20 73  74 6f 72 65 20 66 6f 72  | \ and store for|
00006270  20 72 65 61 64 0d 20 31  38 38 30 20 20 20 20 20  | read. 1880     |
00006280  20 20 20 20 4a 53 52 20  72 65 67 69 73 74 65 72  |    JSR register|
00006290  20 20 5c 20 77 72 69 74  65 20 74 72 61 63 6b 20  |  \ write track |
000062a0  72 65 67 69 73 74 65 72  0d 20 31 38 39 30 20 20  |register. 1890  |
000062b0  20 20 20 20 20 20 20 4c  44 41 20 23 26 30 30 20  |       LDA #&00 |
000062c0  20 20 20 20 20 5c 20 64  72 69 76 65 20 30 0d 20  |     \ drive 0. |
000062d0  31 39 30 30 20 20 20 20  20 20 20 20 20 53 54 41  |1900         STA|
000062e0  20 63 6f 70 79 62 6c 6f  63 6b 0d 20 31 39 31 30  | copyblock. 1910|
000062f0  20 20 20 20 20 20 20 20  20 4c 44 41 20 23 26 35  |         LDA #&5|
00006300  37 20 20 20 20 20 20 5c  20 72 65 61 64 20 73 65  |7      \ read se|
00006310  63 74 6f 72 20 63 6f 6d  6d 61 6e 64 0d 20 31 39  |ctor command. 19|
00006320  32 30 20 20 20 20 20 20  20 20 20 53 54 41 20 63  |20         STA c|
00006330  6f 70 79 62 6c 6f 63 6b  2b 36 0d 20 31 39 33 30  |opyblock+6. 1930|
00006340  20 20 20 20 20 20 20 20  20 4c 44 41 20 23 26 37  |         LDA #&7|
00006350  46 0d 20 31 39 34 30 20  20 20 20 20 20 20 20 20  |F. 1940         |
00006360  4c 44 58 20 23 63 6f 70  79 62 6c 6f 63 6b 20 4d  |LDX #copyblock M|
00006370  4f 44 20 32 35 36 0d 20  31 39 35 30 20 20 20 20  |OD 256. 1950    |
00006380  20 20 20 20 20 4c 44 59  20 23 63 6f 70 79 62 6c  |     LDY #copybl|
00006390  6f 63 6b 20 44 49 56 20  32 35 36 0d 20 31 39 36  |ock DIV 256. 196|
000063a0  30 20 20 20 20 20 20 20  20 20 4a 53 52 20 6f 73  |0         JSR os|
000063b0  77 6f 72 64 0d 20 31 39  37 30 20 20 20 20 20 20  |word. 1970      |
000063c0  20 20 20 4c 44 41 20 63  6f 70 79 62 6c 6f 63 6b  |   LDA copyblock|
000063d0  2b 31 30 0d 20 31 39 38  30 20 20 20 20 20 20 20  |+10. 1980       |
000063e0  20 20 42 45 51 20 6e 6f  74 64 65 6c 20 20 20 20  |  BEQ notdel    |
000063f0  5c 20 6e 6f 74 20 64 65  6c 65 74 65 64 20 64 61  |\ not deleted da|
00006400  74 61 0d 20 31 39 39 30  20 20 20 20 20 20 20 20  |ta. 1990        |
00006410  20 43 4d 50 20 23 26 32  30 20 20 20 20 20 20 5c  | CMP #&20      \|
00006420  20 64 65 6c 65 74 65 64  20 64 61 74 61 20 72 65  | deleted data re|
00006430  73 75 6c 74 0d 20 32 30  30 30 20 20 20 20 20 20  |sult. 2000      |
00006440  20 20 20 42 4e 45 20 72  65 61 64 65 72 72 6f 72  |   BNE readerror|
00006450  20 5c 20 65 72 72 6f 72  20 69 66 20 6e 6f 74 20  | \ error if not |
00006460  26 32 30 0d 20 32 30 31  30 20 20 20 20 20 20 20  |&20. 2010       |
00006470  20 20 4c 44 41 20 23 26  34 46 20 20 20 20 20 20  |  LDA #&4F      |
00006480  5c 20 77 72 69 74 65 20  64 65 6c 65 74 65 64 20  |\ write deleted |
00006490  64 61 74 61 20 63 6f 6d  6d 61 6e 64 0d 20 32 30  |data command. 20|
000064a0  32 30 20 20 20 20 20 20  20 20 20 42 4e 45 20 73  |20         BNE s|
000064b0  61 76 65 63 6f 6d 0d 20  32 30 33 30 20 2e 6e 6f  |avecom. 2030 .no|
000064c0  74 64 65 6c 0d 20 32 30  34 30 20 20 20 20 20 20  |tdel. 2040      |
000064d0  20 20 20 4c 44 41 20 23  26 34 42 20 20 20 20 20  |   LDA #&4B     |
000064e0  20 5c 20 77 72 69 74 65  20 64 61 74 61 20 63 6f  | \ write data co|
000064f0  6d 6d 61 6e 64 0d 20 32  30 35 30 20 2e 73 61 76  |mmand. 2050 .sav|
00006500  65 63 6f 6d 0d 20 32 30  36 30 20 20 20 20 20 20  |ecom. 2060      |
00006510  20 20 20 53 54 41 20 63  6f 70 79 62 6c 6f 63 6b  |   STA copyblock|
00006520  2b 36 0d 20 32 30 37 30  20 20 20 20 20 20 20 20  |+6. 2070        |
00006530  20 4c 44 41 20 23 26 30  31 20 20 20 20 20 20 5c  | LDA #&01      \|
00006540  20 64 72 69 76 65 20 31  0d 20 32 30 38 30 20 20  | drive 1. 2080  |
00006550  20 20 20 20 20 20 20 53  54 41 20 63 6f 70 79 62  |       STA copyb|
00006560  6c 6f 63 6b 0d 20 32 30  39 30 20 20 20 20 20 20  |lock. 2090      |
00006570  20 20 20 4c 44 41 20 23  26 37 46 0d 20 32 31 30  |   LDA #&7F. 210|
00006580  30 20 20 20 20 20 20 20  20 20 4c 44 58 20 23 63  |0         LDX #c|
00006590  6f 70 79 62 6c 6f 63 6b  20 4d 4f 44 20 32 35 36  |opyblock MOD 256|
000065a0  0d 20 32 31 31 30 20 20  20 20 20 20 20 20 20 4c  |. 2110         L|
000065b0  44 59 20 23 63 6f 70 79  62 6c 6f 63 6b 20 44 49  |DY #copyblock DI|
000065c0  56 20 32 35 36 0d 20 32  31 32 30 20 20 20 20 20  |V 256. 2120     |
000065d0  20 20 20 20 4a 53 52 20  6f 73 77 6f 72 64 0d 20  |    JSR osword. |
000065e0  32 31 33 30 20 20 20 20  20 20 20 20 20 4c 44 41  |2130         LDA|
000065f0  20 63 6f 70 79 62 6c 6f  63 6b 2b 31 30 20 5c 20  | copyblock+10 \ |
00006600  72 65 73 75 6c 74 0d 20  32 31 34 30 20 20 20 20  |result. 2140    |
00006610  20 20 20 20 20 42 4e 45  20 77 72 69 74 65 65 72  |     BNE writeer|
00006620  72 6f 72 20 5c 20 3d 20  30 20 69 66 20 4f 4b 0d  |ror \ = 0 if OK.|
00006630  20 32 31 35 30 20 20 20  20 20 20 20 20 20 53 45  | 2150         SE|
00006640  43 0d 20 32 31 36 30 20  20 20 20 20 20 20 20 20  |C. 2160         |
00006650  4c 44 41 20 73 65 63 74  6f 72 6e 75 6d 62 65 72  |LDA sectornumber|
00006660  20 5c 20 73 65 63 74 6f  72 20 69 6e 64 65 78 20  | \ sector index |
00006670  6f 6e 20 74 61 62 6c 65  0d 20 32 31 37 30 20 20  |on table. 2170  |
00006680  20 20 20 20 20 20 20 53  42 43 20 23 26 30 34 0d  |       SBC #&04.|
00006690  20 32 31 38 30 20 20 20  20 20 20 20 20 20 53 54  | 2180         ST|
000066a0  41 20 73 65 63 74 6f 72  6e 75 6d 62 65 72 20 5c  |A sectornumber \|
000066b0  20 69 6e 64 65 78 3d 69  6e 64 65 78 2d 34 0d 20  | index=index-4. |
000066c0  32 31 39 30 20 20 20 20  20 20 20 20 20 52 54 53  |2190         RTS|
000066d0  0d 20 32 32 30 30 20 2e  72 65 61 64 65 72 72 6f  |. 2200 .readerro|
000066e0  72 0d 20 32 32 31 30 20  20 20 20 20 20 20 20 20  |r. 2210         |
000066f0  4c 44 41 20 70 68 79 73  69 63 61 6c 20 20 5c 20  |LDA physical  \ |
00006700  70 68 79 73 69 63 61 6c  20 74 72 61 63 6b 20 6e  |physical track n|
00006710  75 6d 62 65 72 0d 20 32  32 32 30 20 20 20 20 20  |umber. 2220     |
00006720  20 20 20 20 4a 53 52 20  72 65 67 69 73 74 65 72  |    JSR register|
00006730  20 20 5c 20 77 72 69 74  65 20 74 72 61 63 6b 20  |  \ write track |
00006740  72 65 67 69 73 74 65 72  0d 20 32 32 33 30 20 20  |register. 2230  |
00006750  20 20 20 20 20 20 20 42  52 4b 0d 20 32 32 34 30  |       BRK. 2240|
00006760  20 20 20 20 20 20 20 20  20 42 52 4b 0d 20 32 32  |         BRK. 22|
00006770  35 30 20 20 20 20 20 20  20 20 20 45 51 55 53 20  |50         EQUS |
00006780  22 52 65 61 64 20 65 72  72 6f 72 22 0d 20 32 32  |"Read error". 22|
00006790  36 30 20 20 20 20 20 20  20 20 20 42 52 4b 0d 20  |60         BRK. |
000067a0  32 32 37 30 20 2e 77 72  69 74 65 65 72 72 6f 72  |2270 .writeerror|
000067b0  0d 20 32 32 38 30 20 20  20 20 20 20 20 20 20 4c  |. 2280         L|
000067c0  44 41 20 70 68 79 73 69  63 61 6c 20 20 5c 20 70  |DA physical  \ p|
000067d0  68 79 73 69 63 61 6c 20  74 72 61 63 6b 20 6e 75  |hysical track nu|
000067e0  6d 62 65 72 0d 20 32 32  39 30 20 20 20 20 20 20  |mber. 2290      |
000067f0  20 20 20 4a 53 52 20 72  65 67 69 73 74 65 72 20  |   JSR register |
00006800  20 5c 20 77 72 69 74 65  20 74 72 61 63 6b 20 72  | \ write track r|
00006810  65 67 69 73 74 65 72 0d  20 32 33 30 30 20 20 20  |egister. 2300   |
00006820  20 20 20 20 20 20 42 52  4b 0d 20 32 33 31 30 20  |      BRK. 2310 |
00006830  20 20 20 20 20 20 20 20  42 52 4b 0d 20 32 33 32  |        BRK. 232|
00006840  30 20 20 20 20 20 20 20  20 20 45 51 55 53 20 22  |0         EQUS "|
00006850  57 72 69 74 65 20 65 72  72 6f 72 22 0d 20 32 33  |Write error". 23|
00006860  33 30 20 20 20 20 20 20  20 20 20 42 52 4b 0d 20  |30         BRK. |
00006870  32 33 34 30 20 2e 70 72  69 6e 74 62 79 74 65 0d  |2340 .printbyte.|
00006880  20 32 33 35 30 20 20 20  20 20 20 20 20 20 4c 44  | 2350         LD|
00006890  41 20 70 68 79 73 69 63  61 6c 20 20 5c 20 70 72  |A physical  \ pr|
000068a0  69 6e 74 20 70 68 79 73  69 63 61 6c 20 74 72 61  |int physical tra|
000068b0  63 6b 20 6e 75 6d 62 65  72 0d 20 32 33 36 30 20  |ck number. 2360 |
000068c0  20 20 20 20 20 20 20 20  50 48 41 0d 20 32 33 37  |        PHA. 237|
000068d0  30 20 20 20 20 20 20 20  20 20 4c 53 52 20 41 0d  |0         LSR A.|
000068e0  20 32 33 38 30 20 20 20  20 20 20 20 20 20 4c 53  | 2380         LS|
000068f0  52 20 41 0d 20 32 33 39  30 20 20 20 20 20 20 20  |R A. 2390       |
00006900  20 20 4c 53 52 20 41 0d  20 32 34 30 30 20 20 20  |  LSR A. 2400   |
00006910  20 20 20 20 20 20 4c 53  52 20 41 0d 20 32 34 31  |      LSR A. 241|
00006920  30 20 20 20 20 20 20 20  20 20 4a 53 52 20 6e 79  |0         JSR ny|
00006930  62 62 6c 65 20 20 20 20  5c 20 70 72 69 6e 74 20  |bble    \ print |
00006940  4d 53 20 6e 79 62 62 6c  65 0d 20 32 34 32 30 20  |MS nybble. 2420 |
00006950  20 20 20 20 20 20 20 20  50 4c 41 0d 20 32 34 33  |        PLA. 243|
00006960  30 20 20 20 20 20 20 20  20 20 4a 53 52 20 6e 79  |0         JSR ny|
00006970  62 62 6c 65 20 20 20 20  5c 20 70 72 69 6e 74 20  |bble    \ print |
00006980  4c 53 20 6e 79 62 62 6c  65 0d 20 32 34 34 30 20  |LS nybble. 2440 |
00006990  20 20 20 20 20 20 20 20  4c 44 41 20 23 41 53 43  |        LDA #ASC|
000069a0  28 22 20 22 29 0d 20 32  34 35 30 20 20 20 20 20  |(" "). 2450     |
000069b0  20 20 20 20 4a 53 52 20  6f 73 77 72 63 68 20 20  |    JSR oswrch  |
000069c0  20 20 5c 20 70 72 69 6e  74 20 73 70 61 63 65 0d  |  \ print space.|
000069d0  20 32 34 36 30 20 20 20  20 20 20 20 20 20 4a 4d  | 2460         JM|
000069e0  50 20 6f 73 77 72 63 68  20 20 20 20 5c 20 70 72  |P oswrch    \ pr|
000069f0  69 6e 74 20 73 70 61 63  65 20 61 6e 64 20 72 65  |int space and re|
00006a00  74 75 72 6e 0d 20 32 34  37 30 20 2e 6e 79 62 62  |turn. 2470 .nybb|
00006a10  6c 65 0d 20 32 34 38 30  20 20 20 20 20 20 20 20  |le. 2480        |
00006a20  20 41 4e 44 20 23 26 30  46 0d 20 32 34 39 30 20  | AND #&0F. 2490 |
00006a30  20 20 20 20 20 20 20 20  53 45 44 0d 20 32 35 30  |        SED. 250|
00006a40  30 20 20 20 20 20 20 20  20 20 43 4c 43 0d 20 32  |0         CLC. 2|
00006a50  35 31 30 20 20 20 20 20  20 20 20 20 41 44 43 20  |510         ADC |
00006a60  23 26 39 30 0d 20 32 35  32 30 20 20 20 20 20 20  |#&90. 2520      |
00006a70  20 20 20 41 44 43 20 23  26 34 30 0d 20 32 35 33  |   ADC #&40. 253|
00006a80  30 20 20 20 20 20 20 20  20 20 43 4c 44 0d 20 32  |0         CLD. 2|
00006a90  35 34 30 20 20 20 20 20  20 20 20 20 4a 4d 50 20  |540         JMP |
00006aa0  6f 73 77 72 63 68 20 20  20 20 5c 20 70 72 69 6e  |oswrch    \ prin|
00006ab0  74 20 6e 79 62 62 6c 65  20 61 6e 64 20 72 65 74  |t nybble and ret|
00006ac0  75 72 6e 0d 20 32 35 35  30 20 2e 73 65 65 6b 62  |urn. 2550 .seekb|
00006ad0  6c 6f 63 6b 0d 20 32 35  36 30 20 20 20 20 20 20  |lock. 2560      |
00006ae0  20 20 20 45 51 55 42 20  26 30 30 20 20 20 20 20  |   EQUB &00     |
00006af0  20 5c 20 64 72 69 76 65  20 30 2f 31 0d 20 32 35  | \ drive 0/1. 25|
00006b00  37 30 20 20 20 20 20 20  20 20 20 45 51 55 44 20  |70         EQUD |
00006b10  26 30 30 20 20 20 20 20  20 5c 20 64 6f 65 73 20  |&00      \ does |
00006b20  6e 6f 74 20 6d 61 74 74  65 72 0d 20 32 35 38 30  |not matter. 2580|
00006b30  20 20 20 20 20 20 20 20  20 45 51 55 42 20 26 30  |         EQUB &0|
00006b40  31 20 20 20 20 20 20 5c  20 31 20 70 61 72 61 6d  |1      \ 1 param|
00006b50  65 74 65 72 0d 20 32 35  38 32 20 20 20 20 20 20  |eter. 2582      |
00006b60  20 20 20 45 51 55 42 20  26 36 39 20 20 20 20 20  |   EQUB &69     |
00006b70  20 5c 20 73 65 65 6b 20  63 6f 6d 6d 61 6e 64 0d  | \ seek command.|
00006b80  20 32 35 38 34 20 20 20  20 20 20 20 20 20 45 51  | 2584         EQ|
00006b90  55 42 20 26 30 30 20 20  20 20 20 20 5c 20 70 68  |UB &00      \ ph|
00006ba0  79 73 69 63 61 6c 20 74  72 61 63 6b 20 6e 75 6d  |ysical track num|
00006bb0  62 65 72 0d 20 32 35 38  36 20 20 20 20 20 20 20  |ber. 2586       |
00006bc0  20 20 45 51 55 42 20 26  30 30 20 20 20 20 20 20  |  EQUB &00      |
00006bd0  5c 20 72 65 73 75 6c 74  20 62 79 74 65 0d 20 32  |\ result byte. 2|
00006be0  35 39 30 20 2e 72 65 67  62 6c 6f 63 6b 0d 20 32  |590 .regblock. 2|
00006bf0  36 30 30 20 20 20 20 20  20 20 20 20 45 51 55 42  |600         EQUB|
00006c00  20 26 30 30 20 20 20 20  20 20 5c 20 64 72 69 76  | &00      \ driv|
00006c10  65 20 30 2f 31 0d 20 32  36 31 30 20 20 20 20 20  |e 0/1. 2610     |
00006c20  20 20 20 20 45 51 55 44  20 26 30 30 20 20 20 20  |    EQUD &00    |
00006c30  20 20 5c 20 64 6f 65 73  20 6e 6f 74 20 6d 61 74  |  \ does not mat|
00006c40  74 65 72 0d 20 32 36 32  30 20 20 20 20 20 20 20  |ter. 2620       |
00006c50  20 20 45 51 55 42 20 26  30 32 20 20 20 20 20 20  |  EQUB &02      |
00006c60  5c 20 32 20 70 61 72 61  6d 65 74 65 72 73 0d 20  |\ 2 parameters. |
00006c70  32 36 32 32 20 20 20 20  20 20 20 20 20 45 51 55  |2622         EQU|
00006c80  42 20 26 37 41 20 20 20  20 20 20 5c 20 77 72 69  |B &7A      \ wri|
00006c90  74 65 20 73 70 65 63 69  61 6c 20 72 65 67 69 73  |te special regis|
00006ca0  74 65 72 0d 20 32 36 32  34 20 20 20 20 20 20 20  |ter. 2624       |
00006cb0  20 20 45 51 55 42 20 26  30 30 20 20 20 20 20 20  |  EQUB &00      |
00006cc0  5c 20 72 65 67 69 73 74  65 72 20 6e 75 6d 62 65  |\ register numbe|
00006cd0  72 0d 20 32 36 32 36 20  20 20 20 20 20 20 20 20  |r. 2626         |
00006ce0  45 51 55 42 20 26 30 30  20 20 20 20 20 20 5c 20  |EQUB &00      \ |
00006cf0  76 61 6c 75 65 20 74 6f  20 70 75 74 20 69 6e 20  |value to put in |
00006d00  72 65 67 69 73 74 65 72  0d 20 32 36 33 30 20 20  |register. 2630  |
00006d10  20 20 20 20 20 20 20 45  51 55 42 20 26 30 30 20  |       EQUB &00 |
00006d20  20 20 20 20 20 5c 20 72  65 73 75 6c 74 20 62 79  |     \ result by|
00006d30  74 65 0d 20 32 36 34 30  20 2e 69 64 73 62 6c 6f  |te. 2640 .idsblo|
00006d40  63 6b 0d 20 32 36 35 30  20 20 20 20 20 20 20 20  |ck. 2650        |
00006d50  20 45 51 55 42 20 26 30  30 20 20 20 20 20 20 5c  | EQUB &00      \|
00006d60  20 64 72 69 76 65 20 30  0d 20 32 36 36 30 20 20  | drive 0. 2660  |
00006d70  20 20 20 20 20 20 20 45  51 55 44 20 74 61 62 6c  |       EQUD tabl|
00006d80  65 20 20 20 20 5c 20 61  64 64 72 65 73 73 20 6f  |e    \ address o|
00006d90  66 20 62 75 66 66 65 72  0d 20 32 36 37 30 20 20  |f buffer. 2670  |
00006da0  20 20 20 20 20 20 20 45  51 55 42 20 26 30 33 20  |       EQUB &03 |
00006db0  20 20 20 20 20 5c 20 33  20 70 61 72 61 6d 65 74  |     \ 3 paramet|
00006dc0  65 72 73 0d 20 32 36 37  32 20 20 20 20 20 20 20  |ers. 2672       |
00006dd0  20 20 45 51 55 42 20 26  35 42 20 20 20 20 20 20  |  EQUB &5B      |
00006de0  5c 20 72 65 61 64 20 73  65 63 74 6f 72 20 49 44  |\ read sector ID|
00006df0  73 0d 20 32 36 37 34 20  20 20 20 20 20 20 20 20  |s. 2674         |
00006e00  45 51 55 42 20 26 30 30  20 20 20 20 20 20 5c 20  |EQUB &00      \ |
00006e10  70 68 79 73 69 63 61 6c  20 74 72 61 63 6b 20 6e  |physical track n|
00006e20  75 6d 62 65 72 0d 20 32  36 37 36 20 20 20 20 20  |umber. 2676     |
00006e30  20 20 20 20 45 51 55 42  20 26 30 30 20 20 20 20  |    EQUB &00    |
00006e40  20 20 5c 20 61 6c 77 61  79 73 20 26 30 30 0d 20  |  \ always &00. |
00006e50  32 36 37 38 20 20 20 20  20 20 20 20 20 45 51 55  |2678         EQU|
00006e60  42 20 26 30 30 20 20 20  20 20 20 5c 20 6e 75 6d  |B &00      \ num|
00006e70  62 65 72 20 6f 66 20 49  44 73 20 74 6f 20 62 65  |ber of IDs to be|
00006e80  20 72 65 61 64 0d 20 32  36 38 30 20 20 20 20 20  | read. 2680     |
00006e90  20 20 20 20 45 51 55 42  20 26 30 30 20 20 20 20  |    EQUB &00    |
00006ea0  20 20 5c 20 72 65 73 75  6c 74 20 62 79 74 65 0d  |  \ result byte.|
00006eb0  20 32 36 39 30 20 2e 63  6f 70 79 62 6c 6f 63 6b  | 2690 .copyblock|
00006ec0  0d 20 32 37 30 30 20 20  20 20 20 20 20 20 20 45  |. 2700         E|
00006ed0  51 55 42 20 26 30 30 20  20 20 20 20 20 5c 20 64  |QUB &00      \ d|
00006ee0  72 69 76 65 20 30 2f 31  0d 20 32 37 31 30 20 20  |rive 0/1. 2710  |
00006ef0  20 20 20 20 20 20 20 45  51 55 44 20 62 75 66 66  |       EQUD buff|
00006f00  65 72 20 20 20 5c 20 61  64 64 72 65 73 73 20 6f  |er   \ address o|
00006f10  66 20 62 75 66 66 65 72  0d 20 32 37 32 30 20 20  |f buffer. 2720  |
00006f20  20 20 20 20 20 20 20 45  51 55 42 20 26 30 33 20  |       EQUB &03 |
00006f30  20 20 20 20 20 5c 20 33  20 70 61 72 61 6d 65 74  |     \ 3 paramet|
00006f40  65 72 73 0d 20 32 37 32  32 20 20 20 20 20 20 20  |ers. 2722       |
00006f50  20 20 45 51 55 42 20 26  35 37 20 20 20 20 20 20  |  EQUB &57      |
00006f60  5c 20 72 65 61 64 20 64  61 74 61 20 61 6e 64 20  |\ read data and |
00006f70  64 65 6c 65 74 65 64 20  64 61 74 61 0d 20 32 37  |deleted data. 27|
00006f80  32 34 20 20 20 20 20 20  20 20 20 45 51 55 42 20  |24         EQUB |
00006f90  26 30 30 20 20 20 20 20  20 5c 20 6c 6f 67 69 63  |&00      \ logic|
00006fa0  61 6c 20 74 72 61 63 6b  20 6e 75 6d 62 65 72 0d  |al track number.|
00006fb0  20 32 37 32 36 20 20 20  20 20 20 20 20 20 45 51  | 2726         EQ|
00006fc0  55 42 20 26 30 30 20 20  20 20 20 20 5c 20 6c 6f  |UB &00      \ lo|
00006fd0  67 69 63 61 6c 20 73 65  63 74 6f 72 20 6e 75 6d  |gical sector num|
00006fe0  62 65 72 0d 20 32 37 32  38 20 20 20 20 20 20 20  |ber. 2728       |
00006ff0  20 20 45 51 55 42 20 26  30 30 20 20 20 20 20 20  |  EQUB &00      |
00007000  5c 20 73 65 63 74 6f 72  20 73 69 7a 65 2f 6e 75  |\ sector size/nu|
00007010  6d 62 65 72 0d 20 32 37  33 30 20 20 20 20 20 20  |mber. 2730      |
00007020  20 20 20 45 51 55 42 20  26 30 30 20 20 20 20 20  |   EQUB &00     |
00007030  20 5c 20 72 65 73 75 6c  74 20 62 79 74 65 0d 20  | \ result byte. |
00007040  32 37 34 30 20 2e 66 6f  72 6d 62 6c 6f 63 6b 0d  |2740 .formblock.|
00007050  20 32 37 35 30 20 20 20  20 20 20 20 20 20 45 51  | 2750         EQ|
00007060  55 42 20 26 30 31 20 20  20 20 20 20 5c 20 64 72  |UB &01      \ dr|
00007070  69 76 65 20 31 0d 20 32  37 36 30 20 20 20 20 20  |ive 1. 2760     |
00007080  20 20 20 20 45 51 55 44  20 74 61 62 6c 65 20 20  |    EQUD table  |
00007090  20 20 5c 20 73 65 63 74  6f 72 20 74 61 62 6c 65  |  \ sector table|
000070a0  0d 20 32 37 37 30 20 20  20 20 20 20 20 20 20 45  |. 2770         E|
000070b0  51 55 42 20 26 30 35 20  20 20 20 20 20 5c 20 35  |QUB &05      \ 5|
000070c0  20 70 61 72 61 6d 65 74  65 72 73 0d 20 32 37 37  | parameters. 277|
000070d0  32 20 20 20 20 20 20 20  20 20 45 51 55 42 20 26  |2         EQUB &|
000070e0  36 33 20 20 20 20 20 20  5c 20 66 6f 72 6d 61 74  |63      \ format|
000070f0  20 74 72 61 63 6b 20 63  6f 6d 6d 61 6e 64 0d 20  | track command. |
00007100  32 37 37 34 20 20 20 20  20 20 20 20 20 45 51 55  |2774         EQU|
00007110  42 20 26 30 30 20 20 20  20 20 20 5c 20 70 68 79  |B &00      \ phy|
00007120  73 69 63 61 6c 20 74 72  61 63 6b 20 6e 75 6d 62  |sical track numb|
00007130  65 72 0d 20 32 37 37 36  20 20 20 20 20 20 20 20  |er. 2776        |
00007140  20 45 51 55 42 20 26 30  30 20 20 20 20 20 20 5c  | EQUB &00      \|
00007150  20 67 61 70 20 33 20 73  69 7a 65 0d 20 32 37 37  | gap 3 size. 277|
00007160  38 20 20 20 20 20 20 20  20 20 45 51 55 42 20 26  |8         EQUB &|
00007170  30 30 20 20 20 20 20 20  5c 20 73 65 63 74 6f 72  |00      \ sector|
00007180  20 73 69 7a 65 2f 6e 75  6d 62 65 72 0d 20 32 37  | size/number. 27|
00007190  38 30 20 20 20 20 20 20  20 20 20 45 51 55 42 20  |80         EQUB |
000071a0  26 30 30 20 20 20 20 20  20 5c 20 67 61 70 20 35  |&00      \ gap 5|
000071b0  20 73 69 7a 65 0d 20 32  37 38 32 20 20 20 20 20  | size. 2782     |
000071c0  20 20 20 20 45 51 55 42  20 26 31 30 20 20 20 20  |    EQUB &10    |
000071d0  20 20 5c 20 67 61 70 20  31 20 73 69 7a 65 0d 20  |  \ gap 1 size. |
000071e0  32 37 38 34 20 20 20 20  20 20 20 20 20 45 51 55  |2784         EQU|
000071f0  42 20 26 30 30 20 20 20  20 20 20 5c 20 72 65 73  |B &00      \ res|
00007200  75 6c 74 20 62 79 74 65  0d 20 32 37 39 30 20 2e  |ult byte. 2790 .|
00007210  64 65 62 6c 6f 63 6b 0d  20 32 38 30 30 20 20 20  |deblock. 2800   |
00007220  20 20 20 20 20 20 45 51  55 42 20 26 30 31 20 20  |      EQUB &01  |
00007230  20 20 20 20 5c 20 64 72  69 76 65 20 31 0d 20 32  |    \ drive 1. 2|
00007240  38 31 30 20 20 20 20 20  20 20 20 20 45 51 55 44  |810         EQUD|
00007250  20 64 65 74 61 62 6c 65  20 20 5c 20 73 65 63 74  | detable  \ sect|
00007260  6f 72 20 74 61 62 6c 65  0d 20 32 38 32 30 20 20  |or table. 2820  |
00007270  20 20 20 20 20 20 20 45  51 55 42 20 26 30 35 20  |       EQUB &05 |
00007280  20 20 20 20 20 5c 20 35  20 70 61 72 61 6d 65 74  |     \ 5 paramet|
00007290  65 72 73 0d 20 32 38 32  32 20 20 20 20 20 20 20  |ers. 2822       |
000072a0  20 20 45 51 55 42 20 26  36 33 20 20 20 20 20 20  |  EQUB &63      |
000072b0  5c 20 66 6f 72 6d 61 74  20 74 72 61 63 6b 20 63  |\ format track c|
000072c0  6f 6d 6d 61 6e 64 0d 20  32 38 32 34 20 20 20 20  |ommand. 2824    |
000072d0  20 20 20 20 20 45 51 55  42 20 26 30 30 20 20 20  |     EQUB &00   |
000072e0  20 20 20 5c 20 70 68 79  73 69 63 61 6c 20 74 72  |   \ physical tr|
000072f0  61 63 6b 20 6e 75 6d 62  65 72 0d 20 32 38 32 36  |ack number. 2826|
00007300  20 20 20 20 20 20 20 20  20 45 51 55 42 20 26 30  |         EQUB &0|
00007310  30 20 20 20 20 20 20 5c  20 67 61 70 20 33 20 73  |0      \ gap 3 s|
00007320  69 7a 65 0d 20 32 38 32  38 20 20 20 20 20 20 20  |ize. 2828       |
00007330  20 20 45 51 55 42 20 26  43 31 20 20 20 20 20 20  |  EQUB &C1      |
00007340  5c 20 73 65 63 74 6f 72  20 73 69 7a 65 2f 6e 75  |\ sector size/nu|
00007350  6d 62 65 72 0d 20 32 38  33 30 20 20 20 20 20 20  |mber. 2830      |
00007360  20 20 20 45 51 55 42 20  26 30 30 20 20 20 20 20  |   EQUB &00     |
00007370  20 5c 20 67 61 70 20 35  20 73 69 7a 65 0d 20 32  | \ gap 5 size. 2|
00007380  38 33 32 20 20 20 20 20  20 20 20 20 45 51 55 42  |832         EQUB|
00007390  20 26 31 30 20 20 20 20  20 20 5c 20 67 61 70 20  | &10      \ gap |
000073a0  31 20 73 69 7a 65 0d 20  32 38 33 34 20 20 20 20  |1 size. 2834    |
000073b0  20 20 20 20 20 45 51 55  42 20 26 30 30 20 20 20  |     EQUB &00   |
000073c0  20 20 20 5c 20 72 65 73  75 6c 74 20 62 79 74 65  |   \ result byte|
000073d0  0d 20 32 38 34 30 20 2e  64 65 74 61 62 6c 65 0d  |. 2840 .detable.|
000073e0  20 32 38 35 30 20 20 20  20 20 20 20 20 20 45 51  | 2850         EQ|
000073f0  55 44 20 26 30 34 30 30  30 30 30 30 0d 20 32 38  |UD &04000000. 28|
00007400  36 30 20 2e 67 61 70 0d  20 32 38 37 30 20 20 20  |60 .gap. 2870   |
00007410  20 20 20 20 20 20 45 51  55 42 20 31 31 20 20 20  |      EQUB 11   |
00007420  20 20 20 20 5c 20 47 61  70 20 33 2c 20 31 38 20  |    \ Gap 3, 18 |
00007430  73 65 63 74 6f 72 73 0d  20 32 38 38 30 20 20 20  |sectors. 2880   |
00007440  20 20 20 20 20 20 45 51  55 42 20 32 31 20 20 20  |      EQUB 21   |
00007450  20 20 20 20 5c 20 47 61  70 20 33 2c 20 31 30 20  |    \ Gap 3, 10 |
00007460  73 65 63 74 6f 72 73 0d  20 32 38 39 30 20 20 20  |sectors. 2890   |
00007470  20 20 20 20 20 20 45 51  55 42 20 37 34 20 20 20  |      EQUB 74   |
00007480  20 20 20 20 5c 20 47 61  70 20 33 2c 20 35 20 73  |    \ Gap 3, 5 s|
00007490  65 63 74 6f 72 73 0d 20  32 39 30 30 20 20 20 20  |ectors. 2900    |
000074a0  20 20 20 20 20 45 51 55  42 20 32 35 35 20 20 20  |     EQUB 255   |
000074b0  20 20 20 5c 20 47 61 70  20 33 2c 20 32 20 73 65  |   \ Gap 3, 2 se|
000074c0  63 74 6f 72 73 0d 20 32  39 31 30 20 20 20 20 20  |ctors. 2910     |
000074d0  20 20 20 20 45 51 55 42  20 30 20 20 20 20 20 20  |    EQUB 0      |
000074e0  20 20 5c 20 47 61 70 20  33 2c 20 31 20 73 65 63  |  \ Gap 3, 1 sec|
000074f0  74 6f 72 0d 20 32 39 32  30 20 2e 73 69 7a 65 73  |tor. 2920 .sizes|
00007500  0d 20 32 39 33 30 20 20  20 20 20 20 20 20 20 45  |. 2930         E|
00007510  51 55 42 20 31 38 0d 20  32 39 34 30 20 20 20 20  |QUB 18. 2940    |
00007520  20 20 20 20 20 45 51 55  42 20 31 30 0d 20 32 39  |     EQUB 10. 29|
00007530  35 30 20 20 20 20 20 20  20 20 20 45 51 55 42 20  |50         EQUB |
00007540  35 0d 20 32 39 36 30 20  20 20 20 20 20 20 20 20  |5. 2960         |
00007550  45 51 55 42 20 32 0d 20  32 39 37 30 20 20 20 20  |EQUB 2. 2970    |
00007560  20 20 20 20 20 45 51 55  42 20 31 0d 20 32 39 38  |     EQUB 1. 298|
00007570  30 20 2e 70 68 79 73 69  63 61 6c 0d 20 32 39 39  |0 .physical. 299|
00007580  30 20 20 20 20 20 20 20  20 20 45 51 55 42 20 26  |0         EQUB &|
00007590  30 30 0d 20 33 30 30 30  20 2e 73 65 63 74 6f 72  |00. 3000 .sector|
000075a0  6e 75 6d 62 65 72 0d 20  33 30 31 30 20 20 20 20  |number. 3010    |
000075b0  20 20 20 20 20 45 51 55  42 20 26 30 30 0d 20 33  |     EQUB &00. 3|
000075c0  30 32 30 20 2e 6c 61 73  74 0d 20 33 30 33 30 20  |020 .last. 3030 |
000075d0  20 20 20 20 20 20 20 20  45 51 55 42 20 26 30 30  |        EQUB &00|
000075e0  0d 20 33 30 34 30 20 5d  0d 20 33 30 35 30 20 4e  |. 3040 ]. 3050 N|
000075f0  45 58 54 0d 20 33 30 36  30 20 49 4e 50 55 54 27  |EXT. 3060 INPUT'|
00007600  22 4e 75 6d 62 65 72 20  6f 66 20 74 72 61 63 6b  |"Number of track|
00007610  73 20 28 34 30 2f 38 30  29 20 22 74 72 61 63 6b  |s (40/80) "track|
00007620  73 24 0d 20 33 30 37 30  20 49 46 20 74 72 61 63  |s$. 3070 IF trac|
00007630  6b 73 24 3d 22 34 30 22  20 3f 6c 61 73 74 3d 34  |ks$="40" ?last=4|
00007640  30 20 45 4c 53 45 20 3f  6c 61 73 74 3d 38 30 0d  |0 ELSE ?last=80.|
00007650  20 33 30 38 30 20 50 52  49 4e 54 27 22 49 6e 73  | 3080 PRINT'"Ins|
00007660  65 72 74 20 22 3b 3f 6c  61 73 74 3b 22 20 74 72  |ert ";?last;" tr|
00007670  61 63 6b 20 73 6f 75 72  63 65 20 64 69 73 63 20  |ack source disc |
00007680  69 6e 20 3a 30 22 0d 20  33 30 39 30 20 50 52 49  |in :0". 3090 PRI|
00007690  4e 54 22 49 6e 73 65 72  74 20 22 3b 3f 6c 61 73  |NT"Insert ";?las|
000076a0  74 3b 22 20 74 72 61 63  6b 20 64 65 73 74 69 6e  |t;" track destin|
000076b0  61 74 69 6f 6e 20 64 69  73 63 20 69 6e 20 3a 31  |ation disc in :1|
000076c0  22 0d 20 33 31 30 30 20  50 52 49 4e 54 27 22 50  |". 3100 PRINT'"P|
000076d0  72 65 73 73 20 53 70 61  63 65 62 61 72 20 74 6f  |ress Spacebar to|
000076e0  20 63 6f 70 79 20 66 72  6f 6d 20 3a 30 20 74 6f  | copy from :0 to|
000076f0  20 3a 31 22 0d 20 33 31  31 30 20 52 45 50 45 41  | :1". 3110 REPEA|
00007700  54 0d 20 33 31 32 30 20  55 4e 54 49 4c 20 47 45  |T. 3120 UNTIL GE|
00007710  54 3d 33 32 0d 20 33 31  33 30 20 43 41 4c 4c 20  |T=32. 3130 CALL |
00007720  6d 63 6f 64 65 0d                                 |mcode.|
00007726
26-09-88/T\DFS07.m0
26-09-88/T\DFS07.m1
26-09-88/T\DFS07.m2
26-09-88/T\DFS07.m4
26-09-88/T\DFS07.m5