diff options
Diffstat (limited to 'v4.0/src/INC/SF.INC')
| -rw-r--r-- | v4.0/src/INC/SF.INC | 168 |
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 | ||
| 2 | BREAK <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 | |||
| 15 | SF STRUC | ||
| 16 | SFLink DD ? | ||
| 17 | SFCount DW ? ; number of entries | ||
| 18 | SFTable DW ? ; beginning of array of the following | ||
| 19 | SF ENDS | ||
| 20 | |||
| 21 | ; | ||
| 22 | ; system file table entry | ||
| 23 | ; | ||
| 24 | |||
| 25 | sf_entry STRUC | ||
| 26 | sf_ref_count DW ? ; number of processes sharing entry | ||
| 27 | ; if FCB then ref count | ||
| 28 | sf_mode DW ? ; mode of access or high bit on if FCB | ||
| 29 | sf_attr DB ? ; attribute of file | ||
| 30 | sf_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 | ||
| 52 | sf_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 | ||
| 56 | sf_firclus DW ? ; First cluster of file (bit 15 = 0) | ||
| 57 | sf_time DW ? ; Time associated with file | ||
| 58 | sf_date DW ? ; Date associated with file | ||
| 59 | sf_size DD ? ; Size associated with file | ||
| 60 | sf_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 | ; | ||
| 65 | sf_cluspos DW ? ; Position of last cluster accessed | ||
| 66 | sf_dirsec DD ? ; Sector number of directory sector for | ||
| 67 | ; for this file | ||
| 68 | sf_dirpos DB ? ; Offset of this entry in the above | ||
| 69 | ; | ||
| 70 | ; End of 7 bytes of file-system specific info. | ||
| 71 | ; | ||
| 72 | sf_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 | ||
| 78 | sf_chain DD ? ; link to next SF | ||
| 79 | sf_UID DW ? | ||
| 80 | sf_PID DW ? | ||
| 81 | sf_MFT DW ? | ||
| 82 | sf_lstclus DW ? ;AN009; Last cluster accessed | ||
| 83 | sf_IFS_HDR DD ? | ||
| 84 | sf_entry ENDS | ||
| 85 | |||
| 86 | sf_fsda EQU BYTE PTR sf_cluspos ;DOS 4.00 | ||
| 87 | sf_serial_ID EQU WORD PTR sf_firclus ;DOS 4.00 | ||
| 88 | sf_netid EQU BYTE PTR sf_cluspos | ||
| 89 | sf_OpenAge EQU WORD PTR sf_position+2 | ||
| 90 | sf_LRU EQU WORD PTR sf_position | ||
| 91 | |||
| 92 | sf_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 | |||
| 100 | sf_busy EQU -1 | ||
| 101 | |||
| 102 | |||
| 103 | ; mode mask for FCB detection | ||
| 104 | sf_isfcb EQU 1000000000000000B | ||
| 105 | |||
| 106 | ; Flag word masks | ||
| 107 | sf_isnet EQU 1000000000000000B | ||
| 108 | sf_close_nodate EQU 0100000000000000B | ||
| 109 | sf_pipe EQU 0010000000000000B | ||
| 110 | sf_no_inherit EQU 0001000000000000B | ||
| 111 | sf_net_spool EQU 0000100000000000B | ||
| 112 | Handle_Fail_I24 EQU 0000000100000000B ;BIT 8 - DISK FULL I24 ERROR | ||
| 113 | |||
| 114 | ; Local file/device flag masks | ||
| 115 | devid_file_clean EQU 40h ; true if file and not written | ||
| 116 | devid_file_mask_drive EQU 3Fh ; mask for drive number | ||
| 117 | |||
| 118 | devid_device EQU 80h ; true if a device | ||
| 119 | devid_device_EOF EQU 40h ; true if end of file reached | ||
| 120 | devid_device_raw EQU 20h ; true if in raw mode | ||
| 121 | devid_device_special EQU 10h ; true if special device | ||
| 122 | devid_device_clock EQU 08h ; true if clock device | ||
| 123 | devid_device_null EQU 04h ; true if null device | ||
| 124 | devid_device_con_out EQU 02h ; true if console output | ||
| 125 | devid_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 | ; | ||
| 159 | devid_ISDEV EQU 80h | ||
| 160 | devid_EOF EQU 40h | ||
| 161 | devid_RAW EQU 20h | ||
| 162 | devid_SPECIAL EQU 10H | ||
| 163 | devid_ISCLK EQU 08h | ||
| 164 | devid_ISNUL EQU 04h | ||
| 165 | devid_ISCOT EQU 02h | ||
| 166 | devid_ISCIN EQU 01h | ||
| 167 | |||
| 168 | devid_block_dev EQU 1Fh ; mask for block device number | ||