Home » CEEFAX disks » telesoftware8.adl » 19-08-88/T\DFS02

19-08-88/T\DFS02

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 » telesoftware8.adl
Filename: 19-08-88/T\DFS02
Read OK:
File size: 6E67 bytes
Load address: 0000
Exec address: FFFFFFFF
File contents
The Acorn DFS Osword commands  -  by  -  Gordon Horsington
----------------------------------------------------------

Module 2. The DFS Osword commands (part 2)
------------------------------------------

      +----------------------------------------------------------+
      | 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.  |
      +----------------------------------------------------------+


----------
Osword &7F
----------

Osword &7F executes the 8271 disc controller commands. If the disc
interface uses a 1770 disc controller then Osword &7F emulates the 8271
command set using the 1770. The complete command set executed by Osword
&7F is shown in figure 1. Osword &7F commands from &69 to &7D were covered
in module 1. In this module I will explain how to use the Osword &7F
command numbers &4A to &63.


+---------+--------+------+-------------------------------------------+
| Command | Param- | 1770 |  Action                                   |
| number  | eters  |      |                                           |
+---------+--------+------+-------------------------------------------+
|   &4A   |    2   |  Yes | Write data 128 bytes                      |
|   &4B   |    3   |  Yes | Write data multi-sector                   |
|   &4E   |    2   |  Yes | Write deleted data 128 bytes              |
|   &4F   |    3   |  Yes | Write deleted data multi-sector           |
|   &52   |    2   |  Yes | Read data 128 bytes                       |
|   &53   |    3   |  Yes | Read data multi-sector                    |
|   &56   |    2   |  Yes | Read data and deleted data 128 bytes      |
|   &57   |    3   |  Yes | Read data and deleted data multi-sector   |
|   &5B   |    3   |  Yes | Read sector ids                           |
|   &5E   |    2   |  Yes | Verify data and deleted data 128 bytes    |
|   &5F   |    3   |  Yes | Verify data and deleted data multi-sector |
|   &63   |    5   |  Yes | Format track                              |
|   &69   |    1   |  Yes | Seek                                      |
+---------+--------+------+-------------------------------------------+
|   &6C   |    0   | Part | Read drive status                         |
|   &75   |    4   | Part | Initialise 8271                           |
|   &75   |    4   | Part | Load bad tracks                           |
|   &7A   |    2   | Part | Write special register                    |
|   &7D   |    1   | Part | Read special register                     |
+---------+--------+------+-------------------------------------------+

              Figure 1. The Osword &7F commands
              ---------------------------------

--------------------------
Osword &7F Read Sector IDs
--------------------------

Before using this command you should ensure that the appropriate track
register contains the current physical track number or use the Osword &7F
Seek command to seek track 0. Osword &7F Read Sector IDs uses the
appropriate track register as a base from which to seek a specified
physical track. It then reads the required number of sector IDs and stores
them in the buffer area specified in the parameter block. Sector IDs are
transfered into the buffer area in physical sector order. The command
returns four bytes For each sector ID that it reads.

byte 0 = logical track number
byte 1 = head number
byte 2 = logical sector number
byte 3 = data size code (0=128, 1=256, ... 4=2048)


The following parameter block is used by Osword &7F read sector IDs:

Parameter block &00       = drive number (&00-&03 or &FF)
Parameter block &01 - &04 = buffer address for sector IDs
Parameter block &05       = &03 (3 command parameters)
Parameter block &06       = &5B (read sector IDs command)
Parameter block &07       = physical track number
Parameter block &08       = &00
Parameter block &09       = number of IDs to be read
Parameter block &0A       = result byte


One of many possible uses for this command is to check if a disc has been
formatted. If Osword &7F Read Sector IDs fails to find at least one sector
on track zero the most probable reason is that the disc has not been
formatted and this will be reported as error number &18, sector not found
(see figure 2). The program NOTFORM uses this idea to see if a disc in the
current drive has been formatted.


             +--------+----------------------------+
             | Result | Interpretation             |
             +--------+----------------------------+
             |  &02   | Scan met equal **          |
             |  &04   | Scan met not equal **      |
             |  &08   | Clock error                |
             |  &0A   | Late DMA **                |
             |  &0C   | Sector ID CRC error        |
             |  &0E   | Data CRC error             |
             |  &10   | Drive not ready            |
             |  &12   | Disc write protected       |
             |  &14   | Physical track 0 not found |
             |  &16   | Write fault                |
             |  &18   | Sector not found           |
             +--------+----------------------------+
             |  Errors marked ** should not occur  |
             +-------------------------------------+

       Figure 2. The error codes returned in the result byte
       -----------------------------------------------------


   10 REM: NOTFORM
   20 osword=&FFF1
   30 DIM mcode &100
   40 FOR pass = 0 TO 2 STEP 2
   50 P%=mcode
   60 [       OPT pass
   70         LDA #&7F
   80         LDX #block MOD 256
   90         LDY #block DIV 256
  100         JSR osword
  110         RTS
  120 .block
  130         EQUB &FF      \ current drive
  140         EQUD buffer   \ buffer address
  150         EQUB &03      \ 3 parameters
  160         EQUB &5B      \ read sector IDs
  170         EQUB &00      \ track 0
  180         EQUB &00
  190         EQUB &01      \ read 1 sector
  200 .result
  210         EQUB &00      \ result byte
  220 .buffer
  230         EQUD &00
  240 ]
  250 NEXT
  260 CALL mcode
  270 IF ?result=&18 PRINT"Disc not formatted" ELSE PRINT"Disc formatted"


The Osword &7F Read Sector IDs command was used in the program IDSDUMP
used in module 0. After working through this module you might like to go
back to module 0 and look again at the example programs.


-----------------------
Osword &7F Format Track
-----------------------

The Osword &7F Format Track command uses a sector table stored in the
buffer specified in the parameter block. This table contains four bytes
for every ID field on the track. For each sector to be on the disc the
following bytes must be stored in the buffer:

byte 0 = logical track number (&00-&FF)
byte 1 = head number (use &00)
byte 2 = logical sector number (&00-&FF)
byte 3 = data size code (0=128, 1=256, ... 4=2048)


The following parameter block is used with the Osbyte &7F Format Track
command:

Parameter block &00       = drive number (&00-&03 or &FF)
Parameter block &01 - &04 = buffer address for sector IDs
Parameter block &05       = &05 (5 command parameters)
Parameter block &06       = &63 (format track command)
Parameter block &07       = physical track number
Parameter block &08       = gap 3 size (see figure 2)
Parameter block &09       = sector size/number of sectors
Parameter block &0A       = gap 5 size (always use &00)
Parameter block &0B       = gap 1 size (always use &10)
Parameter block &0C       = result byte


The gap 3 size can be taken from figure 3 (all numbers in figure 3 are in
decimal).

The most significant 3 bits of the number stored in parameter block &09
contain the sector size code (column 2 of figure 3). The least significant
5 bits contain the number of sectors per track. To calculate the number to
be stored in parameter block &09 multiply the size code by 32 and add the
number of sectors. For example, if you want to format a track with five
sectors of 512 bytes then parameter block &09 will contain 2*32+5 = 69 =
&45.


+-------------+-----------+--------+------+------+------+------+------+
| No. Sectors | Size code | Length | Gap1 | Gap2 | Gap3 | Gap4 | Gap5 |
+-------------+-----------+--------+------+------+------+------+------+
|     18      |     0     |   128  |  16  |  11  |  11  |   24 |   0  |
|     10      |     1     |   256  |  16  |  11  |  21  |   30 |   0  |
|      5      |     2     |   512  |  16  |  11  |  74  |   88 |   0  |
|      2      |     3     |  1024  |  16  |  11  | 255  |  740 |   0  |
|      1      |     4     |  2048  |  16  |  11  |   0  | 1028 |   0  |
+-------------+-----------+--------+------+------+------+------+------+

Figure 3. The relationship between sector size code, length and gap size.
-------------------------------------------------------------------------


The Osword &7F Format Track command uses the appropriate track register as
a base from which to seek the specified physical track. It then uses the
sector IDs stored in the buffer to create the ID fields for each sector.
It calculates and writes the ID field CRC bytes, creates the correct gap
sizes, fills the data fields with bytes of &E5, and calculates and writes
the data field CRC bytes.

The program FORM10 can be used to format physical track &27 of the disc in
the current drive with 10 sectors of 256 bytes. This program will destroy
all the data stored on track &27 - you have been warned!

The buffer used in the program FORM10 stores 4 bytes for each sector.
Taking physical sector &00 in line 240 as an example, The bytes &27, &00,
&00 and &01 are stored (the order of the bytes is reversed with the EQUD
command). These four bytes represent the logical track number, the head
number, the logical sector number and the data size code. You can alter
the logical track and sector numbers and use the IDSDUMP program from
module 0 to see the effect this has on the format of the disc. If you
alter the logical track number you will be unable to *BACKUP the disc.


   10 REM: FORM10
   20 DIM mcode &100
   30 osword=&FFF1
   40 FORpass=0 TO 2 STEP 2
   50 P%=mcode
   60 [       OPT pass
   70         LDA #&7F
   80         LDX #block MOD 256
   90         LDY #block DIV 256
  100         JSR osword
  110         RTS
  120 .block
  130         EQUB &FF      \ current drive
  140         EQUD buffer   \ address of sector table
  150         EQUB &05      \ 5 parameters
  160         EQUB &63      \ format track command
  170         EQUB &27      \ physical track &27
  180         EQUB 21       \ gap 3 (from figure 2)
  190         EQUB &2A      \ 10 sectors of 256 bytes
  200         EQUB &00      \ gap 5 (always &00)
  210         EQUB &10      \ gap 1 (always &10)
  220         EQUB 0        \ result byte
  230 .buffer
  240         EQUD &01000027
  250         EQUD &01010027
  260         EQUD &01020027
  270         EQUD &01030027
  280         EQUD &01040027
  290         EQUD &01050027
  300         EQUD &01060027
  310         EQUD &01070027
  320         EQUD &01080027
  330         EQUD &01090027
  340 ]
  350 NEXT
  360 CALL mcode


There is more to formatting a disc than just formatting all the tracks. It
is also necessary to create an empty catalogue on track 0 of the disc.
Formatting discs will be covered in more detail in module 3.


----------------------------------------------------
Osword &7F Verify Data and Deleted Data multi-sector
----------------------------------------------------

Osword &7F Verify Data and Deleted Data multi-sector uses the appropriate
track register as a base from which to seek the track and sector specified
in the parameter block. It attempts to verify the sector and returns &00
in the result byte if it is successful. It returns &20 in the result byte
if deleted data have been successfully verified. If more than one sector
is specified this procedure repeats until either all the sectors have been
verified or an error occurs.

The following parameter block is used with the Osbyte &7F Verify Data and
Deleted Data multi-sector command:

Parameter block &00       = drive number (&00-&03 or &FF)
Parameter block &01 - &04 = buffer address (not used)
Parameter block &05       = &03 (3 command parameters)
Parameter block &06       = &5F (verify multi-sector command)
Parameter block &07       = logical track number
Parameter block &08       = logical sector number
Parameter block &09       = sector size/number of sectors
Parameter block &0A       = result byte


The most significant 3 bits of the number stored in parameter block &09
contain the sector size code (column 2 of figure 3). The least significant
5 bits contain the number of sectors per track. To calculate the number to
be stored in parameter block &09 multiply the size code by 32 and add the
number of sectors. For example, if you want to verify a track with ten
sectors of 256 bytes then parameter block &09 will contain 1*32+10 = 42 =
&2A.

If you want to verify discs that use different physical and logical track
numbers it is necessary to use the Osword &7F Seek command to find the
appropriate track, Osword &7F Read Sector IDs to read the logical track
and sector number, and Osword &7F Write Special Register to write the
logical track number into the appropriate track register before using
Osword &7F Verify Data and Deleted Data multi-sector. After verifying the
sector(s) it is then necessary to use Osword &7F Write Special Register to
write the physical track number back into the appropriate track register.
This procedure was used in the program VERIFY in module 0.

The following code could be used to verify track &27 of the disc formatted
with the program FORM10


        LDA #&7F
        LDX #block MOD 256
        LDY #block DIV 256
        JSR &FFF1
        RTS
.block
        EQUB &FF          \ current drive
        EQUD &00          \ buffer address (not used)
        EQUB &03          \ 3 parameters
        EQUB &5F          \ verify command
        EQUB &27          \ logical track &27
        EQUB &00          \ start with logical sector &00
        EQUB &2A          \ 10 sectors of 256 bytes
        EQUB &00          \ result byte


-------------------------------------------------
Osword &7F Verify Data and Deleted Data 128 bytes
-------------------------------------------------

If you need to verify just one sector of 128 bytes you can use the Osword
&7F Verify Data and Deleted Data 128 bytes command. This command uses the
following parameter block.

Parameter block &00       = drive number (&00-&03 or &FF)
Parameter block &01 - &04 = buffer address (not used)
Parameter block &05       = &02 (2 command parameters)
Parameter block &06       = &5E (verify 128 bytes command)
Parameter block &07       = logical track number
Parameter block &08       = logical sector number
Parameter block &09       = result byte


Although using this command saves you the trouble of calculating the
sector size/number of sectors parameter, I cannot recommend using it when
the multi-sector command is so much more versitile.


----------------------------------
Osword &7F Write Data multi-sector
----------------------------------

Osword &7F Write Data multi-sector uses the appropriate track register as
a base from which to seek the track and sector specified in the parameter
block. If it cannot find the track and sector it returns the sector not
found error (&18) in the result byte. If it finds the required track and
sector it writes a data mark at the start of the data field and copies the
first sector of data from the buffer to the specified sector. If more than
one sector is specified this procedure repeats until either all the
sectors have been written or an error occurs.

The following parameter block is used with the Osword &7F Write Data
multi-sector command.

Parameter block &00       = drive number (&00-&03 or &FF)
Parameter block &01 - &04 = buffer address
Parameter block &05       = &03 (3 command parameters)
Parameter block &06       = &4B (write data multi-sector command)
Parameter block &07       = logical track number
Parameter block &08       = logical sector number
Parameter block &09       = sector size/number of sectors
Parameter block &0A       = result byte


The most significant 3 bits of the number stored in parameter block &09
contain the sector size code (column 2 of figure 3). The least significant
5 bits contain the number of sectors per track. To calculate the number to
be stored in parameter block &09 multiply the size code by 32 and add the
number of sectors. For example, if you want to verify a track with ten
sectors of 256 bytes then parameter block &09 will contain 1*32+10 = 42 =
&2A.

The program WRITE10 can be used to demonstrate this command. This program
will destroy all the data stored on track &01 of the disc it uses - you
have been warned!

WRITE10 uses an normally formatted DFS disc and stores 2.5k of data on
track &01. The buffer starts at PAGE (line 240) and so the program could
be used to store a small BASIC program on a disc. The data are stored
without an entry in the DFS catalogue and cannot be read using any of the
DFS star commands. If you use the DFS commands to store any other data on
the disk, the data stored with WRITE10 could be overwritten. The data can
be read from the disc using the Osword &7F Read Data and Deleted Data
command which is explained later in this module.


   10 REM: WRITE10
   20 mcode = &0A00
   30 osword=&FFF1
   40 page = PAGE
   50 FORpass=0 TO 2 STEP 2
   60 P%=mcode
   70 [       OPT pass
   80         LDA #&7F
   90         LDX #block MOD 256
  100         LDY #block DIV 256
  110         JSR osword
  120         LDA result
  130         BEQ ok
  140         BRK
  150         BRK
  160         EQUS "Write error"
  170 .ok
  180         BRK
  190         EQUS "Write sucessful"
  200         BRK
  210         BRK
  220 .block
  230         EQUB &FF      \ current drive
  240         EQUD page     \ start at PAGE
  250         EQUB &03      \ 3 parameters
  260         EQUB &4B      \ write data multi-sector
  270         EQUB &01      \ logical track 1
  280         EQUB &00      \ start logical sector 0
  290         EQUB &2A      \ 10 sectors of 256 bytes
  300 .result
  310         EQUB &00      \ result byte
  320 ]
  330 NEXT
  340 PRINT''"Type: CALL &";~mcode;" to save 10 sectors"'


-------------------------------
Osword &7F Write Data 128 bytes
-------------------------------

If you need to write just one sector of 128 bytes you can use the Osword
&7F Write Data 128 bytes command. This command uses the following
parameter block.

Parameter block &00       = drive number (&00-&03 or &FF)
Parameter block &01 - &04 = buffer address
Parameter block &05       = &02 (2 command parameters)
Parameter block &06       = &4A (write data 128 bytes command)
Parameter block &07       = logical track number
Parameter block &08       = logical sector number
Parameter block &09       = result byte


Although using this command saves you the trouble of calculating the
sector size/number of sectors parameter, I cannot recommend using it when
the multi-sector command is so much more versitile.


------------------------------------------
Osword &7F Write Deleted Data multi-sector
------------------------------------------

Osword &7F Write Deleted Data multi-sector uses the appropriate track
register as a base from which to seek the track and sector specified in
the parameter block. If it cannot find the track and sector it returns the
sector not found error (&18) in the result byte. If it finds the required
track and sector it writes a deleted data mark at the start of the data
field and copies the first sector of data from the buffer to the specified
sector. If more than one sector is specified this procedure repeats until
either all the sectors have been written or an error occurs.

The following parameter block is used with the Osword &7F Write Deleted
Data multi-sector command.

Parameter block &00       = drive number (&00-&03 or &FF)
Parameter block &01 - &04 = buffer address
Parameter block &05       = &03 (3 command parameters)
Parameter block &06       = &4F (write deleted data multi-sector command)
Parameter block &07       = logical track number
Parameter block &08       = logical sector number
Parameter block &09       = sector size/number of sectors
Parameter block &0A       = result byte


The most significant 3 bits of the number stored in parameter block &09
contain the sector size code (column 2 of figure 3). The least significant
5 bits contain the number of sectors per track. To calculate the number to
be stored in parameter block &09 multiply the size code by 32 and add the
number of sectors. For example, if you want to verify a track with ten
sectors of 256 bytes then parameter block &09 will contain 1*32+10 = 42 =
&2A.

The program WRITE10 can be modified to demonstrate this command. Alter
line 260 from EQUB &4B to EQUB &4F. Using deleted data will effectivly
disable the *BACKUP command. Don't forget that this program will destroy
all the data stored on track &01 of the disc it uses - you have been
warned!


---------------------------------------
Osword &7F Write Deleted Data 128 bytes
---------------------------------------

If you need to write just one sector of 128 bytes of deleted data you can
use the Osword &7F Write Deleted Data 128 bytes command. This command uses
the following parameter block.

Parameter block &00       = drive number (&00-&03 or &FF)
Parameter block &01 - &04 = buffer address (not used)
Parameter block &05       = &02 (2 command parameters)
Parameter block &06       = &4F (write deleted data 128 bytes command)
Parameter block &07       = logical track number
Parameter block &08       = logical sector number
Parameter block &09       = result byte


Although using this command saves you the trouble of calculating the
sector size/number of sectors parameter, I cannot recommend using it
when the multi-sector command is so much more versitile.


--------------------------------------------------
Osword &7F Read Data and Deleted Data multi-sector
--------------------------------------------------

Osword &7F Read Data and Deleted Data multi-sector uses the appropriate
track register as a base from which to seek the track and sector specified
in the parameter block. If it cannot find the track and sector it returns
the sector not found error (&18) in the result byte. If it finds the
required track and sector it copies the first sector of data into the
buffer specified in the parameter block. If more than one sector is
specified this procedure repeats until either all the sectors have been
read or an error occurs.

The following parameter block is used with the Osword &7F Write Deleted
Data multi-sector command.

Parameter block &00       = drive number (&00-&03 or &FF)
Parameter block &01 - &04 = buffer address
Parameter block &05       = &03 (3 command parameters)
Parameter block &06       = &57 (read data and deleted data multi-sector)
Parameter block &07       = logical track number
Parameter block &08       = logical sector number
Parameter block &09       = sector size/number of sectors
Parameter block &0A       = result byte


The most significant 3 bits of the number stored in parameter block &09
contain the sector size code (column 2 of figure 3). The least significant
5 bits contain the number of sectors per track. To calculate the number to
be stored in parameter block &09 multiply the size code by 32 and add the
number of sectors. For example, if you want to verify a track with ten
sectors of 256 bytes then parameter block &09 will contain 1*32+10 = 42 =
&2A.

The program READ10 can be used to demonstrate this command. This program
reads the data written onto a disc by the program WRITE10, which was used
to illustrate the Osword &7F Write Data multi-sector command.

READ10 uses an normally formatted DFS disc and reads 2.5k of data from
track &01. The buffer starts at PAGE (line 240) and so the program could
be used to read a small BASIC program from a disc. The programs WRITE10,
with the Osword &7F write deleted data command, and READ10 could be used
to create a copy-protected disc. I will return to copy-protection in later
modules of this series.


   10 REM: READ10
   20 mcode = &0A00
   30 osword=&FFF1
   40 page = PAGE
   50 FORpass=0 TO 2 STEP 2
   60 P%=mcode
   70 [       OPT pass
   80         LDA #&7F
   90         LDX #block MOD 256
  100         LDY #block DIV 256
  110         JSR osword
  120         LDA result
  130         BEQ ok
  140         BRK
  150         BRK
  160         EQUS "Read error"
  170 .ok
  180         BRK
  190         EQUS "Read sucessful"
  200         BRK
  210         BRK
  220 .block
  230         EQUB &FF      \ current drive
  240         EQUD page     \ start at PAGE
  250         EQUB &03      \ 3 parameters
  260         EQUB &57      \ read data and deleted data
  270         EQUB &01      \ logical track 1
  280         EQUB &00      \ start logical sector 0
  290         EQUB &2A      \ 10 sectors of 256 bytes
  300 .result
  310         EQUB &00      \ result byte
  320 ]
  330 NEXT
  340 PRINT''"Type: CALL &";~mcode;" to read 10 sectors"'


-----------------------------------------------
Osword &7F Read Data and Deleted Data 128 bytes
-----------------------------------------------

If you need to read just one sector of 128 bytes you can use the Osword
&7F Read Data and Deleted Data 128 bytes command. This command uses the
following parameter block.

Parameter block &00       = drive number (&00-&03 or &FF)
Parameter block &01 - &04 = buffer address (not used)
Parameter block &05       = &02 (2 command parameters)
Parameter block &06       = &56 (read data and deleted data 128 bytes)
Parameter block &07       = logical track number
Parameter block &08       = logical sector number
Parameter block &09       = result byte


Although using this command saves you the trouble of calculating the
sector size/number of sectors parameter, I can not recommend using it when
the multi-sector command is so much more versitile.


---------------------------------
Osword &7F Read Data multi-sector
---------------------------------

If you need to read data which is not marked as deleted data then you can
use the Osword &7F Read Data multi-sector command. This command uses the
following parameter block.

Parameter block &00       = drive number (&00-&03 or &FF)
Parameter block &01 - &04 = buffer address (not used)
Parameter block &05       = &02 (2 command parameters)
Parameter block &06       = &53 (read data multi sector command)
Parameter block &07       = logical track number
Parameter block &08       = logical sector number
Parameter block &09       = sector size/number of sectors
Parameter block &0A       = result byte


This command can be used in exactly the same way as the Osword &7F Read
Data and Deleted Data command but it cannot read deleted data. There is no
need to use this command when the Osword &7F Read Data and Deleted Data
command is more versitile.


------------------------------
Osword &7F Read Data 128 bytes
------------------------------

If you need to read just one sector of 128 bytes of data which is not
marked as deleted data then you can use the Osword &7F Read Data 128 bytes
command. This command uses the following parameter block.

Parameter block &00       = drive number (&00-&03 or &FF)
Parameter block &01 - &04 = buffer address (not used)
Parameter block &05       = &02 (2 command parameters)
Parameter block &06       = &52 (read data 128 bytes command)
Parameter block &07       = logical track number
Parameter block &08       = logical sector number
Parameter block &09       = result byte


