annotate defs/rbfdefs @ 1699:0ec4d6e34fcc

Added xmode (forgot for 6309) in makefile
author boisy
date Tue, 03 Aug 2004 19:53:36 +0000
parents b75cb7ca03a6
children 823c651e7dcd
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1541
8d4b5ee1cee4 Fixed defsfiles to work with ASM
boisy
parents: 1530
diff changeset
1 IFNE RBFDEFS-1
373
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
1200
0a678473d5cf Major overhaul of headers to 'new' style
boisy
parents: 1199
diff changeset
5 ********************************************************************
0a678473d5cf Major overhaul of headers to 'new' style
boisy
parents: 1199
diff changeset
6 * RBFDefs - Random Block File Manager Definitions
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
7 *
1200
0a678473d5cf Major overhaul of headers to 'new' style
boisy
parents: 1199
diff changeset
8 * $Id$
0a678473d5cf Major overhaul of headers to 'new' style
boisy
parents: 1199
diff changeset
9 *
1199
4e48403790f0 Improved comments
boisy
parents: 480
diff changeset
10 * RBF stands for 'Random Block Filemanager' and is a package of subroutines
4e48403790f0 Improved comments
boisy
parents: 480
diff changeset
11 * that define the logical structure of a disk and allows access to the files
4e48403790f0 Improved comments
boisy
parents: 480
diff changeset
12 * in that structure.
4e48403790f0 Improved comments
boisy
parents: 480
diff changeset
13 *
4e48403790f0 Improved comments
boisy
parents: 480
diff changeset
14 * The data structures in this file give RBF its 'personality' and are used
4e48403790f0 Improved comments
boisy
parents: 480
diff changeset
15 * by RBF itself, as well as applications that will require disk I/O.
1200
0a678473d5cf Major overhaul of headers to 'new' style
boisy
parents: 1199
diff changeset
16 *
0a678473d5cf Major overhaul of headers to 'new' style
boisy
parents: 1199
diff changeset
17 * Edt/Rev YYYY/MM/DD Modified by
0a678473d5cf Major overhaul of headers to 'new' style
boisy
parents: 1199
diff changeset
18 * Comment
0a678473d5cf Major overhaul of headers to 'new' style
boisy
parents: 1199
diff changeset
19 * ------------------------------------------------------------------
0a678473d5cf Major overhaul of headers to 'new' style
boisy
parents: 1199
diff changeset
20 * 1982/07/13 Robert F. Doggett
0a678473d5cf Major overhaul of headers to 'new' style
boisy
parents: 1199
diff changeset
21 * PD.Exten added to path descriptor and PE Entries defined.
0a678473d5cf Major overhaul of headers to 'new' style
boisy
parents: 1199
diff changeset
22 *
0a678473d5cf Major overhaul of headers to 'new' style
boisy
parents: 1199
diff changeset
23 * 1982/07/15 Robert F. Doggett
0a678473d5cf Major overhaul of headers to 'new' style
boisy
parents: 1199
diff changeset
24 * V.FileHd inserted in driver static storage.
0a678473d5cf Major overhaul of headers to 'new' style
boisy
parents: 1199
diff changeset
25 *
0a678473d5cf Major overhaul of headers to 'new' style
boisy
parents: 1199
diff changeset
26 * 1982/09/10 WGP
0a678473d5cf Major overhaul of headers to 'new' style
boisy
parents: 1199
diff changeset
27 * Level One/Level Two condionals added.
0a678473d5cf Major overhaul of headers to 'new' style
boisy
parents: 1199
diff changeset
28 *
0a678473d5cf Major overhaul of headers to 'new' style
boisy
parents: 1199
diff changeset
29 * 1982/09/17 WGP
0a678473d5cf Major overhaul of headers to 'new' style
boisy
parents: 1199
diff changeset
30 *
0a678473d5cf Major overhaul of headers to 'new' style
boisy
parents: 1199
diff changeset
31 * 1982/09/17 Robert F. Doggett
0a678473d5cf Major overhaul of headers to 'new' style
boisy
parents: 1199
diff changeset
32 * PD.SLE renamed to PD.Creat.
0a678473d5cf Major overhaul of headers to 'new' style
boisy
parents: 1199
diff changeset
33 *
0a678473d5cf Major overhaul of headers to 'new' style
boisy
parents: 1199
diff changeset
34 * 1982/09/17 Robert F. Doggett
0a678473d5cf Major overhaul of headers to 'new' style
boisy
parents: 1199
diff changeset
35 * V.DiskID, V.BMapSz, V.MapSct added for smart multi-sector bitmap searching.
0a678473d5cf Major overhaul of headers to 'new' style
boisy
parents: 1199
diff changeset
36 *
0a678473d5cf Major overhaul of headers to 'new' style
boisy
parents: 1199
diff changeset
37 * 1982/09/20 Robert F. Doggett
0a678473d5cf Major overhaul of headers to 'new' style
boisy
parents: 1199
diff changeset
38 * Reserved areas added in static storage.
0a678473d5cf Major overhaul of headers to 'new' style
boisy
parents: 1199
diff changeset
39
0a678473d5cf Major overhaul of headers to 'new' style
boisy
parents: 1199
diff changeset
40 * 1983/06/07 Robert F. Doggett
0a678473d5cf Major overhaul of headers to 'new' style
boisy
parents: 1199
diff changeset
41 * Added InDriver flag in PD.SMF.
0a678473d5cf Major overhaul of headers to 'new' style
boisy
parents: 1199
diff changeset
42 *
0a678473d5cf Major overhaul of headers to 'new' style
boisy
parents: 1199
diff changeset
43 * 1983/06/13 Robert F. Doggett
0a678473d5cf Major overhaul of headers to 'new' style
boisy
parents: 1199
diff changeset
44 * Added PE.Req tmp save for PE.Lock.
0a678473d5cf Major overhaul of headers to 'new' style
boisy
parents: 1199
diff changeset
45 *
0a678473d5cf Major overhaul of headers to 'new' style
boisy
parents: 1199
diff changeset
46 * 1983/08/08 Robert F. Doggett
0a678473d5cf Major overhaul of headers to 'new' style
boisy
parents: 1199
diff changeset
47 * Reserved PD.SToff for Japanese.
0a678473d5cf Major overhaul of headers to 'new' style
boisy
parents: 1199
diff changeset
48 *
0a678473d5cf Major overhaul of headers to 'new' style
boisy
parents: 1199
diff changeset
49 * 1983/11/19 Robert F. Doggett
0a678473d5cf Major overhaul of headers to 'new' style
boisy
parents: 1199
diff changeset
50 * Added V.ResBit in drive tables.
0a678473d5cf Major overhaul of headers to 'new' style
boisy
parents: 1199
diff changeset
51 *
0a678473d5cf Major overhaul of headers to 'new' style
boisy
parents: 1199
diff changeset
52 * 1983/12/12 Robert F. Doggett
0a678473d5cf Major overhaul of headers to 'new' style
boisy
parents: 1199
diff changeset
53 * Added PE.Prior to save process priority.
0a678473d5cf Major overhaul of headers to 'new' style
boisy
parents: 1199
diff changeset
54 *
0a678473d5cf Major overhaul of headers to 'new' style
boisy
parents: 1199
diff changeset
55 * 1983/12/13 Robert F. Doggett
0a678473d5cf Major overhaul of headers to 'new' style
boisy
parents: 1199
diff changeset
56 * Added BufBusy bit in state flag (PD.SMF).
0a678473d5cf Major overhaul of headers to 'new' style
boisy
parents: 1199
diff changeset
57 *
0a678473d5cf Major overhaul of headers to 'new' style
boisy
parents: 1199
diff changeset
58 * 1984/07/06 Mark G. Hawkins
0a678473d5cf Major overhaul of headers to 'new' style
boisy
parents: 1199
diff changeset
59 * Added Bit Definitions for DD.FMT.
0a678473d5cf Major overhaul of headers to 'new' style
boisy
parents: 1199
diff changeset
60 *
0a678473d5cf Major overhaul of headers to 'new' style
boisy
parents: 1199
diff changeset
61 * 1987/06/23 Kevin K. Darling
0a678473d5cf Major overhaul of headers to 'new' style
boisy
parents: 1199
diff changeset
62 * Updated with Dev Desc Info
0a678473d5cf Major overhaul of headers to 'new' style
boisy
parents: 1199
diff changeset
63 *
0a678473d5cf Major overhaul of headers to 'new' style
boisy
parents: 1199
diff changeset
64 * 2003/06/02 Boisy G. Pitre
0a678473d5cf Major overhaul of headers to 'new' style
boisy
parents: 1199
diff changeset
65 * Updated comments for clarity.
1205
383d5981c23f Updated for anticipation of 256-2048 byte sector support
boisy
parents: 1200
diff changeset
66 * Added TYP.256-TYP.2048 definitions for future expansion.
1530
a02b18bfc376 New 'Old' fields added from OS-9 Level One V2.00.00 Addendum
boisy
parents: 1377
diff changeset
67 *
a02b18bfc376 New 'Old' fields added from OS-9 Level One V2.00.00 Addendum
boisy
parents: 1377
diff changeset
68 * 2004/04/14 Boisy G. Pitre
a02b18bfc376 New 'Old' fields added from OS-9 Level One V2.00.00 Addendum
boisy
parents: 1377
diff changeset
69 * Added new entries to device descriptor as per OS-9 Level One V2.00.00
a02b18bfc376 New 'Old' fields added from OS-9 Level One V2.00.00 Addendum
boisy
parents: 1377
diff changeset
70 * addendum. Pointed out by Rodney Hamilton.
1200
0a678473d5cf Major overhaul of headers to 'new' style
boisy
parents: 1199
diff changeset
71
0a678473d5cf Major overhaul of headers to 'new' style
boisy
parents: 1199
diff changeset
72 nam RBFDefs
0a678473d5cf Major overhaul of headers to 'new' style
boisy
parents: 1199
diff changeset
73 ttl Random Block File Manager Definitions
1199
4e48403790f0 Improved comments
boisy
parents: 480
diff changeset
74
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
75
1200
0a678473d5cf Major overhaul of headers to 'new' style
boisy
parents: 1199
diff changeset
76 pag
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
77 *******************************
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
78 * RBF Device Descriptor Offsets
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
79 *
1199
4e48403790f0 Improved comments
boisy
parents: 480
diff changeset
80 * These definitions are for RBF device descriptors.
4e48403790f0 Improved comments
boisy
parents: 480
diff changeset
81
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
82 org M$DTyp
1199
4e48403790f0 Improved comments
boisy
parents: 480
diff changeset
83 rmb 1 Device type (DT.RBF)
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
84 IT.DRV rmb 1 Drive number
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
85 IT.STP rmb 1 Step rate
1199
4e48403790f0 Improved comments
boisy
parents: 480
diff changeset
86 IT.TYP rmb 1 Disk device type information
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
87 IT.DNS rmb 1 Density capability
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
88 IT.CYL rmb 2 Number of cylinders
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
89 IT.SID rmb 1 Number of surfaces
1199
4e48403790f0 Improved comments
boisy
parents: 480
diff changeset
90 IT.VFY rmb 1 Verify disk writes (0 = verify, 1 = don't)
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
91 IT.SCT rmb 2 Default sectors/track
1199
4e48403790f0 Improved comments
boisy
parents: 480
diff changeset
92 IT.T0S rmb 2 Default sectors/track for track 0 sector 0
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
93 IT.ILV rmb 1 Sector interleave offset
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
94 IT.SAS rmb 1 Segment allocation size
1530
a02b18bfc376 New 'Old' fields added from OS-9 Level One V2.00.00 Addendum
boisy
parents: 1377
diff changeset
95 * The following fields are from the OS-9 Level One V2.00.00 Addendum
a02b18bfc376 New 'Old' fields added from OS-9 Level One V2.00.00 Addendum
boisy
parents: 1377
diff changeset
96 IT.TFM rmb 1 DMA Transfer Mode
a02b18bfc376 New 'Old' fields added from OS-9 Level One V2.00.00 Addendum
boisy
parents: 1377
diff changeset
97 IT.Exten rmb 2 Path Extension (PE) for record locking
a02b18bfc376 New 'Old' fields added from OS-9 Level One V2.00.00 Addendum
boisy
parents: 1377
diff changeset
98 IT.SToff rmb 1 Sector/Track offsets (for "foreign" disk formats)
a02b18bfc376 New 'Old' fields added from OS-9 Level One V2.00.00 Addendum
boisy
parents: 1377
diff changeset
99 * The following fields are not copied to the path descriptor
a02b18bfc376 New 'Old' fields added from OS-9 Level One V2.00.00 Addendum
boisy
parents: 1377
diff changeset
100 IT.WPC rmb 1 Write precomp cyl/4 (HD)
a02b18bfc376 New 'Old' fields added from OS-9 Level One V2.00.00 Addendum
boisy
parents: 1377
diff changeset
101 IT.OFS rmb 2 Starting cylinder offset (HD)
a02b18bfc376 New 'Old' fields added from OS-9 Level One V2.00.00 Addendum
boisy
parents: 1377
diff changeset
102 IT.RWC rmb 2 Reduced write current cylinder (HD)
a02b18bfc376 New 'Old' fields added from OS-9 Level One V2.00.00 Addendum
boisy
parents: 1377
diff changeset
103
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
104
1609
0502edac451d TYPH.DSQ now bit 4
boisy
parents: 1602
diff changeset
105 * IT.TYP Definitions
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
106 *
1626
c01a65c813ce Definition files to use with as6809
boisy
parents: 1618
diff changeset
107 TYP.HARD equ %10000000 Hard disk
1199
4e48403790f0 Improved comments
boisy
parents: 480
diff changeset
108 TYP.FLP equ %00000000 Floppy disk
1626
c01a65c813ce Definition files to use with as6809
boisy
parents: 1618
diff changeset
109 TYP.NSF equ %01000000 Non-standard format
c01a65c813ce Definition files to use with as6809
boisy
parents: 1618
diff changeset
110 TYP.SOF equ %00000000 Standard NitrOS-9 format
1199
4e48403790f0 Improved comments
boisy
parents: 480
diff changeset
111
1609
0502edac451d TYPH.DSQ now bit 4
boisy
parents: 1602
diff changeset
112 * IT.TYP bit definitions if bit 7 of IT.TYP is set (hard disk)
1626
c01a65c813ce Definition files to use with as6809
boisy
parents: 1618
diff changeset
113 TYPH.256 equ %00000000 256 byte sector media
c01a65c813ce Definition files to use with as6809
boisy
parents: 1618
diff changeset
114 TYPH.512 equ %00000001 512 byte sector media
c01a65c813ce Definition files to use with as6809
boisy
parents: 1618
diff changeset
115 TYPH.1024 equ %00000010 1024 byte sector media
c01a65c813ce Definition files to use with as6809
boisy
parents: 1618
diff changeset
116 TYPH.2048 equ %00000011 2048 byte sector media
c01a65c813ce Definition files to use with as6809
boisy
parents: 1618
diff changeset
117 TYPH.SSM equ %00000011 Sector size mask
1637
d6f639eb9a0f ChangeLog and bootlist updates.
boisy
parents: 1626
diff changeset
118 TYPH.DRSV equ %00001100 Driver-reserved bits
d6f639eb9a0f ChangeLog and bootlist updates.
boisy
parents: 1626
diff changeset
119 TYPH.DSQ equ %00010000 Drive size query flag
1609
0502edac451d TYPH.DSQ now bit 4
boisy
parents: 1602
diff changeset
120
0502edac451d TYPH.DSQ now bit 4
boisy
parents: 1602
diff changeset
121 * IT.TYP bit definitions if bit 7 of IT.TYP is clear (floppy disk)
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
122 TYP.5 equ %00000000 5" media
1676
b17a3a132bbb TYP.8 has been renamed to TYP.3 for 3.5" drives
boisy
parents: 1637
diff changeset
123 TYP.3 equ %00000001 3.5" media
1693
b75cb7ca03a6 Added TYP.SBO to rbfdefs (used by rb1773)
boisy
parents: 1676
diff changeset
124 TYP.SBO equ %00000010 Sector base offset (clear = 0; sect = 1)
1609
0502edac451d TYPH.DSQ now bit 4
boisy
parents: 1602
diff changeset
125 TYP.256 equ %00000000 256 byte sector media
0502edac451d TYPH.DSQ now bit 4
boisy
parents: 1602
diff changeset
126 TYP.512 equ %00000100 512 byte sector media
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
127 TYP.CCF equ %00100000 CoCo format
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
128 TYP.NCCF equ %00000000 Non-CoCo format
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
129
1609
0502edac451d TYPH.DSQ now bit 4
boisy
parents: 1602
diff changeset
130 * IT.DNS Definitions
0502edac451d TYPH.DSQ now bit 4
boisy
parents: 1602
diff changeset
131 *
1626
c01a65c813ce Definition files to use with as6809
boisy
parents: 1618
diff changeset
132
c01a65c813ce Definition files to use with as6809
boisy
parents: 1618
diff changeset
133 * If bit 7 of IT.TYP is set, IT.DNS is driver-dependent
c01a65c813ce Definition files to use with as6809
boisy
parents: 1618
diff changeset
134
1609
0502edac451d TYPH.DSQ now bit 4
boisy
parents: 1602
diff changeset
135 * IT.DNS bit definitions if bit 7 of IT.TYP is clear (floppy disk)
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
136 DNS.FM equ %00000000 Single-density (FM)
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
137 DNS.MFM equ %00000001 Double-density (MFM)
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
138 DNS.STD equ %00000000 Single track density (48 tpi)
1618
78b98373061d Updated with better comments on DNS.STD and DNS.DTD
boisy
parents: 1609
diff changeset
139 DNS.DTD equ %00000010 Double track density (96/135 tpi)
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
140
1199
4e48403790f0 Improved comments
boisy
parents: 480
diff changeset
141 * Floppy disk step rate definitions
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
142 STP.30ms equ 0 30ms step rate
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
143 STP.20ms equ 1 20ms step rate
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
144 STP.12ms equ 2 12ms step rate
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
145 STP.6ms equ 3 6ms step rate
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
146
1200
0a678473d5cf Major overhaul of headers to 'new' style
boisy
parents: 1199
diff changeset
147 pag
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
148 *************************************
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
149 * Random Block Path Descriptor Format
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
150 *
1199
4e48403790f0 Improved comments
boisy
parents: 480
diff changeset
151 * A path descriptor is created for every new path that is open
4e48403790f0 Improved comments
boisy
parents: 480
diff changeset
152 * via the I$Open system call (processed by IOMan). Process
4e48403790f0 Improved comments
boisy
parents: 480
diff changeset
153 * descriptors track state information of a path.
4e48403790f0 Improved comments
boisy
parents: 480
diff changeset
154 *
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
155 org PD.FST
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
156 PD.SMF rmb 1 State flags
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
157 PD.CP rmb 4 Current logical byte position
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
158 PD.SIZ rmb 4 File size
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
159 PD.SBL rmb 3 Segment beginning lsn
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
160 PD.SBP rmb 3 Segment beginning psn
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
161 PD.SSZ rmb 3 Segment size
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
162 PD.DSK rmb 2 Disk id
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
163 PD.DTB rmb 2 Drive table ptr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
164 org PD.OPT
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
165 rmb 1 Device type
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
166 PD.DRV rmb 1 Drive number
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
167 PD.STP rmb 1 Step rate
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
168 PD.TYP rmb 1 Disk device type (5" 8" other)
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
169 PD.DNS rmb 1 Density capability
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
170 PD.CYL rmb 2 Number of cylinders
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
171 PD.SID rmb 1 Number of surfaces
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
172 PD.VFY rmb 1 0=verify disk writes
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
173 PD.SCT rmb 2 Default sectors/track
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
174 PD.T0S rmb 2 Default sectors/track tr00,s0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
175 PD.ILV rmb 1 Sector interleave offset
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
176 PD.SAS rmb 1 Segment allocation size
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
177 PD.TFM rmb 1 DMA Transfer Mode
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
178 PD.Exten rmb 2 Path Extension (PE) for record locking
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
179 PD.SToff rmb 1 Sector/Track offsets (for "foreign" disk formats)
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
180 PD.ATT rmb 1 File attributes
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
181 PD.FD rmb 3 File descriptor psn
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
182 PD.DFD rmb 3 Directory file descriptor psn
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
183 PD.DCP rmb 4 File directory entry ptr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
184 PD.DVT rmb 2 User readable dev tbl ptr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
185
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
186 * State Flags
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
187 BUFMOD equ $01 Buffer modified
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
188 SINBUF equ $02 Sector in buffer
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
189 FDBUF equ $04 File descriptor in buffer
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
190 *EOFSEC equ $08 End of file sector
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
191 *EOF equ $10 End of file
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
192 InDriver equ $20 Currently in Disk Driver, or queued
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
193 BufBusy equ $40 Buffer is currently busy
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
194
1199
4e48403790f0 Improved comments
boisy
parents: 480
diff changeset
195 IFNE Level-1
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
196 ************************************
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
197 * Random Block Path Extension Format
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
198 *
1199
4e48403790f0 Improved comments
boisy
parents: 480
diff changeset
199 * RBF paths under Level Two have additional information that
4e48403790f0 Improved comments
boisy
parents: 480
diff changeset
200 * is referenced by the path extension area.
4e48403790f0 Improved comments
boisy
parents: 480
diff changeset
201 *
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
202 org 0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
203 PE.PE rmb 1 PE path number
1199
4e48403790f0 Improved comments
boisy
parents: 480
diff changeset
204 PE.PDptr rmb 2 Back ptr to this PE's Path Descriptor
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
205 PE.NxFil rmb 2 Drive Open-File list ptr
1199
4e48403790f0 Improved comments
boisy
parents: 480
diff changeset
206 PE.Confl rmb 2 Circular File Conflict list
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
207 PE.Lock rmb 1 Path lockout status
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
208 PE.LoLck rmb 4 Low Locked Logical addr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
209 PE.HiLck rmb 4 High Locked Logical addr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
210 PE.Wait rmb 2 PE ptr to (next) locked-out PE
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
211 PE.TmOut rmb 2 Max ticks to wait for locked segment
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
212 PE.Owner rmb 1 Process ID of owner of locked segment
1199
4e48403790f0 Improved comments
boisy
parents: 480
diff changeset
213 PE.Req rmb 1 Temp for PE.Lock in GAIN when LockSeg fails
4e48403790f0 Improved comments
boisy
parents: 480
diff changeset
214 PE.Prior rmb 1 Temp for process priority while in driver
4e48403790f0 Improved comments
boisy
parents: 480
diff changeset
215 PE.SigSg rmb 1 Signal code to send
4e48403790f0 Improved comments
boisy
parents: 480
diff changeset
216 PE.SigID rmb 1 Process ID to send the signal to
4e48403790f0 Improved comments
boisy
parents: 480
diff changeset
217 rmb 32-. Reserved
4e48403790f0 Improved comments
boisy
parents: 480
diff changeset
218 PE.FilNm rmb 32 Temp for filename during directory search
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
219
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
220 * PE.Lock status codes
1199
4e48403790f0 Improved comments
boisy
parents: 480
diff changeset
221 Unlocked equ 0 No portion of file is locked
4e48403790f0 Improved comments
boisy
parents: 480
diff changeset
222 RcdLock equ 1 Record from LoLck to HiLck locked
4e48403790f0 Improved comments
boisy
parents: 480
diff changeset
223 FileLock equ 2 Entire file locked
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
224 EofLock equ 4 End of file is locked
1199
4e48403790f0 Improved comments
boisy
parents: 480
diff changeset
225 ENDC
4e48403790f0 Improved comments
boisy
parents: 480
diff changeset
226
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
227
1200
0a678473d5cf Major overhaul of headers to 'new' style
boisy
parents: 1199
diff changeset
228 pag
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
229 ***********************
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
230 * LSN0 Disk Data Format
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
231 *
1199
4e48403790f0 Improved comments
boisy
parents: 480
diff changeset
232 * Logical Sector Number 0 is the first sector on an RBF formatted device
4e48403790f0 Improved comments
boisy
parents: 480
diff changeset
233 * and contains information about the device's size and format.
4e48403790f0 Improved comments
boisy
parents: 480
diff changeset
234 *
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
235 org 0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
236 DD.TOT rmb 3 Total number of sectors
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
237 DD.TKS rmb 1 Track size in sectors
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
238 DD.MAP rmb 2 Number of bytes in allocation bit map
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
239 DD.BIT rmb 2 Number of sectors/bit
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
240 DD.DIR rmb 3 Address of root directory fd
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
241 DD.OWN rmb 2 Owner
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
242 DD.ATT rmb 1 Attributes
1199
4e48403790f0 Improved comments
boisy
parents: 480
diff changeset
243 DD.DSK rmb 2 Disk ID
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
244 DD.FMT rmb 1 Disk format; density/sides
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
245 DD.SPT rmb 2 Sectors/track
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
246 DD.RES rmb 2 Reserved for future use
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
247 DD.SIZ equ . Device descriptor minimum size
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
248 DD.BT rmb 3 System bootstrap sector
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
249 DD.BSZ rmb 2 Size of system bootstrap
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
250 DD.DAT rmb 5 Creation date
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
251 DD.NAM rmb 32 Volume name
1199
4e48403790f0 Improved comments
boisy
parents: 480
diff changeset
252 DD.OPT rmb 32 Option area
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
253
1199
4e48403790f0 Improved comments
boisy
parents: 480
diff changeset
254 * DD.FMT Bit Definitions - valid only if device is a floppy disk
1618
78b98373061d Updated with better comments on DNS.STD and DNS.DTD
boisy
parents: 1609
diff changeset
255 FMT.SIDE equ %00000001 Single Sided=0, Double Sided=1
78b98373061d Updated with better comments on DNS.STD and DNS.DTD
boisy
parents: 1609
diff changeset
256 FMT.DNS equ %00000010 Single Density=0, Double Density=1
78b98373061d Updated with better comments on DNS.STD and DNS.DTD
boisy
parents: 1609
diff changeset
257 FMT.TDNS equ %00000100 Track Density: 48 TPI=0, 96/135 TPI=1
78b98373061d Updated with better comments on DNS.STD and DNS.DTD
boisy
parents: 1609
diff changeset
258 FMT.T0DN equ %00100000 Track 0 Density, see FMT.DNS
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
259
1199
4e48403790f0 Improved comments
boisy
parents: 480
diff changeset
260
1200
0a678473d5cf Major overhaul of headers to 'new' style
boisy
parents: 1199
diff changeset
261 pag
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
262 ************************
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
263 * File Descriptor Format
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
264 *
1199
4e48403790f0 Improved comments
boisy
parents: 480
diff changeset
265 * The file descriptor is a sector that is present for every file
4e48403790f0 Improved comments
boisy
parents: 480
diff changeset
266 * on an RBF device. It contains attributes, modification dates,
4e48403790f0 Improved comments
boisy
parents: 480
diff changeset
267 * and segment information on a file.
4e48403790f0 Improved comments
boisy
parents: 480
diff changeset
268 *
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
269 org 0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
270 FD.ATT rmb 1 Attributes
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
271 FD.OWN rmb 2 Owner
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
272 FD.DAT rmb 5 Date last modified
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
273 FD.LNK rmb 1 Link count
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
274 FD.SIZ rmb 4 File size
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
275 FD.Creat rmb 3 Segment list extension
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
276 FD.SEG equ . Beginning of segment list
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
277 * Segment List Entry Format
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
278 org 0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
279 FDSL.A rmb 3 Segment beginning physical sector number
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
280 FDSL.B rmb 2 Segment size
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
281 FDSL.S equ . Segment list entry size
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
282 FD.LS1 equ FD.SEG+((256-FD.SEG)/FDSL.S-1)*FDSL.S
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
283 FD.LS2 equ (256/FDSL.S-1)*FDSL.S
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
284 MINSEC set 16
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
285
1199
4e48403790f0 Improved comments
boisy
parents: 480
diff changeset
286
1200
0a678473d5cf Major overhaul of headers to 'new' style
boisy
parents: 1199
diff changeset
287 pag
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
288 ************************
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
289 * Directory Entry Format
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
290 *
1199
4e48403790f0 Improved comments
boisy
parents: 480
diff changeset
291 * Directory entries are part of a directory and define the name
4e48403790f0 Improved comments
boisy
parents: 480
diff changeset
292 * of the file, as well as a pointer to its file descriptor.
4e48403790f0 Improved comments
boisy
parents: 480
diff changeset
293 *
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
294 org 0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
295 DIR.NM rmb 29 File name
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
296 DIR.FD rmb 3 File descriptor physical sector number
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
297 DIR.SZ equ . Directory record size
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
298
1199
4e48403790f0 Improved comments
boisy
parents: 480
diff changeset
299
1200
0a678473d5cf Major overhaul of headers to 'new' style
boisy
parents: 1199
diff changeset
300 pag
0a678473d5cf Major overhaul of headers to 'new' style
boisy
parents: 1199
diff changeset
301 ********************
0a678473d5cf Major overhaul of headers to 'new' style
boisy
parents: 1199
diff changeset
302 * RBF Static Storage
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
303 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
304 * Overall Disk Static Storage
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
305 *
1199
4e48403790f0 Improved comments
boisy
parents: 480
diff changeset
306 * Note: This does not reserve any memory for drive tables. Each
4e48403790f0 Improved comments
boisy
parents: 480
diff changeset
307 * driver is responsible for reserving sufficient memory for
4e48403790f0 Improved comments
boisy
parents: 480
diff changeset
308 * the appropriate number of tables.
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
309 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
310 org V.USER Reserve required ($06)
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
311 V.NDRV rmb 1 Number of drives ($07)
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
312 rmb 8 reserved ($08)
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
313 DRVBEG equ . Beginning of drive tables ($10)
1199
4e48403790f0 Improved comments
boisy
parents: 480
diff changeset
314
4e48403790f0 Improved comments
boisy
parents: 480
diff changeset
315
1200
0a678473d5cf Major overhaul of headers to 'new' style
boisy
parents: 1199
diff changeset
316 pag
1199
4e48403790f0 Improved comments
boisy
parents: 480
diff changeset
317 ****************
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
318 * Global Storage For Disk Drive Tables
1199
4e48403790f0 Improved comments
boisy
parents: 480
diff changeset
319 *
4e48403790f0 Improved comments
boisy
parents: 480
diff changeset
320 * Each table contains the first 'DD.SIZ' bytes from
4e48403790f0 Improved comments
boisy
parents: 480
diff changeset
321 * LSN 0, and the current track, stepping rate,
4e48403790f0 Improved comments
boisy
parents: 480
diff changeset
322 * bitmap use flag, and disk type.
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
323 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
324 org 0
1199
4e48403790f0 Improved comments
boisy
parents: 480
diff changeset
325 rmb DD.SIZ Device descriptor, LSN 0
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
326 V.TRAK rmb 2 Current track
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
327 V.BMB rmb 1 Bit-map use flag
1199
4e48403790f0 Improved comments
boisy
parents: 480
diff changeset
328 V.FileHd rmb 2 Open file list for this drive
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
329 V.DiskID rmb 2 Disk ID
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
330 V.BMapSz rmb 1 Bitmap Size
1199
4e48403790f0 Improved comments
boisy
parents: 480
diff changeset
331 V.MapSct rmb 1 Lowest reasonable bitmap sector
4e48403790f0 Improved comments
boisy
parents: 480
diff changeset
332 V.ResBit rmb 1 Reserved bitmap sector (for compaction)
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
333 V.ScTkOf rmb 1 Sector/Track byte (Combined from descriptor)
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
334 V.ScOfst rmb 1 Sector offset split from byte above
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
335 V.TkOfst rmb 1 Track offset split from byte above
1199
4e48403790f0 Improved comments
boisy
parents: 480
diff changeset
336 rmb 4 Reserved
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
337 DRVMEM equ .
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
338
1199
4e48403790f0 Improved comments
boisy
parents: 480
diff changeset
339 ENDC
373
c07686556109 Added ifeq statements at top to allow for multiple use's of same def
boisy
parents: 71
diff changeset
340