Mercurial > hg > Members > kono > nitros9-code
annotate defs/rbfdefs @ 484:13ca57c5a987
Added ChangeLog, modified Makefile to include file in archive
author | boisy |
---|---|
date | Wed, 09 Oct 2002 14:25:21 +0000 |
parents | c3929e005d23 |
children | 4e48403790f0 |
rev | line source |
---|---|
373
c07686556109
Added ifeq statements at top to allow for multiple use's of same def
boisy
parents:
71
diff
changeset
|
1 ifeq RBFDEFS |
c07686556109
Added ifeq statements at top to allow for multiple use's of same def
boisy
parents:
71
diff
changeset
|
2 |
c07686556109
Added ifeq statements at top to allow for multiple use's of same def
boisy
parents:
71
diff
changeset
|
3 RBFDEFS set 1 |
c07686556109
Added ifeq statements at top to allow for multiple use's of same def
boisy
parents:
71
diff
changeset
|
4 |
0 | 5 nam RBFDefs |
6 ttl Random Block File Manager Definitions | |
7 | |
8 ********************** | |
9 * Modification History | |
10 * | |
11 * Date Changes Made by | |
12 * -------- ------------------------------------------------------------ --- | |
13 * 82/07/13 PD.Exten added to path descriptor rfd | |
14 * 82/07/13 PE entries defined rfd | |
15 * 82/07/15 V.FileHd inserted in drive static rfd | |
16 * 82/09/10 Level One/ Level two cond added WGP | |
17 * 82/09/17 Record Lock cond added WGP | |
18 * 82/09/17 PD.SLE renamed to PD.Creat rfd | |
19 * 82/09/17 V.DiskID, V.BMapSz, V.MapSct added for | |
20 * smart multi-sector bitmap searching rfd | |
21 * 82/09/20 reserved areas added in static storage. | |
22 * 83/06/07 Added InDriver flag in PD.SMF. rfd | |
23 * 83/06/13 Added PE.Req tmp save for PE.Lock rfd | |
24 * 83/08/08 reserved PD.SToff for Japanese rfd | |
25 * 83/11/19 Added V.ResBit in drive tables. rfd | |
26 * 83/12/12 Added PE.Prior to save process priority. rfd | |
27 * 83/12/13 Added BufBusy bit in state flag (PD.SMF) rfd | |
28 * 84/07/06 Added Bit Definitions for DD.FMT MGH | |
29 * 87/06/23 Updated with Dev Desc Info KKD | |
30 | |
31 ******************************* | |
32 * RBF Device Descriptor Offsets | |
33 * | |
34 org M$DTyp | |
35 rmb 1 Device type (IT.DTP) (1=RBF) | |
36 IT.DRV rmb 1 Drive number | |
37 IT.STP rmb 1 Step rate | |
38 IT.TYP rmb 1 Disk device type (5" 8" other) | |
39 IT.DNS rmb 1 Density capability | |
40 IT.CYL rmb 2 Number of cylinders | |
41 IT.SID rmb 1 Number of surfaces | |
42 IT.VFY rmb 1 0=verify disk writes | |
43 IT.SCT rmb 2 Default sectors/track | |
44 IT.T0S rmb 2 Default sectors/track tr00,s0 | |
45 IT.ILV rmb 1 Sector interleave offset | |
46 IT.SAS rmb 1 Segment allocation size | |
47 | |
48 ************************************* | |
49 * IT.TYP/IT.DNS/IT.STP definitions | |
50 * | |
51 TYP.5 equ %00000000 5" media | |
52 TYP.8 equ %00000001 8" media | |
53 TYP.CCF equ %00100000 CoCo format | |
54 TYP.NCCF equ %00000000 Non-CoCo format | |
55 TYP.SOF equ %00000000 Standard OS-9 format | |
56 TYP.NSF equ %01000000 Non-standard format | |
57 TYP.FLP equ %00000000 Floppy disk | |
58 TYP.HARD equ %10000000 Hard disk | |
59 | |
60 DNS.FM equ %00000000 Single-density (FM) | |
61 DNS.MFM equ %00000001 Double-density (MFM) | |
62 DNS.STD equ %00000000 Single track density (48 tpi) | |
63 DNS.DTD equ %00000010 Single track density (96 tpi) | |
64 | |
480 | 65 IFEQ Level-1 |
66 STP.30ms equ 3 30ms step rate | |
67 STP.20ms equ 2 20ms step rate | |
68 STP.12ms equ 1 12ms step rate | |
69 STP.6ms equ 0 6ms step rate | |
70 ELSE | |
0 | 71 STP.30ms equ 0 30ms step rate |
72 STP.20ms equ 1 20ms step rate | |
73 STP.12ms equ 2 12ms step rate | |
74 STP.6ms equ 3 6ms step rate | |
480 | 75 ENDC |
0 | 76 |
77 ************************************* | |
78 * Random Block Path Descriptor Format | |
79 * | |
80 org PD.FST | |
81 PD.SMF rmb 1 State flags | |
82 PD.CP rmb 4 Current logical byte position | |
83 PD.SIZ rmb 4 File size | |
84 PD.SBL rmb 3 Segment beginning lsn | |
85 PD.SBP rmb 3 Segment beginning psn | |
86 PD.SSZ rmb 3 Segment size | |
87 PD.DSK rmb 2 Disk id | |
88 PD.DTB rmb 2 Drive table ptr | |
89 org PD.OPT | |
90 rmb 1 Device type | |
91 PD.DRV rmb 1 Drive number | |
92 PD.STP rmb 1 Step rate | |
93 PD.TYP rmb 1 Disk device type (5" 8" other) | |
94 PD.DNS rmb 1 Density capability | |
95 PD.CYL rmb 2 Number of cylinders | |
96 PD.SID rmb 1 Number of surfaces | |
97 PD.VFY rmb 1 0=verify disk writes | |
98 PD.SCT rmb 2 Default sectors/track | |
99 PD.T0S rmb 2 Default sectors/track tr00,s0 | |
100 PD.ILV rmb 1 Sector interleave offset | |
101 PD.SAS rmb 1 Segment allocation size | |
102 PD.TFM rmb 1 DMA Transfer Mode | |
103 PD.Exten rmb 2 Path Extension (PE) for record locking | |
104 PD.SToff rmb 1 Sector/Track offsets (for "foreign" disk formats) | |
105 PD.ATT rmb 1 File attributes | |
106 PD.FD rmb 3 File descriptor psn | |
107 PD.DFD rmb 3 Directory file descriptor psn | |
108 PD.DCP rmb 4 File directory entry ptr | |
109 PD.DVT rmb 2 User readable dev tbl ptr | |
110 | |
111 * State Flags | |
112 BUFMOD equ $01 Buffer modified | |
113 SINBUF equ $02 Sector in buffer | |
114 FDBUF equ $04 File descriptor in buffer | |
115 *EOFSEC equ $08 End of file sector | |
116 *EOF equ $10 End of file | |
117 InDriver equ $20 Currently in Disk Driver, or queued | |
118 BufBusy equ $40 Buffer is currently busy | |
119 | |
120 ifne Level-1 | |
121 ************************************ | |
122 * Random Block Path Extension Format | |
123 * | |
124 org 0 | |
125 PE.PE rmb 1 PE path number | |
126 PE.PDptr rmb 2 back ptr to this PE's Path Descriptor | |
127 PE.NxFil rmb 2 Drive Open-File list ptr | |
128 PE.Confl rmb 2 circular File Conflict list | |
129 PE.Lock rmb 1 Path lockout status | |
130 PE.LoLck rmb 4 Low Locked Logical addr | |
131 PE.HiLck rmb 4 High Locked Logical addr | |
132 PE.Wait rmb 2 PE ptr to (next) locked-out PE | |
133 PE.TmOut rmb 2 Max ticks to wait for locked segment | |
134 PE.Owner rmb 1 Process ID of owner of locked segment | |
135 PE.Req rmb 1 temp for PE.Lock in GAIN when LockSeg fails | |
136 PE.Prior rmb 1 tmp for process priority while in driver | |
71 | 137 PE.SigSg rmb 1 signal code to send |
138 PE.SigID rmb 1 process ID to send the signal to | |
0 | 139 rmb 32-. reserved |
140 PE.FilNm rmb 32 temp for filename during directory search | |
141 | |
142 * PE.Lock status codes | |
143 Unlocked equ 0 no portion of file is locked | |
144 RcdLock equ 1 record from LoLck to HiLck locked | |
145 FileLock equ 2 entire file locked | |
146 EofLock equ 4 End of file is locked | |
147 endc | |
148 | |
149 *********************** | |
150 * LSN0 Disk Data Format | |
151 * | |
152 org 0 | |
153 DD.TOT rmb 3 Total number of sectors | |
154 DD.TKS rmb 1 Track size in sectors | |
155 DD.MAP rmb 2 Number of bytes in allocation bit map | |
156 DD.BIT rmb 2 Number of sectors/bit | |
157 DD.DIR rmb 3 Address of root directory fd | |
158 DD.OWN rmb 2 Owner | |
159 DD.ATT rmb 1 Attributes | |
160 DD.DSK rmb 2 Disk id | |
161 DD.FMT rmb 1 Disk format; density/sides | |
162 DD.SPT rmb 2 Sectors/track | |
163 DD.RES rmb 2 Reserved for future use | |
164 DD.SIZ equ . Device descriptor minimum size | |
165 DD.BT rmb 3 System bootstrap sector | |
166 DD.BSZ rmb 2 Size of system bootstrap | |
167 DD.DAT rmb 5 Creation date | |
168 DD.NAM rmb 32 Volume name | |
169 DD.OPT rmb 32 option area | |
170 | |
171 * DD.FMT Bit Definitions | |
172 FMT.SIDE equ %00000001 Single Side=0, Double Side=1 | |
173 FMT.DNS equ %00000010 Single DNS=0, Double DNS=1 | |
174 FMT.TDNS equ %00000100 48tpi=0, 96tpi=1 | |
175 FMT.T0DN equ %00100000 Track 0 DNS, see FMT.DNS | |
176 | |
177 ************************ | |
178 * File Descriptor Format | |
179 * | |
180 org 0 | |
181 FD.ATT rmb 1 Attributes | |
182 FD.OWN rmb 2 Owner | |
183 FD.DAT rmb 5 Date last modified | |
184 FD.LNK rmb 1 Link count | |
185 FD.SIZ rmb 4 File size | |
186 FD.Creat rmb 3 Segment list extension | |
187 FD.SEG equ . Beginning of segment list | |
188 * Segment List Entry Format | |
189 org 0 | |
190 FDSL.A rmb 3 Segment beginning physical sector number | |
191 FDSL.B rmb 2 Segment size | |
192 FDSL.S equ . Segment list entry size | |
193 FD.LS1 equ FD.SEG+((256-FD.SEG)/FDSL.S-1)*FDSL.S | |
194 FD.LS2 equ (256/FDSL.S-1)*FDSL.S | |
195 MINSEC set 16 | |
196 | |
197 ************************ | |
198 * Directory Entry Format | |
199 * | |
200 org 0 | |
201 DIR.NM rmb 29 File name | |
202 DIR.FD rmb 3 File descriptor physical sector number | |
203 DIR.SZ equ . Directory record size | |
204 | |
205 **************** | |
206 * Static Storage | |
207 * | |
208 * Overall Disk Static Storage | |
209 * | |
210 * Note: This does not reserve any memory for drive tables. Each Driver is | |
211 * responsible for reserving sufficient memory for the appropriate | |
212 * number of tables. | |
213 * | |
214 org V.USER Reserve required ($06) | |
215 V.NDRV rmb 1 Number of drives ($07) | |
216 rmb 8 reserved ($08) | |
217 DRVBEG equ . Beginning of drive tables ($10) | |
218 * | |
219 * Global Storage For Disk Drive Tables | |
220 * Each Table Contains The First 'DD.Siz' Bytes | |
221 * From Sector 0, And The Current Track, Stepping Rate, | |
222 * Bit-Map Use Flag, And Disk Type | |
223 * | |
224 org 0 | |
225 rmb DD.SIZ Device descriptor, sector 0 | |
226 V.TRAK rmb 2 Current track | |
227 V.BMB rmb 1 Bit-map use flag | |
228 V.FileHd rmb 2 open file list for this drive | |
229 V.DiskID rmb 2 Disk ID | |
230 V.BMapSz rmb 1 Bitmap Size | |
231 V.MapSct rmb 1 lowest reasonable bitmap sector | |
232 V.ResBit rmb 1 reserved bitmap sector (for compaction) | |
233 V.ScTkOf rmb 1 Sector/Track byte (Combined from descriptor) | |
234 V.ScOfst rmb 1 Sector offset split from byte above | |
235 V.TkOfst rmb 1 Track offset split from byte above | |
236 rmb 4 reserved | |
237 DRVMEM equ . | |
238 | |
373
c07686556109
Added ifeq statements at top to allow for multiple use's of same def
boisy
parents:
71
diff
changeset
|
239 endc |
c07686556109
Added ifeq statements at top to allow for multiple use's of same def
boisy
parents:
71
diff
changeset
|
240 |