User`s guide
______________________________
020- How does DOS 3.3 remember which sectors are used to
store a file?
Every file has a set of one or more Track/Sector List sectors. A
Track/Sector List (T/S List) lists sectors (by Track and Sector number) which
make up the file. Each T/S List sector points to up to 122 data sectors If the
file is too long for one T/S List sector, a second one is allocated, and a
pointer to it is stored in the first one, and so on.
Note that DOS 3.3 supports "sparse" files...there may 0/0 pairs in the T/S
List indicating parts of the file that were never written. When DOS 3.3 is
reading a file and encounters a 0/0 pair in the T/S List, it passes a buffer
full of binary zeros back to the calling program.
A Track/Sector List sector looks like this:
Byte Meaning
---- -------
$00 Unused
$01-02 Track/Sector location of next T/S List sector (00 for Track means
the list uses no more sectors since Track 0 can not be used)
$03-04 Unused
$05-06 Sector number in file (offset) of first sector represented in this
T/S List sector (starting at byte $0C below).
Ex: 00 00 = file sector #0 (i.e. the sector specified is the first
sector in the file). In a second T/S list sector, if required,
the first sector listed would be file sector #122 (i.e. the 123rd
sector) indicated by 7A 00-- hexadecimal $007A = 122 in decimal.
$07-0B Unused
The rest of the T/S List sector lists sectors in which the file is stored ...
$0C-0D Track/Sector location of first sector (in this T/S List sector)
$0E-0F Track/Sector location of second sector (in this T/S List sector)
... etc.
______________________________
021- What are the formats of DOS 3.3's main file types?
A machine-language program is free to store whatever it wants in any file,
but most programs (including DOS 3.3's own command interpreter) expect the data
in each type of file to conform to certain formats:
A sequential text file consists of lines of ASCII text separated by
carriage returns, and ending with a $00 byte. The high bit of each character
(except the $00 at the end) is set.
A random-access file may be thought of as a set of mini sequential access
files separated by strings of $00 bytes. Each "mini-file" begins at a file