diff options
| author | 2024-04-25 21:24:10 +0100 | |
|---|---|---|
| committer | 2024-04-25 22:32:27 +0000 | |
| commit | 2d04cacc5322951f187bb17e017c12920ac8ebe2 (patch) | |
| tree | 80ee017efa878dfd5344b44249e6a241f2a7f6e2 /v4.0/src/INC/FASTOPEN.INC | |
| parent | Merge pull request #430 from jpbaltazar/typoptbr (diff) | |
| download | ms-dos-main.tar.gz ms-dos-main.tar.xz ms-dos-main.zip | |
Diffstat (limited to 'v4.0/src/INC/FASTOPEN.INC')
| -rw-r--r-- | v4.0/src/INC/FASTOPEN.INC | 148 |
1 files changed, 148 insertions, 0 deletions
diff --git a/v4.0/src/INC/FASTOPEN.INC b/v4.0/src/INC/FASTOPEN.INC new file mode 100644 index 0000000..a01c6da --- /dev/null +++ b/v4.0/src/INC/FASTOPEN.INC | |||
| @@ -0,0 +1,148 @@ | |||
| 1 | ; | ||
| 2 | ; EXPORT DATE: 9/11 | ||
| 3 | ;Equates for FASTOPEN. | ||
| 4 | |||
| 5 | ;FASTOPEN NAME CACHING Subfunctions | ||
| 6 | FONC_Look_up equ 1 | ||
| 7 | FONC_insert equ 2 | ||
| 8 | FONC_delete equ 3 | ||
| 9 | FONC_update equ 4 | ||
| 10 | FONC_purge equ 5 ;reserved for the future use. | ||
| 11 | |||
| 12 | ;FASTOPEN EXTENT CACHING Subfunctions | ||
| 13 | FSK_Open equ 11 ;AN000; | ||
| 14 | FSK_Close equ 12 ;AN000; | ||
| 15 | FSK_Delete equ 13 ;AN000; | ||
| 16 | FSK_Lookup equ 14 ;AN000; | ||
| 17 | FSK_Insert equ 15 ;AN000; | ||
| 18 | FSK_Trunc equ 16 ;AN000; | ||
| 19 | |||
| 20 | HeaderSize equ 8 ; size of file header (8 bytes) ;AN000; | ||
| 21 | ExtendSize equ 8 ; size of extend (8 bytes) ;AN000; | ||
| 22 | Num_Of_Pages equ 1 ; number of pages ;AN000; | ||
| 23 | Num_Of_Segs equ 2 ; number of frame segments ;AN000; | ||
| 24 | Stayresident equ 04ch ; terminate and stay resident function code | ||
| 25 | |||
| 26 | |||
| 27 | ;Equates used in DOS. | ||
| 28 | FastOpen_Set equ 00000001B | ||
| 29 | FastOpen_Reset equ 11111110B | ||
| 30 | Lookup_Success equ 00000010B | ||
| 31 | Lookup_Reset equ 11111101B | ||
| 32 | Special_Fill_Set equ 00000100B | ||
| 33 | Special_Fill_Reset equ 11111011B | ||
| 34 | No_Lookup equ 00001000B | ||
| 35 | Set_For_Search equ 00010000B ;DCR 167 | ||
| 36 | |||
| 37 | |||
| 38 | ;============= FastOpen Data Structures ===================== | ||
| 39 | |||
| 40 | Fastopen_Entry STRUC ;Fastopen Entry pointer in DOS | ||
| 41 | Fastopen_Entry_size dw 4 ;size of the following | ||
| 42 | Fastopen_Name_Caching dd ? | ||
| 43 | ;Fastopen_FatChain_Caching dd ? ;reserved for future use | ||
| 44 | Fastopen_Entry ENDS | ||
| 45 | ; | ||
| 46 | |||
| 47 | |||
| 48 | CMPCT_DIR_INFO STRUC ;compact version of Dir Info. | ||
| 49 | CDI_file_name db 11 dup (' ') | ||
| 50 | CDI_file_attr db ? | ||
| 51 | CDI_codepage dw ? | ||
| 52 | CDI_extcluster dw ? | ||
| 53 | CDI_attr2 db ? | ||
| 54 | CDI_time dw ? | ||
| 55 | CDI_date dw ? | ||
| 56 | CDI_cluster dw ? | ||
| 57 | CDI_filesize dd ? | ||
| 58 | CMPCT_DIR_INFO ENDS | ||
| 59 | ; | ||
| 60 | |||
| 61 | ORIG_DIR_INFO STRUC | ||
| 62 | ODI_head db 17 dup (?) | ||
| 63 | ODI_skip db 5 dup (0) ;reserved for DOS. FASTOPEN does not | ||
| 64 | ODI_tail db 10 dup (?) ; use ODI_skip part. | ||
| 65 | ORIG_DIR_INFO ENDS | ||
| 66 | ; | ||
| 67 | |||
| 68 | ODI_head_leng equ 17 | ||
| 69 | ODI_skip_leng equ 5 | ||
| 70 | ODI_tail_leng equ 10 | ||
| 71 | ; | ||
| 72 | |||
| 73 | FASTOPEN_EXTENDED_INFO STRUC | ||
| 74 | FEI_dirpos db 0 | ||
| 75 | FEI_dirsec dd 0 | ||
| 76 | FEI_clusnum dw 0 | ||
| 77 | FEI_lastent dw 0 ; for search first | ||
| 78 | FEI_dirstart dw 0 ; for search first | ||
| 79 | FASTOPEN_EXTENDED_INFO ENDS | ||
| 80 | ; | ||
| 81 | |||
| 82 | NAME_RECORD STRUC | ||
| 83 | nLRU_ptr dw -1 | ||
| 84 | nMRU_ptr dw -1 ;reverse of nLRU_ptr | ||
| 85 | nChild_ptr dw -1 | ||
| 86 | nSibling_ptr dw -1 | ||
| 87 | nBackward_ptr dw -1 ;points to preceding node | ||
| 88 | nCmpct_Dir_Info db size Cmpct_Dir_Info dup (' ') | ||
| 89 | nExtended_Info db size Fastopen_Extended_Info dup (?) | ||
| 90 | NAME_RECORD ENDS | ||
| 91 | ; | ||
| 92 | |||
| 93 | DRIVE_CACHE_HEADER STRUC ;drive cache header | ||
| 94 | DCH_LRU_ROOT dw 0 ;Header of the LRU chain of this drive | ||
| 95 | DCH_MRU_ROOT dw 0 ;offset to the last entry of LRU chain | ||
| 96 | DCH_Child_ptr dw -1 ;the first child in Name cache seg. | ||
| 97 | DCH_Sibling_ptr dw -1 ;points to the next drive cache header | ||
| 98 | DCH_Drive_letter db 'C' ;drive letter | ||
| 99 | DCH_Num_Entries dw 0 ;Number of entries in the Name cache. | ||
| 100 | DCH_Name_Buff dw 0 ;pointer to name cahe buffer | ||
| 101 | DRIVE_CACHE_HEADER ENDS | ||
| 102 | ; | ||
| 103 | |||
| 104 | |||
| 105 | |||
| 106 | |||
| 107 | |||
| 108 | ;======== FAST SEEK FUNCTION DATA STRUCTURES ======================= | ||
| 109 | |||
| 110 | DRIVE_HEADER STRUC ; Drive header structure ;AN000; | ||
| 111 | Drive_Number dw 0 ; drive number ;AN000; | ||
| 112 | Extent_Count dw 0 ; reserved for debugging | ||
| 113 | MRU_Hdr_Ptr dw 0 ; pointer to OPEN Queue | ||
| 114 | Free_ptr dw 0 ; pointer to FREE buffer ;AN000; | ||
| 115 | Close_Ptr dw 0 ; pointer to CLOSE Queue ;AN000; | ||
| 116 | Buff_Size dw 0 ; cache buffer size including header ;AN000; | ||
| 117 | Free_Size dw 0 ; size of Free area in bytes | ||
| 118 | Next_Drv_Hdr_Ptr dw 0 ; pointer to next drive header | ||
| 119 | DRIVE_HEADER ENDS | ||
| 120 | |||
| 121 | |||
| 122 | |||
| 123 | FILE_HEADER STRUC ; File header structure ;AN000; | ||
| 124 | FH_Phys_Clus_Num dw 0 ; starting physcial clustnum of file ;AN000; | ||
| 125 | FH_Refer_Count dw 0 ; reference count ;AN000; | ||
| 126 | FH_Next_Extn_Ptr dw 0 ; pointer to first extent of the file;AN000; | ||
| 127 | FH_Next_Hdr_Ptr dw 0 ; pointer to next file header ;AN000; | ||
| 128 | FH_MRU_Extn_Ptr dw 0 ; pointer to MRU extent | ||
| 129 | dw 0 | ||
| 130 | dw 0 | ||
| 131 | dw 0 | ||
| 132 | FILE_HEADER ENDS ;AN000; | ||
| 133 | |||
| 134 | |||
| 135 | |||
| 136 | EXTENT_HEADER STRUC ; extend header structure ;AN000; | ||
| 137 | EH_Logic_Clus_Num dw 0 ; starting logical clus num of extent;AN000; | ||
| 138 | EH_Phys_Clus_Num dw 0 ; starting physical clus numof extnt;AN000; | ||
| 139 | EH_Count dw 0 ; range of logical clusnum in the extnt | ||
| 140 | EH_Next_Extn_Ptr dw 0 ; pointer to next extent ;AN000; | ||
| 141 | EH_Prev_Extn_Ptr dw 0 ; pointer to previous extent ;AN000; | ||
| 142 | EH_Next_LRU_Ptr dw 0 ; pointer to next LRU extent | ||
| 143 | EH_Prev_LRU_Ptr dw 0 ; pointer tp previous LRU extent | ||
| 144 | dw 0 | ||
| 145 | EXTENT_HEADER ENDS | ||
| 146 | |||
| 147 | |||
| 148 | |||