Although using this command saves you the trouble of calculating the
sector size/number of sectors parameter, I can not recommend using it when
the multi-sector command is so much more versitile.
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 32 2e  |-----..Module 2.|
00000080  20 54 68 65 20 44 46 53  20 4f 73 77 6f 72 64 20  | The DFS Osword |
00000090  63 6f 6d 6d 61 6e 64 73  20 28 70 61 72 74 20 32  |commands (part 2|
000000a0  29 0d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |).--------------|
000000b0  2d 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 0d 0d 20 20  |------------..  |
000000d0  20 20 20 20 2b 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |    +-----------|
000000e0  2d 2d 2d 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 2b  |---------------+|
00000110  0d 20 20 20 20 20 20 7c  20 41 6c 6c 20 74 68 65  |.      | All the|
00000120  20 44 46 53 20 6d 6f 64  75 6c 65 73 20 69 6e 20  | DFS modules in |
00000130  20 74 68 69 73 20 20 73  65 72 69 65 73 20 20 75  | this  series  u|
00000140  73 65 20 70 72 6f 67 72  61 6d 73 20 77 68 69 63  |se programs whic|
00000150  68 20 7c 0d 20 20 20 20  20 20 7c 20 65 78 70 65  |h |.      | expe|
00000160  72 69 6d 65 6e 74 20 20  77 69 74 68 20 74 68 65  |riment  with the|
00000170  20 66 6f 72 6d 61 74 20  61 6e 64 20 63 6f 6e 74  | format and cont|
00000180  65 6e 74 73 20 6f 66 20  64 69 73 63 73 2e 20 54  |ents of discs. T|
00000190  68 65 73 65 20 7c 0d 20  20 20 20 20 20 7c 20 65  |hese |.      | e|
000001a0  78 70 65 72 69 6d 65 6e  74 73 20 6d 61 79 20 20  |xperiments may  |
000001b0  68 61 76 65 20 64 69 73  61 73 74 65 72 6f 75 73  |have disasterous|
000001c0  20 65 66 66 65 63 74 73  20 69 66 20 79 6f 75 20  | effects if you |
000001d0  75 73 65 20 61 6e 79 20  7c 0d 20 20 20 20 20 20  |use any |.      |
000001e0  7c 20 6f 66 20 74 68 65  20 70 72 6f 67 72 61 6d  || of the program|
000001f0  73 20 20 6f 6e 20 20 64  69 73 63 73 20 20 77 68  |s  on  discs  wh|
00000200  69 63 68 20 73 74 6f 72  65 20 70 72 6f 67 72 61  |ich store progra|
00000210  6d 73 20 6f 72 20 64 61  74 61 20 7c 0d 20 20 20  |ms or data |.   |
00000220  20 20 20 7c 20 77 68 69  63 68 20 79 6f 75 20 63  |   | which you c|
00000230  61 6e 6e 6f 74 20 61 66  66 6f 72 64 20 74 6f 20  |annot afford to |
00000240  6c 6f 73 65 2e 20 20 59  6f 75 20 20 73 68 6f 75  |lose.  You  shou|
00000250  6c 64 20 20 66 69 72 73  74 20 74 72 79 20 7c 0d  |ld  first try |.|
00000260  20 20 20 20 20 20 7c 20  6f 75 74 20 20 74 68 65  |      | out  the|
00000270  20 20 70 72 6f 67 72 61  6d 73 20 20 75 73 69 6e  |  programs  usin|
00000280  67 20 20 64 69 73 63 73  20 20 74 68 61 74 20 20  |g  discs  that  |
00000290  68 61 76 65 20 65 69 74  68 65 72 20 62 65 65 6e  |have either been|
000002a0  20 7c 0d 20 20 20 20 20  20 7c 20 64 75 70 6c 69  | |.      | dupli|
000002b0  63 61 74 65 64 20 6f 72  2c 20 62 65 74 74 65 72  |cated or, better|
000002c0  20 73 74 69 6c 6c 2c 20  68 61 76 65 20 6e 6f 74  | still, have not|
000002d0  20 62 65 65 6e 20 75 73  65 64 20 61 74 20 61 6c  | been used at al|
000002e0  6c 2e 20 20 7c 0d 20 20  20 20 20 20 2b 2d 2d 2d  |l.  |.      +---|
000002f0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00000320  2d 2d 2d 2d 2d 2d 2d 2b  0d 0d 0d 2d 2d 2d 2d 2d  |-------+...-----|
00000330  2d 2d 2d 2d 2d 0d 4f 73  77 6f 72 64 20 26 37 46  |-----.Osword &7F|
00000340  0d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 0d 0d 4f 73 77  |.----------..Osw|
00000350  6f 72 64 20 26 37 46 20  65 78 65 63 75 74 65 73  |ord &7F executes|
00000360  20 74 68 65 20 38 32 37  31 20 64 69 73 63 20 63  | the 8271 disc c|
00000370  6f 6e 74 72 6f 6c 6c 65  72 20 63 6f 6d 6d 61 6e  |ontroller comman|
00000380  64 73 2e 20 49 66 20 74  68 65 20 64 69 73 63 0d  |ds. If the disc.|
00000390  69 6e 74 65 72 66 61 63  65 20 75 73 65 73 20 61  |interface uses a|
000003a0  20 31 37 37 30 20 64 69  73 63 20 63 6f 6e 74 72  | 1770 disc contr|
000003b0  6f 6c 6c 65 72 20 74 68  65 6e 20 4f 73 77 6f 72  |oller then Oswor|
000003c0  64 20 26 37 46 20 65 6d  75 6c 61 74 65 73 20 74  |d &7F emulates t|
000003d0  68 65 20 38 32 37 31 0d  63 6f 6d 6d 61 6e 64 20  |he 8271.command |
000003e0  73 65 74 20 75 73 69 6e  67 20 74 68 65 20 31 37  |set using the 17|
000003f0  37 30 2e 20 54 68 65 20  63 6f 6d 70 6c 65 74 65  |70. The complete|
00000400  20 63 6f 6d 6d 61 6e 64  20 73 65 74 20 65 78 65  | command set exe|
00000410  63 75 74 65 64 20 62 79  20 4f 73 77 6f 72 64 0d  |cuted by Osword.|
00000420  26 37 46 20 69 73 20 73  68 6f 77 6e 20 69 6e 20  |&7F is shown in |
00000430  66 69 67 75 72 65 20 31  2e 20 4f 73 77 6f 72 64  |figure 1. Osword|
00000440  20 26 37 46 20 63 6f 6d  6d 61 6e 64 73 20 66 72  | &7F commands fr|
00000450  6f 6d 20 26 36 39 20 74  6f 20 26 37 44 20 77 65  |om &69 to &7D we|
00000460  72 65 20 63 6f 76 65 72  65 64 0d 69 6e 20 6d 6f  |re covered.in mo|
00000470  64 75 6c 65 20 31 2e 20  49 6e 20 74 68 69 73 20  |dule 1. In this |
00000480  6d 6f 64 75 6c 65 20 49  20 77 69 6c 6c 20 65 78  |module I will ex|
00000490  70 6c 61 69 6e 20 68 6f  77 20 74 6f 20 75 73 65  |plain how to use|
000004a0  20 74 68 65 20 4f 73 77  6f 72 64 20 26 37 46 0d  | the Osword &7F.|
000004b0  63 6f 6d 6d 61 6e 64 20  6e 75 6d 62 65 72 73 20  |command numbers |
000004c0  26 34 41 20 74 6f 20 26  36 33 2e 0d 0d 0d 2b 2d  |&4A to &63....+-|
000004d0  2d 2d 2d 2d 2d 2d 2d 2d  2b 2d 2d 2d 2d 2d 2d 2d  |--------+-------|
000004e0  2d 2b 2d 2d 2d 2d 2d 2d  2b 2d 2d 2d 2d 2d 2d 2d  |-+------+-------|
000004f0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00000510  2d 2d 2d 2d 2b 0d 7c 20  43 6f 6d 6d 61 6e 64 20  |----+.| Command |
00000520  7c 20 50 61 72 61 6d 2d  20 7c 20 31 37 37 30 20  || Param- | 1770 |
00000530  7c 20 20 41 63 74 69 6f  6e 20 20 20 20 20 20 20  ||  Action       |
00000540  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000550  20 20 20 20 20 20 20 20  20 20 20 20 7c 0d 7c 20  |            |.| |
00000560  6e 75 6d 62 65 72 20 20  7c 20 65 74 65 72 73 20  |number  | eters |
00000570  20 7c 20 20 20 20 20 20  7c 20 20 20 20 20 20 20  | |      |       |
00000580  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
*
000005a0  20 20 20 20 7c 0d 2b 2d  2d 2d 2d 2d 2d 2d 2d 2d  |    |.+---------|
000005b0  2b 2d 2d 2d 2d 2d 2d 2d  2d 2b 2d 2d 2d 2d 2d 2d  |+--------+------|
000005c0  2b 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |+---------------|
000005d0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
000005e0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2b 0d 7c 20  |------------+.| |
000005f0  20 20 26 34 41 20 20 20  7c 20 20 20 20 32 20 20  |  &4A   |    2  |
00000600  20 7c 20 20 59 65 73 20  7c 20 57 72 69 74 65 20  | |  Yes | Write |
00000610  64 61 74 61 20 31 32 38  20 62 79 74 65 73 20 20  |data 128 bytes  |
00000620  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000630  20 20 20 20 7c 0d 7c 20  20 20 26 34 42 20 20 20  |    |.|   &4B   |
00000640  7c 20 20 20 20 33 20 20  20 7c 20 20 59 65 73 20  ||    3   |  Yes |
00000650  7c 20 57 72 69 74 65 20  64 61 74 61 20 6d 75 6c  || Write data mul|
00000660  74 69 2d 73 65 63 74 6f  72 20 20 20 20 20 20 20  |ti-sector       |
00000670  20 20 20 20 20 20 20 20  20 20 20 20 7c 0d 7c 20  |            |.| |
00000680  20 20 26 34 45 20 20 20  7c 20 20 20 20 32 20 20  |  &4E   |    2  |
00000690  20 7c 20 20 59 65 73 20  7c 20 57 72 69 74 65 20  | |  Yes | Write |
000006a0  64 65 6c 65 74 65 64 20  64 61 74 61 20 31 32 38  |deleted data 128|
000006b0  20 62 79 74 65 73 20 20  20 20 20 20 20 20 20 20  | bytes          |
000006c0  20 20 20 20 7c 0d 7c 20  20 20 26 34 46 20 20 20  |    |.|   &4F   |
000006d0  7c 20 20 20 20 33 20 20  20 7c 20 20 59 65 73 20  ||    3   |  Yes |
000006e0  7c 20 57 72 69 74 65 20  64 65 6c 65 74 65 64 20  || Write deleted |
000006f0  64 61 74 61 20 6d 75 6c  74 69 2d 73 65 63 74 6f  |data multi-secto|
00000700  72 20 20 20 20 20 20 20  20 20 20 20 7c 0d 7c 20  |r           |.| |
00000710  20 20 26 35 32 20 20 20  7c 20 20 20 20 32 20 20  |  &52   |    2  |
00000720  20 7c 20 20 59 65 73 20  7c 20 52 65 61 64 20 64  | |  Yes | Read d|
00000730  61 74 61 20 31 32 38 20  62 79 74 65 73 20 20 20  |ata 128 bytes   |
00000740  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000750  20 20 20 20 7c 0d 7c 20  20 20 26 35 33 20 20 20  |    |.|   &53   |
00000760  7c 20 20 20 20 33 20 20  20 7c 20 20 59 65 73 20  ||    3   |  Yes |
00000770  7c 20 52 65 61 64 20 64  61 74 61 20 6d 75 6c 74  || Read data mult|
00000780  69 2d 73 65 63 74 6f 72  20 20 20 20 20 20 20 20  |i-sector        |
00000790  20 20 20 20 20 20 20 20  20 20 20 20 7c 0d 7c 20  |            |.| |
000007a0  20 20 26 35 36 20 20 20  7c 20 20 20 20 32 20 20  |  &56   |    2  |
000007b0  20 7c 20 20 59 65 73 20  7c 20 52 65 61 64 20 64  | |  Yes | Read d|
000007c0  61 74 61 20 61 6e 64 20  64 65 6c 65 74 65 64 20  |ata and deleted |
000007d0  64 61 74 61 20 31 32 38  20 62 79 74 65 73 20 20  |data 128 bytes  |
000007e0  20 20 20 20 7c 0d 7c 20  20 20 26 35 37 20 20 20  |    |.|   &57   |
000007f0  7c 20 20 20 20 33 20 20  20 7c 20 20 59 65 73 20  ||    3   |  Yes |
00000800  7c 20 52 65 61 64 20 64  61 74 61 20 61 6e 64 20  || Read data and |
00000810  64 65 6c 65 74 65 64 20  64 61 74 61 20 6d 75 6c  |deleted data mul|
00000820  74 69 2d 73 65 63 74 6f  72 20 20 20 7c 0d 7c 20  |ti-sector   |.| |
00000830  20 20 26 35 42 20 20 20  7c 20 20 20 20 33 20 20  |  &5B   |    3  |
00000840  20 7c 20 20 59 65 73 20  7c 20 52 65 61 64 20 73  | |  Yes | Read s|
00000850  65 63 74 6f 72 20 69 64  73 20 20 20 20 20 20 20  |ector ids       |
00000860  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000870  20 20 20 20 7c 0d 7c 20  20 20 26 35 45 20 20 20  |    |.|   &5E   |
00000880  7c 20 20 20 20 32 20 20  20 7c 20 20 59 65 73 20  ||    2   |  Yes |
00000890  7c 20 56 65 72 69 66 79  20 64 61 74 61 20 61 6e  || Verify data an|
000008a0  64 20 64 65 6c 65 74 65  64 20 64 61 74 61 20 31  |d deleted data 1|
000008b0  32 38 20 62 79 74 65 73  20 20 20 20 7c 0d 7c 20  |28 bytes    |.| |
000008c0  20 20 26 35 46 20 20 20  7c 20 20 20 20 33 20 20  |  &5F   |    3  |
000008d0  20 7c 20 20 59 65 73 20  7c 20 56 65 72 69 66 79  | |  Yes | Verify|
000008e0  20 64 61 74 61 20 61 6e  64 20 64 65 6c 65 74 65  | data and delete|
000008f0  64 20 64 61 74 61 20 6d  75 6c 74 69 2d 73 65 63  |d data multi-sec|
00000900  74 6f 72 20 7c 0d 7c 20  20 20 26 36 33 20 20 20  |tor |.|   &63   |
00000910  7c 20 20 20 20 35 20 20  20 7c 20 20 59 65 73 20  ||    5   |  Yes |
00000920  7c 20 46 6f 72 6d 61 74  20 74 72 61 63 6b 20 20  || Format track  |
00000930  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000940  20 20 20 20 20 20 20 20  20 20 20 20 7c 0d 7c 20  |            |.| |
00000950  20 20 26 36 39 20 20 20  7c 20 20 20 20 31 20 20  |  &69   |    1  |
00000960  20 7c 20 20 59 65 73 20  7c 20 53 65 65 6b 20 20  | |  Yes | Seek  |
00000970  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
*
00000990  20 20 20 20 7c 0d 2b 2d  2d 2d 2d 2d 2d 2d 2d 2d  |    |.+---------|
000009a0  2b 2d 2d 2d 2d 2d 2d 2d  2d 2b 2d 2d 2d 2d 2d 2d  |+--------+------|
000009b0  2b 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |+---------------|
000009c0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
000009d0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2b 0d 7c 20  |------------+.| |
000009e0  20 20 26 36 43 20 20 20  7c 20 20 20 20 30 20 20  |  &6C   |    0  |
000009f0  20 7c 20 50 61 72 74 20  7c 20 52 65 61 64 20 64  | | Part | Read d|
00000a00  72 69 76 65 20 73 74 61  74 75 73 20 20 20 20 20  |rive status     |
00000a10  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000a20  20 20 20 20 7c 0d 7c 20  20 20 26 37 35 20 20 20  |    |.|   &75   |
00000a30  7c 20 20 20 20 34 20 20  20 7c 20 50 61 72 74 20  ||    4   | Part |
00000a40  7c 20 49 6e 69 74 69 61  6c 69 73 65 20 38 32 37  || Initialise 827|
00000a50  31 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |1               |
00000a60  20 20 20 20 20 20 20 20  20 20 20 20 7c 0d 7c 20  |            |.| |
00000a70  20 20 26 37 35 20 20 20  7c 20 20 20 20 34 20 20  |  &75   |    4  |
00000a80  20 7c 20 50 61 72 74 20  7c 20 4c 6f 61 64 20 62  | | Part | Load b|
00000a90  61 64 20 74 72 61 63 6b  73 20 20 20 20 20 20 20  |ad tracks       |
00000aa0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000ab0  20 20 20 20 7c 0d 7c 20  20 20 26 37 41 20 20 20  |    |.|   &7A   |
00000ac0  7c 20 20 20 20 32 20 20  20 7c 20 50 61 72 74 20  ||    2   | Part |
00000ad0  7c 20 57 72 69 74 65 20  73 70 65 63 69 61 6c 20  || Write special |
00000ae0  72 65 67 69 73 74 65 72  20 20 20 20 20 20 20 20  |register        |
00000af0  20 20 20 20 20 20 20 20  20 20 20 20 7c 0d 7c 20  |            |.| |
00000b00  20 20 26 37 44 20 20 20  7c 20 20 20 20 31 20 20  |  &7D   |    1  |
00000b10  20 7c 20 50 61 72 74 20  7c 20 52 65 61 64 20 73  | | Part | Read s|
00000b20  70 65 63 69 61 6c 20 72  65 67 69 73 74 65 72 20  |pecial register |
00000b30  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000b40  20 20 20 20 7c 0d 2b 2d  2d 2d 2d 2d 2d 2d 2d 2d  |    |.+---------|
00000b50  2b 2d 2d 2d 2d 2d 2d 2d  2d 2b 2d 2d 2d 2d 2d 2d  |+--------+------|
00000b60  2b 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |+---------------|
00000b70  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
00000b80  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2b 0d 0d 20  |------------+.. |
00000b90  20 20 20 20 20 20 20 20  20 20 20 20 20 46 69 67  |             Fig|
00000ba0  75 72 65 20 31 2e 20 54  68 65 20 4f 73 77 6f 72  |ure 1. The Oswor|
00000bb0  64 20 26 37 46 20 63 6f  6d 6d 61 6e 64 73 0d 20  |d &7F commands. |
00000bc0  20 20 20 20 20 20 20 20  20 20 20 20 20 2d 2d 2d  |             ---|
00000bd0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
00000be0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 0d 0d  |--------------..|
00000bf0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
00000c00  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 0d 4f 73 77 6f 72  |----------.Oswor|
00000c10  64 20 26 37 46 20 52 65  61 64 20 53 65 63 74 6f  |d &7F Read Secto|
00000c20  72 20 49 44 73 0d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |r IDs.----------|
00000c30  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
00000c40  0d 0d 42 65 66 6f 72 65  20 75 73 69 6e 67 20 74  |..Before using t|
00000c50  68 69 73 20 63 6f 6d 6d  61 6e 64 20 79 6f 75 20  |his command you |
00000c60  73 68 6f 75 6c 64 20 65  6e 73 75 72 65 20 74 68  |should ensure th|
00000c70  61 74 20 74 68 65 20 61  70 70 72 6f 70 72 69 61  |at the appropria|
00000c80  74 65 20 74 72 61 63 6b  0d 72 65 67 69 73 74 65  |te track.registe|
00000c90  72 20 63 6f 6e 74 61 69  6e 73 20 74 68 65 20 63  |r contains the c|
00000ca0  75 72 72 65 6e 74 20 70  68 79 73 69 63 61 6c 20  |urrent physical |
00000cb0  74 72 61 63 6b 20 6e 75  6d 62 65 72 20 6f 72 20  |track number or |
00000cc0  75 73 65 20 74 68 65 20  4f 73 77 6f 72 64 20 26  |use the Osword &|
00000cd0  37 46 0d 53 65 65 6b 20  63 6f 6d 6d 61 6e 64 20  |7F.Seek command |
00000ce0  74 6f 20 73 65 65 6b 20  74 72 61 63 6b 20 30 2e  |to seek track 0.|
00000cf0  20 4f 73 77 6f 72 64 20  26 37 46 20 52 65 61 64  | Osword &7F Read|
00000d00  20 53 65 63 74 6f 72 20  49 44 73 20 75 73 65 73  | Sector IDs uses|
00000d10  20 74 68 65 0d 61 70 70  72 6f 70 72 69 61 74 65  | the.appropriate|
00000d20  20 74 72 61 63 6b 20 72  65 67 69 73 74 65 72 20  | track register |
00000d30  61 73 20 61 20 62 61 73  65 20 66 72 6f 6d 20 77  |as a base from w|
00000d40  68 69 63 68 20 74 6f 20  73 65 65 6b 20 61 20 73  |hich to seek a s|
00000d50  70 65 63 69 66 69 65 64  0d 70 68 79 73 69 63 61  |pecified.physica|
00000d60  6c 20 74 72 61 63 6b 2e  20 49 74 20 74 68 65 6e  |l track. It then|
00000d70  20 72 65 61 64 73 20 74  68 65 20 72 65 71 75 69  | reads the requi|
00000d80  72 65 64 20 6e 75 6d 62  65 72 20 6f 66 20 73 65  |red number of se|
00000d90  63 74 6f 72 20 49 44 73  20 61 6e 64 20 73 74 6f  |ctor IDs and sto|
00000da0  72 65 73 0d 74 68 65 6d  20 69 6e 20 74 68 65 20  |res.them in the |
00000db0  62 75 66 66 65 72 20 61  72 65 61 20 73 70 65 63  |buffer area spec|
00000dc0  69 66 69 65 64 20 69 6e  20 74 68 65 20 70 61 72  |ified in the par|
00000dd0  61 6d 65 74 65 72 20 62  6c 6f 63 6b 2e 20 53 65  |ameter block. Se|
00000de0  63 74 6f 72 20 49 44 73  20 61 72 65 0d 74 72 61  |ctor IDs are.tra|
00000df0  6e 73 66 65 72 65 64 20  69 6e 74 6f 20 74 68 65  |nsfered into the|
00000e00  20 62 75 66 66 65 72 20  61 72 65 61 20 69 6e 20  | buffer area in |
00000e10  70 68 79 73 69 63 61 6c  20 73 65 63 74 6f 72 20  |physical sector |
00000e20  6f 72 64 65 72 2e 20 54  68 65 20 63 6f 6d 6d 61  |order. The comma|
00000e30  6e 64 0d 72 65 74 75 72  6e 73 20 66 6f 75 72 20  |nd.returns four |
00000e40  62 79 74 65 73 20 46 6f  72 20 65 61 63 68 20 73  |bytes For each s|
00000e50  65 63 74 6f 72 20 49 44  20 74 68 61 74 20 69 74  |ector ID that it|
00000e60  20 72 65 61 64 73 2e 0d  0d 62 79 74 65 20 30 20  | reads...byte 0 |
00000e70  3d 20 6c 6f 67 69 63 61  6c 20 74 72 61 63 6b 20  |= logical track |
00000e80  6e 75 6d 62 65 72 0d 62  79 74 65 20 31 20 3d 20  |number.byte 1 = |
00000e90  68 65 61 64 20 6e 75 6d  62 65 72 0d 62 79 74 65  |head number.byte|
00000ea0  20 32 20 3d 20 6c 6f 67  69 63 61 6c 20 73 65 63  | 2 = logical sec|
00000eb0  74 6f 72 20 6e 75 6d 62  65 72 0d 62 79 74 65 20  |tor number.byte |
00000ec0  33 20 3d 20 64 61 74 61  20 73 69 7a 65 20 63 6f  |3 = data size co|
00000ed0  64 65 20 28 30 3d 31 32  38 2c 20 31 3d 32 35 36  |de (0=128, 1=256|
00000ee0  2c 20 2e 2e 2e 20 34 3d  32 30 34 38 29 0d 0d 0d  |, ... 4=2048)...|
00000ef0  54 68 65 20 66 6f 6c 6c  6f 77 69 6e 67 20 70 61  |The following pa|
00000f00  72 61 6d 65 74 65 72 20  62 6c 6f 63 6b 20 69 73  |rameter block is|
00000f10  20 75 73 65 64 20 62 79  20 4f 73 77 6f 72 64 20  | used by Osword |
00000f20  26 37 46 20 72 65 61 64  20 73 65 63 74 6f 72 20  |&7F read sector |
00000f30  49 44 73 3a 0d 0d 50 61  72 61 6d 65 74 65 72 20  |IDs:..Parameter |
00000f40  62 6c 6f 63 6b 20 26 30  30 20 20 20 20 20 20 20  |block &00       |
00000f50  3d 20 64 72 69 76 65 20  6e 75 6d 62 65 72 20 28  |= drive number (|
00000f60  26 30 30 2d 26 30 33 20  6f 72 20 26 46 46 29 0d  |&00-&03 or &FF).|
00000f70  50 61 72 61 6d 65 74 65  72 20 62 6c 6f 63 6b 20  |Parameter block |
00000f80  26 30 31 20 2d 20 26 30  34 20 3d 20 62 75 66 66  |&01 - &04 = buff|
00000f90  65 72 20 61 64 64 72 65  73 73 20 66 6f 72 20 73  |er address for s|
00000fa0  65 63 74 6f 72 20 49 44  73 0d 50 61 72 61 6d 65  |ector IDs.Parame|
00000fb0  74 65 72 20 62 6c 6f 63  6b 20 26 30 35 20 20 20  |ter block &05   |
00000fc0  20 20 20 20 3d 20 26 30  33 20 28 33 20 63 6f 6d  |    = &03 (3 com|
00000fd0  6d 61 6e 64 20 70 61 72  61 6d 65 74 65 72 73 29  |mand parameters)|
00000fe0  0d 50 61 72 61 6d 65 74  65 72 20 62 6c 6f 63 6b  |.Parameter block|
00000ff0  20 26 30 36 20 20 20 20  20 20 20 3d 20 26 35 42  | &06       = &5B|
00001000  20 28 72 65 61 64 20 73  65 63 74 6f 72 20 49 44  | (read sector ID|
00001010  73 20 63 6f 6d 6d 61 6e  64 29 0d 50 61 72 61 6d  |s command).Param|
00001020  65 74 65 72 20 62 6c 6f  63 6b 20 26 30 37 20 20  |eter block &07  |
00001030  20 20 20 20 20 3d 20 70  68 79 73 69 63 61 6c 20  |     = physical |
00001040  74 72 61 63 6b 20 6e 75  6d 62 65 72 0d 50 61 72  |track number.Par|
00001050  61 6d 65 74 65 72 20 62  6c 6f 63 6b 20 26 30 38  |ameter block &08|
00001060  20 20 20 20 20 20 20 3d  20 26 30 30 0d 50 61 72  |       = &00.Par|
00001070  61 6d 65 74 65 72 20 62  6c 6f 63 6b 20 26 30 39  |ameter block &09|
00001080  20 20 20 20 20 20 20 3d  20 6e 75 6d 62 65 72 20  |       = number |
00001090  6f 66 20 49 44 73 20 74  6f 20 62 65 20 72 65 61  |of IDs to be rea|
000010a0  64 0d 50 61 72 61 6d 65  74 65 72 20 62 6c 6f 63  |d.Parameter bloc|
000010b0  6b 20 26 30 41 20 20 20  20 20 20 20 3d 20 72 65  |k &0A       = re|
000010c0  73 75 6c 74 20 62 79 74  65 0d 0d 0d 4f 6e 65 20  |sult byte...One |
000010d0  6f 66 20 6d 61 6e 79 20  70 6f 73 73 69 62 6c 65  |of many possible|
000010e0  20 75 73 65 73 20 66 6f  72 20 74 68 69 73 20 63  | uses for this c|
000010f0  6f 6d 6d 61 6e 64 20 69  73 20 74 6f 20 63 68 65  |ommand is to che|
00001100  63 6b 20 69 66 20 61 20  64 69 73 63 20 68 61 73  |ck if a disc has|
00001110  20 62 65 65 6e 0d 66 6f  72 6d 61 74 74 65 64 2e  | been.formatted.|
00001120  20 49 66 20 4f 73 77 6f  72 64 20 26 37 46 20 52  | If Osword &7F R|
00001130  65 61 64 20 53 65 63 74  6f 72 20 49 44 73 20 66  |ead Sector IDs f|
00001140  61 69 6c 73 20 74 6f 20  66 69 6e 64 20 61 74 20  |ails to find at |
00001150  6c 65 61 73 74 20 6f 6e  65 20 73 65 63 74 6f 72  |least one sector|
00001160  0d 6f 6e 20 74 72 61 63  6b 20 7a 65 72 6f 20 74  |.on track zero t|
00001170  68 65 20 6d 6f 73 74 20  70 72 6f 62 61 62 6c 65  |he most probable|
00001180  20 72 65 61 73 6f 6e 20  69 73 20 74 68 61 74 20  | reason is that |
00001190  74 68 65 20 64 69 73 63  20 68 61 73 20 6e 6f 74  |the disc has not|
000011a0  20 62 65 65 6e 0d 66 6f  72 6d 61 74 74 65 64 20  | been.formatted |
000011b0  61 6e 64 20 74 68 69 73  20 77 69 6c 6c 20 62 65  |and this will be|
000011c0  20 72 65 70 6f 72 74 65  64 20 61 73 20 65 72 72  | reported as err|
000011d0  6f 72 20 6e 75 6d 62 65  72 20 26 31 38 2c 20 73  |or number &18, s|
000011e0  65 63 74 6f 72 20 6e 6f  74 20 66 6f 75 6e 64 0d  |ector not found.|
000011f0  28 73 65 65 20 66 69 67  75 72 65 20 32 29 2e 20  |(see figure 2). |
00001200  54 68 65 20 70 72 6f 67  72 61 6d 20 4e 4f 54 46  |The program NOTF|
00001210  4f 52 4d 20 75 73 65 73  20 74 68 69 73 20 69 64  |ORM uses this id|
00001220  65 61 20 74 6f 20 73 65  65 20 69 66 20 61 20 64  |ea to see if a d|
00001230  69 73 63 20 69 6e 20 74  68 65 0d 63 75 72 72 65  |isc in the.curre|
00001240  6e 74 20 64 72 69 76 65  20 68 61 73 20 62 65 65  |nt drive has bee|
00001250  6e 20 66 6f 72 6d 61 74  74 65 64 2e 0d 0d 0d 20  |n formatted.... |
00001260  20 20 20 20 20 20 20 20  20 20 20 20 2b 2d 2d 2d  |            +---|
00001270  2d 2d 2d 2d 2d 2b 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |-----+----------|
00001280  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
00001290  2d 2d 2b 0d 20 20 20 20  20 20 20 20 20 20 20 20  |--+.            |
000012a0  20 7c 20 52 65 73 75 6c  74 20 7c 20 49 6e 74 65  | | Result | Inte|
000012b0  72 70 72 65 74 61 74 69  6f 6e 20 20 20 20 20 20  |rpretation      |
000012c0  20 20 20 20 20 20 20 7c  0d 20 20 20 20 20 20 20  |       |.       |
000012d0  20 20 20 20 20 20 2b 2d  2d 2d 2d 2d 2d 2d 2d 2b  |      +--------+|
000012e0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
000012f0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2b 0d 20 20  |------------+.  |
00001300  20 20 20 20 20 20 20 20  20 20 20 7c 20 20 26 30  |           |  &0|
00001310  32 20 20 20 7c 20 53 63  61 6e 20 6d 65 74 20 65  |2   | Scan met e|
00001320  71 75 61 6c 20 2a 2a 20  20 20 20 20 20 20 20 20  |qual **         |
00001330  20 7c 0d 20 20 20 20 20  20 20 20 20 20 20 20 20  | |.             |
00001340  7c 20 20 26 30 34 20 20  20 7c 20 53 63 61 6e 20  ||  &04   | Scan |
00001350  6d 65 74 20 6e 6f 74 20  65 71 75 61 6c 20 2a 2a  |met not equal **|
00001360  20 20 20 20 20 20 7c 0d  20 20 20 20 20 20 20 20  |      |.        |
00001370  20 20 20 20 20 7c 20 20  26 30 38 20 20 20 7c 20  |     |  &08   | |
00001380  43 6c 6f 63 6b 20 65 72  72 6f 72 20 20 20 20 20  |Clock error     |
00001390  20 20 20 20 20 20 20 20  20 20 20 7c 0d 20 20 20  |           |.   |
000013a0  20 20 20 20 20 20 20 20  20 20 7c 20 20 26 30 41  |          |  &0A|
000013b0  20 20 20 7c 20 4c 61 74  65 20 44 4d 41 20 2a 2a  |   | Late DMA **|
000013c0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000013d0  7c 0d 20 20 20 20 20 20  20 20 20 20 20 20 20 7c  ||.             ||
000013e0  20 20 26 30 43 20 20 20  7c 20 53 65 63 74 6f 72  |  &0C   | Sector|
000013f0  20 49 44 20 43 52 43 20  65 72 72 6f 72 20 20 20  | ID CRC error   |
00001400  20 20 20 20 20 7c 0d 20  20 20 20 20 20 20 20 20  |     |.         |
00001410  20 20 20 20 7c 20 20 26  30 45 20 20 20 7c 20 44  |    |  &0E   | D|
00001420  61 74 61 20 43 52 43 20  65 72 72 6f 72 20 20 20  |ata CRC error   |
00001430  20 20 20 20 20 20 20 20  20 20 7c 0d 20 20 20 20  |          |.    |
00001440  20 20 20 20 20 20 20 20  20 7c 20 20 26 31 30 20  |         |  &10 |
00001450  20 20 7c 20 44 72 69 76  65 20 6e 6f 74 20 72 65  |  | Drive not re|
00001460  61 64 79 20 20 20 20 20  20 20 20 20 20 20 20 7c  |ady            ||
00001470  0d 20 20 20 20 20 20 20  20 20 20 20 20 20 7c 20  |.             | |
00001480  20 26 31 32 20 20 20 7c  20 44 69 73 63 20 77 72  | &12   | Disc wr|
00001490  69 74 65 20 70 72 6f 74  65 63 74 65 64 20 20 20  |ite protected   |
000014a0  20 20 20 20 7c 0d 20 20  20 20 20 20 20 20 20 20  |    |.          |
000014b0  20 20 20 7c 20 20 26 31  34 20 20 20 7c 20 50 68  |   |  &14   | Ph|
000014c0  79 73 69 63 61 6c 20 74  72 61 63 6b 20 30 20 6e  |ysical track 0 n|
000014d0  6f 74 20 66 6f 75 6e 64  20 7c 0d 20 20 20 20 20  |ot found |.     |
000014e0  20 20 20 20 20 20 20 20  7c 20 20 26 31 36 20 20  |        |  &16  |
000014f0  20 7c 20 57 72 69 74 65  20 66 61 75 6c 74 20 20  | | Write fault  |
00001500  20 20 20 20 20 20 20 20  20 20 20 20 20 20 7c 0d  |              |.|
00001510  20 20 20 20 20 20 20 20  20 20 20 20 20 7c 20 20  |             |  |
00001520  26 31 38 20 20 20 7c 20  53 65 63 74 6f 72 20 6e  |&18   | Sector n|
00001530  6f 74 20 66 6f 75 6e 64  20 20 20 20 20 20 20 20  |ot found        |
00001540  20 20 20 7c 0d 20 20 20  20 20 20 20 20 20 20 20  |   |.           |
00001550  20 20 2b 2d 2d 2d 2d 2d  2d 2d 2d 2b 2d 2d 2d 2d  |  +--------+----|
00001560  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
00001570  2d 2d 2d 2d 2d 2d 2d 2d  2b 0d 20 20 20 20 20 20  |--------+.      |
00001580  20 20 20 20 20 20 20 7c  20 20 45 72 72 6f 72 73  |       |  Errors|
00001590  20 6d 61 72 6b 65 64 20  2a 2a 20 73 68 6f 75 6c  | marked ** shoul|
000015a0  64 20 6e 6f 74 20 6f 63  63 75 72 20 20 7c 0d 20  |d not occur  |. |
000015b0  20 20 20 20 20 20 20 20  20 20 20 20 2b 2d 2d 2d  |            +---|
000015c0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
000015e0  2d 2d 2b 0d 0d 20 20 20  20 20 20 20 46 69 67 75  |--+..       Figu|
000015f0  72 65 20 32 2e 20 54 68  65 20 65 72 72 6f 72 20  |re 2. The error |
00001600  63 6f 64 65 73 20 72 65  74 75 72 6e 65 64 20 69  |codes returned i|
00001610  6e 20 74 68 65 20 72 65  73 75 6c 74 20 62 79 74  |n the result byt|
00001620  65 0d 20 20 20 20 20 20  20 2d 2d 2d 2d 2d 2d 2d  |e.       -------|
00001630  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00001650  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 0d 0d  |--------------..|
00001660  0d 20 20 20 31 30 20 52  45 4d 3a 20 4e 4f 54 46  |.   10 REM: NOTF|
00001670  4f 52 4d 0d 20 20 20 32  30 20 6f 73 77 6f 72 64  |ORM.   20 osword|
00001680  3d 26 46 46 46 31 0d 20  20 20 33 30 20 44 49 4d  |=&FFF1.   30 DIM|
00001690  20 6d 63 6f 64 65 20 26  31 30 30 0d 20 20 20 34  | mcode &100.   4|
000016a0  30 20 46 4f 52 20 70 61  73 73 20 3d 20 30 20 54  |0 FOR pass = 0 T|
000016b0  4f 20 32 20 53 54 45 50  20 32 0d 20 20 20 35 30  |O 2 STEP 2.   50|
000016c0  20 50 25 3d 6d 63 6f 64  65 0d 20 20 20 36 30 20  | P%=mcode.   60 |
000016d0  5b 20 20 20 20 20 20 20  4f 50 54 20 70 61 73 73  |[       OPT pass|
000016e0  0d 20 20 20 37 30 20 20  20 20 20 20 20 20 20 4c  |.   70         L|
000016f0  44 41 20 23 26 37 46 0d  20 20 20 38 30 20 20 20  |DA #&7F.   80   |
00001700  20 20 20 20 20 20 4c 44  58 20 23 62 6c 6f 63 6b  |      LDX #block|
00001710  20 4d 4f 44 20 32 35 36  0d 20 20 20 39 30 20 20  | MOD 256.   90  |
00001720  20 20 20 20 20 20 20 4c  44 59 20 23 62 6c 6f 63  |       LDY #bloc|
00001730  6b 20 44 49 56 20 32 35  36 0d 20 20 31 30 30 20  |k DIV 256.  100 |
00001740  20 20 20 20 20 20 20 20  4a 53 52 20 6f 73 77 6f  |        JSR oswo|
00001750  72 64 0d 20 20 31 31 30  20 20 20 20 20 20 20 20  |rd.  110        |
00001760  20 52 54 53 0d 20 20 31  32 30 20 2e 62 6c 6f 63  | RTS.  120 .bloc|
00001770  6b 0d 20 20 31 33 30 20  20 20 20 20 20 20 20 20  |k.  130         |
00001780  45 51 55 42 20 26 46 46  20 20 20 20 20 20 5c 20  |EQUB &FF      \ |
00001790  63 75 72 72 65 6e 74 20  64 72 69 76 65 0d 20 20  |current drive.  |
000017a0  31 34 30 20 20 20 20 20  20 20 20 20 45 51 55 44  |140         EQUD|
000017b0  20 62 75 66 66 65 72 20  20 20 5c 20 62 75 66 66  | buffer   \ buff|
000017c0  65 72 20 61 64 64 72 65  73 73 0d 20 20 31 35 30  |er address.  150|
000017d0  20 20 20 20 20 20 20 20  20 45 51 55 42 20 26 30  |         EQUB &0|
000017e0  33 20 20 20 20 20 20 5c  20 33 20 70 61 72 61 6d  |3      \ 3 param|
000017f0  65 74 65 72 73 0d 20 20  31 36 30 20 20 20 20 20  |eters.  160     |
00001800  20 20 20 20 45 51 55 42  20 26 35 42 20 20 20 20  |    EQUB &5B    |
00001810  20 20 5c 20 72 65 61 64  20 73 65 63 74 6f 72 20  |  \ read sector |
00001820  49 44 73 0d 20 20 31 37  30 20 20 20 20 20 20 20  |IDs.  170       |
00001830  20 20 45 51 55 42 20 26  30 30 20 20 20 20 20 20  |  EQUB &00      |
00001840  5c 20 74 72 61 63 6b 20  30 0d 20 20 31 38 30 20  |\ track 0.  180 |
00001850  20 20 20 20 20 20 20 20  45 51 55 42 20 26 30 30  |        EQUB &00|
00001860  0d 20 20 31 39 30 20 20  20 20 20 20 20 20 20 45  |.  190         E|
00001870  51 55 42 20 26 30 31 20  20 20 20 20 20 5c 20 72  |QUB &01      \ r|
00001880  65 61 64 20 31 20 73 65  63 74 6f 72 0d 20 20 32  |ead 1 sector.  2|
00001890  30 30 20 2e 72 65 73 75  6c 74 0d 20 20 32 31 30  |00 .result.  210|
000018a0  20 20 20 20 20 20 20 20  20 45 51 55 42 20 26 30  |         EQUB &0|
000018b0  30 20 20 20 20 20 20 5c  20 72 65 73 75 6c 74 20  |0      \ result |
000018c0  62 79 74 65 0d 20 20 32  32 30 20 2e 62 75 66 66  |byte.  220 .buff|
000018d0  65 72 0d 20 20 32 33 30  20 20 20 20 20 20 20 20  |er.  230        |
000018e0  20 45 51 55 44 20 26 30  30 0d 20 20 32 34 30 20  | EQUD &00.  240 |
000018f0  5d 0d 20 20 32 35 30 20  4e 45 58 54 0d 20 20 32  |].  250 NEXT.  2|
00001900  36 30 20 43 41 4c 4c 20  6d 63 6f 64 65 0d 20 20  |60 CALL mcode.  |
00001910  32 37 30 20 49 46 20 3f  72 65 73 75 6c 74 3d 26  |270 IF ?result=&|
00001920  31 38 20 50 52 49 4e 54  22 44 69 73 63 20 6e 6f  |18 PRINT"Disc no|
00001930  74 20 66 6f 72 6d 61 74  74 65 64 22 20 45 4c 53  |t formatted" ELS|
00001940  45 20 50 52 49 4e 54 22  44 69 73 63 20 66 6f 72  |E PRINT"Disc for|
00001950  6d 61 74 74 65 64 22 0d  0d 0d 54 68 65 20 4f 73  |matted"...The Os|
00001960  77 6f 72 64 20 26 37 46  20 52 65 61 64 20 53 65  |word &7F Read Se|
00001970  63 74 6f 72 20 49 44 73  20 63 6f 6d 6d 61 6e 64  |ctor IDs command|
00001980  20 77 61 73 20 75 73 65  64 20 69 6e 20 74 68 65  | was used in the|
00001990  20 70 72 6f 67 72 61 6d  20 49 44 53 44 55 4d 50  | program IDSDUMP|
000019a0  0d 75 73 65 64 20 69 6e  20 6d 6f 64 75 6c 65 20  |.used in module |
000019b0  30 2e 20 41 66 74 65 72  20 77 6f 72 6b 69 6e 67  |0. After working|
000019c0  20 74 68 72 6f 75 67 68  20 74 68 69 73 20 6d 6f  | through this mo|
000019d0  64 75 6c 65 20 79 6f 75  20 6d 69 67 68 74 20 6c  |dule you might l|
000019e0  69 6b 65 20 74 6f 20 67  6f 0d 62 61 63 6b 20 74  |ike to go.back t|
000019f0  6f 20 6d 6f 64 75 6c 65  20 30 20 61 6e 64 20 6c  |o module 0 and l|
00001a00  6f 6f 6b 20 61 67 61 69  6e 20 61 74 20 74 68 65  |ook again at the|
00001a10  20 65 78 61 6d 70 6c 65  20 70 72 6f 67 72 61 6d  | example program|
00001a20  73 2e 0d 0d 0d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |s....-----------|
00001a30  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 0d 4f 73 77  |------------.Osw|
00001a40  6f 72 64 20 26 37 46 20  46 6f 72 6d 61 74 20 54  |ord &7F Format T|
00001a50  72 61 63 6b 0d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |rack.-----------|
00001a60  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 0d 0d 54 68  |------------..Th|
00001a70  65 20 4f 73 77 6f 72 64  20 26 37 46 20 46 6f 72  |e Osword &7F For|
00001a80  6d 61 74 20 54 72 61 63  6b 20 63 6f 6d 6d 61 6e  |mat Track comman|
00001a90  64 20 75 73 65 73 20 61  20 73 65 63 74 6f 72 20  |d uses a sector |
00001aa0  74 61 62 6c 65 20 73 74  6f 72 65 64 20 69 6e 20  |table stored in |
00001ab0  74 68 65 0d 62 75 66 66  65 72 20 73 70 65 63 69  |the.buffer speci|
00001ac0  66 69 65 64 20 69 6e 20  74 68 65 20 70 61 72 61  |fied in the para|
00001ad0  6d 65 74 65 72 20 62 6c  6f 63 6b 2e 20 54 68 69  |meter block. Thi|
00001ae0  73 20 74 61 62 6c 65 20  63 6f 6e 74 61 69 6e 73  |s table contains|
00001af0  20 66 6f 75 72 20 62 79  74 65 73 0d 66 6f 72 20  | four bytes.for |
00001b00  65 76 65 72 79 20 49 44  20 66 69 65 6c 64 20 6f  |every ID field o|
00001b10  6e 20 74 68 65 20 74 72  61 63 6b 2e 20 46 6f 72  |n the track. For|
00001b20  20 65 61 63 68 20 73 65  63 74 6f 72 20 74 6f 20  | each sector to |
00001b30  62 65 20 6f 6e 20 74 68  65 20 64 69 73 63 20 74  |be on the disc t|
00001b40  68 65 0d 66 6f 6c 6c 6f  77 69 6e 67 20 62 79 74  |he.following byt|
00001b50  65 73 20 6d 75 73 74 20  62 65 20 73 74 6f 72 65  |es must be store|
00001b60  64 20 69 6e 20 74 68 65  20 62 75 66 66 65 72 3a  |d in the buffer:|
00001b70  0d 0d 62 79 74 65 20 30  20 3d 20 6c 6f 67 69 63  |..byte 0 = logic|
00001b80  61 6c 20 74 72 61 63 6b  20 6e 75 6d 62 65 72 20  |al track number |
00001b90  28 26 30 30 2d 26 46 46  29 0d 62 79 74 65 20 31  |(&00-&FF).byte 1|
00001ba0  20 3d 20 68 65 61 64 20  6e 75 6d 62 65 72 20 28  | = head number (|
00001bb0  75 73 65 20 26 30 30 29  0d 62 79 74 65 20 32 20  |use &00).byte 2 |
00001bc0  3d 20 6c 6f 67 69 63 61  6c 20 73 65 63 74 6f 72  |= logical sector|
00001bd0  20 6e 75 6d 62 65 72 20  28 26 30 30 2d 26 46 46  | number (&00-&FF|
00001be0  29 0d 62 79 74 65 20 33  20 3d 20 64 61 74 61 20  |).byte 3 = data |
00001bf0  73 69 7a 65 20 63 6f 64  65 20 28 30 3d 31 32 38  |size code (0=128|
00001c00  2c 20 31 3d 32 35 36 2c  20 2e 2e 2e 20 34 3d 32  |, 1=256, ... 4=2|
00001c10  30 34 38 29 0d 0d 0d 54  68 65 20 66 6f 6c 6c 6f  |048)...The follo|
00001c20  77 69 6e 67 20 70 61 72  61 6d 65 74 65 72 20 62  |wing parameter b|
00001c30  6c 6f 63 6b 20 69 73 20  75 73 65 64 20 77 69 74  |lock is used wit|
00001c40  68 20 74 68 65 20 4f 73  62 79 74 65 20 26 37 46  |h the Osbyte &7F|
00001c50  20 46 6f 72 6d 61 74 20  54 72 61 63 6b 0d 63 6f  | Format Track.co|
00001c60  6d 6d 61 6e 64 3a 0d 0d  50 61 72 61 6d 65 74 65  |mmand:..Paramete|
00001c70  72 20 62 6c 6f 63 6b 20  26 30 30 20 20 20 20 20  |r block &00     |
00001c80  20 20 3d 20 64 72 69 76  65 20 6e 75 6d 62 65 72  |  = drive number|
00001c90  20 28 26 30 30 2d 26 30  33 20 6f 72 20 26 46 46  | (&00-&03 or &FF|
00001ca0  29 0d 50 61 72 61 6d 65  74 65 72 20 62 6c 6f 63  |).Parameter bloc|
00001cb0  6b 20 26 30 31 20 2d 20  26 30 34 20 3d 20 62 75  |k &01 - &04 = bu|
00001cc0  66 66 65 72 20 61 64 64  72 65 73 73 20 66 6f 72  |ffer address for|
00001cd0  20 73 65 63 74 6f 72 20  49 44 73 0d 50 61 72 61  | sector IDs.Para|
00001ce0  6d 65 74 65 72 20 62 6c  6f 63 6b 20 26 30 35 20  |meter block &05 |
00001cf0  20 20 20 20 20 20 3d 20  26 30 35 20 28 35 20 63  |      = &05 (5 c|
00001d00  6f 6d 6d 61 6e 64 20 70  61 72 61 6d 65 74 65 72  |ommand parameter|
00001d10  73 29 0d 50 61 72 61 6d  65 74 65 72 20 62 6c 6f  |s).Parameter blo|
00001d20  63 6b 20 26 30 36 20 20  20 20 20 20 20 3d 20 26  |ck &06       = &|
00001d30  36 33 20 28 66 6f 72 6d  61 74 20 74 72 61 63 6b  |63 (format track|
00001d40  20 63 6f 6d 6d 61 6e 64  29 0d 50 61 72 61 6d 65  | command).Parame|
00001d50  74 65 72 20 62 6c 6f 63  6b 20 26 30 37 20 20 20  |ter block &07   |
00001d60  20 20 20 20 3d 20 70 68  79 73 69 63 61 6c 20 74  |    = physical t|
00001d70  72 61 63 6b 20 6e 75 6d  62 65 72 0d 50 61 72 61  |rack number.Para|
00001d80  6d 65 74 65 72 20 62 6c  6f 63 6b 20 26 30 38 20  |meter block &08 |
00001d90  20 20 20 20 20 20 3d 20  67 61 70 20 33 20 73 69  |      = gap 3 si|
00001da0  7a 65 20 28 73 65 65 20  66 69 67 75 72 65 20 32  |ze (see figure 2|
00001db0  29 0d 50 61 72 61 6d 65  74 65 72 20 62 6c 6f 63  |).Parameter bloc|
00001dc0  6b 20 26 30 39 20 20 20  20 20 20 20 3d 20 73 65  |k &09       = se|
00001dd0  63 74 6f 72 20 73 69 7a  65 2f 6e 75 6d 62 65 72  |ctor size/number|
00001de0  20 6f 66 20 73 65 63 74  6f 72 73 0d 50 61 72 61  | of sectors.Para|
00001df0  6d 65 74 65 72 20 62 6c  6f 63 6b 20 26 30 41 20  |meter block &0A |
00001e00  20 20 20 20 20 20 3d 20  67 61 70 20 35 20 73 69  |      = gap 5 si|
00001e10  7a 65 20 28 61 6c 77 61  79 73 20 75 73 65 20 26  |ze (always use &|
00001e20  30 30 29 0d 50 61 72 61  6d 65 74 65 72 20 62 6c  |00).Parameter bl|
00001e30  6f 63 6b 20 26 30 42 20  20 20 20 20 20 20 3d 20  |ock &0B       = |
00001e40  67 61 70 20 31 20 73 69  7a 65 20 28 61 6c 77 61  |gap 1 size (alwa|
00001e50  79 73 20 75 73 65 20 26  31 30 29 0d 50 61 72 61  |ys use &10).Para|
00001e60  6d 65 74 65 72 20 62 6c  6f 63 6b 20 26 30 43 20  |meter block &0C |
00001e70  20 20 20 20 20 20 3d 20  72 65 73 75 6c 74 20 62  |      = result b|
00001e80  79 74 65 0d 0d 0d 54 68  65 20 67 61 70 20 33 20  |yte...The gap 3 |
00001e90  73 69 7a 65 20 63 61 6e  20 62 65 20 74 61 6b 65  |size can be take|
00001ea0  6e 20 66 72 6f 6d 20 66  69 67 75 72 65 20 33 20  |n from figure 3 |
00001eb0  28 61 6c 6c 20 6e 75 6d  62 65 72 73 20 69 6e 20  |(all numbers in |
00001ec0  66 69 67 75 72 65 20 33  20 61 72 65 20 69 6e 0d  |figure 3 are in.|
00001ed0  64 65 63 69 6d 61 6c 29  2e 0d 0d 54 68 65 20 6d  |decimal)...The m|
00001ee0  6f 73 74 20 73 69 67 6e  69 66 69 63 61 6e 74 20  |ost significant |
00001ef0  33 20 62 69 74 73 20 6f  66 20 74 68 65 20 6e 75  |3 bits of the nu|
00001f00  6d 62 65 72 20 73 74 6f  72 65 64 20 69 6e 20 70  |mber stored in p|
00001f10  61 72 61 6d 65 74 65 72  20 62 6c 6f 63 6b 20 26  |arameter block &|
00001f20  30 39 0d 63 6f 6e 74 61  69 6e 20 74 68 65 20 73  |09.contain the s|
00001f30  65 63 74 6f 72 20 73 69  7a 65 20 63 6f 64 65 20  |ector size code |
00001f40  28 63 6f 6c 75 6d 6e 20  32 20 6f 66 20 66 69 67  |(column 2 of fig|
00001f50  75 72 65 20 33 29 2e 20  54 68 65 20 6c 65 61 73  |ure 3). The leas|
00001f60  74 20 73 69 67 6e 69 66  69 63 61 6e 74 0d 35 20  |t significant.5 |
00001f70  62 69 74 73 20 63 6f 6e  74 61 69 6e 20 74 68 65  |bits contain the|
00001f80  20 6e 75 6d 62 65 72 20  6f 66 20 73 65 63 74 6f  | number of secto|
00001f90  72 73 20 70 65 72 20 74  72 61 63 6b 2e 20 54 6f  |rs per track. To|
00001fa0  20 63 61 6c 63 75 6c 61  74 65 20 74 68 65 20 6e  | calculate the n|
00001fb0  75 6d 62 65 72 20 74 6f  0d 62 65 20 73 74 6f 72  |umber to.be stor|
00001fc0  65 64 20 69 6e 20 70 61  72 61 6d 65 74 65 72 20  |ed in parameter |
00001fd0  62 6c 6f 63 6b 20 26 30  39 20 6d 75 6c 74 69 70  |block &09 multip|
00001fe0  6c 79 20 74 68 65 20 73  69 7a 65 20 63 6f 64 65  |ly the size code|
00001ff0  20 62 79 20 33 32 20 61  6e 64 20 61 64 64 20 74  | by 32 and add t|
00002000  68 65 0d 6e 75 6d 62 65  72 20 6f 66 20 73 65 63  |he.number of sec|
00002010  74 6f 72 73 2e 20 46 6f  72 20 65 78 61 6d 70 6c  |tors. For exampl|
00002020  65 2c 20 69 66 20 79 6f  75 20 77 61 6e 74 20 74  |e, if you want t|
00002030  6f 20 66 6f 72 6d 61 74  20 61 20 74 72 61 63 6b  |o format a track|
00002040  20 77 69 74 68 20 66 69  76 65 0d 73 65 63 74 6f  | with five.secto|
00002050  72 73 20 6f 66 20 35 31  32 20 62 79 74 65 73 20  |rs of 512 bytes |
00002060  74 68 65 6e 20 70 61 72  61 6d 65 74 65 72 20 62  |then parameter b|
00002070  6c 6f 63 6b 20 26 30 39  20 77 69 6c 6c 20 63 6f  |lock &09 will co|
00002080  6e 74 61 69 6e 20 32 2a  33 32 2b 35 20 3d 20 36  |ntain 2*32+5 = 6|
00002090  39 20 3d 0d 26 34 35 2e  0d 0d 0d 2b 2d 2d 2d 2d  |9 =.&45....+----|
000020a0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2b 2d 2d 2d 2d 2d 2d  |---------+------|
000020b0  2d 2d 2d 2d 2d 2b 2d 2d  2d 2d 2d 2d 2d 2d 2b 2d  |-----+--------+-|
000020c0  2d 2d 2d 2d 2d 2b 2d 2d  2d 2d 2d 2d 2b 2d 2d 2d  |-----+------+---|
000020d0  2d 2d 2d 2b 2d 2d 2d 2d  2d 2d 2b 2d 2d 2d 2d 2d  |---+------+-----|
000020e0  2d 2b 0d 7c 20 4e 6f 2e  20 53 65 63 74 6f 72 73  |-+.| No. Sectors|
000020f0  20 7c 20 53 69 7a 65 20  63 6f 64 65 20 7c 20 4c  | | Size code | L|
00002100  65 6e 67 74 68 20 7c 20  47 61 70 31 20 7c 20 47  |ength | Gap1 | G|
00002110  61 70 32 20 7c 20 47 61  70 33 20 7c 20 47 61 70  |ap2 | Gap3 | Gap|
00002120  34 20 7c 20 47 61 70 35  20 7c 0d 2b 2d 2d 2d 2d  |4 | Gap5 |.+----|
00002130  2d 2d 2d 2d 2d 2d 2d 2d  2d 2b 2d 2d 2d 2d 2d 2d  |---------+------|
00002140  2d 2d 2d 2d 2d 2b 2d 2d  2d 2d 2d 2d 2d 2d 2b 2d  |-----+--------+-|
00002150  2d 2d 2d 2d 2d 2b 2d 2d  2d 2d 2d 2d 2b 2d 2d 2d  |-----+------+---|
00002160  2d 2d 2d 2b 2d 2d 2d 2d  2d 2d 2b 2d 2d 2d 2d 2d  |---+------+-----|
00002170  2d 2b 0d 7c 20 20 20 20  20 31 38 20 20 20 20 20  |-+.|     18     |
00002180  20 7c 20 20 20 20 20 30  20 20 20 20 20 7c 20 20  | |     0     |  |
00002190  20 31 32 38 20 20 7c 20  20 31 36 20 20 7c 20 20  | 128  |  16  |  |
000021a0  31 31 20 20 7c 20 20 31  31 20 20 7c 20 20 20 32  |11  |  11  |   2|
000021b0  34 20 7c 20 20 20 30 20  20 7c 0d 7c 20 20 20 20  |4 |   0  |.|    |
000021c0  20 31 30 20 20 20 20 20  20 7c 20 20 20 20 20 31  | 10      |     1|
000021d0  20 20 20 20 20 7c 20 20  20 32 35 36 20 20 7c 20  |     |   256  | |
000021e0  20 31 36 20 20 7c 20 20  31 31 20 20 7c 20 20 32  | 16  |  11  |  2|
000021f0  31 20 20 7c 20 20 20 33  30 20 7c 20 20 20 30 20  |1  |   30 |   0 |
00002200  20 7c 0d 7c 20 20 20 20  20 20 35 20 20 20 20 20  | |.|      5     |
00002210  20 7c 20 20 20 20 20 32  20 20 20 20 20 7c 20 20  | |     2     |  |
00002220  20 35 31 32 20 20 7c 20  20 31 36 20 20 7c 20 20  | 512  |  16  |  |
00002230  31 31 20 20 7c 20 20 37  34 20 20 7c 20 20 20 38  |11  |  74  |   8|
00002240  38 20 7c 20 20 20 30 20  20 7c 0d 7c 20 20 20 20  |8 |   0  |.|    |
00002250  20 20 32 20 20 20 20 20  20 7c 20 20 20 20 20 33  |  2      |     3|
00002260  20 20 20 20 20 7c 20 20  31 30 32 34 20 20 7c 20  |     |  1024  | |
00002270  20 31 36 20 20 7c 20 20  31 31 20 20 7c 20 32 35  | 16  |  11  | 25|
00002280  35 20 20 7c 20 20 37 34  30 20 7c 20 20 20 30 20  |5  |  740 |   0 |
00002290  20 7c 0d 7c 20 20 20 20  20 20 31 20 20 20 20 20  | |.|      1     |
000022a0  20 7c 20 20 20 20 20 34  20 20 20 20 20 7c 20 20  | |     4     |  |
000022b0  32 30 34 38 20 20 7c 20  20 31 36 20 20 7c 20 20  |2048  |  16  |  |
000022c0  31 31 20 20 7c 20 20 20  30 20 20 7c 20 31 30 32  |11  |   0  | 102|
000022d0  38 20 7c 20 20 20 30 20  20 7c 0d 2b 2d 2d 2d 2d  |8 |   0  |.+----|
000022e0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2b 2d 2d 2d 2d 2d 2d  |---------+------|
000022f0  2d 2d 2d 2d 2d 2b 2d 2d  2d 2d 2d 2d 2d 2d 2b 2d  |-----+--------+-|
00002300  2d 2d 2d 2d 2d 2b 2d 2d  2d 2d 2d 2d 2b 2d 2d 2d  |-----+------+---|
00002310  2d 2d 2d 2b 2d 2d 2d 2d  2d 2d 2b 2d 2d 2d 2d 2d  |---+------+-----|
00002320  2d 2b 0d 0d 46 69 67 75  72 65 20 33 2e 20 54 68  |-+..Figure 3. Th|
00002330  65 20 72 65 6c 61 74 69  6f 6e 73 68 69 70 20 62  |e relationship b|
00002340  65 74 77 65 65 6e 20 73  65 63 74 6f 72 20 73 69  |etween sector si|
00002350  7a 65 20 63 6f 64 65 2c  20 6c 65 6e 67 74 68 20  |ze code, length |
00002360  61 6e 64 20 67 61 70 20  73 69 7a 65 2e 0d 2d 2d  |and gap size..--|
00002370  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
000023b0  2d 2d 2d 2d 2d 2d 2d 0d  0d 0d 54 68 65 20 4f 73  |-------...The Os|
000023c0  77 6f 72 64 20 26 37 46  20 46 6f 72 6d 61 74 20  |word &7F Format |
000023d0  54 72 61 63 6b 20 63 6f  6d 6d 61 6e 64 20 75 73  |Track command us|
000023e0  65 73 20 74 68 65 20 61  70 70 72 6f 70 72 69 61  |es the appropria|
000023f0  74 65 20 74 72 61 63 6b  20 72 65 67 69 73 74 65  |te track registe|
00002400  72 20 61 73 0d 61 20 62  61 73 65 20 66 72 6f 6d  |r as.a base from|
00002410  20 77 68 69 63 68 20 74  6f 20 73 65 65 6b 20 74  | which to seek t|
00002420  68 65 20 73 70 65 63 69  66 69 65 64 20 70 68 79  |he specified phy|
00002430  73 69 63 61 6c 20 74 72  61 63 6b 2e 20 49 74 20  |sical track. It |
00002440  74 68 65 6e 20 75 73 65  73 20 74 68 65 0d 73 65  |then uses the.se|
00002450  63 74 6f 72 20 49 44 73  20 73 74 6f 72 65 64 20  |ctor IDs stored |
00002460  69 6e 20 74 68 65 20 62  75 66 66 65 72 20 74 6f  |in the buffer to|
00002470  20 63 72 65 61 74 65 20  74 68 65 20 49 44 20 66  | create the ID f|
00002480  69 65 6c 64 73 20 66 6f  72 20 65 61 63 68 20 73  |ields for each s|
00002490  65 63 74 6f 72 2e 0d 49  74 20 63 61 6c 63 75 6c  |ector..It calcul|
000024a0  61 74 65 73 20 61 6e 64  20 77 72 69 74 65 73 20  |ates and writes |
000024b0  74 68 65 20 49 44 20 66  69 65 6c 64 20 43 52 43  |the ID field CRC|
000024c0  20 62 79 74 65 73 2c 20  63 72 65 61 74 65 73 20  | bytes, creates |
000024d0  74 68 65 20 63 6f 72 72  65 63 74 20 67 61 70 0d  |the correct gap.|
000024e0  73 69 7a 65 73 2c 20 66  69 6c 6c 73 20 74 68 65  |sizes, fills the|
000024f0  20 64 61 74 61 20 66 69  65 6c 64 73 20 77 69 74  | data fields wit|
00002500  68 20 62 79 74 65 73 20  6f 66 20 26 45 35 2c 20  |h bytes of &E5, |
00002510  61 6e 64 20 63 61 6c 63  75 6c 61 74 65 73 20 61  |and calculates a|
00002520  6e 64 20 77 72 69 74 65  73 0d 74 68 65 20 64 61  |nd writes.the da|
00002530  74 61 20 66 69 65 6c 64  20 43 52 43 20 62 79 74  |ta field CRC byt|
00002540  65 73 2e 0d 0d 54 68 65  20 70 72 6f 67 72 61 6d  |es...The program|
00002550  20 46 4f 52 4d 31 30 20  63 61 6e 20 62 65 20 75  | FORM10 can be u|
00002560  73 65 64 20 74 6f 20 66  6f 72 6d 61 74 20 70 68  |sed to format ph|
00002570  79 73 69 63 61 6c 20 74  72 61 63 6b 20 26 32 37  |ysical track &27|
00002580  20 6f 66 20 74 68 65 20  64 69 73 63 20 69 6e 0d  | of the disc in.|
00002590  74 68 65 20 63 75 72 72  65 6e 74 20 64 72 69 76  |the current driv|
000025a0  65 20 77 69 74 68 20 31  30 20 73 65 63 74 6f 72  |e with 10 sector|
000025b0  73 20 6f 66 20 32 35 36  20 62 79 74 65 73 2e 20  |s of 256 bytes. |
000025c0  54 68 69 73 20 70 72 6f  67 72 61 6d 20 77 69 6c  |This program wil|
000025d0  6c 20 64 65 73 74 72 6f  79 0d 61 6c 6c 20 74 68  |l destroy.all th|
000025e0  65 20 64 61 74 61 20 73  74 6f 72 65 64 20 6f 6e  |e data stored on|
000025f0  20 74 72 61 63 6b 20 26  32 37 20 2d 20 79 6f 75  | track &27 - you|
00002600  20 68 61 76 65 20 62 65  65 6e 20 77 61 72 6e 65  | have been warne|
00002610  64 21 0d 0d 54 68 65 20  62 75 66 66 65 72 20 75  |d!..The buffer u|
00002620  73 65 64 20 69 6e 20 74  68 65 20 70 72 6f 67 72  |sed in the progr|
00002630  61 6d 20 46 4f 52 4d 31  30 20 73 74 6f 72 65 73  |am FORM10 stores|
00002640  20 34 20 62 79 74 65 73  20 66 6f 72 20 65 61 63  | 4 bytes for eac|
00002650  68 20 73 65 63 74 6f 72  2e 0d 54 61 6b 69 6e 67  |h sector..Taking|
00002660  20 70 68 79 73 69 63 61  6c 20 73 65 63 74 6f 72  | physical sector|
00002670  20 26 30 30 20 69 6e 20  6c 69 6e 65 20 32 34 30  | &00 in line 240|
00002680  20 61 73 20 61 6e 20 65  78 61 6d 70 6c 65 2c 20  | as an example, |
00002690  54 68 65 20 62 79 74 65  73 20 26 32 37 2c 20 26  |The bytes &27, &|
000026a0  30 30 2c 0d 26 30 30 20  61 6e 64 20 26 30 31 20  |00,.&00 and &01 |
000026b0  61 72 65 20 73 74 6f 72  65 64 20 28 74 68 65 20  |are stored (the |
000026c0  6f 72 64 65 72 20 6f 66  20 74 68 65 20 62 79 74  |order of the byt|
000026d0  65 73 20 69 73 20 72 65  76 65 72 73 65 64 20 77  |es is reversed w|
000026e0  69 74 68 20 74 68 65 20  45 51 55 44 0d 63 6f 6d  |ith the EQUD.com|
000026f0  6d 61 6e 64 29 2e 20 54  68 65 73 65 20 66 6f 75  |mand). These fou|
00002700  72 20 62 79 74 65 73 20  72 65 70 72 65 73 65 6e  |r bytes represen|
00002710  74 20 74 68 65 20 6c 6f  67 69 63 61 6c 20 74 72  |t the logical tr|
00002720  61 63 6b 20 6e 75 6d 62  65 72 2c 20 74 68 65 20  |ack number, the |
00002730  68 65 61 64 0d 6e 75 6d  62 65 72 2c 20 74 68 65  |head.number, the|
00002740  20 6c 6f 67 69 63 61 6c  20 73 65 63 74 6f 72 20  | logical sector |
00002750  6e 75 6d 62 65 72 20 61  6e 64 20 74 68 65 20 64  |number and the d|
00002760  61 74 61 20 73 69 7a 65  20 63 6f 64 65 2e 20 59  |ata size code. Y|
00002770  6f 75 20 63 61 6e 20 61  6c 74 65 72 0d 74 68 65  |ou can alter.the|
00002780  20 6c 6f 67 69 63 61 6c  20 74 72 61 63 6b 20 61  | logical track a|
00002790  6e 64 20 73 65 63 74 6f  72 20 6e 75 6d 62 65 72  |nd sector number|
000027a0  73 20 61 6e 64 20 75 73  65 20 74 68 65 20 49 44  |s and use the ID|
000027b0  53 44 55 4d 50 20 70 72  6f 67 72 61 6d 20 66 72  |SDUMP program fr|
000027c0  6f 6d 0d 6d 6f 64 75 6c  65 20 30 20 74 6f 20 73  |om.module 0 to s|
000027d0  65 65 20 74 68 65 20 65  66 66 65 63 74 20 74 68  |ee the effect th|
000027e0  69 73 20 68 61 73 20 6f  6e 20 74 68 65 20 66 6f  |is has on the fo|
000027f0  72 6d 61 74 20 6f 66 20  74 68 65 20 64 69 73 63  |rmat of the disc|
00002800  2e 20 49 66 20 79 6f 75  0d 61 6c 74 65 72 20 74  |. If you.alter t|
00002810  68 65 20 6c 6f 67 69 63  61 6c 20 74 72 61 63 6b  |he logical track|
00002820  20 6e 75 6d 62 65 72 20  79 6f 75 20 77 69 6c 6c  | number you will|
00002830  20 62 65 20 75 6e 61 62  6c 65 20 74 6f 20 2a 42  | be unable to *B|
00002840  41 43 4b 55 50 20 74 68  65 20 64 69 73 63 2e 0d  |ACKUP the disc..|
00002850  0d 0d 20 20 20 31 30 20  52 45 4d 3a 20 46 4f 52  |..   10 REM: FOR|
00002860  4d 31 30 0d 20 20 20 32  30 20 44 49 4d 20 6d 63  |M10.   20 DIM mc|
00002870  6f 64 65 20 26 31 30 30  0d 20 20 20 33 30 20 6f  |ode &100.   30 o|
00002880  73 77 6f 72 64 3d 26 46  46 46 31 0d 20 20 20 34  |sword=&FFF1.   4|
00002890  30 20 46 4f 52 70 61 73  73 3d 30 20 54 4f 20 32  |0 FORpass=0 TO 2|
000028a0  20 53 54 45 50 20 32 0d  20 20 20 35 30 20 50 25  | STEP 2.   50 P%|
000028b0  3d 6d 63 6f 64 65 0d 20  20 20 36 30 20 5b 20 20  |=mcode.   60 [  |
000028c0  20 20 20 20 20 4f 50 54  20 70 61 73 73 0d 20 20  |     OPT pass.  |
000028d0  20 37 30 20 20 20 20 20  20 20 20 20 4c 44 41 20  | 70         LDA |
000028e0  23 26 37 46 0d 20 20 20  38 30 20 20 20 20 20 20  |#&7F.   80      |
000028f0  20 20 20 4c 44 58 20 23  62 6c 6f 63 6b 20 4d 4f  |   LDX #block MO|
00002900  44 20 32 35 36 0d 20 20  20 39 30 20 20 20 20 20  |D 256.   90     |
00002910  20 20 20 20 4c 44 59 20  23 62 6c 6f 63 6b 20 44  |    LDY #block D|
00002920  49 56 20 32 35 36 0d 20  20 31 30 30 20 20 20 20  |IV 256.  100    |
00002930  20 20 20 20 20 4a 53 52  20 6f 73 77 6f 72 64 0d  |     JSR osword.|
00002940  20 20 31 31 30 20 20 20  20 20 20 20 20 20 52 54  |  110         RT|
00002950  53 0d 20 20 31 32 30 20  2e 62 6c 6f 63 6b 0d 20  |S.  120 .block. |
00002960  20 31 33 30 20 20 20 20  20 20 20 20 20 45 51 55  | 130         EQU|
00002970  42 20 26 46 46 20 20 20  20 20 20 5c 20 63 75 72  |B &FF      \ cur|
00002980  72 65 6e 74 20 64 72 69  76 65 0d 20 20 31 34 30  |rent drive.  140|
00002990  20 20 20 20 20 20 20 20  20 45 51 55 44 20 62 75  |         EQUD bu|
000029a0  66 66 65 72 20 20 20 5c  20 61 64 64 72 65 73 73  |ffer   \ address|
000029b0  20 6f 66 20 73 65 63 74  6f 72 20 74 61 62 6c 65  | of sector table|
000029c0  0d 20 20 31 35 30 20 20  20 20 20 20 20 20 20 45  |.  150         E|
000029d0  51 55 42 20 26 30 35 20  20 20 20 20 20 5c 20 35  |QUB &05      \ 5|
000029e0  20 70 61 72 61 6d 65 74  65 72 73 0d 20 20 31 36  | parameters.  16|
000029f0  30 20 20 20 20 20 20 20  20 20 45 51 55 42 20 26  |0         EQUB &|
00002a00  36 33 20 20 20 20 20 20  5c 20 66 6f 72 6d 61 74  |63      \ format|
00002a10  20 74 72 61 63 6b 20 63  6f 6d 6d 61 6e 64 0d 20  | track command. |
00002a20  20 31 37 30 20 20 20 20  20 20 20 20 20 45 51 55  | 170         EQU|
00002a30  42 20 26 32 37 20 20 20  20 20 20 5c 20 70 68 79  |B &27      \ phy|
00002a40  73 69 63 61 6c 20 74 72  61 63 6b 20 26 32 37 0d  |sical track &27.|
00002a50  20 20 31 38 30 20 20 20  20 20 20 20 20 20 45 51  |  180         EQ|
00002a60  55 42 20 32 31 20 20 20  20 20 20 20 5c 20 67 61  |UB 21       \ ga|
00002a70  70 20 33 20 28 66 72 6f  6d 20 66 69 67 75 72 65  |p 3 (from figure|
00002a80  20 32 29 0d 20 20 31 39  30 20 20 20 20 20 20 20  | 2).  190       |
00002a90  20 20 45 51 55 42 20 26  32 41 20 20 20 20 20 20  |  EQUB &2A      |
00002aa0  5c 20 31 30 20 73 65 63  74 6f 72 73 20 6f 66 20  |\ 10 sectors of |
00002ab0  32 35 36 20 62 79 74 65  73 0d 20 20 32 30 30 20  |256 bytes.  200 |
00002ac0  20 20 20 20 20 20 20 20  45 51 55 42 20 26 30 30  |        EQUB &00|
00002ad0  20 20 20 20 20 20 5c 20  67 61 70 20 35 20 28 61  |      \ gap 5 (a|
00002ae0  6c 77 61 79 73 20 26 30  30 29 0d 20 20 32 31 30  |lways &00).  210|
00002af0  20 20 20 20 20 20 20 20  20 45 51 55 42 20 26 31  |         EQUB &1|
00002b00  30 20 20 20 20 20 20 5c  20 67 61 70 20 31 20 28  |0      \ gap 1 (|
00002b10  61 6c 77 61 79 73 20 26  31 30 29 0d 20 20 32 32  |always &10).  22|
00002b20  30 20 20 20 20 20 20 20  20 20 45 51 55 42 20 30  |0         EQUB 0|
00002b30  20 20 20 20 20 20 20 20  5c 20 72 65 73 75 6c 74  |        \ result|
00002b40  20 62 79 74 65 0d 20 20  32 33 30 20 2e 62 75 66  | byte.  230 .buf|
00002b50  66 65 72 0d 20 20 32 34  30 20 20 20 20 20 20 20  |fer.  240       |
00002b60  20 20 45 51 55 44 20 26  30 31 30 30 30 30 32 37  |  EQUD &01000027|
00002b70  0d 20 20 32 35 30 20 20  20 20 20 20 20 20 20 45  |.  250         E|
00002b80  51 55 44 20 26 30 31 30  31 30 30 32 37 0d 20 20  |QUD &01010027.  |
00002b90  32 36 30 20 20 20 20 20  20 20 20 20 45 51 55 44  |260         EQUD|
00002ba0  20 26 30 31 30 32 30 30  32 37 0d 20 20 32 37 30  | &01020027.  270|
00002bb0  20 20 20 20 20 20 20 20  20 45 51 55 44 20 26 30  |         EQUD &0|
00002bc0  31 30 33 30 30 32 37 0d  20 20 32 38 30 20 20 20  |1030027.  280   |
00002bd0  20 20 20 20 20 20 45 51  55 44 20 26 30 31 30 34  |      EQUD &0104|
00002be0  30 30 32 37 0d 20 20 32  39 30 20 20 20 20 20 20  |0027.  290      |
00002bf0  20 20 20 45 51 55 44 20  26 30 31 30 35 30 30 32  |   EQUD &0105002|
00002c00  37 0d 20 20 33 30 30 20  20 20 20 20 20 20 20 20  |7.  300         |
00002c10  45 51 55 44 20 26 30 31  30 36 30 30 32 37 0d 20  |EQUD &01060027. |
00002c20  20 33 31 30 20 20 20 20  20 20 20 20 20 45 51 55  | 310         EQU|
00002c30  44 20 26 30 31 30 37 30  30 32 37 0d 20 20 33 32  |D &01070027.  32|
00002c40  30 20 20 20 20 20 20 20  20 20 45 51 55 44 20 26  |0         EQUD &|
00002c50  30 31 30 38 30 30 32 37  0d 20 20 33 33 30 20 20  |01080027.  330  |
00002c60  20 20 20 20 20 20 20 45  51 55 44 20 26 30 31 30  |       EQUD &010|
00002c70  39 30 30 32 37 0d 20 20  33 34 30 20 5d 0d 20 20  |90027.  340 ].  |
00002c80  33 35 30 20 4e 45 58 54  0d 20 20 33 36 30 20 43  |350 NEXT.  360 C|
00002c90  41 4c 4c 20 6d 63 6f 64  65 0d 0d 0d 54 68 65 72  |ALL mcode...Ther|
00002ca0  65 20 69 73 20 6d 6f 72  65 20 74 6f 20 66 6f 72  |e is more to for|
00002cb0  6d 61 74 74 69 6e 67 20  61 20 64 69 73 63 20 74  |matting a disc t|
00002cc0  68 61 6e 20 6a 75 73 74  20 66 6f 72 6d 61 74 74  |han just formatt|
00002cd0  69 6e 67 20 61 6c 6c 20  74 68 65 20 74 72 61 63  |ing all the trac|
00002ce0  6b 73 2e 20 49 74 0d 69  73 20 61 6c 73 6f 20 6e  |ks. It.is also n|
00002cf0  65 63 65 73 73 61 72 79  20 74 6f 20 63 72 65 61  |ecessary to crea|
00002d00  74 65 20 61 6e 20 65 6d  70 74 79 20 63 61 74 61  |te an empty cata|
00002d10  6c 6f 67 75 65 20 6f 6e  20 74 72 61 63 6b 20 30  |logue on track 0|
00002d20  20 6f 66 20 74 68 65 20  64 69 73 63 2e 0d 46 6f  | of the disc..Fo|
00002d30  72 6d 61 74 74 69 6e 67  20 64 69 73 63 73 20 77  |rmatting discs w|
00002d40  69 6c 6c 20 62 65 20 63  6f 76 65 72 65 64 20 69  |ill be covered i|
00002d50  6e 20 6d 6f 72 65 20 64  65 74 61 69 6c 20 69 6e  |n more detail in|
00002d60  20 6d 6f 64 75 6c 65 20  33 2e 0d 0d 0d 2d 2d 2d  | module 3....---|
00002d70  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00002da0  2d 0d 4f 73 77 6f 72 64  20 26 37 46 20 56 65 72  |-.Osword &7F Ver|
00002db0  69 66 79 20 44 61 74 61  20 61 6e 64 20 44 65 6c  |ify Data and Del|
00002dc0  65 74 65 64 20 44 61 74  61 20 6d 75 6c 74 69 2d  |eted Data multi-|
00002dd0  73 65 63 74 6f 72 0d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |sector.---------|
00002de0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00002e00  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 0d 0d 4f 73 77  |-----------..Osw|
00002e10  6f 72 64 20 26 37 46 20  56 65 72 69 66 79 20 44  |ord &7F Verify D|
00002e20  61 74 61 20 61 6e 64 20  44 65 6c 65 74 65 64 20  |ata and Deleted |
00002e30  44 61 74 61 20 6d 75 6c  74 69 2d 73 65 63 74 6f  |Data multi-secto|
00002e40  72 20 75 73 65 73 20 74  68 65 20 61 70 70 72 6f  |r uses the appro|
00002e50  70 72 69 61 74 65 0d 74  72 61 63 6b 20 72 65 67  |priate.track reg|
00002e60  69 73 74 65 72 20 61 73  20 61 20 62 61 73 65 20  |ister as a base |
00002e70  66 72 6f 6d 20 77 68 69  63 68 20 74 6f 20 73 65  |from which to se|
00002e80  65 6b 20 74 68 65 20 74  72 61 63 6b 20 61 6e 64  |ek the track and|
00002e90  20 73 65 63 74 6f 72 20  73 70 65 63 69 66 69 65  | sector specifie|
00002ea0  64 0d 69 6e 20 74 68 65  20 70 61 72 61 6d 65 74  |d.in the paramet|
00002eb0  65 72 20 62 6c 6f 63 6b  2e 20 49 74 20 61 74 74  |er block. It att|
00002ec0  65 6d 70 74 73 20 74 6f  20 76 65 72 69 66 79 20  |empts to verify |
00002ed0  74 68 65 20 73 65 63 74  6f 72 20 61 6e 64 20 72  |the sector and r|
00002ee0  65 74 75 72 6e 73 20 26  30 30 0d 69 6e 20 74 68  |eturns &00.in th|
00002ef0  65 20 72 65 73 75 6c 74  20 62 79 74 65 20 69 66  |e result byte if|
00002f00  20 69 74 20 69 73 20 73  75 63 63 65 73 73 66 75  | it is successfu|
00002f10  6c 2e 20 49 74 20 72 65  74 75 72 6e 73 20 26 32  |l. It returns &2|
00002f20  30 20 69 6e 20 74 68 65  20 72 65 73 75 6c 74 20  |0 in the result |
00002f30  62 79 74 65 0d 69 66 20  64 65 6c 65 74 65 64 20  |byte.if deleted |
00002f40  64 61 74 61 20 68 61 76  65 20 62 65 65 6e 20 73  |data have been s|
00002f50  75 63 63 65 73 73 66 75  6c 6c 79 20 76 65 72 69  |uccessfully veri|
00002f60  66 69 65 64 2e 20 49 66  20 6d 6f 72 65 20 74 68  |fied. If more th|
00002f70  61 6e 20 6f 6e 65 20 73  65 63 74 6f 72 0d 69 73  |an one sector.is|
00002f80  20 73 70 65 63 69 66 69  65 64 20 74 68 69 73 20  | specified this |
00002f90  70 72 6f 63 65 64 75 72  65 20 72 65 70 65 61 74  |procedure repeat|
00002fa0  73 20 75 6e 74 69 6c 20  65 69 74 68 65 72 20 61  |s until either a|
00002fb0  6c 6c 20 74 68 65 20 73  65 63 74 6f 72 73 20 68  |ll the sectors h|
00002fc0  61 76 65 20 62 65 65 6e  0d 76 65 72 69 66 69 65  |ave been.verifie|
00002fd0  64 20 6f 72 20 61 6e 20  65 72 72 6f 72 20 6f 63  |d or an error oc|
00002fe0  63 75 72 73 2e 0d 0d 54  68 65 20 66 6f 6c 6c 6f  |curs...The follo|
00002ff0  77 69 6e 67 20 70 61 72  61 6d 65 74 65 72 20 62  |wing parameter b|
00003000  6c 6f 63 6b 20 69 73 20  75 73 65 64 20 77 69 74  |lock is used wit|
00003010  68 20 74 68 65 20 4f 73  62 79 74 65 20 26 37 46  |h the Osbyte &7F|
00003020  20 56 65 72 69 66 79 20  44 61 74 61 20 61 6e 64  | Verify Data and|
00003030  0d 44 65 6c 65 74 65 64  20 44 61 74 61 20 6d 75  |.Deleted Data mu|
00003040  6c 74 69 2d 73 65 63 74  6f 72 20 63 6f 6d 6d 61  |lti-sector comma|
00003050  6e 64 3a 0d 0d 50 61 72  61 6d 65 74 65 72 20 62  |nd:..Parameter b|
00003060  6c 6f 63 6b 20 26 30 30  20 20 20 20 20 20 20 3d  |lock &00       =|
00003070  20 64 72 69 76 65 20 6e  75 6d 62 65 72 20 28 26  | drive number (&|
00003080  30 30 2d 26 30 33 20 6f  72 20 26 46 46 29 0d 50  |00-&03 or &FF).P|
00003090  61 72 61 6d 65 74 65 72  20 62 6c 6f 63 6b 20 26  |arameter block &|
000030a0  30 31 20 2d 20 26 30 34  20 3d 20 62 75 66 66 65  |01 - &04 = buffe|
000030b0  72 20 61 64 64 72 65 73  73 20 28 6e 6f 74 20 75  |r address (not u|
000030c0  73 65 64 29 0d 50 61 72  61 6d 65 74 65 72 20 62  |sed).Parameter b|
000030d0  6c 6f 63 6b 20 26 30 35  20 20 20 20 20 20 20 3d  |lock &05       =|
000030e0  20 26 30 33 20 28 33 20  63 6f 6d 6d 61 6e 64 20  | &03 (3 command |
000030f0  70 61 72 61 6d 65 74 65  72 73 29 0d 50 61 72 61  |parameters).Para|
00003100  6d 65 74 65 72 20 62 6c  6f 63 6b 20 26 30 36 20  |meter block &06 |
00003110  20 20 20 20 20 20 3d 20  26 35 46 20 28 76 65 72  |      = &5F (ver|
00003120  69 66 79 20 6d 75 6c 74  69 2d 73 65 63 74 6f 72  |ify multi-sector|
00003130  20 63 6f 6d 6d 61 6e 64  29 0d 50 61 72 61 6d 65  | command).Parame|
00003140  74 65 72 20 62 6c 6f 63  6b 20 26 30 37 20 20 20  |ter block &07   |
00003150  20 20 20 20 3d 20 6c 6f  67 69 63 61 6c 20 74 72  |    = logical tr|
00003160  61 63 6b 20 6e 75 6d 62  65 72 0d 50 61 72 61 6d  |ack number.Param|
00003170  65 74 65 72 20 62 6c 6f  63 6b 20 26 30 38 20 20  |eter block &08  |
00003180  20 20 20 20 20 3d 20 6c  6f 67 69 63 61 6c 20 73  |     = logical s|
00003190  65 63 74 6f 72 20 6e 75  6d 62 65 72 0d 50 61 72  |ector number.Par|
000031a0  61 6d 65 74 65 72 20 62  6c 6f 63 6b 20 26 30 39  |ameter block &09|
000031b0  20 20 20 20 20 20 20 3d  20 73 65 63 74 6f 72 20  |       = sector |
000031c0  73 69 7a 65 2f 6e 75 6d  62 65 72 20 6f 66 20 73  |size/number of s|
000031d0  65 63 74 6f 72 73 0d 50  61 72 61 6d 65 74 65 72  |ectors.Parameter|
000031e0  20 62 6c 6f 63 6b 20 26  30 41 20 20 20 20 20 20  | block &0A      |
000031f0  20 3d 20 72 65 73 75 6c  74 20 62 79 74 65 0d 0d  | = result byte..|
00003200  0d 54 68 65 20 6d 6f 73  74 20 73 69 67 6e 69 66  |.The most signif|
00003210  69 63 61 6e 74 20 33 20  62 69 74 73 20 6f 66 20  |icant 3 bits of |
00003220  74 68 65 20 6e 75 6d 62  65 72 20 73 74 6f 72 65  |the number store|
00003230  64 20 69 6e 20 70 61 72  61 6d 65 74 65 72 20 62  |d in parameter b|
00003240  6c 6f 63 6b 20 26 30 39  0d 63 6f 6e 74 61 69 6e  |lock &09.contain|
00003250  20 74 68 65 20 73 65 63  74 6f 72 20 73 69 7a 65  | the sector size|
00003260  20 63 6f 64 65 20 28 63  6f 6c 75 6d 6e 20 32 20  | code (column 2 |
00003270  6f 66 20 66 69 67 75 72  65 20 33 29 2e 20 54 68  |of figure 3). Th|
00003280  65 20 6c 65 61 73 74 20  73 69 67 6e 69 66 69 63  |e least signific|
00003290  61 6e 74 0d 35 20 62 69  74 73 20 63 6f 6e 74 61  |ant.5 bits conta|
000032a0  69 6e 20 74 68 65 20 6e  75 6d 62 65 72 20 6f 66  |in the number of|
000032b0  20 73 65 63 74 6f 72 73  20 70 65 72 20 74 72 61  | sectors per tra|
000032c0  63 6b 2e 20 54 6f 20 63  61 6c 63 75 6c 61 74 65  |ck. To calculate|
000032d0  20 74 68 65 20 6e 75 6d  62 65 72 20 74 6f 0d 62  | the number to.b|
000032e0  65 20 73 74 6f 72 65 64  20 69 6e 20 70 61 72 61  |e stored in para|
000032f0  6d 65 74 65 72 20 62 6c  6f 63 6b 20 26 30 39 20  |meter block &09 |
00003300  6d 75 6c 74 69 70 6c 79  20 74 68 65 20 73 69 7a  |multiply the siz|
00003310  65 20 63 6f 64 65 20 62  79 20 33 32 20 61 6e 64  |e code by 32 and|
00003320  20 61 64 64 20 74 68 65  0d 6e 75 6d 62 65 72 20  | add the.number |
00003330  6f 66 20 73 65 63 74 6f  72 73 2e 20 46 6f 72 20  |of sectors. For |
00003340  65 78 61 6d 70 6c 65 2c  20 69 66 20 79 6f 75 20  |example, if you |
00003350  77 61 6e 74 20 74 6f 20  76 65 72 69 66 79 20 61  |want to verify a|
00003360  20 74 72 61 63 6b 20 77  69 74 68 20 74 65 6e 0d  | track with ten.|
00003370  73 65 63 74 6f 72 73 20  6f 66 20 32 35 36 20 62  |sectors of 256 b|
00003380  79 74 65 73 20 74 68 65  6e 20 70 61 72 61 6d 65  |ytes then parame|
00003390  74 65 72 20 62 6c 6f 63  6b 20 26 30 39 20 77 69  |ter block &09 wi|
000033a0  6c 6c 20 63 6f 6e 74 61  69 6e 20 31 2a 33 32 2b  |ll contain 1*32+|
000033b0  31 30 20 3d 20 34 32 20  3d 0d 26 32 41 2e 0d 0d  |10 = 42 =.&2A...|
000033c0  49 66 20 79 6f 75 20 77  61 6e 74 20 74 6f 20 76  |If you want to v|
000033d0  65 72 69 66 79 20 64 69  73 63 73 20 74 68 61 74  |erify discs that|
000033e0  20 75 73 65 20 64 69 66  66 65 72 65 6e 74 20 70  | use different p|
000033f0  68 79 73 69 63 61 6c 20  61 6e 64 20 6c 6f 67 69  |hysical and logi|
00003400  63 61 6c 20 74 72 61 63  6b 0d 6e 75 6d 62 65 72  |cal track.number|
00003410  73 20 69 74 20 69 73 20  6e 65 63 65 73 73 61 72  |s it is necessar|
00003420  79 20 74 6f 20 75 73 65  20 74 68 65 20 4f 73 77  |y to use the Osw|
00003430  6f 72 64 20 26 37 46 20  53 65 65 6b 20 63 6f 6d  |ord &7F Seek com|
00003440  6d 61 6e 64 20 74 6f 20  66 69 6e 64 20 74 68 65  |mand to find the|
00003450  0d 61 70 70 72 6f 70 72  69 61 74 65 20 74 72 61  |.appropriate tra|
00003460  63 6b 2c 20 4f 73 77 6f  72 64 20 26 37 46 20 52  |ck, Osword &7F R|
00003470  65 61 64 20 53 65 63 74  6f 72 20 49 44 73 20 74  |ead Sector IDs t|
00003480  6f 20 72 65 61 64 20 74  68 65 20 6c 6f 67 69 63  |o read the logic|
00003490  61 6c 20 74 72 61 63 6b  0d 61 6e 64 20 73 65 63  |al track.and sec|
000034a0  74 6f 72 20 6e 75 6d 62  65 72 2c 20 61 6e 64 20  |tor number, and |
000034b0  4f 73 77 6f 72 64 20 26  37 46 20 57 72 69 74 65  |Osword &7F Write|
000034c0  20 53 70 65 63 69 61 6c  20 52 65 67 69 73 74 65  | Special Registe|
000034d0  72 20 74 6f 20 77 72 69  74 65 20 74 68 65 0d 6c  |r to write the.l|
000034e0  6f 67 69 63 61 6c 20 74  72 61 63 6b 20 6e 75 6d  |ogical track num|
000034f0  62 65 72 20 69 6e 74 6f  20 74 68 65 20 61 70 70  |ber into the app|
00003500  72 6f 70 72 69 61 74 65  20 74 72 61 63 6b 20 72  |ropriate track r|
00003510  65 67 69 73 74 65 72 20  62 65 66 6f 72 65 20 75  |egister before u|
00003520  73 69 6e 67 0d 4f 73 77  6f 72 64 20 26 37 46 20  |sing.Osword &7F |
00003530  56 65 72 69 66 79 20 44  61 74 61 20 61 6e 64 20  |Verify Data and |
00003540  44 65 6c 65 74 65 64 20  44 61 74 61 20 6d 75 6c  |Deleted Data mul|
00003550  74 69 2d 73 65 63 74 6f  72 2e 20 41 66 74 65 72  |ti-sector. After|
00003560  20 76 65 72 69 66 79 69  6e 67 20 74 68 65 0d 73  | verifying the.s|
00003570  65 63 74 6f 72 28 73 29  20 69 74 20 69 73 20 74  |ector(s) it is t|
00003580  68 65 6e 20 6e 65 63 65  73 73 61 72 79 20 74 6f  |hen necessary to|
00003590  20 75 73 65 20 4f 73 77  6f 72 64 20 26 37 46 20  | use Osword &7F |
000035a0  57 72 69 74 65 20 53 70  65 63 69 61 6c 20 52 65  |Write Special Re|
000035b0  67 69 73 74 65 72 20 74  6f 0d 77 72 69 74 65 20  |gister to.write |
000035c0  74 68 65 20 70 68 79 73  69 63 61 6c 20 74 72 61  |the physical tra|
000035d0  63 6b 20 6e 75 6d 62 65  72 20 62 61 63 6b 20 69  |ck number back i|
000035e0  6e 74 6f 20 74 68 65 20  61 70 70 72 6f 70 72 69  |nto the appropri|
000035f0  61 74 65 20 74 72 61 63  6b 20 72 65 67 69 73 74  |ate track regist|
00003600  65 72 2e 0d 54 68 69 73  20 70 72 6f 63 65 64 75  |er..This procedu|
00003610  72 65 20 77 61 73 20 75  73 65 64 20 69 6e 20 74  |re was used in t|
00003620  68 65 20 70 72 6f 67 72  61 6d 20 56 45 52 49 46  |he program VERIF|
00003630  59 20 69 6e 20 6d 6f 64  75 6c 65 20 30 2e 0d 0d  |Y in module 0...|
00003640  54 68 65 20 66 6f 6c 6c  6f 77 69 6e 67 20 63 6f  |The following co|
00003650  64 65 20 63 6f 75 6c 64  20 62 65 20 75 73 65 64  |de could be used|
00003660  20 74 6f 20 76 65 72 69  66 79 20 74 72 61 63 6b  | to verify track|
00003670  20 26 32 37 20 6f 66 20  74 68 65 20 64 69 73 63  | &27 of the disc|
00003680  20 66 6f 72 6d 61 74 74  65 64 0d 77 69 74 68 20  | formatted.with |
00003690  74 68 65 20 70 72 6f 67  72 61 6d 20 46 4f 52 4d  |the program FORM|
000036a0  31 30 0d 0d 0d 20 20 20  20 20 20 20 20 4c 44 41  |10...        LDA|
000036b0  20 23 26 37 46 0d 20 20  20 20 20 20 20 20 4c 44  | #&7F.        LD|
000036c0  58 20 23 62 6c 6f 63 6b  20 4d 4f 44 20 32 35 36  |X #block MOD 256|
000036d0  0d 20 20 20 20 20 20 20  20 4c 44 59 20 23 62 6c  |.        LDY #bl|
000036e0  6f 63 6b 20 44 49 56 20  32 35 36 0d 20 20 20 20  |ock DIV 256.    |
000036f0  20 20 20 20 4a 53 52 20  26 46 46 46 31 0d 20 20  |    JSR &FFF1.  |
00003700  20 20 20 20 20 20 52 54  53 0d 2e 62 6c 6f 63 6b  |      RTS..block|
00003710  0d 20 20 20 20 20 20 20  20 45 51 55 42 20 26 46  |.        EQUB &F|
00003720  46 20 20 20 20 20 20 20  20 20 20 5c 20 63 75 72  |F          \ cur|
00003730  72 65 6e 74 20 64 72 69  76 65 0d 20 20 20 20 20  |rent drive.     |
00003740  20 20 20 45 51 55 44 20  26 30 30 20 20 20 20 20  |   EQUD &00     |
00003750  20 20 20 20 20 5c 20 62  75 66 66 65 72 20 61 64  |     \ buffer ad|
00003760  64 72 65 73 73 20 28 6e  6f 74 20 75 73 65 64 29  |dress (not used)|
00003770  0d 20 20 20 20 20 20 20  20 45 51 55 42 20 26 30  |.        EQUB &0|
00003780  33 20 20 20 20 20 20 20  20 20 20 5c 20 33 20 70  |3          \ 3 p|
00003790  61 72 61 6d 65 74 65 72  73 0d 20 20 20 20 20 20  |arameters.      |
000037a0  20 20 45 51 55 42 20 26  35 46 20 20 20 20 20 20  |  EQUB &5F      |
000037b0  20 20 20 20 5c 20 76 65  72 69 66 79 20 63 6f 6d  |    \ verify com|
000037c0  6d 61 6e 64 0d 20 20 20  20 20 20 20 20 45 51 55  |mand.        EQU|
000037d0  42 20 26 32 37 20 20 20  20 20 20 20 20 20 20 5c  |B &27          \|
000037e0  20 6c 6f 67 69 63 61 6c  20 74 72 61 63 6b 20 26  | logical track &|
000037f0  32 37 0d 20 20 20 20 20  20 20 20 45 51 55 42 20  |27.        EQUB |
00003800  26 30 30 20 20 20 20 20  20 20 20 20 20 5c 20 73  |&00          \ s|
00003810  74 61 72 74 20 77 69 74  68 20 6c 6f 67 69 63 61  |tart with logica|
00003820  6c 20 73 65 63 74 6f 72  20 26 30 30 0d 20 20 20  |l sector &00.   |
00003830  20 20 20 20 20 45 51 55  42 20 26 32 41 20 20 20  |     EQUB &2A   |
00003840  20 20 20 20 20 20 20 5c  20 31 30 20 73 65 63 74  |       \ 10 sect|
00003850  6f 72 73 20 6f 66 20 32  35 36 20 62 79 74 65 73  |ors of 256 bytes|
00003860  0d 20 20 20 20 20 20 20  20 45 51 55 42 20 26 30  |.        EQUB &0|
00003870  30 20 20 20 20 20 20 20  20 20 20 5c 20 72 65 73  |0          \ res|
00003880  75 6c 74 20 62 79 74 65  0d 0d 0d 2d 2d 2d 2d 2d  |ult byte...-----|
00003890  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
000038b0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 0d 4f 73 77  |------------.Osw|
000038c0  6f 72 64 20 26 37 46 20  56 65 72 69 66 79 20 44  |ord &7F Verify D|
000038d0  61 74 61 20 61 6e 64 20  44 65 6c 65 74 65 64 20  |ata and Deleted |
000038e0  44 61 74 61 20 31 32 38  20 62 79 74 65 73 0d 2d  |Data 128 bytes.-|
000038f0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00003920  0d 0d 49 66 20 79 6f 75  20 6e 65 65 64 20 74 6f  |..If you need to|
00003930  20 76 65 72 69 66 79 20  6a 75 73 74 20 6f 6e 65  | verify just one|
00003940  20 73 65 63 74 6f 72 20  6f 66 20 31 32 38 20 62  | sector of 128 b|
00003950  79 74 65 73 20 79 6f 75  20 63 61 6e 20 75 73 65  |ytes you can use|
00003960  20 74 68 65 20 4f 73 77  6f 72 64 0d 26 37 46 20  | the Osword.&7F |
00003970  56 65 72 69 66 79 20 44  61 74 61 20 61 6e 64 20  |Verify Data and |
00003980  44 65 6c 65 74 65 64 20  44 61 74 61 20 31 32 38  |Deleted Data 128|
00003990  20 62 79 74 65 73 20 63  6f 6d 6d 61 6e 64 2e 20  | bytes command. |
000039a0  54 68 69 73 20 63 6f 6d  6d 61 6e 64 20 75 73 65  |This command use|
000039b0  73 20 74 68 65 0d 66 6f  6c 6c 6f 77 69 6e 67 20  |s the.following |
000039c0  70 61 72 61 6d 65 74 65  72 20 62 6c 6f 63 6b 2e  |parameter block.|
000039d0  0d 0d 50 61 72 61 6d 65  74 65 72 20 62 6c 6f 63  |..Parameter bloc|
000039e0  6b 20 26 30 30 20 20 20  20 20 20 20 3d 20 64 72  |k &00       = dr|
000039f0  69 76 65 20 6e 75 6d 62  65 72 20 28 26 30 30 2d  |ive number (&00-|
00003a00  26 30 33 20 6f 72 20 26  46 46 29 0d 50 61 72 61  |&03 or &FF).Para|
00003a10  6d 65 74 65 72 20 62 6c  6f 63 6b 20 26 30 31 20  |meter block &01 |
00003a20  2d 20 26 30 34 20 3d 20  62 75 66 66 65 72 20 61  |- &04 = buffer a|
00003a30  64 64 72 65 73 73 20 28  6e 6f 74 20 75 73 65 64  |ddress (not used|
00003a40  29 0d 50 61 72 61 6d 65  74 65 72 20 62 6c 6f 63  |).Parameter bloc|
00003a50  6b 20 26 30 35 20 20 20  20 20 20 20 3d 20 26 30  |k &05       = &0|
00003a60  32 20 28 32 20 63 6f 6d  6d 61 6e 64 20 70 61 72  |2 (2 command par|
00003a70  61 6d 65 74 65 72 73 29  0d 50 61 72 61 6d 65 74  |ameters).Paramet|
00003a80  65 72 20 62 6c 6f 63 6b  20 26 30 36 20 20 20 20  |er block &06    |
00003a90  20 20 20 3d 20 26 35 45  20 28 76 65 72 69 66 79  |   = &5E (verify|
00003aa0  20 31 32 38 20 62 79 74  65 73 20 63 6f 6d 6d 61  | 128 bytes comma|
00003ab0  6e 64 29 0d 50 61 72 61  6d 65 74 65 72 20 62 6c  |nd).Parameter bl|
00003ac0  6f 63 6b 20 26 30 37 20  20 20 20 20 20 20 3d 20  |ock &07       = |
00003ad0  6c 6f 67 69 63 61 6c 20  74 72 61 63 6b 20 6e 75  |logical track nu|
00003ae0  6d 62 65 72 0d 50 61 72  61 6d 65 74 65 72 20 62  |mber.Parameter b|
00003af0  6c 6f 63 6b 20 26 30 38  20 20 20 20 20 20 20 3d  |lock &08       =|
00003b00  20 6c 6f 67 69 63 61 6c  20 73 65 63 74 6f 72 20  | logical sector |
00003b10  6e 75 6d 62 65 72 0d 50  61 72 61 6d 65 74 65 72  |number.Parameter|
00003b20  20 62 6c 6f 63 6b 20 26  30 39 20 20 20 20 20 20  | block &09      |
00003b30  20 3d 20 72 65 73 75 6c  74 20 62 79 74 65 0d 0d  | = result byte..|
00003b40  0d 41 6c 74 68 6f 75 67  68 20 75 73 69 6e 67 20  |.Although using |
00003b50  74 68 69 73 20 63 6f 6d  6d 61 6e 64 20 73 61 76  |this command sav|
00003b60  65 73 20 79 6f 75 20 74  68 65 20 74 72 6f 75 62  |es you the troub|
00003b70  6c 65 20 6f 66 20 63 61  6c 63 75 6c 61 74 69 6e  |le of calculatin|
00003b80  67 20 74 68 65 0d 73 65  63 74 6f 72 20 73 69 7a  |g the.sector siz|
00003b90  65 2f 6e 75 6d 62 65 72  20 6f 66 20 73 65 63 74  |e/number of sect|
00003ba0  6f 72 73 20 70 61 72 61  6d 65 74 65 72 2c 20 49  |ors parameter, I|
00003bb0  20 63 61 6e 6e 6f 74 20  72 65 63 6f 6d 6d 65 6e  | cannot recommen|
00003bc0  64 20 75 73 69 6e 67 20  69 74 20 77 68 65 6e 0d  |d using it when.|
00003bd0  74 68 65 20 6d 75 6c 74  69 2d 73 65 63 74 6f 72  |the multi-sector|
00003be0  20 63 6f 6d 6d 61 6e 64  20 69 73 20 73 6f 20 6d  | command is so m|
00003bf0  75 63 68 20 6d 6f 72 65  20 76 65 72 73 69 74 69  |uch more versiti|
00003c00  6c 65 2e 0d 0d 0d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |le....----------|
00003c10  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
00003c20  2d 2d 2d 2d 2d 2d 2d 2d  0d 4f 73 77 6f 72 64 20  |--------.Osword |
00003c30  26 37 46 20 57 72 69 74  65 20 44 61 74 61 20 6d  |&7F Write Data m|
00003c40  75 6c 74 69 2d 73 65 63  74 6f 72 0d 2d 2d 2d 2d  |ulti-sector.----|
00003c50  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
00003c60  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 0d 0d  |--------------..|
00003c70  4f 73 77 6f 72 64 20 26  37 46 20 57 72 69 74 65  |Osword &7F Write|
00003c80  20 44 61 74 61 20 6d 75  6c 74 69 2d 73 65 63 74  | Data multi-sect|
00003c90  6f 72 20 75 73 65 73 20  74 68 65 20 61 70 70 72  |or uses the appr|
00003ca0  6f 70 72 69 61 74 65 20  74 72 61 63 6b 20 72 65  |opriate track re|
00003cb0  67 69 73 74 65 72 20 61  73 0d 61 20 62 61 73 65  |gister as.a base|
00003cc0  20 66 72 6f 6d 20 77 68  69 63 68 20 74 6f 20 73  | from which to s|
00003cd0  65 65 6b 20 74 68 65 20  74 72 61 63 6b 20 61 6e  |eek the track an|
00003ce0  64 20 73 65 63 74 6f 72  20 73 70 65 63 69 66 69  |d sector specifi|
00003cf0  65 64 20 69 6e 20 74 68  65 20 70 61 72 61 6d 65  |ed in the parame|
00003d00  74 65 72 0d 62 6c 6f 63  6b 2e 20 49 66 20 69 74  |ter.block. If it|
00003d10  20 63 61 6e 6e 6f 74 20  66 69 6e 64 20 74 68 65  | cannot find the|
00003d20  20 74 72 61 63 6b 20 61  6e 64 20 73 65 63 74 6f  | track and secto|
00003d30  72 20 69 74 20 72 65 74  75 72 6e 73 20 74 68 65  |r it returns the|
00003d40  20 73 65 63 74 6f 72 20  6e 6f 74 0d 66 6f 75 6e  | sector not.foun|
00003d50  64 20 65 72 72 6f 72 20  28 26 31 38 29 20 69 6e  |d error (&18) in|
00003d60  20 74 68 65 20 72 65 73  75 6c 74 20 62 79 74 65  | the result byte|
00003d70  2e 20 49 66 20 69 74 20  66 69 6e 64 73 20 74 68  |. If it finds th|
00003d80  65 20 72 65 71 75 69 72  65 64 20 74 72 61 63 6b  |e required track|
00003d90  20 61 6e 64 0d 73 65 63  74 6f 72 20 69 74 20 77  | and.sector it w|
00003da0  72 69 74 65 73 20 61 20  64 61 74 61 20 6d 61 72  |rites a data mar|
00003db0  6b 20 61 74 20 74 68 65  20 73 74 61 72 74 20 6f  |k at the start o|
00003dc0  66 20 74 68 65 20 64 61  74 61 20 66 69 65 6c 64  |f the data field|
00003dd0  20 61 6e 64 20 63 6f 70  69 65 73 20 74 68 65 0d  | and copies the.|
00003de0  66 69 72 73 74 20 73 65  63 74 6f 72 20 6f 66 20  |first sector of |
00003df0  64 61 74 61 20 66 72 6f  6d 20 74 68 65 20 62 75  |data from the bu|
00003e00  66 66 65 72 20 74 6f 20  74 68 65 20 73 70 65 63  |ffer to the spec|
00003e10  69 66 69 65 64 20 73 65  63 74 6f 72 2e 20 49 66  |ified sector. If|
00003e20  20 6d 6f 72 65 20 74 68  61 6e 0d 6f 6e 65 20 73  | more than.one s|
00003e30  65 63 74 6f 72 20 69 73  20 73 70 65 63 69 66 69  |ector is specifi|
00003e40  65 64 20 74 68 69 73 20  70 72 6f 63 65 64 75 72  |ed this procedur|
00003e50  65 20 72 65 70 65 61 74  73 20 75 6e 74 69 6c 20  |e repeats until |
00003e60  65 69 74 68 65 72 20 61  6c 6c 20 74 68 65 0d 73  |either all the.s|
00003e70  65 63 74 6f 72 73 20 68  61 76 65 20 62 65 65 6e  |ectors have been|
00003e80  20 77 72 69 74 74 65 6e  20 6f 72 20 61 6e 20 65  | written or an e|
00003e90  72 72 6f 72 20 6f 63 63  75 72 73 2e 0d 0d 54 68  |rror occurs...Th|
00003ea0  65 20 66 6f 6c 6c 6f 77  69 6e 67 20 70 61 72 61  |e following para|
00003eb0  6d 65 74 65 72 20 62 6c  6f 63 6b 20 69 73 20 75  |meter block is u|
00003ec0  73 65 64 20 77 69 74 68  20 74 68 65 20 4f 73 77  |sed with the Osw|
00003ed0  6f 72 64 20 26 37 46 20  57 72 69 74 65 20 44 61  |ord &7F Write Da|
00003ee0  74 61 0d 6d 75 6c 74 69  2d 73 65 63 74 6f 72 20  |ta.multi-sector |
00003ef0  63 6f 6d 6d 61 6e 64 2e  0d 0d 50 61 72 61 6d 65  |command...Parame|
00003f00  74 65 72 20 62 6c 6f 63  6b 20 26 30 30 20 20 20  |ter block &00   |
00003f10  20 20 20 20 3d 20 64 72  69 76 65 20 6e 75 6d 62  |    = drive numb|
00003f20  65 72 20 28 26 30 30 2d  26 30 33 20 6f 72 20 26  |er (&00-&03 or &|
00003f30  46 46 29 0d 50 61 72 61  6d 65 74 65 72 20 62 6c  |FF).Parameter bl|
00003f40  6f 63 6b 20 26 30 31 20  2d 20 26 30 34 20 3d 20  |ock &01 - &04 = |
00003f50  62 75 66 66 65 72 20 61  64 64 72 65 73 73 0d 50  |buffer address.P|
00003f60  61 72 61 6d 65 74 65 72  20 62 6c 6f 63 6b 20 26  |arameter block &|
00003f70  30 35 20 20 20 20 20 20  20 3d 20 26 30 33 20 28  |05       = &03 (|
00003f80  33 20 63 6f 6d 6d 61 6e  64 20 70 61 72 61 6d 65  |3 command parame|
00003f90  74 65 72 73 29 0d 50 61  72 61 6d 65 74 65 72 20  |ters).Parameter |
00003fa0  62 6c 6f 63 6b 20 26 30  36 20 20 20 20 20 20 20  |block &06       |
00003fb0  3d 20 26 34 42 20 28 77  72 69 74 65 20 64 61 74  |= &4B (write dat|
00003fc0  61 20 6d 75 6c 74 69 2d  73 65 63 74 6f 72 20 63  |a multi-sector c|
00003fd0  6f 6d 6d 61 6e 64 29 0d  50 61 72 61 6d 65 74 65  |ommand).Paramete|
00003fe0  72 20 62 6c 6f 63 6b 20  26 30 37 20 20 20 20 20  |r block &07     |
00003ff0  20 20 3d 20 6c 6f 67 69  63 61 6c 20 74 72 61 63  |  = logical trac|
00004000  6b 20 6e 75 6d 62 65 72  0d 50 61 72 61 6d 65 74  |k number.Paramet|
00004010  65 72 20 62 6c 6f 63 6b  20 26 30 38 20 20 20 20  |er block &08    |
00004020  20 20 20 3d 20 6c 6f 67  69 63 61 6c 20 73 65 63  |   = logical sec|
00004030  74 6f 72 20 6e 75 6d 62  65 72 0d 50 61 72 61 6d  |tor number.Param|
00004040  65 74 65 72 20 62 6c 6f  63 6b 20 26 30 39 20 20  |eter block &09  |
00004050  20 20 20 20 20 3d 20 73  65 63 74 6f 72 20 73 69  |     = sector si|
00004060  7a 65 2f 6e 75 6d 62 65  72 20 6f 66 20 73 65 63  |ze/number of sec|
00004070  74 6f 72 73 0d 50 61 72  61 6d 65 74 65 72 20 62  |tors.Parameter b|
00004080  6c 6f 63 6b 20 26 30 41  20 20 20 20 20 20 20 3d  |lock &0A       =|
00004090  20 72 65 73 75 6c 74 20  62 79 74 65 0d 0d 0d 54  | result byte...T|
000040a0  68 65 20 6d 6f 73 74 20  73 69 67 6e 69 66 69 63  |he most signific|
000040b0  61 6e 74 20 33 20 62 69  74 73 20 6f 66 20 74 68  |ant 3 bits of th|
000040c0  65 20 6e 75 6d 62 65 72  20 73 74 6f 72 65 64 20  |e number stored |
000040d0  69 6e 20 70 61 72 61 6d  65 74 65 72 20 62 6c 6f  |in parameter blo|
000040e0  63 6b 20 26 30 39 0d 63  6f 6e 74 61 69 6e 20 74  |ck &09.contain t|
000040f0  68 65 20 73 65 63 74 6f  72 20 73 69 7a 65 20 63  |he sector size c|
00004100  6f 64 65 20 28 63 6f 6c  75 6d 6e 20 32 20 6f 66  |ode (column 2 of|
00004110  20 66 69 67 75 72 65 20  33 29 2e 20 54 68 65 20  | figure 3). The |
00004120  6c 65 61 73 74 20 73 69  67 6e 69 66 69 63 61 6e  |least significan|
00004130  74 0d 35 20 62 69 74 73  20 63 6f 6e 74 61 69 6e  |t.5 bits contain|
00004140  20 74 68 65 20 6e 75 6d  62 65 72 20 6f 66 20 73  | the number of s|
00004150  65 63 74 6f 72 73 20 70  65 72 20 74 72 61 63 6b  |ectors per track|
00004160  2e 20 54 6f 20 63 61 6c  63 75 6c 61 74 65 20 74  |. To calculate t|
00004170  68 65 20 6e 75 6d 62 65  72 20 74 6f 0d 62 65 20  |he number to.be |
00004180  73 74 6f 72 65 64 20 69  6e 20 70 61 72 61 6d 65  |stored in parame|
00004190  74 65 72 20 62 6c 6f 63  6b 20 26 30 39 20 6d 75  |ter block &09 mu|
000041a0  6c 74 69 70 6c 79 20 74  68 65 20 73 69 7a 65 20  |ltiply the size |
000041b0  63 6f 64 65 20 62 79 20  33 32 20 61 6e 64 20 61  |code by 32 and a|
000041c0  64 64 20 74 68 65 0d 6e  75 6d 62 65 72 20 6f 66  |dd the.number of|
000041d0  20 73 65 63 74 6f 72 73  2e 20 46 6f 72 20 65 78  | sectors. For ex|
000041e0  61 6d 70 6c 65 2c 20 69  66 20 79 6f 75 20 77 61  |ample, if you wa|
000041f0  6e 74 20 74 6f 20 76 65  72 69 66 79 20 61 20 74  |nt to verify a t|
00004200  72 61 63 6b 20 77 69 74  68 20 74 65 6e 0d 73 65  |rack with ten.se|
00004210  63 74 6f 72 73 20 6f 66  20 32 35 36 20 62 79 74  |ctors of 256 byt|
00004220  65 73 20 74 68 65 6e 20  70 61 72 61 6d 65 74 65  |es then paramete|
00004230  72 20 62 6c 6f 63 6b 20  26 30 39 20 77 69 6c 6c  |r block &09 will|
00004240  20 63 6f 6e 74 61 69 6e  20 31 2a 33 32 2b 31 30  | contain 1*32+10|
00004250  20 3d 20 34 32 20 3d 0d  26 32 41 2e 0d 0d 54 68  | = 42 =.&2A...Th|
00004260  65 20 70 72 6f 67 72 61  6d 20 57 52 49 54 45 31  |e program WRITE1|
00004270  30 20 63 61 6e 20 62 65  20 75 73 65 64 20 74 6f  |0 can be used to|
00004280  20 64 65 6d 6f 6e 73 74  72 61 74 65 20 74 68 69  | demonstrate thi|
00004290  73 20 63 6f 6d 6d 61 6e  64 2e 20 54 68 69 73 20  |s command. This |
000042a0  70 72 6f 67 72 61 6d 0d  77 69 6c 6c 20 64 65 73  |program.will des|
000042b0  74 72 6f 79 20 61 6c 6c  20 74 68 65 20 64 61 74  |troy all the dat|
000042c0  61 20 73 74 6f 72 65 64  20 6f 6e 20 74 72 61 63  |a stored on trac|
000042d0  6b 20 26 30 31 20 6f 66  20 74 68 65 20 64 69 73  |k &01 of the dis|
000042e0  63 20 69 74 20 75 73 65  73 20 2d 20 79 6f 75 0d  |c it uses - you.|
000042f0  68 61 76 65 20 62 65 65  6e 20 77 61 72 6e 65 64  |have been warned|
00004300  21 0d 0d 57 52 49 54 45  31 30 20 75 73 65 73 20  |!..WRITE10 uses |
00004310  61 6e 20 6e 6f 72 6d 61  6c 6c 79 20 66 6f 72 6d  |an normally form|
00004320  61 74 74 65 64 20 44 46  53 20 64 69 73 63 20 61  |atted DFS disc a|
00004330  6e 64 20 73 74 6f 72 65  73 20 32 2e 35 6b 20 6f  |nd stores 2.5k o|
00004340  66 20 64 61 74 61 20 6f  6e 0d 74 72 61 63 6b 20  |f data on.track |
00004350  26 30 31 2e 20 54 68 65  20 62 75 66 66 65 72 20  |&01. The buffer |
00004360  73 74 61 72 74 73 20 61  74 20 50 41 47 45 20 28  |starts at PAGE (|
00004370  6c 69 6e 65 20 32 34 30  29 20 61 6e 64 20 73 6f  |line 240) and so|
00004380  20 74 68 65 20 70 72 6f  67 72 61 6d 20 63 6f 75  | the program cou|
00004390  6c 64 0d 62 65 20 75 73  65 64 20 74 6f 20 73 74  |ld.be used to st|
000043a0  6f 72 65 20 61 20 73 6d  61 6c 6c 20 42 41 53 49  |ore a small BASI|
000043b0  43 20 70 72 6f 67 72 61  6d 20 6f 6e 20 61 20 64  |C program on a d|
000043c0  69 73 63 2e 20 54 68 65  20 64 61 74 61 20 61 72  |isc. The data ar|
000043d0  65 20 73 74 6f 72 65 64  0d 77 69 74 68 6f 75 74  |e stored.without|
000043e0  20 61 6e 20 65 6e 74 72  79 20 69 6e 20 74 68 65  | an entry in the|
000043f0  20 44 46 53 20 63 61 74  61 6c 6f 67 75 65 20 61  | DFS catalogue a|
00004400  6e 64 20 63 61 6e 6e 6f  74 20 62 65 20 72 65 61  |nd cannot be rea|
00004410  64 20 75 73 69 6e 67 20  61 6e 79 20 6f 66 20 74  |d using any of t|
00004420  68 65 0d 44 46 53 20 73  74 61 72 20 63 6f 6d 6d  |he.DFS star comm|
00004430  61 6e 64 73 2e 20 49 66  20 79 6f 75 20 75 73 65  |ands. If you use|
00004440  20 74 68 65 20 44 46 53  20 63 6f 6d 6d 61 6e 64  | the DFS command|
00004450  73 20 74 6f 20 73 74 6f  72 65 20 61 6e 79 20 6f  |s to store any o|
00004460  74 68 65 72 20 64 61 74  61 20 6f 6e 0d 74 68 65  |ther data on.the|
00004470  20 64 69 73 6b 2c 20 74  68 65 20 64 61 74 61 20  | disk, the data |
00004480  73 74 6f 72 65 64 20 77  69 74 68 20 57 52 49 54  |stored with WRIT|
00004490  45 31 30 20 63 6f 75 6c  64 20 62 65 20 6f 76 65  |E10 could be ove|
000044a0  72 77 72 69 74 74 65 6e  2e 20 54 68 65 20 64 61  |rwritten. The da|
000044b0  74 61 20 63 61 6e 0d 62  65 20 72 65 61 64 20 66  |ta can.be read f|
000044c0  72 6f 6d 20 74 68 65 20  64 69 73 63 20 75 73 69  |rom the disc usi|
000044d0  6e 67 20 74 68 65 20 4f  73 77 6f 72 64 20 26 37  |ng the Osword &7|
000044e0  46 20 52 65 61 64 20 44  61 74 61 20 61 6e 64 20  |F Read Data and |
000044f0  44 65 6c 65 74 65 64 20  44 61 74 61 0d 63 6f 6d  |Deleted Data.com|
00004500  6d 61 6e 64 20 77 68 69  63 68 20 69 73 20 65 78  |mand which is ex|
00004510  70 6c 61 69 6e 65 64 20  6c 61 74 65 72 20 69 6e  |plained later in|
00004520  20 74 68 69 73 20 6d 6f  64 75 6c 65 2e 0d 0d 0d  | this module....|
00004530  20 20 20 31 30 20 52 45  4d 3a 20 57 52 49 54 45  |   10 REM: WRITE|
00004540  31 30 0d 20 20 20 32 30  20 6d 63 6f 64 65 20 3d  |10.   20 mcode =|
00004550  20 26 30 41 30 30 0d 20  20 20 33 30 20 6f 73 77  | &0A00.   30 osw|
00004560  6f 72 64 3d 26 46 46 46  31 0d 20 20 20 34 30 20  |ord=&FFF1.   40 |
00004570  70 61 67 65 20 3d 20 50  41 47 45 0d 20 20 20 35  |page = PAGE.   5|
00004580  30 20 46 4f 52 70 61 73  73 3d 30 20 54 4f 20 32  |0 FORpass=0 TO 2|
00004590  20 53 54 45 50 20 32 0d  20 20 20 36 30 20 50 25  | STEP 2.   60 P%|
000045a0  3d 6d 63 6f 64 65 0d 20  20 20 37 30 20 5b 20 20  |=mcode.   70 [  |
000045b0  20 20 20 20 20 4f 50 54  20 70 61 73 73 0d 20 20  |     OPT pass.  |
000045c0  20 38 30 20 20 20 20 20  20 20 20 20 4c 44 41 20  | 80         LDA |
000045d0  23 26 37 46 0d 20 20 20  39 30 20 20 20 20 20 20  |#&7F.   90      |
000045e0  20 20 20 4c 44 58 20 23  62 6c 6f 63 6b 20 4d 4f  |   LDX #block MO|
000045f0  44 20 32 35 36 0d 20 20  31 30 30 20 20 20 20 20  |D 256.  100     |
00004600  20 20 20 20 4c 44 59 20  23 62 6c 6f 63 6b 20 44  |    LDY #block D|
00004610  49 56 20 32 35 36 0d 20  20 31 31 30 20 20 20 20  |IV 256.  110    |
00004620  20 20 20 20 20 4a 53 52  20 6f 73 77 6f 72 64 0d  |     JSR osword.|
00004630  20 20 31 32 30 20 20 20  20 20 20 20 20 20 4c 44  |  120         LD|
00004640  41 20 72 65 73 75 6c 74  0d 20 20 31 33 30 20 20  |A result.  130  |
00004650  20 20 20 20 20 20 20 42  45 51 20 6f 6b 0d 20 20  |       BEQ ok.  |
00004660  31 34 30 20 20 20 20 20  20 20 20 20 42 52 4b 0d  |140         BRK.|
00004670  20 20 31 35 30 20 20 20  20 20 20 20 20 20 42 52  |  150         BR|
00004680  4b 0d 20 20 31 36 30 20  20 20 20 20 20 20 20 20  |K.  160         |
00004690  45 51 55 53 20 22 57 72  69 74 65 20 65 72 72 6f  |EQUS "Write erro|
000046a0  72 22 0d 20 20 31 37 30  20 2e 6f 6b 0d 20 20 31  |r".  170 .ok.  1|
000046b0  38 30 20 20 20 20 20 20  20 20 20 42 52 4b 0d 20  |80         BRK. |
000046c0  20 31 39 30 20 20 20 20  20 20 20 20 20 45 51 55  | 190         EQU|
000046d0  53 20 22 57 72 69 74 65  20 73 75 63 65 73 73 66  |S "Write sucessf|
000046e0  75 6c 22 0d 20 20 32 30  30 20 20 20 20 20 20 20  |ul".  200       |
000046f0  20 20 42 52 4b 0d 20 20  32 31 30 20 20 20 20 20  |  BRK.  210     |
00004700  20 20 20 20 42 52 4b 0d  20 20 32 32 30 20 2e 62  |    BRK.  220 .b|
00004710  6c 6f 63 6b 0d 20 20 32  33 30 20 20 20 20 20 20  |lock.  230      |
00004720  20 20 20 45 51 55 42 20  26 46 46 20 20 20 20 20  |   EQUB &FF     |
00004730  20 5c 20 63 75 72 72 65  6e 74 20 64 72 69 76 65  | \ current drive|
00004740  0d 20 20 32 34 30 20 20  20 20 20 20 20 20 20 45  |.  240         E|
00004750  51 55 44 20 70 61 67 65  20 20 20 20 20 5c 20 73  |QUD page     \ s|
00004760  74 61 72 74 20 61 74 20  50 41 47 45 0d 20 20 32  |tart at PAGE.  2|
00004770  35 30 20 20 20 20 20 20  20 20 20 45 51 55 42 20  |50         EQUB |
00004780  26 30 33 20 20 20 20 20  20 5c 20 33 20 70 61 72  |&03      \ 3 par|
00004790  61 6d 65 74 65 72 73 0d  20 20 32 36 30 20 20 20  |ameters.  260   |
000047a0  20 20 20 20 20 20 45 51  55 42 20 26 34 42 20 20  |      EQUB &4B  |
000047b0  20 20 20 20 5c 20 77 72  69 74 65 20 64 61 74 61  |    \ write data|
000047c0  20 6d 75 6c 74 69 2d 73  65 63 74 6f 72 0d 20 20  | multi-sector.  |
000047d0  32 37 30 20 20 20 20 20  20 20 20 20 45 51 55 42  |270         EQUB|
000047e0  20 26 30 31 20 20 20 20  20 20 5c 20 6c 6f 67 69  | &01      \ logi|
000047f0  63 61 6c 20 74 72 61 63  6b 20 31 0d 20 20 32 38  |cal track 1.  28|
00004800  30 20 20 20 20 20 20 20  20 20 45 51 55 42 20 26  |0         EQUB &|
00004810  30 30 20 20 20 20 20 20  5c 20 73 74 61 72 74 20  |00      \ start |
00004820  6c 6f 67 69 63 61 6c 20  73 65 63 74 6f 72 20 30  |logical sector 0|
00004830  0d 20 20 32 39 30 20 20  20 20 20 20 20 20 20 45  |.  290         E|
00004840  51 55 42 20 26 32 41 20  20 20 20 20 20 5c 20 31  |QUB &2A      \ 1|
00004850  30 20 73 65 63 74 6f 72  73 20 6f 66 20 32 35 36  |0 sectors of 256|
00004860  20 62 79 74 65 73 0d 20  20 33 30 30 20 2e 72 65  | bytes.  300 .re|
00004870  73 75 6c 74 0d 20 20 33  31 30 20 20 20 20 20 20  |sult.  310      |
00004880  20 20 20 45 51 55 42 20  26 30 30 20 20 20 20 20  |   EQUB &00     |
00004890  20 5c 20 72 65 73 75 6c  74 20 62 79 74 65 0d 20  | \ result byte. |
000048a0  20 33 32 30 20 5d 0d 20  20 33 33 30 20 4e 45 58  | 320 ].  330 NEX|
000048b0  54 0d 20 20 33 34 30 20  50 52 49 4e 54 27 27 22  |T.  340 PRINT''"|
000048c0  54 79 70 65 3a 20 43 41  4c 4c 20 26 22 3b 7e 6d  |Type: CALL &";~m|
000048d0  63 6f 64 65 3b 22 20 74  6f 20 73 61 76 65 20 31  |code;" to save 1|
000048e0  30 20 73 65 63 74 6f 72  73 22 27 0d 0d 0d 2d 2d  |0 sectors"'...--|
000048f0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
00004900  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 0d 4f 73  |-------------.Os|
00004910  77 6f 72 64 20 26 37 46  20 57 72 69 74 65 20 44  |word &7F Write D|
00004920  61 74 61 20 31 32 38 20  62 79 74 65 73 0d 2d 2d  |ata 128 bytes.--|
00004930  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
00004940  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 0d 0d 49  |-------------..I|
00004950  66 20 79 6f 75 20 6e 65  65 64 20 74 6f 20 77 72  |f you need to wr|
00004960  69 74 65 20 6a 75 73 74  20 6f 6e 65 20 73 65 63  |ite just one sec|
00004970  74 6f 72 20 6f 66 20 31  32 38 20 62 79 74 65 73  |tor of 128 bytes|
00004980  20 79 6f 75 20 63 61 6e  20 75 73 65 20 74 68 65  | you can use the|
00004990  20 4f 73 77 6f 72 64 0d  26 37 46 20 57 72 69 74  | Osword.&7F Writ|
000049a0  65 20 44 61 74 61 20 31  32 38 20 62 79 74 65 73  |e Data 128 bytes|
000049b0  20 63 6f 6d 6d 61 6e 64  2e 20 54 68 69 73 20 63  | command. This c|
000049c0  6f 6d 6d 61 6e 64 20 75  73 65 73 20 74 68 65 20  |ommand uses the |
000049d0  66 6f 6c 6c 6f 77 69 6e  67 0d 70 61 72 61 6d 65  |following.parame|
000049e0  74 65 72 20 62 6c 6f 63  6b 2e 0d 0d 50 61 72 61  |ter block...Para|
000049f0  6d 65 74 65 72 20 62 6c  6f 63 6b 20 26 30 30 20  |meter block &00 |
00004a00  20 20 20 20 20 20 3d 20  64 72 69 76 65 20 6e 75  |      = drive nu|
00004a10  6d 62 65 72 20 28 26 30  30 2d 26 30 33 20 6f 72  |mber (&00-&03 or|
00004a20  20 26 46 46 29 0d 50 61  72 61 6d 65 74 65 72 20  | &FF).Parameter |
00004a30  62 6c 6f 63 6b 20 26 30  31 20 2d 20 26 30 34 20  |block &01 - &04 |
00004a40  3d 20 62 75 66 66 65 72  20 61 64 64 72 65 73 73  |= buffer address|
00004a50  0d 50 61 72 61 6d 65 74  65 72 20 62 6c 6f 63 6b  |.Parameter block|
00004a60  20 26 30 35 20 20 20 20  20 20 20 3d 20 26 30 32  | &05       = &02|
00004a70  20 28 32 20 63 6f 6d 6d  61 6e 64 20 70 61 72 61  | (2 command para|
00004a80  6d 65 74 65 72 73 29 0d  50 61 72 61 6d 65 74 65  |meters).Paramete|
00004a90  72 20 62 6c 6f 63 6b 20  26 30 36 20 20 20 20 20  |r block &06     |
00004aa0  20 20 3d 20 26 34 41 20  28 77 72 69 74 65 20 64  |  = &4A (write d|
00004ab0  61 74 61 20 31 32 38 20  62 79 74 65 73 20 63 6f  |ata 128 bytes co|
00004ac0  6d 6d 61 6e 64 29 0d 50  61 72 61 6d 65 74 65 72  |mmand).Parameter|
00004ad0  20 62 6c 6f 63 6b 20 26  30 37 20 20 20 20 20 20  | block &07      |
00004ae0  20 3d 20 6c 6f 67 69 63  61 6c 20 74 72 61 63 6b  | = logical track|
00004af0  20 6e 75 6d 62 65 72 0d  50 61 72 61 6d 65 74 65  | number.Paramete|
00004b00  72 20 62 6c 6f 63 6b 20  26 30 38 20 20 20 20 20  |r block &08     |
00004b10  20 20 3d 20 6c 6f 67 69  63 61 6c 20 73 65 63 74  |  = logical sect|
00004b20  6f 72 20 6e 75 6d 62 65  72 0d 50 61 72 61 6d 65  |or number.Parame|
00004b30  74 65 72 20 62 6c 6f 63  6b 20 26 30 39 20 20 20  |ter block &09   |
00004b40  20 20 20 20 3d 20 72 65  73 75 6c 74 20 62 79 74  |    = result byt|
00004b50  65 0d 0d 0d 41 6c 74 68  6f 75 67 68 20 75 73 69  |e...Although usi|
00004b60  6e 67 20 74 68 69 73 20  63 6f 6d 6d 61 6e 64 20  |ng this command |
00004b70  73 61 76 65 73 20 79 6f  75 20 74 68 65 20 74 72  |saves you the tr|
00004b80  6f 75 62 6c 65 20 6f 66  20 63 61 6c 63 75 6c 61  |ouble of calcula|
00004b90  74 69 6e 67 20 74 68 65  0d 73 65 63 74 6f 72 20  |ting the.sector |
00004ba0  73 69 7a 65 2f 6e 75 6d  62 65 72 20 6f 66 20 73  |size/number of s|
00004bb0  65 63 74 6f 72 73 20 70  61 72 61 6d 65 74 65 72  |ectors parameter|
00004bc0  2c 20 49 20 63 61 6e 6e  6f 74 20 72 65 63 6f 6d  |, I cannot recom|
00004bd0  6d 65 6e 64 20 75 73 69  6e 67 20 69 74 20 77 68  |mend using it wh|
00004be0  65 6e 0d 74 68 65 20 6d  75 6c 74 69 2d 73 65 63  |en.the multi-sec|
00004bf0  74 6f 72 20 63 6f 6d 6d  61 6e 64 20 69 73 20 73  |tor command is s|
00004c00  6f 20 6d 75 63 68 20 6d  6f 72 65 20 76 65 72 73  |o much more vers|
00004c10  69 74 69 6c 65 2e 0d 0d  0d 2d 2d 2d 2d 2d 2d 2d  |itile....-------|
00004c20  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00004c40  2d 2d 2d 0d 4f 73 77 6f  72 64 20 26 37 46 20 57  |---.Osword &7F W|
00004c50  72 69 74 65 20 44 65 6c  65 74 65 64 20 44 61 74  |rite Deleted Dat|
00004c60  61 20 6d 75 6c 74 69 2d  73 65 63 74 6f 72 0d 2d  |a multi-sector.-|
00004c70  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00004c90  2d 2d 2d 2d 2d 2d 2d 2d  2d 0d 0d 4f 73 77 6f 72  |---------..Oswor|
00004ca0  64 20 26 37 46 20 57 72  69 74 65 20 44 65 6c 65  |d &7F Write Dele|
00004cb0  74 65 64 20 44 61 74 61  20 6d 75 6c 74 69 2d 73  |ted Data multi-s|
00004cc0  65 63 74 6f 72 20 75 73  65 73 20 74 68 65 20 61  |ector uses the a|
00004cd0  70 70 72 6f 70 72 69 61  74 65 20 74 72 61 63 6b  |ppropriate track|
00004ce0  0d 72 65 67 69 73 74 65  72 20 61 73 20 61 20 62  |.register as a b|
00004cf0  61 73 65 20 66 72 6f 6d  20 77 68 69 63 68 20 74  |ase from which t|
00004d00  6f 20 73 65 65 6b 20 74  68 65 20 74 72 61 63 6b  |o seek the track|
00004d10  20 61 6e 64 20 73 65 63  74 6f 72 20 73 70 65 63  | and sector spec|
00004d20  69 66 69 65 64 20 69 6e  0d 74 68 65 20 70 61 72  |ified in.the par|
00004d30  61 6d 65 74 65 72 20 62  6c 6f 63 6b 2e 20 49 66  |ameter block. If|
00004d40  20 69 74 20 63 61 6e 6e  6f 74 20 66 69 6e 64 20  | it cannot find |
00004d50  74 68 65 20 74 72 61 63  6b 20 61 6e 64 20 73 65  |the track and se|
00004d60  63 74 6f 72 20 69 74 20  72 65 74 75 72 6e 73 20  |ctor it returns |
00004d70  74 68 65 0d 73 65 63 74  6f 72 20 6e 6f 74 20 66  |the.sector not f|
00004d80  6f 75 6e 64 20 65 72 72  6f 72 20 28 26 31 38 29  |ound error (&18)|
00004d90  20 69 6e 20 74 68 65 20  72 65 73 75 6c 74 20 62  | in the result b|
00004da0  79 74 65 2e 20 49 66 20  69 74 20 66 69 6e 64 73  |yte. If it finds|
00004db0  20 74 68 65 20 72 65 71  75 69 72 65 64 0d 74 72  | the required.tr|
00004dc0  61 63 6b 20 61 6e 64 20  73 65 63 74 6f 72 20 69  |ack and sector i|
00004dd0  74 20 77 72 69 74 65 73  20 61 20 64 65 6c 65 74  |t writes a delet|
00004de0  65 64 20 64 61 74 61 20  6d 61 72 6b 20 61 74 20  |ed data mark at |
00004df0  74 68 65 20 73 74 61 72  74 20 6f 66 20 74 68 65  |the start of the|
00004e00  20 64 61 74 61 0d 66 69  65 6c 64 20 61 6e 64 20  | data.field and |
00004e10  63 6f 70 69 65 73 20 74  68 65 20 66 69 72 73 74  |copies the first|
00004e20  20 73 65 63 74 6f 72 20  6f 66 20 64 61 74 61 20  | sector of data |
00004e30  66 72 6f 6d 20 74 68 65  20 62 75 66 66 65 72 20  |from the buffer |
00004e40  74 6f 20 74 68 65 20 73  70 65 63 69 66 69 65 64  |to the specified|
00004e50  0d 73 65 63 74 6f 72 2e  20 49 66 20 6d 6f 72 65  |.sector. If more|
00004e60  20 74 68 61 6e 20 6f 6e  65 20 73 65 63 74 6f 72  | than one sector|
00004e70  20 69 73 20 73 70 65 63  69 66 69 65 64 20 74 68  | is specified th|
00004e80  69 73 20 70 72 6f 63 65  64 75 72 65 20 72 65 70  |is procedure rep|
00004e90  65 61 74 73 20 75 6e 74  69 6c 0d 65 69 74 68 65  |eats until.eithe|
00004ea0  72 20 61 6c 6c 20 74 68  65 20 73 65 63 74 6f 72  |r all the sector|
00004eb0  73 20 68 61 76 65 20 62  65 65 6e 20 77 72 69 74  |s have been writ|
00004ec0  74 65 6e 20 6f 72 20 61  6e 20 65 72 72 6f 72 20  |ten or an error |
00004ed0  6f 63 63 75 72 73 2e 0d  0d 54 68 65 20 66 6f 6c  |occurs...The fol|
00004ee0  6c 6f 77 69 6e 67 20 70  61 72 61 6d 65 74 65 72  |lowing parameter|
00004ef0  20 62 6c 6f 63 6b 20 69  73 20 75 73 65 64 20 77  | block is used w|
00004f00  69 74 68 20 74 68 65 20  4f 73 77 6f 72 64 20 26  |ith the Osword &|
00004f10  37 46 20 57 72 69 74 65  20 44 65 6c 65 74 65 64  |7F Write Deleted|
00004f20  0d 44 61 74 61 20 6d 75  6c 74 69 2d 73 65 63 74  |.Data multi-sect|
00004f30  6f 72 20 63 6f 6d 6d 61  6e 64 2e 0d 0d 50 61 72  |or command...Par|
00004f40  61 6d 65 74 65 72 20 62  6c 6f 63 6b 20 26 30 30  |ameter block &00|
00004f50  20 20 20 20 20 20 20 3d  20 64 72 69 76 65 20 6e  |       = drive n|
00004f60  75 6d 62 65 72 20 28 26  30 30 2d 26 30 33 20 6f  |umber (&00-&03 o|
00004f70  72 20 26 46 46 29 0d 50  61 72 61 6d 65 74 65 72  |r &FF).Parameter|
00004f80  20 62 6c 6f 63 6b 20 26  30 31 20 2d 20 26 30 34  | block &01 - &04|
00004f90  20 3d 20 62 75 66 66 65  72 20 61 64 64 72 65 73  | = buffer addres|
00004fa0  73 0d 50 61 72 61 6d 65  74 65 72 20 62 6c 6f 63  |s.Parameter bloc|
00004fb0  6b 20 26 30 35 20 20 20  20 20 20 20 3d 20 26 30  |k &05       = &0|
00004fc0  33 20 28 33 20 63 6f 6d  6d 61 6e 64 20 70 61 72  |3 (3 command par|
00004fd0  61 6d 65 74 65 72 73 29  0d 50 61 72 61 6d 65 74  |ameters).Paramet|
00004fe0  65 72 20 62 6c 6f 63 6b  20 26 30 36 20 20 20 20  |er block &06    |
00004ff0  20 20 20 3d 20 26 34 46  20 28 77 72 69 74 65 20  |   = &4F (write |
00005000  64 65 6c 65 74 65 64 20  64 61 74 61 20 6d 75 6c  |deleted data mul|
00005010  74 69 2d 73 65 63 74 6f  72 20 63 6f 6d 6d 61 6e  |ti-sector comman|
00005020  64 29 0d 50 61 72 61 6d  65 74 65 72 20 62 6c 6f  |d).Parameter blo|
00005030  63 6b 20 26 30 37 20 20  20 20 20 20 20 3d 20 6c  |ck &07       = l|
00005040  6f 67 69 63 61 6c 20 74  72 61 63 6b 20 6e 75 6d  |ogical track num|
00005050  62 65 72 0d 50 61 72 61  6d 65 74 65 72 20 62 6c  |ber.Parameter bl|
00005060  6f 63 6b 20 26 30 38 20  20 20 20 20 20 20 3d 20  |ock &08       = |
00005070  6c 6f 67 69 63 61 6c 20  73 65 63 74 6f 72 20 6e  |logical sector n|
00005080  75 6d 62 65 72 0d 50 61  72 61 6d 65 74 65 72 20  |umber.Parameter |
00005090  62 6c 6f 63 6b 20 26 30  39 20 20 20 20 20 20 20  |block &09       |
000050a0  3d 20 73 65 63 74 6f 72  20 73 69 7a 65 2f 6e 75  |= sector size/nu|
000050b0  6d 62 65 72 20 6f 66 20  73 65 63 74 6f 72 73 0d  |mber of sectors.|
000050c0  50 61 72 61 6d 65 74 65  72 20 62 6c 6f 63 6b 20  |Parameter block |
000050d0  26 30 41 20 20 20 20 20  20 20 3d 20 72 65 73 75  |&0A       = resu|
000050e0  6c 74 20 62 79 74 65 0d  0d 0d 54 68 65 20 6d 6f  |lt byte...The mo|
000050f0  73 74 20 73 69 67 6e 69  66 69 63 61 6e 74 20 33  |st significant 3|
00005100  20 62 69 74 73 20 6f 66  20 74 68 65 20 6e 75 6d  | bits of the num|
00005110  62 65 72 20 73 74 6f 72  65 64 20 69 6e 20 70 61  |ber stored in pa|
00005120  72 61 6d 65 74 65 72 20  62 6c 6f 63 6b 20 26 30  |rameter block &0|
00005130  39 0d 63 6f 6e 74 61 69  6e 20 74 68 65 20 73 65  |9.contain the se|
00005140  63 74 6f 72 20 73 69 7a  65 20 63 6f 64 65 20 28  |ctor size code (|
00005150  63 6f 6c 75 6d 6e 20 32  20 6f 66 20 66 69 67 75  |column 2 of figu|
00005160  72 65 20 33 29 2e 20 54  68 65 20 6c 65 61 73 74  |re 3). The least|
00005170  20 73 69 67 6e 69 66 69  63 61 6e 74 0d 35 20 62  | significant.5 b|
00005180  69 74 73 20 63 6f 6e 74  61 69 6e 20 74 68 65 20  |its contain the |
00005190  6e 75 6d 62 65 72 20 6f  66 20 73 65 63 74 6f 72  |number of sector|
000051a0  73 20 70 65 72 20 74 72  61 63 6b 2e 20 54 6f 20  |s per track. To |
000051b0  63 61 6c 63 75 6c 61 74  65 20 74 68 65 20 6e 75  |calculate the nu|
000051c0  6d 62 65 72 20 74 6f 0d  62 65 20 73 74 6f 72 65  |mber to.be store|
000051d0  64 20 69 6e 20 70 61 72  61 6d 65 74 65 72 20 62  |d in parameter b|
000051e0  6c 6f 63 6b 20 26 30 39  20 6d 75 6c 74 69 70 6c  |lock &09 multipl|
000051f0  79 20 74 68 65 20 73 69  7a 65 20 63 6f 64 65 20  |y the size code |
00005200  62 79 20 33 32 20 61 6e  64 20 61 64 64 20 74 68  |by 32 and add th|
00005210  65 0d 6e 75 6d 62 65 72  20 6f 66 20 73 65 63 74  |e.number of sect|
00005220  6f 72 73 2e 20 46 6f 72  20 65 78 61 6d 70 6c 65  |ors. For example|
00005230  2c 20 69 66 20 79 6f 75  20 77 61 6e 74 20 74 6f  |, if you want to|
00005240  20 76 65 72 69 66 79 20  61 20 74 72 61 63 6b 20  | verify a track |
00005250  77 69 74 68 20 74 65 6e  0d 73 65 63 74 6f 72 73  |with ten.sectors|
00005260  20 6f 66 20 32 35 36 20  62 79 74 65 73 20 74 68  | of 256 bytes th|
00005270  65 6e 20 70 61 72 61 6d  65 74 65 72 20 62 6c 6f  |en parameter blo|
00005280  63 6b 20 26 30 39 20 77  69 6c 6c 20 63 6f 6e 74  |ck &09 will cont|
00005290  61 69 6e 20 31 2a 33 32  2b 31 30 20 3d 20 34 32  |ain 1*32+10 = 42|
000052a0  20 3d 0d 26 32 41 2e 0d  0d 54 68 65 20 70 72 6f  | =.&2A...The pro|
000052b0  67 72 61 6d 20 57 52 49  54 45 31 30 20 63 61 6e  |gram WRITE10 can|
000052c0  20 62 65 20 6d 6f 64 69  66 69 65 64 20 74 6f 20  | be modified to |
000052d0  64 65 6d 6f 6e 73 74 72  61 74 65 20 74 68 69 73  |demonstrate this|
000052e0  20 63 6f 6d 6d 61 6e 64  2e 20 41 6c 74 65 72 0d  | command. Alter.|
000052f0  6c 69 6e 65 20 32 36 30  20 66 72 6f 6d 20 45 51  |line 260 from EQ|
00005300  55 42 20 26 34 42 20 74  6f 20 45 51 55 42 20 26  |UB &4B to EQUB &|
00005310  34 46 2e 20 55 73 69 6e  67 20 64 65 6c 65 74 65  |4F. Using delete|
00005320  64 20 64 61 74 61 20 77  69 6c 6c 20 65 66 66 65  |d data will effe|
00005330  63 74 69 76 6c 79 0d 64  69 73 61 62 6c 65 20 74  |ctivly.disable t|
00005340  68 65 20 2a 42 41 43 4b  55 50 20 63 6f 6d 6d 61  |he *BACKUP comma|
00005350  6e 64 2e 20 44 6f 6e 27  74 20 66 6f 72 67 65 74  |nd. Don't forget|
00005360  20 74 68 61 74 20 74 68  69 73 20 70 72 6f 67 72  | that this progr|
00005370  61 6d 20 77 69 6c 6c 20  64 65 73 74 72 6f 79 0d  |am will destroy.|
00005380  61 6c 6c 20 74 68 65 20  64 61 74 61 20 73 74 6f  |all the data sto|
00005390  72 65 64 20 6f 6e 20 74  72 61 63 6b 20 26 30 31  |red on track &01|
000053a0  20 6f 66 20 74 68 65 20  64 69 73 63 20 69 74 20  | of the disc it |
000053b0  75 73 65 73 20 2d 20 79  6f 75 20 68 61 76 65 20  |uses - you have |
000053c0  62 65 65 6e 0d 77 61 72  6e 65 64 21 0d 0d 0d 2d  |been.warned!...-|
000053d0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
000053f0  2d 2d 2d 2d 2d 2d 0d 4f  73 77 6f 72 64 20 26 37  |------.Osword &7|
00005400  46 20 57 72 69 74 65 20  44 65 6c 65 74 65 64 20  |F Write Deleted |
00005410  44 61 74 61 20 31 32 38  20 62 79 74 65 73 0d 2d  |Data 128 bytes.-|
00005420  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00005440  2d 2d 2d 2d 2d 2d 0d 0d  49 66 20 79 6f 75 20 6e  |------..If you n|
00005450  65 65 64 20 74 6f 20 77  72 69 74 65 20 6a 75 73  |eed to write jus|
00005460  74 20 6f 6e 65 20 73 65  63 74 6f 72 20 6f 66 20  |t one sector of |
00005470  31 32 38 20 62 79 74 65  73 20 6f 66 20 64 65 6c  |128 bytes of del|
00005480  65 74 65 64 20 64 61 74  61 20 79 6f 75 20 63 61  |eted data you ca|
00005490  6e 0d 75 73 65 20 74 68  65 20 4f 73 77 6f 72 64  |n.use the Osword|
000054a0  20 26 37 46 20 57 72 69  74 65 20 44 65 6c 65 74  | &7F Write Delet|
000054b0  65 64 20 44 61 74 61 20  31 32 38 20 62 79 74 65  |ed Data 128 byte|
000054c0  73 20 63 6f 6d 6d 61 6e  64 2e 20 54 68 69 73 20  |s command. This |
000054d0  63 6f 6d 6d 61 6e 64 20  75 73 65 73 0d 74 68 65  |command uses.the|
000054e0  20 66 6f 6c 6c 6f 77 69  6e 67 20 70 61 72 61 6d  | following param|
000054f0  65 74 65 72 20 62 6c 6f  63 6b 2e 0d 0d 50 61 72  |eter block...Par|
00005500  61 6d 65 74 65 72 20 62  6c 6f 63 6b 20 26 30 30  |ameter block &00|
00005510  20 20 20 20 20 20 20 3d  20 64 72 69 76 65 20 6e  |       = drive n|
00005520  75 6d 62 65 72 20 28 26  30 30 2d 26 30 33 20 6f  |umber (&00-&03 o|
00005530  72 20 26 46 46 29 0d 50  61 72 61 6d 65 74 65 72  |r &FF).Parameter|
00005540  20 62 6c 6f 63 6b 20 26  30 31 20 2d 20 26 30 34  | block &01 - &04|
00005550  20 3d 20 62 75 66 66 65  72 20 61 64 64 72 65 73  | = buffer addres|
00005560  73 20 28 6e 6f 74 20 75  73 65 64 29 0d 50 61 72  |s (not used).Par|
00005570  61 6d 65 74 65 72 20 62  6c 6f 63 6b 20 26 30 35  |ameter block &05|
00005580  20 20 20 20 20 20 20 3d  20 26 30 32 20 28 32 20  |       = &02 (2 |
00005590  63 6f 6d 6d 61 6e 64 20  70 61 72 61 6d 65 74 65  |command paramete|
000055a0  72 73 29 0d 50 61 72 61  6d 65 74 65 72 20 62 6c  |rs).Parameter bl|
000055b0  6f 63 6b 20 26 30 36 20  20 20 20 20 20 20 3d 20  |ock &06       = |
000055c0  26 34 46 20 28 77 72 69  74 65 20 64 65 6c 65 74  |&4F (write delet|
000055d0  65 64 20 64 61 74 61 20  31 32 38 20 62 79 74 65  |ed data 128 byte|
000055e0  73 20 63 6f 6d 6d 61 6e  64 29 0d 50 61 72 61 6d  |s command).Param|
000055f0  65 74 65 72 20 62 6c 6f  63 6b 20 26 30 37 20 20  |eter block &07  |
00005600  20 20 20 20 20 3d 20 6c  6f 67 69 63 61 6c 20 74  |     = logical t|
00005610  72 61 63 6b 20 6e 75 6d  62 65 72 0d 50 61 72 61  |rack number.Para|
00005620  6d 65 74 65 72 20 62 6c  6f 63 6b 20 26 30 38 20  |meter block &08 |
00005630  20 20 20 20 20 20 3d 20  6c 6f 67 69 63 61 6c 20  |      = logical |
00005640  73 65 63 74 6f 72 20 6e  75 6d 62 65 72 0d 50 61  |sector number.Pa|
00005650  72 61 6d 65 74 65 72 20  62 6c 6f 63 6b 20 26 30  |rameter block &0|
00005660  39 20 20 20 20 20 20 20  3d 20 72 65 73 75 6c 74  |9       = result|
00005670  20 62 79 74 65 0d 0d 0d  41 6c 74 68 6f 75 67 68  | byte...Although|
00005680  20 75 73 69 6e 67 20 74  68 69 73 20 63 6f 6d 6d  | using this comm|
00005690  61 6e 64 20 73 61 76 65  73 20 79 6f 75 20 74 68  |and saves you th|
000056a0  65 20 74 72 6f 75 62 6c  65 20 6f 66 20 63 61 6c  |e trouble of cal|
000056b0  63 75 6c 61 74 69 6e 67  20 74 68 65 0d 73 65 63  |culating the.sec|
000056c0  74 6f 72 20 73 69 7a 65  2f 6e 75 6d 62 65 72 20  |tor size/number |
000056d0  6f 66 20 73 65 63 74 6f  72 73 20 70 61 72 61 6d  |of sectors param|
000056e0  65 74 65 72 2c 20 49 20  63 61 6e 6e 6f 74 20 72  |eter, I cannot r|
000056f0  65 63 6f 6d 6d 65 6e 64  20 75 73 69 6e 67 20 69  |ecommend using i|
00005700  74 0d 77 68 65 6e 20 74  68 65 20 6d 75 6c 74 69  |t.when the multi|
00005710  2d 73 65 63 74 6f 72 20  63 6f 6d 6d 61 6e 64 20  |-sector command |
00005720  69 73 20 73 6f 20 6d 75  63 68 20 6d 6f 72 65 20  |is so much more |
00005730  76 65 72 73 69 74 69 6c  65 2e 0d 0d 0d 2d 2d 2d  |versitile....---|
00005740  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00005760  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 0d  |---------------.|
00005770  4f 73 77 6f 72 64 20 26  37 46 20 52 65 61 64 20  |Osword &7F Read |
00005780  44 61 74 61 20 61 6e 64  20 44 65 6c 65 74 65 64  |Data and Deleted|
00005790  20 44 61 74 61 20 6d 75  6c 74 69 2d 73 65 63 74  | Data multi-sect|
000057a0  6f 72 0d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |or.-------------|
000057b0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
000057d0  2d 2d 2d 2d 2d 0d 0d 4f  73 77 6f 72 64 20 26 37  |-----..Osword &7|
000057e0  46 20 52 65 61 64 20 44  61 74 61 20 61 6e 64 20  |F Read Data and |
000057f0  44 65 6c 65 74 65 64 20  44 61 74 61 20 6d 75 6c  |Deleted Data mul|
00005800  74 69 2d 73 65 63 74 6f  72 20 75 73 65 73 20 74  |ti-sector uses t|
00005810  68 65 20 61 70 70 72 6f  70 72 69 61 74 65 0d 74  |he appropriate.t|
00005820  72 61 63 6b 20 72 65 67  69 73 74 65 72 20 61 73  |rack register as|
00005830  20 61 20 62 61 73 65 20  66 72 6f 6d 20 77 68 69  | a base from whi|
00005840  63 68 20 74 6f 20 73 65  65 6b 20 74 68 65 20 74  |ch to seek the t|
00005850  72 61 63 6b 20 61 6e 64  20 73 65 63 74 6f 72 20  |rack and sector |
00005860  73 70 65 63 69 66 69 65  64 0d 69 6e 20 74 68 65  |specified.in the|
00005870  20 70 61 72 61 6d 65 74  65 72 20 62 6c 6f 63 6b  | parameter block|
00005880  2e 20 49 66 20 69 74 20  63 61 6e 6e 6f 74 20 66  |. If it cannot f|
00005890  69 6e 64 20 74 68 65 20  74 72 61 63 6b 20 61 6e  |ind the track an|
000058a0  64 20 73 65 63 74 6f 72  20 69 74 20 72 65 74 75  |d sector it retu|
000058b0  72 6e 73 0d 74 68 65 20  73 65 63 74 6f 72 20 6e  |rns.the sector n|
000058c0  6f 74 20 66 6f 75 6e 64  20 65 72 72 6f 72 20 28  |ot found error (|
000058d0  26 31 38 29 20 69 6e 20  74 68 65 20 72 65 73 75  |&18) in the resu|
000058e0  6c 74 20 62 79 74 65 2e  20 49 66 20 69 74 20 66  |lt byte. If it f|
000058f0  69 6e 64 73 20 74 68 65  0d 72 65 71 75 69 72 65  |inds the.require|
00005900  64 20 74 72 61 63 6b 20  61 6e 64 20 73 65 63 74  |d track and sect|
00005910  6f 72 20 69 74 20 63 6f  70 69 65 73 20 74 68 65  |or it copies the|
00005920  20 66 69 72 73 74 20 73  65 63 74 6f 72 20 6f 66  | first sector of|
00005930  20 64 61 74 61 20 69 6e  74 6f 20 74 68 65 0d 62  | data into the.b|
00005940  75 66 66 65 72 20 73 70  65 63 69 66 69 65 64 20  |uffer specified |
00005950  69 6e 20 74 68 65 20 70  61 72 61 6d 65 74 65 72  |in the parameter|
00005960  20 62 6c 6f 63 6b 2e 20  49 66 20 6d 6f 72 65 20  | block. If more |
00005970  74 68 61 6e 20 6f 6e 65  20 73 65 63 74 6f 72 20  |than one sector |
00005980  69 73 0d 73 70 65 63 69  66 69 65 64 20 74 68 69  |is.specified thi|
00005990  73 20 70 72 6f 63 65 64  75 72 65 20 72 65 70 65  |s procedure repe|
000059a0  61 74 73 20 75 6e 74 69  6c 20 65 69 74 68 65 72  |ats until either|
000059b0  20 61 6c 6c 20 74 68 65  20 73 65 63 74 6f 72 73  | all the sectors|
000059c0  20 68 61 76 65 20 62 65  65 6e 0d 72 65 61 64 20  | have been.read |
000059d0  6f 72 20 61 6e 20 65 72  72 6f 72 20 6f 63 63 75  |or an error occu|
000059e0  72 73 2e 0d 0d 54 68 65  20 66 6f 6c 6c 6f 77 69  |rs...The followi|
000059f0  6e 67 20 70 61 72 61 6d  65 74 65 72 20 62 6c 6f  |ng parameter blo|
00005a00  63 6b 20 69 73 20 75 73  65 64 20 77 69 74 68 20  |ck is used with |
00005a10  74 68 65 20 4f 73 77 6f  72 64 20 26 37 46 20 57  |the Osword &7F W|
00005a20  72 69 74 65 20 44 65 6c  65 74 65 64 0d 44 61 74  |rite Deleted.Dat|
00005a30  61 20 6d 75 6c 74 69 2d  73 65 63 74 6f 72 20 63  |a multi-sector c|
00005a40  6f 6d 6d 61 6e 64 2e 0d  0d 50 61 72 61 6d 65 74  |ommand...Paramet|
00005a50  65 72 20 62 6c 6f 63 6b  20 26 30 30 20 20 20 20  |er block &00    |
00005a60  20 20 20 3d 20 64 72 69  76 65 20 6e 75 6d 62 65  |   = drive numbe|
00005a70  72 20 28 26 30 30 2d 26  30 33 20 6f 72 20 26 46  |r (&00-&03 or &F|
00005a80  46 29 0d 50 61 72 61 6d  65 74 65 72 20 62 6c 6f  |F).Parameter blo|
00005a90  63 6b 20 26 30 31 20 2d  20 26 30 34 20 3d 20 62  |ck &01 - &04 = b|
00005aa0  75 66 66 65 72 20 61 64  64 72 65 73 73 0d 50 61  |uffer address.Pa|
00005ab0  72 61 6d 65 74 65 72 20  62 6c 6f 63 6b 20 26 30  |rameter block &0|
00005ac0  35 20 20 20 20 20 20 20  3d 20 26 30 33 20 28 33  |5       = &03 (3|
00005ad0  20 63 6f 6d 6d 61 6e 64  20 70 61 72 61 6d 65 74  | command paramet|
00005ae0  65 72 73 29 0d 50 61 72  61 6d 65 74 65 72 20 62  |ers).Parameter b|
00005af0  6c 6f 63 6b 20 26 30 36  20 20 20 20 20 20 20 3d  |lock &06       =|
00005b00  20 26 35 37 20 28 72 65  61 64 20 64 61 74 61 20  | &57 (read data |
00005b10  61 6e 64 20 64 65 6c 65  74 65 64 20 64 61 74 61  |and deleted data|
00005b20  20 6d 75 6c 74 69 2d 73  65 63 74 6f 72 29 0d 50  | multi-sector).P|
00005b30  61 72 61 6d 65 74 65 72  20 62 6c 6f 63 6b 20 26  |arameter block &|
00005b40  30 37 20 20 20 20 20 20  20 3d 20 6c 6f 67 69 63  |07       = logic|
00005b50  61 6c 20 74 72 61 63 6b  20 6e 75 6d 62 65 72 0d  |al track number.|
00005b60  50 61 72 61 6d 65 74 65  72 20 62 6c 6f 63 6b 20  |Parameter block |
00005b70  26 30 38 20 20 20 20 20  20 20 3d 20 6c 6f 67 69  |&08       = logi|
00005b80  63 61 6c 20 73 65 63 74  6f 72 20 6e 75 6d 62 65  |cal sector numbe|
00005b90  72 0d 50 61 72 61 6d 65  74 65 72 20 62 6c 6f 63  |r.Parameter bloc|
00005ba0  6b 20 26 30 39 20 20 20  20 20 20 20 3d 20 73 65  |k &09       = se|
00005bb0  63 74 6f 72 20 73 69 7a  65 2f 6e 75 6d 62 65 72  |ctor size/number|
00005bc0  20 6f 66 20 73 65 63 74  6f 72 73 0d 50 61 72 61  | of sectors.Para|
00005bd0  6d 65 74 65 72 20 62 6c  6f 63 6b 20 26 30 41 20  |meter block &0A |
00005be0  20 20 20 20 20 20 3d 20  72 65 73 75 6c 74 20 62  |      = result b|
00005bf0  79 74 65 0d 0d 0d 54 68  65 20 6d 6f 73 74 20 73  |yte...The most s|
00005c00  69 67 6e 69 66 69 63 61  6e 74 20 33 20 62 69 74  |ignificant 3 bit|
00005c10  73 20 6f 66 20 74 68 65  20 6e 75 6d 62 65 72 20  |s of the number |
00005c20  73 74 6f 72 65 64 20 69  6e 20 70 61 72 61 6d 65  |stored in parame|
00005c30  74 65 72 20 62 6c 6f 63  6b 20 26 30 39 0d 63 6f  |ter block &09.co|
00005c40  6e 74 61 69 6e 20 74 68  65 20 73 65 63 74 6f 72  |ntain the sector|
00005c50  20 73 69 7a 65 20 63 6f  64 65 20 28 63 6f 6c 75  | size code (colu|
00005c60  6d 6e 20 32 20 6f 66 20  66 69 67 75 72 65 20 33  |mn 2 of figure 3|
00005c70  29 2e 20 54 68 65 20 6c  65 61 73 74 20 73 69 67  |). The least sig|
00005c80  6e 69 66 69 63 61 6e 74  0d 35 20 62 69 74 73 20  |nificant.5 bits |
00005c90  63 6f 6e 74 61 69 6e 20  74 68 65 20 6e 75 6d 62  |contain the numb|
00005ca0  65 72 20 6f 66 20 73 65  63 74 6f 72 73 20 70 65  |er of sectors pe|
00005cb0  72 20 74 72 61 63 6b 2e  20 54 6f 20 63 61 6c 63  |r track. To calc|
00005cc0  75 6c 61 74 65 20 74 68  65 20 6e 75 6d 62 65 72  |ulate the number|
00005cd0  20 74 6f 0d 62 65 20 73  74 6f 72 65 64 20 69 6e  | to.be stored in|
00005ce0  20 70 61 72 61 6d 65 74  65 72 20 62 6c 6f 63 6b  | parameter block|
00005cf0  20 26 30 39 20 6d 75 6c  74 69 70 6c 79 20 74 68  | &09 multiply th|
00005d00  65 20 73 69 7a 65 20 63  6f 64 65 20 62 79 20 33  |e size code by 3|
00005d10  32 20 61 6e 64 20 61 64  64 20 74 68 65 0d 6e 75  |2 and add the.nu|
00005d20  6d 62 65 72 20 6f 66 20  73 65 63 74 6f 72 73 2e  |mber of sectors.|
00005d30  20 46 6f 72 20 65 78 61  6d 70 6c 65 2c 20 69 66  | For example, if|
00005d40  20 79 6f 75 20 77 61 6e  74 20 74 6f 20 76 65 72  | you want to ver|
00005d50  69 66 79 20 61 20 74 72  61 63 6b 20 77 69 74 68  |ify a track with|
00005d60  20 74 65 6e 0d 73 65 63  74 6f 72 73 20 6f 66 20  | ten.sectors of |
00005d70  32 35 36 20 62 79 74 65  73 20 74 68 65 6e 20 70  |256 bytes then p|
00005d80  61 72 61 6d 65 74 65 72  20 62 6c 6f 63 6b 20 26  |arameter block &|
00005d90  30 39 20 77 69 6c 6c 20  63 6f 6e 74 61 69 6e 20  |09 will contain |
00005da0  31 2a 33 32 2b 31 30 20  3d 20 34 32 20 3d 0d 26  |1*32+10 = 42 =.&|
00005db0  32 41 2e 0d 0d 54 68 65  20 70 72 6f 67 72 61 6d  |2A...The program|
00005dc0  20 52 45 41 44 31 30 20  63 61 6e 20 62 65 20 75  | READ10 can be u|
00005dd0  73 65 64 20 74 6f 20 64  65 6d 6f 6e 73 74 72 61  |sed to demonstra|
00005de0  74 65 20 74 68 69 73 20  63 6f 6d 6d 61 6e 64 2e  |te this command.|
00005df0  20 54 68 69 73 20 70 72  6f 67 72 61 6d 0d 72 65  | This program.re|
00005e00  61 64 73 20 74 68 65 20  64 61 74 61 20 77 72 69  |ads the data wri|
00005e10  74 74 65 6e 20 6f 6e 74  6f 20 61 20 64 69 73 63  |tten onto a disc|
00005e20  20 62 79 20 74 68 65 20  70 72 6f 67 72 61 6d 20  | by the program |
00005e30  57 52 49 54 45 31 30 2c  20 77 68 69 63 68 20 77  |WRITE10, which w|
00005e40  61 73 20 75 73 65 64 0d  74 6f 20 69 6c 6c 75 73  |as used.to illus|
00005e50  74 72 61 74 65 20 74 68  65 20 4f 73 77 6f 72 64  |trate the Osword|
00005e60  20 26 37 46 20 57 72 69  74 65 20 44 61 74 61 20  | &7F Write Data |
00005e70  6d 75 6c 74 69 2d 73 65  63 74 6f 72 20 63 6f 6d  |multi-sector com|
00005e80  6d 61 6e 64 2e 0d 0d 52  45 41 44 31 30 20 75 73  |mand...READ10 us|
00005e90  65 73 20 61 6e 20 6e 6f  72 6d 61 6c 6c 79 20 66  |es an normally f|
00005ea0  6f 72 6d 61 74 74 65 64  20 44 46 53 20 64 69 73  |ormatted DFS dis|
00005eb0  63 20 61 6e 64 20 72 65  61 64 73 20 32 2e 35 6b  |c and reads 2.5k|
00005ec0  20 6f 66 20 64 61 74 61  20 66 72 6f 6d 0d 74 72  | of data from.tr|
00005ed0  61 63 6b 20 26 30 31 2e  20 54 68 65 20 62 75 66  |ack &01. The buf|
00005ee0  66 65 72 20 73 74 61 72  74 73 20 61 74 20 50 41  |fer starts at PA|
00005ef0  47 45 20 28 6c 69 6e 65  20 32 34 30 29 20 61 6e  |GE (line 240) an|
00005f00  64 20 73 6f 20 74 68 65  20 70 72 6f 67 72 61 6d  |d so the program|
00005f10  20 63 6f 75 6c 64 0d 62  65 20 75 73 65 64 20 74  | could.be used t|
00005f20  6f 20 72 65 61 64 20 61  20 73 6d 61 6c 6c 20 42  |o read a small B|
00005f30  41 53 49 43 20 70 72 6f  67 72 61 6d 20 66 72 6f  |ASIC program fro|
00005f40  6d 20 61 20 64 69 73 63  2e 20 54 68 65 20 70 72  |m a disc. The pr|
00005f50  6f 67 72 61 6d 73 20 57  52 49 54 45 31 30 2c 0d  |ograms WRITE10,.|
00005f60  77 69 74 68 20 74 68 65  20 4f 73 77 6f 72 64 20  |with the Osword |
00005f70  26 37 46 20 77 72 69 74  65 20 64 65 6c 65 74 65  |&7F write delete|
00005f80  64 20 64 61 74 61 20 63  6f 6d 6d 61 6e 64 2c 20  |d data command, |
00005f90  61 6e 64 20 52 45 41 44  31 30 20 63 6f 75 6c 64  |and READ10 could|
00005fa0  20 62 65 20 75 73 65 64  0d 74 6f 20 63 72 65 61  | be used.to crea|
00005fb0  74 65 20 61 20 63 6f 70  79 2d 70 72 6f 74 65 63  |te a copy-protec|
00005fc0  74 65 64 20 64 69 73 63  2e 20 49 20 77 69 6c 6c  |ted disc. I will|
00005fd0  20 72 65 74 75 72 6e 20  74 6f 20 63 6f 70 79 2d  | return to copy-|
00005fe0  70 72 6f 74 65 63 74 69  6f 6e 20 69 6e 20 6c 61  |protection in la|
00005ff0  74 65 72 0d 6d 6f 64 75  6c 65 73 20 6f 66 20 74  |ter.modules of t|
00006000  68 69 73 20 73 65 72 69  65 73 2e 0d 0d 0d 20 20  |his series....  |
00006010  20 31 30 20 52 45 4d 3a  20 52 45 41 44 31 30 0d  | 10 REM: READ10.|
00006020  20 20 20 32 30 20 6d 63  6f 64 65 20 3d 20 26 30  |   20 mcode = &0|
00006030  41 30 30 0d 20 20 20 33  30 20 6f 73 77 6f 72 64  |A00.   30 osword|
00006040  3d 26 46 46 46 31 0d 20  20 20 34 30 20 70 61 67  |=&FFF1.   40 pag|
00006050  65 20 3d 20 50 41 47 45  0d 20 20 20 35 30 20 46  |e = PAGE.   50 F|
00006060  4f 52 70 61 73 73 3d 30  20 54 4f 20 32 20 53 54  |ORpass=0 TO 2 ST|
00006070  45 50 20 32 0d 20 20 20  36 30 20 50 25 3d 6d 63  |EP 2.   60 P%=mc|
00006080  6f 64 65 0d 20 20 20 37  30 20 5b 20 20 20 20 20  |ode.   70 [     |
00006090  20 20 4f 50 54 20 70 61  73 73 0d 20 20 20 38 30  |  OPT pass.   80|
000060a0  20 20 20 20 20 20 20 20  20 4c 44 41 20 23 26 37  |         LDA #&7|
000060b0  46 0d 20 20 20 39 30 20  20 20 20 20 20 20 20 20  |F.   90         |
000060c0  4c 44 58 20 23 62 6c 6f  63 6b 20 4d 4f 44 20 32  |LDX #block MOD 2|
000060d0  35 36 0d 20 20 31 30 30  20 20 20 20 20 20 20 20  |56.  100        |
000060e0  20 4c 44 59 20 23 62 6c  6f 63 6b 20 44 49 56 20  | LDY #block DIV |
000060f0  32 35 36 0d 20 20 31 31  30 20 20 20 20 20 20 20  |256.  110       |
00006100  20 20 4a 53 52 20 6f 73  77 6f 72 64 0d 20 20 31  |  JSR osword.  1|
00006110  32 30 20 20 20 20 20 20  20 20 20 4c 44 41 20 72  |20         LDA r|
00006120  65 73 75 6c 74 0d 20 20  31 33 30 20 20 20 20 20  |esult.  130     |
00006130  20 20 20 20 42 45 51 20  6f 6b 0d 20 20 31 34 30  |    BEQ ok.  140|
00006140  20 20 20 20 20 20 20 20  20 42 52 4b 0d 20 20 31  |         BRK.  1|
00006150  35 30 20 20 20 20 20 20  20 20 20 42 52 4b 0d 20  |50         BRK. |
00006160  20 31 36 30 20 20 20 20  20 20 20 20 20 45 51 55  | 160         EQU|
00006170  53 20 22 52 65 61 64 20  65 72 72 6f 72 22 0d 20  |S "Read error". |
00006180  20 31 37 30 20 2e 6f 6b  0d 20 20 31 38 30 20 20  | 170 .ok.  180  |
00006190  20 20 20 20 20 20 20 42  52 4b 0d 20 20 31 39 30  |       BRK.  190|
000061a0  20 20 20 20 20 20 20 20  20 45 51 55 53 20 22 52  |         EQUS "R|
000061b0  65 61 64 20 73 75 63 65  73 73 66 75 6c 22 0d 20  |ead sucessful". |
000061c0  20 32 30 30 20 20 20 20  20 20 20 20 20 42 52 4b  | 200         BRK|
000061d0  0d 20 20 32 31 30 20 20  20 20 20 20 20 20 20 42  |.  210         B|
000061e0  52 4b 0d 20 20 32 32 30  20 2e 62 6c 6f 63 6b 0d  |RK.  220 .block.|
000061f0  20 20 32 33 30 20 20 20  20 20 20 20 20 20 45 51  |  230         EQ|
00006200  55 42 20 26 46 46 20 20  20 20 20 20 5c 20 63 75  |UB &FF      \ cu|
00006210  72 72 65 6e 74 20 64 72  69 76 65 0d 20 20 32 34  |rrent drive.  24|
00006220  30 20 20 20 20 20 20 20  20 20 45 51 55 44 20 70  |0         EQUD p|
00006230  61 67 65 20 20 20 20 20  5c 20 73 74 61 72 74 20  |age     \ start |
00006240  61 74 20 50 41 47 45 0d  20 20 32 35 30 20 20 20  |at PAGE.  250   |
00006250  20 20 20 20 20 20 45 51  55 42 20 26 30 33 20 20  |      EQUB &03  |
00006260  20 20 20 20 5c 20 33 20  70 61 72 61 6d 65 74 65  |    \ 3 paramete|
00006270  72 73 0d 20 20 32 36 30  20 20 20 20 20 20 20 20  |rs.  260        |
00006280  20 45 51 55 42 20 26 35  37 20 20 20 20 20 20 5c  | EQUB &57      \|
00006290  20 72 65 61 64 20 64 61  74 61 20 61 6e 64 20 64  | read data and d|
000062a0  65 6c 65 74 65 64 20 64  61 74 61 0d 20 20 32 37  |eleted data.  27|
000062b0  30 20 20 20 20 20 20 20  20 20 45 51 55 42 20 26  |0         EQUB &|
000062c0  30 31 20 20 20 20 20 20  5c 20 6c 6f 67 69 63 61  |01      \ logica|
000062d0  6c 20 74 72 61 63 6b 20  31 0d 20 20 32 38 30 20  |l track 1.  280 |
000062e0  20 20 20 20 20 20 20 20  45 51 55 42 20 26 30 30  |        EQUB &00|
000062f0  20 20 20 20 20 20 5c 20  73 74 61 72 74 20 6c 6f  |      \ start lo|
00006300  67 69 63 61 6c 20 73 65  63 74 6f 72 20 30 0d 20  |gical sector 0. |
00006310  20 32 39 30 20 20 20 20  20 20 20 20 20 45 51 55  | 290         EQU|
00006320  42 20 26 32 41 20 20 20  20 20 20 5c 20 31 30 20  |B &2A      \ 10 |
00006330  73 65 63 74 6f 72 73 20  6f 66 20 32 35 36 20 62  |sectors of 256 b|
00006340  79 74 65 73 0d 20 20 33  30 30 20 2e 72 65 73 75  |ytes.  300 .resu|
00006350  6c 74 0d 20 20 33 31 30  20 20 20 20 20 20 20 20  |lt.  310        |
00006360  20 45 51 55 42 20 26 30  30 20 20 20 20 20 20 5c  | EQUB &00      \|
00006370  20 72 65 73 75 6c 74 20  62 79 74 65 0d 20 20 33  | result byte.  3|
00006380  32 30 20 5d 0d 20 20 33  33 30 20 4e 45 58 54 0d  |20 ].  330 NEXT.|
00006390  20 20 33 34 30 20 50 52  49 4e 54 27 27 22 54 79  |  340 PRINT''"Ty|
000063a0  70 65 3a 20 43 41 4c 4c  20 26 22 3b 7e 6d 63 6f  |pe: CALL &";~mco|
000063b0  64 65 3b 22 20 74 6f 20  72 65 61 64 20 31 30 20  |de;" to read 10 |
000063c0  73 65 63 74 6f 72 73 22  27 0d 0d 0d 2d 2d 2d 2d  |sectors"'...----|
000063d0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
000063f0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 0d 4f 73 77 6f  |-----------.Oswo|
00006400  72 64 20 26 37 46 20 52  65 61 64 20 44 61 74 61  |rd &7F Read Data|
00006410  20 61 6e 64 20 44 65 6c  65 74 65 64 20 44 61 74  | and Deleted Dat|
00006420  61 20 31 32 38 20 62 79  74 65 73 0d 2d 2d 2d 2d  |a 128 bytes.----|
00006430  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00006450  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 0d 0d 49 66 20  |-----------..If |
00006460  79 6f 75 20 6e 65 65 64  20 74 6f 20 72 65 61 64  |you need to read|
00006470  20 6a 75 73 74 20 6f 6e  65 20 73 65 63 74 6f 72  | just one sector|
00006480  20 6f 66 20 31 32 38 20  62 79 74 65 73 20 79 6f  | of 128 bytes yo|
00006490  75 20 63 61 6e 20 75 73  65 20 74 68 65 20 4f 73  |u can use the Os|
000064a0  77 6f 72 64 0d 26 37 46  20 52 65 61 64 20 44 61  |word.&7F Read Da|
000064b0  74 61 20 61 6e 64 20 44  65 6c 65 74 65 64 20 44  |ta and Deleted D|
000064c0  61 74 61 20 31 32 38 20  62 79 74 65 73 20 63 6f  |ata 128 bytes co|
000064d0  6d 6d 61 6e 64 2e 20 54  68 69 73 20 63 6f 6d 6d  |mmand. This comm|
000064e0  61 6e 64 20 75 73 65 73  20 74 68 65 0d 66 6f 6c  |and uses the.fol|
000064f0  6c 6f 77 69 6e 67 20 70  61 72 61 6d 65 74 65 72  |lowing parameter|
00006500  20 62 6c 6f 63 6b 2e 0d  0d 50 61 72 61 6d 65 74  | block...Paramet|
00006510  65 72 20 62 6c 6f 63 6b  20 26 30 30 20 20 20 20  |er block &00    |
00006520  20 20 20 3d 20 64 72 69  76 65 20 6e 75 6d 62 65  |   = drive numbe|
00006530  72 20 28 26 30 30 2d 26  30 33 20 6f 72 20 26 46  |r (&00-&03 or &F|
00006540  46 29 0d 50 61 72 61 6d  65 74 65 72 20 62 6c 6f  |F).Parameter blo|
00006550  63 6b 20 26 30 31 20 2d  20 26 30 34 20 3d 20 62  |ck &01 - &04 = b|
00006560  75 66 66 65 72 20 61 64  64 72 65 73 73 20 28 6e  |uffer address (n|
00006570  6f 74 20 75 73 65 64 29  0d 50 61 72 61 6d 65 74  |ot used).Paramet|
00006580  65 72 20 62 6c 6f 63 6b  20 26 30 35 20 20 20 20  |er block &05    |
00006590  20 20 20 3d 20 26 30 32  20 28 32 20 63 6f 6d 6d  |   = &02 (2 comm|
000065a0  61 6e 64 20 70 61 72 61  6d 65 74 65 72 73 29 0d  |and parameters).|
000065b0  50 61 72 61 6d 65 74 65  72 20 62 6c 6f 63 6b 20  |Parameter block |
000065c0  26 30 36 20 20 20 20 20  20 20 3d 20 26 35 36 20  |&06       = &56 |
000065d0  28 72 65 61 64 20 64 61  74 61 20 61 6e 64 20 64  |(read data and d|
000065e0  65 6c 65 74 65 64 20 64  61 74 61 20 31 32 38 20  |eleted data 128 |
000065f0  62 79 74 65 73 29 0d 50  61 72 61 6d 65 74 65 72  |bytes).Parameter|
00006600  20 62 6c 6f 63 6b 20 26  30 37 20 20 20 20 20 20  | block &07      |
00006610  20 3d 20 6c 6f 67 69 63  61 6c 20 74 72 61 63 6b  | = logical track|
00006620  20 6e 75 6d 62 65 72 0d  50 61 72 61 6d 65 74 65  | number.Paramete|
00006630  72 20 62 6c 6f 63 6b 20  26 30 38 20 20 20 20 20  |r block &08     |
00006640  20 20 3d 20 6c 6f 67 69  63 61 6c 20 73 65 63 74  |  = logical sect|
00006650  6f 72 20 6e 75 6d 62 65  72 0d 50 61 72 61 6d 65  |or number.Parame|
00006660  74 65 72 20 62 6c 6f 63  6b 20 26 30 39 20 20 20  |ter block &09   |
00006670  20 20 20 20 3d 20 72 65  73 75 6c 74 20 62 79 74  |    = result byt|
00006680  65 0d 0d 0d 41 6c 74 68  6f 75 67 68 20 75 73 69  |e...Although usi|
00006690  6e 67 20 74 68 69 73 20  63 6f 6d 6d 61 6e 64 20  |ng this command |
000066a0  73 61 76 65 73 20 79 6f  75 20 74 68 65 20 74 72  |saves you the tr|
000066b0  6f 75 62 6c 65 20 6f 66  20 63 61 6c 63 75 6c 61  |ouble of calcula|
000066c0  74 69 6e 67 20 74 68 65  0d 73 65 63 74 6f 72 20  |ting the.sector |
000066d0  73 69 7a 65 2f 6e 75 6d  62 65 72 20 6f 66 20 73  |size/number of s|
000066e0  65 63 74 6f 72 73 20 70  61 72 61 6d 65 74 65 72  |ectors parameter|
000066f0  2c 20 49 20 63 61 6e 20  6e 6f 74 20 72 65 63 6f  |, I can not reco|
00006700  6d 6d 65 6e 64 20 75 73  69 6e 67 20 69 74 20 77  |mmend using it w|
00006710  68 65 6e 0d 74 68 65 20  6d 75 6c 74 69 2d 73 65  |hen.the multi-se|
00006720  63 74 6f 72 20 63 6f 6d  6d 61 6e 64 20 69 73 20  |ctor command is |
00006730  73 6f 20 6d 75 63 68 20  6d 6f 72 65 20 76 65 72  |so much more ver|
00006740  73 69 74 69 6c 65 2e 0d  0d 0d 2d 2d 2d 2d 2d 2d  |sitile....------|
00006750  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
00006760  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 0d 4f 73 77 6f  |-----------.Oswo|
00006770  72 64 20 26 37 46 20 52  65 61 64 20 44 61 74 61  |rd &7F Read Data|
00006780  20 6d 75 6c 74 69 2d 73  65 63 74 6f 72 0d 2d 2d  | multi-sector.--|
00006790  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
000067a0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 0d  |---------------.|
000067b0  0d 49 66 20 79 6f 75 20  6e 65 65 64 20 74 6f 20  |.If you need to |
000067c0  72 65 61 64 20 64 61 74  61 20 77 68 69 63 68 20  |read data which |
000067d0  69 73 20 6e 6f 74 20 6d  61 72 6b 65 64 20 61 73  |is not marked as|
000067e0  20 64 65 6c 65 74 65 64  20 64 61 74 61 20 74 68  | deleted data th|
000067f0  65 6e 20 79 6f 75 20 63  61 6e 0d 75 73 65 20 74  |en you can.use t|
00006800  68 65 20 4f 73 77 6f 72  64 20 26 37 46 20 52 65  |he Osword &7F Re|
00006810  61 64 20 44 61 74 61 20  6d 75 6c 74 69 2d 73 65  |ad Data multi-se|
00006820  63 74 6f 72 20 63 6f 6d  6d 61 6e 64 2e 20 54 68  |ctor command. Th|
00006830  69 73 20 63 6f 6d 6d 61  6e 64 20 75 73 65 73 20  |is command uses |
00006840  74 68 65 0d 66 6f 6c 6c  6f 77 69 6e 67 20 70 61  |the.following pa|
00006850  72 61 6d 65 74 65 72 20  62 6c 6f 63 6b 2e 0d 0d  |rameter block...|
00006860  50 61 72 61 6d 65 74 65  72 20 62 6c 6f 63 6b 20  |Parameter block |
00006870  26 30 30 20 20 20 20 20  20 20 3d 20 64 72 69 76  |&00       = driv|
00006880  65 20 6e 75 6d 62 65 72  20 28 26 30 30 2d 26 30  |e number (&00-&0|
00006890  33 20 6f 72 20 26 46 46  29 0d 50 61 72 61 6d 65  |3 or &FF).Parame|
000068a0  74 65 72 20 62 6c 6f 63  6b 20 26 30 31 20 2d 20  |ter block &01 - |
000068b0  26 30 34 20 3d 20 62 75  66 66 65 72 20 61 64 64  |&04 = buffer add|
000068c0  72 65 73 73 20 28 6e 6f  74 20 75 73 65 64 29 0d  |ress (not used).|
000068d0  50 61 72 61 6d 65 74 65  72 20 62 6c 6f 63 6b 20  |Parameter block |
000068e0  26 30 35 20 20 20 20 20  20 20 3d 20 26 30 32 20  |&05       = &02 |
000068f0  28 32 20 63 6f 6d 6d 61  6e 64 20 70 61 72 61 6d  |(2 command param|
00006900  65 74 65 72 73 29 0d 50  61 72 61 6d 65 74 65 72  |eters).Parameter|
00006910  20 62 6c 6f 63 6b 20 26  30 36 20 20 20 20 20 20  | block &06      |
00006920  20 3d 20 26 35 33 20 28  72 65 61 64 20 64 61 74  | = &53 (read dat|
00006930  61 20 6d 75 6c 74 69 20  73 65 63 74 6f 72 20 63  |a multi sector c|
00006940  6f 6d 6d 61 6e 64 29 0d  50 61 72 61 6d 65 74 65  |ommand).Paramete|
00006950  72 20 62 6c 6f 63 6b 20  26 30 37 20 20 20 20 20  |r block &07     |
00006960  20 20 3d 20 6c 6f 67 69  63 61 6c 20 74 72 61 63  |  = logical trac|
00006970  6b 20 6e 75 6d 62 65 72  0d 50 61 72 61 6d 65 74  |k number.Paramet|
00006980  65 72 20 62 6c 6f 63 6b  20 26 30 38 20 20 20 20  |er block &08    |
00006990  20 20 20 3d 20 6c 6f 67  69 63 61 6c 20 73 65 63  |   = logical sec|
000069a0  74 6f 72 20 6e 75 6d 62  65 72 0d 50 61 72 61 6d  |tor number.Param|
000069b0  65 74 65 72 20 62 6c 6f  63 6b 20 26 30 39 20 20  |eter block &09  |
000069c0  20 20 20 20 20 3d 20 73  65 63 74 6f 72 20 73 69  |     = sector si|
000069d0  7a 65 2f 6e 75 6d 62 65  72 20 6f 66 20 73 65 63  |ze/number of sec|
000069e0  74 6f 72 73 0d 50 61 72  61 6d 65 74 65 72 20 62  |tors.Parameter b|
000069f0  6c 6f 63 6b 20 26 30 41  20 20 20 20 20 20 20 3d  |lock &0A       =|
00006a00  20 72 65 73 75 6c 74 20  62 79 74 65 0d 0d 0d 54  | result byte...T|
00006a10  68 69 73 20 63 6f 6d 6d  61 6e 64 20 63 61 6e 20  |his command can |
00006a20  62 65 20 75 73 65 64 20  69 6e 20 65 78 61 63 74  |be used in exact|
00006a30  6c 79 20 74 68 65 20 73  61 6d 65 20 77 61 79 20  |ly the same way |
00006a40  61 73 20 74 68 65 20 4f  73 77 6f 72 64 20 26 37  |as the Osword &7|
00006a50  46 20 52 65 61 64 0d 44  61 74 61 20 61 6e 64 20  |F Read.Data and |
00006a60  44 65 6c 65 74 65 64 20  44 61 74 61 20 63 6f 6d  |Deleted Data com|
00006a70  6d 61 6e 64 20 62 75 74  20 69 74 20 63 61 6e 6e  |mand but it cann|
00006a80  6f 74 20 72 65 61 64 20  64 65 6c 65 74 65 64 20  |ot read deleted |
00006a90  64 61 74 61 2e 20 54 68  65 72 65 20 69 73 20 6e  |data. There is n|
00006aa0  6f 0d 6e 65 65 64 20 74  6f 20 75 73 65 20 74 68  |o.need to use th|
00006ab0  69 73 20 63 6f 6d 6d 61  6e 64 20 77 68 65 6e 20  |is command when |
00006ac0  74 68 65 20 4f 73 77 6f  72 64 20 26 37 46 20 52  |the Osword &7F R|
00006ad0  65 61 64 20 44 61 74 61  20 61 6e 64 20 44 65 6c  |ead Data and Del|
00006ae0  65 74 65 64 20 44 61 74  61 0d 63 6f 6d 6d 61 6e  |eted Data.comman|
00006af0  64 20 69 73 20 6d 6f 72  65 20 76 65 72 73 69 74  |d is more versit|
00006b00  69 6c 65 2e 0d 0d 0d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |ile....---------|
00006b10  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
00006b20  2d 2d 2d 2d 2d 0d 4f 73  77 6f 72 64 20 26 37 46  |-----.Osword &7F|
00006b30  20 52 65 61 64 20 44 61  74 61 20 31 32 38 20 62  | Read Data 128 b|
00006b40  79 74 65 73 0d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |ytes.-----------|
00006b50  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
00006b60  2d 2d 2d 0d 0d 49 66 20  79 6f 75 20 6e 65 65 64  |---..If you need|
00006b70  20 74 6f 20 72 65 61 64  20 6a 75 73 74 20 6f 6e  | to read just on|
00006b80  65 20 73 65 63 74 6f 72  20 6f 66 20 31 32 38 20  |e sector of 128 |
00006b90  62 79 74 65 73 20 6f 66  20 64 61 74 61 20 77 68  |bytes of data wh|
00006ba0  69 63 68 20 69 73 20 6e  6f 74 0d 6d 61 72 6b 65  |ich is not.marke|
00006bb0  64 20 61 73 20 64 65 6c  65 74 65 64 20 64 61 74  |d as deleted dat|
00006bc0  61 20 74 68 65 6e 20 79  6f 75 20 63 61 6e 20 75  |a then you can u|
00006bd0  73 65 20 74 68 65 20 4f  73 77 6f 72 64 20 26 37  |se the Osword &7|
00006be0  46 20 52 65 61 64 20 44  61 74 61 20 31 32 38 20  |F Read Data 128 |
00006bf0  62 79 74 65 73 0d 63 6f  6d 6d 61 6e 64 2e 20 54  |bytes.command. T|
00006c00  68 69 73 20 63 6f 6d 6d  61 6e 64 20 75 73 65 73  |his command uses|
00006c10  20 74 68 65 20 66 6f 6c  6c 6f 77 69 6e 67 20 70  | the following p|
00006c20  61 72 61 6d 65 74 65 72  20 62 6c 6f 63 6b 2e 0d  |arameter block..|
00006c30  0d 50 61 72 61 6d 65 74  65 72 20 62 6c 6f 63 6b  |.Parameter block|
00006c40  20 26 30 30 20 20 20 20  20 20 20 3d 20 64 72 69  | &00       = dri|
00006c50  76 65 20 6e 75 6d 62 65  72 20 28 26 30 30 2d 26  |ve number (&00-&|
00006c60  30 33 20 6f 72 20 26 46  46 29 0d 50 61 72 61 6d  |03 or &FF).Param|
00006c70  65 74 65 72 20 62 6c 6f  63 6b 20 26 30 31 20 2d  |eter block &01 -|
00006c80  20 26 30 34 20 3d 20 62  75 66 66 65 72 20 61 64  | &04 = buffer ad|
00006c90  64 72 65 73 73 20 28 6e  6f 74 20 75 73 65 64 29  |dress (not used)|
00006ca0  0d 50 61 72 61 6d 65 74  65 72 20 62 6c 6f 63 6b  |.Parameter block|
00006cb0  20 26 30 35 20 20 20 20  20 20 20 3d 20 26 30 32  | &05       = &02|
00006cc0  20 28 32 20 63 6f 6d 6d  61 6e 64 20 70 61 72 61  | (2 command para|
00006cd0  6d 65 74 65 72 73 29 0d  50 61 72 61 6d 65 74 65  |meters).Paramete|
00006ce0  72 20 62 6c 6f 63 6b 20  26 30 36 20 20 20 20 20  |r block &06     |
00006cf0  20 20 3d 20 26 35 32 20  28 72 65 61 64 20 64 61  |  = &52 (read da|
00006d00  74 61 20 31 32 38 20 62  79 74 65 73 20 63 6f 6d  |ta 128 bytes com|
00006d10  6d 61 6e 64 29 0d 50 61  72 61 6d 65 74 65 72 20  |mand).Parameter |
00006d20  62 6c 6f 63 6b 20 26 30  37 20 20 20 20 20 20 20  |block &07       |
00006d30  3d 20 6c 6f 67 69 63 61  6c 20 74 72 61 63 6b 20  |= logical track |
00006d40  6e 75 6d 62 65 72 0d 50  61 72 61 6d 65 74 65 72  |number.Parameter|
00006d50  20 62 6c 6f 63 6b 20 26  30 38 20 20 20 20 20 20  | block &08      |
00006d60  20 3d 20 6c 6f 67 69 63  61 6c 20 73 65 63 74 6f  | = logical secto|
00006d70  72 20 6e 75 6d 62 65 72  0d 50 61 72 61 6d 65 74  |r number.Paramet|
00006d80  65 72 20 62 6c 6f 63 6b  20 26 30 39 20 20 20 20  |er block &09    |
00006d90  20 20 20 3d 20 72 65 73  75 6c 74 20 62 79 74 65  |   = result byte|
00006da0  0d 0d 0d 41 6c 74 68 6f  75 67 68 20 75 73 69 6e  |...Although usin|
00006db0  67 20 74 68 69 73 20 63  6f 6d 6d 61 6e 64 20 73  |g this command s|
00006dc0  61 76 65 73 20 79 6f 75  20 74 68 65 20 74 72 6f  |aves you the tro|
00006dd0  75 62 6c 65 20 6f 66 20  63 61 6c 63 75 6c 61 74  |uble of calculat|
00006de0  69 6e 67 20 74 68 65 0d  73 65 63 74 6f 72 20 73  |ing the.sector s|
00006df0  69 7a 65 2f 6e 75 6d 62  65 72 20 6f 66 20 73 65  |ize/number of se|
00006e00  63 74 6f 72 73 20 70 61  72 61 6d 65 74 65 72 2c  |ctors parameter,|
00006e10  20 49 20 63 61 6e 20 6e  6f 74 20 72 65 63 6f 6d  | I can not recom|
00006e20  6d 65 6e 64 20 75 73 69  6e 67 20 69 74 20 77 68  |mend using it wh|
00006e30  65 6e 0d 74 68 65 20 6d  75 6c 74 69 2d 73 65 63  |en.the multi-sec|
00006e40  74 6f 72 20 63 6f 6d 6d  61 6e 64 20 69 73 20 73  |tor command is s|
00006e50  6f 20 6d 75 63 68 20 6d  6f 72 65 20 76 65 72 73  |o much more vers|
00006e60  69 74 69 6c 65 2e 0d                              |itile..|
00006e67
19-08-88/T\DFS02.m0
19-08-88/T\DFS02.m1
19-08-88/T\DFS02.m2
19-08-88/T\DFS02.m4
19-08-88/T\DFS02.m5