summaryrefslogtreecommitdiff
path: root/v4.0/src/INC/SF.INC
diff options
context:
space:
mode:
Diffstat (limited to 'v4.0/src/INC/SF.INC')
-rw-r--r--v4.0/src/INC/SF.INC168
1 files changed, 168 insertions, 0 deletions
diff --git a/v4.0/src/INC/SF.INC b/v4.0/src/INC/SF.INC
new file mode 100644
index 0000000..dd6f188
--- /dev/null
+++ b/v4.0/src/INC/SF.INC
@@ -0,0 +1,168 @@
1; SCCSID = @(#)sf.asm 1.1 85/04/10
2BREAK <Internal system file table format>
3;
4; AN000 version 4.00 Jan. 1988
5; AN003 PTM 3680 -- make NAME offset the same as before (<=3.30)
6; AN009 PTM 3839 reorder SFT for MS WINDOWS
7
8;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
9; C A V E A T P R O G R A M M E R ;
10; ;
11;
12; system file table
13;
14
15SF STRUC
16SFLink DD ?
17SFCount DW ? ; number of entries
18SFTable DW ? ; beginning of array of the following
19SF ENDS
20
21;
22; system file table entry
23;
24
25sf_entry STRUC
26sf_ref_count DW ? ; number of processes sharing entry
27 ; if FCB then ref count
28sf_mode DW ? ; mode of access or high bit on if FCB
29sf_attr DB ? ; attribute of file
30sf_flags DW ? ;Bits 8-15
31 ; Bit 15 = 1 if remote file
32 ; = 0 if local file or device
33 ; Bit 14 = 1 if date/time is not to be
34 ; set from clock at CLOSE. Set by
35 ; FILETIMES and FCB_CLOSE. Reset by
36 ; other reseters of the dirty bit
37 ; (WRITE)
38 ; Bit 13 = Pipe bit (reserved)
39 ;
40 ; Bits 0-7 (old FCB_devid bits)
41 ; If remote file or local file, bit
42 ; 6=0 if dirty Device ID number, bits
43 ; 0-5 if local file.
44 ; bit 7=0 for local file, bit 7
45 ; =1 for local I/O device
46 ; If local I/O device, bit 6=0 if EOF (input)
47 ; Bit 5=1 if Raw mode
48 ; Bit 0=1 if console input device
49 ; Bit 1=1 if console output device
50 ; Bit 2=1 if null device
51 ; Bit 3=1 if clock device
52sf_devptr DD ? ; Points to DPB if local file, points
53 ; to device header if local device,
54 ; points to net device header if
55 ; remote
56sf_firclus DW ? ; First cluster of file (bit 15 = 0)
57sf_time DW ? ; Time associated with file
58sf_date DW ? ; Date associated with file
59sf_size DD ? ; Size associated with file
60sf_position DD ? ; Read/Write pointer or LRU count for FCBs
61;
62; Starting here, the next 7 bytes may be used by the file system to store an
63; ID
64;
65sf_cluspos DW ? ; Position of last cluster accessed
66sf_dirsec DD ? ; Sector number of directory sector for
67 ; for this file
68sf_dirpos DB ? ; Offset of this entry in the above
69;
70; End of 7 bytes of file-system specific info.
71;
72sf_name DB 11 DUP (?) ; 11 character name that is in the
73 ; directory entry. This is used by
74 ; close to detect file deleted and
75 ; disk changed errors.
76
77; SHARING INFO
78sf_chain DD ? ; link to next SF
79sf_UID DW ?
80sf_PID DW ?
81sf_MFT DW ?
82sf_lstclus DW ? ;AN009; Last cluster accessed
83sf_IFS_HDR DD ?
84sf_entry ENDS
85
86sf_fsda EQU BYTE PTR sf_cluspos ;DOS 4.00
87sf_serial_ID EQU WORD PTR sf_firclus ;DOS 4.00
88sf_netid EQU BYTE PTR sf_cluspos
89sf_OpenAge EQU WORD PTR sf_position+2
90sf_LRU EQU WORD PTR sf_position
91
92sf_default_number EQU 5h
93
94;
95; Note that we need to mark an SFT as being busy for OPEN/CREATE. This is
96; because an INT 24 may prevent us from 'freeing' it. We mark this as such
97; by placing a -1 in the ref_count field.
98;
99
100sf_busy EQU -1
101
102
103; mode mask for FCB detection
104sf_isfcb EQU 1000000000000000B
105
106; Flag word masks
107sf_isnet EQU 1000000000000000B
108sf_close_nodate EQU 0100000000000000B
109sf_pipe EQU 0010000000000000B
110sf_no_inherit EQU 0001000000000000B
111sf_net_spool EQU 0000100000000000B
112Handle_Fail_I24 EQU 0000000100000000B ;BIT 8 - DISK FULL I24 ERROR
113
114; Local file/device flag masks
115devid_file_clean EQU 40h ; true if file and not written
116devid_file_mask_drive EQU 3Fh ; mask for drive number
117
118devid_device EQU 80h ; true if a device
119devid_device_EOF EQU 40h ; true if end of file reached
120devid_device_raw EQU 20h ; true if in raw mode
121devid_device_special EQU 10h ; true if special device
122devid_device_clock EQU 08h ; true if clock device
123devid_device_null EQU 04h ; true if null device
124devid_device_con_out EQU 02h ; true if console output
125devid_device_con_in EQU 01h ; true if consle input
126; ;
127; C A V E A T P R O G R A M M E R ;
128;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
129
130;
131; structure of devid field as returned by IOCTL is:
132;
133; BIT 7 6 5 4 3 2 1 0
134; |---|---|---|---|---|---|---|---|
135; | I | E | R | S | I | I | I | I |
136; | S | O | A | P | S | S | S | S |
137; | D | F | W | E | C | N | C | C |
138; | E | | | C | L | U | O | I |
139; | V | | | L | K | L | T | N |
140; |---|---|---|---|---|---|---|---|
141; ISDEV = 1 if this channel is a device
142; = 0 if this channel is a disk file
143;
144; If ISDEV = 1
145;
146; EOF = 0 if End Of File on input
147; RAW = 1 if this device is in Raw mode
148; = 0 if this device is cooked
149; ISCLK = 1 if this device is the clock device
150; ISNUL = 1 if this device is the null device
151; ISCOT = 1 if this device is the console output
152; ISCIN = 1 if this device is the console input
153;
154; If ISDEV = 0
155; EOF = 0 if channel has been written
156; Bits 0-5 are the block device number for
157; the channel (0 = A, 1 = B, ...)
158;
159devid_ISDEV EQU 80h
160devid_EOF EQU 40h
161devid_RAW EQU 20h
162devid_SPECIAL EQU 10H
163devid_ISCLK EQU 08h
164devid_ISNUL EQU 04h
165devid_ISCOT EQU 02h
166devid_ISCIN EQU 01h
167
168devid_block_dev EQU 1Fh ; mask for block device number