Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 11 Next »

File system tree

OZ file system (FS) is a RAM FS. The memory allocated for the filesystem depends on one permanent handle (NQ_Fmh) open for all slots, avoiding swap area (MM_MUL | MM_FIX).

The tree roots are stored in the first plage of bank $21 (R21_BNK). They define the devices : :RAM.0, :RAM.- and :EPR.0-3. Tree root of :RAM.1 is in bank $40, :RAM.2 in $80 and :RAM.3 in $C0.

The structure of the root is a minimal DOR containing father, brother, son, device major type and its name.

The son of the device is a node which structure is a file DOR. Its type is a minor type : file (Dn_Fil), directory (Dn_Dir), virtual file (Dn_Epr). Those nodes are linked each other according the file system tree using the father/brother/son pointers.

For the file type (Dn_Fil and Dn_Epr) the son points to a memory page allocated for the file system. The pointer is not an extended 24 bits pointer as usual, only 16 bits are used. Conversion from memory pointer (BHL) to file pointer (DE) is as follows :

B        H        L        
dddddddd 00eeeeee ee000000
  

The file pointer points to the first sector. A sector is 62+2 bytes length. Two bytes for the link to the next followed by 62 bytes of data. When the sector is the last one, the first byte is zero followed by the sector length. Each page allocated to the file system holds up to 4 sectors (or 1 DOR and 3 sectors...).

File DOR

The file DOR length is up to 64 bytes. Its layout is fixed and should respect the specified order. It contains father, brother and son followed by file informations consisting of a key, data length, data.

OffsetLengthNameValueDescription
$003

pointer to father
$033

pointer to brother
$063

pointer to son
$091DN_
DOR minor type (DN_Fil, DN_Dir, DN_Epr)
$0A1
$3Ffile DOR length
$0B1DT_NAM'N'name section descriptor
$0C1
$11

filename length, fixed value

$0D17

Filename null terminated, cell filled with trailing zero. Includes dot and extension.

Filename of 1 to 12 characters, a dot, 3 characters extension, a null terminator.

$1E1DT_UPD'U'update timestamp section descriptor
$1F1
$06update time length, fixed value
$206

date and time of update in machine format
$261DT_CRE'C'creation timestamp section descriptor
$271
$06creation time length, fixed value
$286

date and time of creation in machine format
$2E1DT_EXT'X'extent (size)
$2F1
$04extent length, fixed value
$304

32 bit value of filesize
$341DT_EFS'E'section descriptor
$351
$04section length, fixed value
$364

32 bit pointer to eprom file entry
$3A1DT_ATR'A'section descriptor
$3B1
$03section length, fixed value
$3C3

24 bit for file attribute flags

system flag (protecting shell commands) is bit 23, others are reserved

  • No labels