summaryrefslogtreecommitdiff
path: root/v4.0/src/INC/CPMFCB.INC
diff options
context:
space:
mode:
Diffstat (limited to 'v4.0/src/INC/CPMFCB.INC')
-rw-r--r--v4.0/src/INC/CPMFCB.INC125
1 files changed, 125 insertions, 0 deletions
diff --git a/v4.0/src/INC/CPMFCB.INC b/v4.0/src/INC/CPMFCB.INC
new file mode 100644
index 0000000..1d6a6bf
--- /dev/null
+++ b/v4.0/src/INC/CPMFCB.INC
@@ -0,0 +1,125 @@
1; SCCSID = @(#)cpmfcb.asm 1.1 85/04/10
2; SCCSID = @(#)cpmfcb.asm 1.1 85/04/10
3;BREAK <File Control Block definition>
4
5;
6; Field definition for FCBs
7; The FCB has the following structure:
8;
9; +---------------------------+
10; | Drive indicator(byte) |
11; +---------------------------+
12; | Filename (8 chars) |
13; +---------------------------+
14; | Extension (3 chars) |
15; +---------------------------+
16; | Current Extent(word) |
17; +---------------------------+
18; | Record size (word) |
19; +---------------------------+
20; | File Size (2 words) |
21; +---------------------------+
22; | Date of write |
23; +---------------------------+
24; | Time of write |
25; +---------------------------+
26;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
27; C A V E A T P R O G R A M M E R ;
28; ;
29; +---------------------------+
30; | 8 bytes reserved |
31; +---------------------------+
32; ;
33; C A V E A T P R O G R A M M E R ;
34;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
35; | next record number |
36; +---------------------------+
37; | random record number |
38; +---------------------------+
39;
40
41sys_fcb STRUC
42fcb_drive DB ?
43fcb_name DB 8 DUP (?)
44fcb_ext DB 3 DUP (?)
45fcb_EXTENT DW ?
46fcb_RECSIZ DW ? ; Size of record (user settable)
47fcb_FILSIZ DW ? ; Size of file in bytes; used with the
48 ; following word
49fcb_DRVBP DW ? ; BP for SEARCH FIRST and SEARCH NEXT
50fcb_FDATE DW ? ; Date of last writing
51fcb_FTIME DW ? ; Time of last writing
52;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
53; C A V E A T P R O G R A M M E R ;
54; ;
55fcb_reserved DB 8 DUP (?) ; RESERVED
56; ;
57; C A V E A T P R O G R A M M E R ;
58;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
59fcb_NR DB ? ; Next record
60fcb_RR DB 4 DUP (?) ; Random record
61sys_fcb ENDS
62
63FILDIRENT = fcb_FILSIZ ; Used only by SEARCH FIRST and SEARCH
64 ; NEXT
65
66fcb_sfn EQU BYTE PTR fcb_reserved
67
68; Note that fcb_net_handle, fcb_nsl_drive, fcb_nsld_drive and fcb_l_drive
69; all must point to the same byte. Otherwise, the FCBRegen will fail.
70; NOTE about this byte (fcb_nsl_drive)
71; The high two bits of this byte are used as follows to indicate the FCB type
72; 00 means a local file or device with sharing loaded
73; 10 means a remote (network) file
74; 01 means a local file with no sharing loaded
75; 11 means a local device with no sharing loaded
76
77;
78; Network FCB
79;
80fcb_net_drive EQU BYTE PTR fcb_reserved+1
81fcb_net_handle EQU WORD PTR fcb_reserved+2
82fcb_netID EQU DWORD PTR fcb_reserved+4
83
84;
85; No sharing local file FCB
86;
87fcb_nsl_drive EQU BYTE PTR fcb_reserved+1
88fcb_nsl_bits EQU BYTE PTR fcb_reserved+2
89fcb_nsl_firclus EQU WORD PTR fcb_reserved+3
90fcb_nsl_dirsec EQU WORD PTR fcb_reserved+5
91fcb_nsl_dirpos EQU BYTE PTR fcb_reserved+7
92
93;
94; No sharing local device FCB
95;
96fcb_nsld_drive EQU BYTE PTR fcb_reserved+1
97fcb_nsld_drvptr EQU DWORD PTR fcb_reserved+2
98
99;
100; Sharing local FCB
101;
102fcb_l_drive EQU BYTE PTR fcb_reserved+1
103fcb_l_firclus EQU WORD PTR fcb_reserved+2
104fcb_l_mfs EQU WORD PTR fcb_reserved+4
105fcb_l_attr EQU BYTE PTR fcb_reserved+6
106
107;
108; Bogusness: the four cases are:
109;
110; local file 00
111; local device 40
112; local sharing C0
113; network 80
114;
115; Since sharing and network collide, we cannot use a test instruction for
116; deciding whether a network or a share check in involved
117;
118FCBDEVICE EQU 040h
119FCBNETWORK EQU 080h
120FCBSHARE EQU 0C0h
121
122; FCBSPECIAL must be able to mask off both net and share
123FCBSPECIAL EQU 080h
124FCBMASK EQU 0C0h
125 \ No newline at end of file