diff options
Diffstat (limited to 'v4.0/src/INC/CPMFCB.INC')
| -rw-r--r-- | v4.0/src/INC/CPMFCB.INC | 125 |
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 | |||
| 41 | sys_fcb STRUC | ||
| 42 | fcb_drive DB ? | ||
| 43 | fcb_name DB 8 DUP (?) | ||
| 44 | fcb_ext DB 3 DUP (?) | ||
| 45 | fcb_EXTENT DW ? | ||
| 46 | fcb_RECSIZ DW ? ; Size of record (user settable) | ||
| 47 | fcb_FILSIZ DW ? ; Size of file in bytes; used with the | ||
| 48 | ; following word | ||
| 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 ; | ||
| 54 | ; ; | ||
| 55 | fcb_reserved DB 8 DUP (?) ; RESERVED | ||
| 56 | ; ; | ||
| 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 | ||
| 61 | sys_fcb ENDS | ||
| 62 | |||
| 63 | FILDIRENT = fcb_FILSIZ ; Used only by SEARCH FIRST and SEARCH | ||
| 64 | ; NEXT | ||
| 65 | |||
| 66 | fcb_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 | ; | ||
| 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 | ||
| 83 | |||
| 84 | ; | ||
| 85 | ; No sharing local file FCB | ||
| 86 | ; | ||
| 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 | ||
| 92 | |||
| 93 | ; | ||
| 94 | ; No sharing local device FCB | ||
| 95 | ; | ||
| 96 | fcb_nsld_drive EQU BYTE PTR fcb_reserved+1 | ||
| 97 | fcb_nsld_drvptr EQU DWORD PTR fcb_reserved+2 | ||
| 98 | |||
| 99 | ; | ||
| 100 | ; Sharing local FCB | ||
| 101 | ; | ||
| 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 | ||
| 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 | ; | ||
| 118 | FCBDEVICE EQU 040h | ||
| 119 | FCBNETWORK EQU 080h | ||
| 120 | FCBSHARE EQU 0C0h | ||
| 121 | |||
| 122 | ; FCBSPECIAL must be able to mask off both net and share | ||
| 123 | FCBSPECIAL EQU 080h | ||
| 124 | FCBMASK EQU 0C0h | ||
| 125 | \ No newline at end of file | ||