comparison os9/level1/rbfdefs @ 31:bd2b07db8917 cocoos9lv2v3

CoCoOS9 version
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sat, 14 Jul 2018 15:16:13 +0900
parents
children
comparison
equal deleted inserted replaced
30:7b1b25ff010a 31:bd2b07db8917
1 opt -l
2 ttl Random Block File Manager Definitions
3
4 ***************
5 * Modification History
6
7 * 82/07/13 PD.Exten added to path descriptor by RFD.
8 * 82/07/13 PE entries defined by RFD.
9 * 82/07/15 V.FileHd inserted in drive static by RFD.
10 * 82/09/10 Level One/ Level two cond added by WGP.
11 * 82/09/17 Record Lock cond added by WGP.
12 * 82/09/17 PD.SLE renamed to PD.Creat by RFD.
13 * 82/09/17 V.DiskID, V.BMapSz, V.MapSct added for smart
14 * multi-sector bitmap searching by RFD.
15 * 82/09/20 reserved areas added in static storage.
16
17 pag
18 ************************************************************
19 *
20 * Random Block Path Descriptor Format
21 *
22 org PD.FST
23 PD.SMF rmb 1 State flags
24 PD.CP rmb 4 Current logical byte position
25 PD.SIZ rmb 4 File size
26 PD.SBL rmb 3 Segment beginning lsn
27 PD.SBP rmb 3 Segment beginning psn
28 PD.SSZ rmb 3 Segment size
29 PD.DSK rmb 2 Disk id
30 PD.DTB rmb 2 Drive table ptr
31 org PD.OPT
32 rmb 1 Device type
33 PD.DRV rmb 1 Drive number
34 PD.STP rmb 1 Step rate
35 PD.TYP rmb 1 Disk device type (5" 8" other)
36 PD.DNS rmb 1 Density capability
37 PD.CYL rmb 2 Number of cylinders
38 PD.SID rmb 1 Number of surfaces
39 PD.VFY rmb 1 0=verify disk writes
40 PD.SCT rmb 2 Default sectors/track
41 PD.T0S rmb 2 Default sectors/track tr00,s0
42 PD.ILV rmb 1 Sector interleave offset
43 PD.SAS rmb 1 Segment allocation size
44 PD.TFM rmb 1 DMA Transfer Mode
45 PD.Exten rmb 2 Path Extension (PE) for record locking
46 rmb PDSIZE-.-13
47 PD.ATT rmb 1 File attributes
48 PD.FD rmb 3 File descriptor psn
49 PD.DFD rmb 3 Directory file descriptor psn
50 PD.DCP rmb 4 File directory entry ptr
51 PD.DVT rmb 2 User readable dev tbl ptr
52
53 * State Flags
54 BUFMOD equ 1 Buffer modified
55 SINBUF equ 2 Sector in buffer
56 FDBUF equ 4 File descriptor in buffer
57 EOFSEC equ 8 End of file sector
58 EOF equ 16 End of file
59
60 ifne LEVEL-1
61 **************************************************
62 * Random Block Path Extension Format
63
64 org 0
65 PE.PE rmb 1 PE path number
66 PE.PDptr rmb 2 back ptr to this PE's Path Descriptor
67 PE.NxFil rmb 2 Drive Open-File list ptr
68 PE.Confl rmb 2 circular File Conflict list
69 PE.Lock rmb 1 Path lockout status
70 PE.LoLck rmb 4 Low Locked Logical addr
71 PE.HiLck rmb 4 High Locked Logical addr
72 PE.Wait rmb 2 PE ptr to (next) locked-out PE
73 PE.TmOut rmb 2 Max ticks to wait for locked segment
74 PE.Owner rmb 1 Process ID of owner of locked segment
75
76 * PE.Lock status codes
77 Unlocked equ 0 no portion of file is locked
78 RcdLock equ 1 record from LoLck to HiLck locked
79 FileLock equ 2 entire file locked
80 EofLock equ 4 End of file is locked
81 endc
82
83 *
84 * Device Descriptor Format
85 *
86
87 org 0
88 DD.TOT rmb 3 Total number of sectors
89 DD.TKS rmb 1 Track size in sectors
90 DD.MAP rmb 2 Number of bytes in allocation bit map
91 DD.BIT rmb 2 Number of sectors/bit
92 DD.DIR rmb 3 Address of root directory fd
93 DD.OWN rmb 2 Owner
94 DD.ATT rmb 1 Attributes
95 DD.DSK rmb 2 Disk id
96 DD.FMT rmb 1 Disk format; density/sides
97 DD.SPT rmb 2 Sectors/track
98 DD.RES rmb 2 Reserved for future use
99 DD.SIZ equ . Device descriptor minimum size
100 DD.BT rmb 3 System bootstrap sector
101 DD.BSZ rmb 2 Size of system bootstrap
102 DD.DAT rmb 5 Creation date
103 DD.NAM rmb 32 Volume name
104 DD.OPT rmb 32 option area
105
106
107 *
108 * File Descriptor Format
109 *
110
111 org 0
112 FD.ATT rmb 1 Attributes
113 FD.OWN rmb 2 Owner
114 FD.DAT rmb 5 Date last modified
115 FD.LNK rmb 1 Link count
116 FD.SIZ rmb 4 File size
117 FD.Creat rmb 3 Segment list extension
118 FD.SEG equ . Beginning of segment list
119
120 * Segment List Entry Format
121 org 0
122 FDSL.A rmb 3 Segment beginning physical sector number
123 FDSL.B rmb 2 Segment size
124 FDSL.S equ . Segment list entry size
125
126 FD.LS1 equ FD.SEG+((256-FD.SEG)/FDSL.S-1)*FDSL.S
127 FD.LS2 equ (256/FDSL.S-1)*FDSL.S
128
129 MINSEC set 16
130
131
132
133 *
134 * Directory Entry Format
135 *
136
137 org 0
138 DIR.NM rmb 29 File name
139 DIR.FD rmb 3 File descriptor physical sector number
140 DIR.SZ equ . Diectory record size
141
142
143 ****************
144 *
145 * Static Storage
146 *
147 *
148 * Overall Disk Static Storage
149 *
150 * Note: This does Not reserve Any memory for Drive Tables
151 * Each Driver is responsible for reserving sufficient
152 * memory for the appropriate number of tables.
153 *
154 org V.USER Reserve required
155 V.NDRV rmb 1 Number of drives
156 rmb 8 reserved
157 DRVBEG equ . Beginning of drive tables
158 *
159 * Global Storage For Disk Drive Tables
160 * Each Table Contains The First 'DD.Siz' Bytes
161 * From Sector 0, And The Current Track, Stepping Rate,
162 * Bit-Map Use Flag, And Disk Type
163 *
164 org 0
165 rmb DD.SIZ Device descriptor, sector 0
166 V.TRAK rmb 2 Current track
167 V.BMB rmb 1 Bit-map use flag
168 V.FileHd rmb 2 open file list for this drive
169 V.DiskID rmb 2 Disk ID
170 V.BMapSz rmb 1 Bitmap Size
171 V.MapSct rmb 1 lowest reasonable bitmap sector
172 rmb 8 reserved
173 DRVMEM equ .
174
175 opt l