1 ; SCCSID = @(#)cpmfcb.asm 1.1 85/04/10
2 ; SCCSID = @(#)cpmfcb.asm 1.1 85/04/10
3 ;BREAK <File Control Block definition>
6 ; Field definition for FCBs
7 ; The FCB has the following structure:
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 ; +---------------------------+
23 ; +---------------------------+
25 ; +---------------------------+
26 ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
27 ; C A V E A T P R O G R A M M E R ;
29 ; +---------------------------+
30 ; | 8 bytes reserved |
31 ; +---------------------------+
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 ; +---------------------------+
46 fcb_RECSIZ DW ? ; Size of record (user settable)
47 fcb_FILSIZ DW ? ; Size of file in bytes; used with the
49 fcb_DRVBP DW ? ; BP for SEARCH FIRST and SEARCH NEXT
50 fcb_FDATE DW ? ; Date of last writing
51 fcb_FTIME DW ? ; Time of last writing
52 ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
53 ; C A V E A T P R O G R A M M E R ;
55 fcb_reserved DB 8 DUP (?) ; RESERVED
57 ; C A V E A T P R O G R A M M E R ;
58 ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
59 fcb_NR DB ? ; Next record
60 fcb_RR DB 4 DUP (?) ; Random record
63 FILDIRENT = fcb_FILSIZ ; Used only by SEARCH FIRST and SEARCH
66 fcb_sfn EQU BYTE PTR fcb_reserved
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
80 fcb_net_drive EQU BYTE PTR fcb_reserved+1
81 fcb_net_handle EQU WORD PTR fcb_reserved+2
82 fcb_netID EQU DWORD PTR fcb_reserved+4
85 ; No sharing local file FCB
87 fcb_nsl_drive EQU BYTE PTR fcb_reserved+1
88 fcb_nsl_bits EQU BYTE PTR fcb_reserved+2
89 fcb_nsl_firclus EQU WORD PTR fcb_reserved+3
90 fcb_nsl_dirsec EQU WORD PTR fcb_reserved+5
91 fcb_nsl_dirpos EQU BYTE PTR fcb_reserved+7
94 ; No sharing local device FCB
96 fcb_nsld_drive EQU BYTE PTR fcb_reserved+1
97 fcb_nsld_drvptr EQU DWORD PTR fcb_reserved+2
102 fcb_l_drive EQU BYTE PTR fcb_reserved+1
103 fcb_l_firclus EQU WORD PTR fcb_reserved+2
104 fcb_l_mfs EQU WORD PTR fcb_reserved+4
105 fcb_l_attr EQU BYTE PTR fcb_reserved+6
108 ; Bogusness: the four cases are:
115 ; Since sharing and network collide, we cannot use a test instruction for
116 ; deciding whether a network or a share check in involved
122 ; FCBSPECIAL must be able to mask off both net and share