::.. RIO File Descriptor ..::

ZDOS File Descriptor
Byte(s) in Sector
Decimal, Hex
Byte(s) in OPEN Buffer
Decimal
Explanation
0...3 Reserved for future expansion
4, 5 File ID
Unused
6, 7 2-byte pointer (disk address) to directory sector holding entry for this file
8, 9 2-byte pointer (disk address) to first data record of file
Sector address of the first sector on disk. So the OS can walk forward through the file.
10, 11
0aH, 0bH
2-byte pointer (disk address) to last data record of file
Sector address of the last sector on disk. So the OS can walk backward through the file.
12
0cH
0 File Type and Subtype
This value can be changed using the SET utility.
13, 14
0dH, 0eH
1, 2 Record Count
Number of data records. The sector of the file descriptor does not count here.
15, 16
0fH, 10H
3, 4 Record Length
A logical record can consist of 1, 2, 4, 8, 16 or 32 physical sectors. This results in record lengths of 80H, 100H, 200H, 400H, 800H or 1000H. Default Record Length is 80H (128 bytes).
Note: In UDOS-1526 (V4.x) the maximum Record Length is 800H (16 sectors) because the disks have only 26 sectors per track.
17, 18
11H, 12H
5, 6 Block Length
Unused and set to be same as Record Length
19
13H
7 File Properties
This value can be changed using the SET utility.
20, 21
14H, 15H
8, 9 Procedure files (Filetype=P) only - Starting execution address (ENTRY_POINT), unused for other file types.
This value can be changed using the SET utility.
22, 23
16H, 17H
10, 11 Text files (Filetype=A) only - Number of bytes in the last record of the file
This value can be changed using the SET utility.
24...31
18H...1fH
12...19 Date of Creation
32...39
20H...27H
20...27 Date of Last Write
40...43
44...47
......
100...103
28H...67H
28...31
32...35
......
88...91
Procedure files (Filetype=P) only - Segment descriptors for up to 16 code segments.
Each segment descriptor is 4 bytes - the first 2 bytes are the starting address (loading address) of the segment and the second 2 bytes are the length of the segment in bytes. After the the last used segment descriptor is a null descriptor with each of the 4 bytes are zero.
104...121
68H...79H
92...109 Unused
122, 123
7aH, 7bH
110, 111 Procedure files (Filetype=P) only - Lowest segment starting address (LOW_ADDRESS)
LOW_ADDRESS and HIGH_ADDRESS are used when loading the program files for allocating the main memory with MEMMGR.
This value can be changed using the SET utility.
124, 125
7cH, 7dH
112, 113 Procedure files (Filetype=P) only - Highest segment ending address rounded up to the end of the record (HIGH_ADDRESS)
This value can be changed using the SET utility.
126, 127
7eH, 7fH
114, 115 Procedure files (Filetype=P) only - Stacksize (STACK_SIZE)
The size of the stack for the program the OS has to allocate at program load with MEMMGR.
This value can be changed using the SET utility.

The Zilog Hard Disk File System (DFS) has a slightly different structure of the file descriptor as the ZDOS. The number of sectors on hard disk may be greater than 65536. So we need a 3-byte pointer to address physical sectors. The OS and utilities are adjusted accordingly.

DFS File Descriptor
Byte(s) in Sector
Decimal, Hex
Byte(s) in OPEN Buffer
Decimal
Explanation
0...3 Reserved for future expansion
4...7 File ID
8...10
08H...0aH
3-byte pointer (disk address) to directory sector holding entry for this file
11...13
0bH...0dH
3-byte pointer (disk address) to first data record of file
Sector address of the first sector on disk. So the OS can walk forward through the file.
14...16
0eH...10H
3-byte pointer (disk address) to last data record of file
Sector address of the last sector on disk. So the OS can walk backward through the file.
17
11H
0 File Type and Subtype
This value can be changed using the SET utility.
18, 19
12H, 13H
1, 2 Record Count
Number of data records. The sector of the file descriptor does not count here.
20, 21
14H, 15H
3, 4 Record Length - always 200H (512 bytes)
In DFS, there are no variable record length. A logical record always has the same size as a physical sector.
22, 23
16H, 17H
5, 6 Block Length
Unused and set to be same as Record Length
24
18H
7 File Properties
This value can be changed using the SET utility.
25, 26
19H, 1aH
8, 9 Procedure files (Filetype=P) only - Starting execution address (ENTRY_POINT), unused for other file types.
This value can be changed using the SET utility.
27, 28
1bH, 1cH
10, 11 Text files (Filetype=A) only - Number of bytes in the last record of the file
This value can be changed using the SET utility.
29...36
1dH...24H
12...19 Date of Creation
37...44
25H...2cH
20...27 Date of Last Write
45...48
49...52
......
105...108
2dH...6cH
28...31
32...35
......
88...91
Procedure files (Filetype=P) only - Segment descriptors for up to 16 code segments.
Each segment descriptor is 4 bytes - the first 2 bytes are the starting address (loading address) of the segment and the second 2 bytes are the length of the segment in bytes. After the the last used segment descriptor is a null descriptor with each of the 4 bytes are zero.
109...126
6dH...7eH
92...109 Unused
127, 128
7fH, 80H
110, 111 Procedure files (Filetype=P) only - Lowest segment starting address (LOW_ADDRESS)
LOW_ADDRESS and HIGH_ADDRESS are used when loading the program files for allocating the main memory with MEMMGR.
This value can be changed using the SET utility.
129, 130
81H, 82H
112, 113 Procedure files (Filetype=P) only - Highest segment ending address rounded up to the end of the record (HIGH_ADDRESS)
This value can be changed using the SET utility.
131, 132
83H, 84H
114, 115 Procedure files (Filetype=P) only - Stacksize (STACK_SIZE)
The size of the stack for the program the OS has to allocate at program load with MEMMGR.
This value can be changed using the SET utility.
133...511
85H...1ffH
Available for programmer definition

In German UDOS systems with NDOS or DDOS as filesystem the physical sector length is 100H (256 bytes). The file descriptor has a size of 256 bytes.

NDOS/DDOS File Descriptor
Byte(s) in Sector
Decimal, Hex
Byte(s) in OPEN Buffer
Decimal
Explanation
0...11
00H...0bH
Identical to ZDOS
12...14
0cH...0eH
0...2 Identical to ZDOS
15, 16
0fH, 10H
3, 4 Record Length
A logical record can consist of 0.5 (a half sector), 1, 2, 4, 8 or 16 physical sectors. This results in record lengths of 80H, 100H, 200H, 400H, 800H or 1000H. Default Record Length is 100H (256 bytes).
Note: The record length of 80H (128 bytes) is maintained for compatibility reasons. This means that only the half of the capacity of each physical sector is used. RL=80 is implemented in NDOS only, not in DDOS.
17...127
11H...7fH
5...115 Identical to ZDOS
128, 129
80H, 81H
2-byte pointer (disk address) to the pointer sector of this file
130...255
82H...0ffH
Unused