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/SELECT/DOS.EQU | |
| 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/SELECT/DOS.EQU')
| -rw-r--r-- | v4.0/src/SELECT/DOS.EQU | 359 |
1 files changed, 359 insertions, 0 deletions
diff --git a/v4.0/src/SELECT/DOS.EQU b/v4.0/src/SELECT/DOS.EQU new file mode 100644 index 0000000..c1ec499 --- /dev/null +++ b/v4.0/src/SELECT/DOS.EQU | |||
| @@ -0,0 +1,359 @@ | |||
| 1 | ; | ||
| 2 | ;****************************************************************************** | ||
| 3 | ; DOS Interrupts | ||
| 4 | ; | ||
| 5 | ; REVISION HISTORY: | ||
| 6 | ; | ||
| 7 | ; PTM P00 - WAIT & LOCK to WAITP & LOCKF for MASM errors. DRM 4/23/87 | ||
| 8 | ; | ||
| 9 | ; A005 DCR0201 10/9/87 Incorperate new format for EXTENDED | ||
| 10 | ; ATTRIBUTES. | ||
| 11 | ; | ||
| 12 | ;****************************************************************************** | ||
| 13 | ; | ||
| 14 | |||
| 15 | Terminate equ 20h ;AN000; | ||
| 16 | DOS_Function equ 21h ;AN000; | ||
| 17 | Terminate_Address equ 22h ;AN000; | ||
| 18 | CNTRL_BREAK equ 23h ;AN000; | ||
| 19 | Critical_Error equ 24h ;AN000; | ||
| 20 | Disk_Read equ 25h ;AN000; | ||
| 21 | Disk_Write equ 26h ;AN000; | ||
| 22 | Terminate_Stay_Resident equ 27h ;AN000; | ||
| 23 | Printer equ 2Fh ;AN000; | ||
| 24 | CHK_APPEND EQU 0B700H ;AN000; CHECK IF APPEND ACTIVE INT 2FH | ||
| 25 | GET_APPEND EQU 0B706H ;AN000; Read /X status with INT 2FH | ||
| 26 | ; BX = 0 if /X is not active | ||
| 27 | ; BX = 1 if /X is active | ||
| 28 | SET_APPEND EQU 0B707H ;AN000; Set /X status with INT 2FH | ||
| 29 | EXT_OPEN EQU 6C00H ;AN000; Extended Open function code | ||
| 30 | CREATE_FLAG EQU 0112H ;AN005;FUNCTION CONTROL | ||
| 31 | CREATE_ATTR EQU 0 ;AN000;SEARCH/CREATE ATTRIBUTE | ||
| 32 | CREATE_MODE EQU 0011H ;AN000;CREATE MODE | ||
| 33 | OPN_FLAG EQU 0101H ;AN000;OPEN FUNCTION CONTROL | ||
| 34 | OPN_ATTR EQU 0 ;AN000;OPEN ATTRIBUTE | ||
| 35 | OPN_MODE EQU 0002H ;AN000;OPEN MODE | ||
| 36 | NUL_LIST EQU -1 ;AN005;JUST TO OPEN | ||
| 37 | |||
| 38 | GET_ATTRIB EQU 05702H ;AN000; Get ext. attribute by handle | ||
| 39 | QUY_ATTRIB EQU 05703H ;AN000; QUERY EXT. ATTRIBUTES BY HANDLE | ||
| 40 | INT_ORDINAL EQU 0 ;AN000;ATTRIBUTE LIST ORDINAL = 0 | ||
| 41 | ALL_ATTR EQU -1 ;AN005;TO SELECT ALL THE ATTRIBUTES | ||
| 42 | ; | ||
| 43 | ;****************************************************************************** | ||
| 44 | ; DOS Function Calls | ||
| 45 | ;****************************************************************************** | ||
| 46 | ; | ||
| 47 | |||
| 48 | Program_Terminate equ 00h ;AN000; | ||
| 49 | Keyboard_Input equ 01h ;AN000; | ||
| 50 | Display_Output equ 02h ;AN000; | ||
| 51 | Auxiliary_Input equ 03h ;AN000; | ||
| 52 | Auxiliary_Output equ 04h ;AN000; | ||
| 53 | Printer_Output equ 05h ;AN000; | ||
| 54 | Direct_Console_IO equ 06h ;AN000; | ||
| 55 | Direct_Input_No_Echo equ 07h ;AN000; | ||
| 56 | Console_Input_No_Echo equ 08h ;AN000; | ||
| 57 | Print_String equ 09h ;AN000; | ||
| 58 | Buffered_Keyboard_Input equ 0Ah ;AN000; | ||
| 59 | Check_Std_Input_Status equ 0Bh ;AN000; | ||
| 60 | Clear_Keyboard_Buffer equ 0Ch ;AN000; | ||
| 61 | Disk_Reset equ 0Dh ;AN000; | ||
| 62 | Select_Disk equ 0Eh ;AN000; | ||
| 63 | FCB_Open equ 0Fh ;AN000; | ||
| 64 | FCB_Close equ 10h ;AN000; | ||
| 65 | Search_First equ 11h ;AN000; | ||
| 66 | Search_Next equ 12h ;AN000; | ||
| 67 | FCB_Delete equ 13h ;AN000; | ||
| 68 | Sequential_Read equ 14h ;AN000; | ||
| 69 | Sequential_Write equ 15h ;AN000; | ||
| 70 | FCB_Create equ 16h ;AN000; | ||
| 71 | FCB_Rename equ 17h ;AN000; | ||
| 72 | Current_Disk equ 19h ;AN000; | ||
| 73 | Set_DTA equ 1Ah ;AN000; | ||
| 74 | Allocation_Info equ 1Bh ;AN000; | ||
| 75 | Allocation_Info_Device equ 1Ch ;AN000; | ||
| 76 | Random_Read equ 21h ;AN000; | ||
| 77 | Random_Write equ 22h ;AN000; | ||
| 78 | File_Size equ 23h ;AN000; | ||
| 79 | Set_Relative_Record equ 24h ;AN000; | ||
| 80 | Set_Interrupt_Vector equ 25h ;AN000; | ||
| 81 | Create_New_PSP equ 26h ;AN000; | ||
| 82 | Random_Block_Read equ 27h ;AN000; | ||
| 83 | Random_Block_Write equ 28h ;AN000; | ||
| 84 | Parse_Filename equ 29h ;AN000; | ||
| 85 | Get_Date equ 2Ah ;AN000; | ||
| 86 | Set_Date equ 2Bh ;AN000; | ||
| 87 | Get_Time equ 2Ch ;AN000; | ||
| 88 | Set_Time equ 2Dh ;AN000; | ||
| 89 | Verify equ 2Eh ;AN000; | ||
| 90 | Verify_Off equ 02h ;AN000; | ||
| 91 | Verify_On equ 01h ;AN000; | ||
| 92 | Set_Verify_On equ 2E01h ;AN000; | ||
| 93 | Get_DTA equ 2Fh ;AN000; | ||
| 94 | DOS_Version equ 30h ;AN000; | ||
| 95 | Terminate_Resident equ 31h ;AN000; | ||
| 96 | Get_Interrupt_Vector equ 35h ;AN000; | ||
| 97 | Get_Disk_Free_Space equ 36h ;AN000; | ||
| 98 | Country_Code equ 38h ;AN000; | ||
| 99 | Mkdir equ 39h ;AN000; | ||
| 100 | Rmdir equ 3Ah ;AN000; | ||
| 101 | Chdir equ 3Bh ;AN000; | ||
| 102 | Create equ 3Ch ;AN000; | ||
| 103 | Open equ 3Dh ;AN000; | ||
| 104 | Read_Only equ 00h ;AN000; | ||
| 105 | Write_Only equ 01h ;AN000; | ||
| 106 | Read_Write equ 02h ;AN000; | ||
| 107 | Read_Only_Exclusive equ 10h ;AN000; | ||
| 108 | Write_Only_Exclusive equ 11h ;AN000; | ||
| 109 | Read_Write_Exclusive equ 12h ;AN000; | ||
| 110 | Read_Only_Deny_Write equ 20h ;AN000; | ||
| 111 | Write_Only_Deny_Write equ 21h ;AN000; | ||
| 112 | Read_Write_Deny_Write equ 22h ;AN000; | ||
| 113 | Read_Only_Deny_Read equ 30h ;AN000; | ||
| 114 | Write_Only_Deny_Read equ 31h ;AN000; | ||
| 115 | Read_Write_Deny_Read equ 32h ;AN000; | ||
| 116 | Read_Only_Deny_None equ 40h ;AN000; | ||
| 117 | Write_Only_Deny_None equ 41h ;AN000; | ||
| 118 | Read_Write_Deny_None equ 42h ;AN000; | ||
| 119 | Close equ 3Eh ;AN000; | ||
| 120 | Read equ 3Fh ;AN000; | ||
| 121 | Write equ 40h ;AN000; | ||
| 122 | Delete equ 41h ;AN000; | ||
| 123 | Lseek equ 42h ;AN000; | ||
| 124 | Lseek_Offset equ 00h ;AN000; | ||
| 125 | Lseek_Plus_Offset equ 01h ;AN000; | ||
| 126 | Lseek_End_Offset equ 02h ;AN000; | ||
| 127 | Chmod equ 43h ;AN000; | ||
| 128 | IOCTL equ 44h ;AN000; | ||
| 129 | Get_Device_Info equ 00h ;AN000; | ||
| 130 | Set_Device_Info equ 01h ;AN000; | ||
| 131 | Read_Channel equ 02h ;AN000; | ||
| 132 | Write_Channel equ 03h ;AN000; | ||
| 133 | Read_Drive_Channel equ 04h ;AN000; | ||
| 134 | Write_Drive_Channel equ 05h ;AN000; | ||
| 135 | Get_Input_Status equ 06h ;AN000; | ||
| 136 | Get_Output_Status equ 07h ;AN000; | ||
| 137 | Is_Removable equ 08h ;AN000; | ||
| 138 | Is_Block_Redirected equ 09h ;AN000; | ||
| 139 | Is_Handle_Redirected equ 0Ah ;AN000; | ||
| 140 | Set_Retry_Count equ 0Bh ;AN000; | ||
| 141 | Dup_Handle equ 45h ;AN000; | ||
| 142 | Force_Dup_Handle equ 46h ;AN000; | ||
| 143 | Get_Current_Directory equ 47h ;AN000; | ||
| 144 | Free_Memory equ 49h ;AN000; | ||
| 145 | Setblock equ 4Ah ;AN000; | ||
| 146 | Exec equ 4Bh ;AN000; | ||
| 147 | Exit equ 4Ch ;AN000; | ||
| 148 | Waitp equ 4Dh ;AN000; | ||
| 149 | Find_First equ 4Eh ;AN000; | ||
| 150 | norm_attr equ 00h ;AN000; | ||
| 151 | incl_read_attr equ 01h ;AN000; | ||
| 152 | incl_h_attr equ 02h ;AN000; | ||
| 153 | incl_h_s_attr equ 06h ;AN000; | ||
| 154 | incl_h_s_dir_attr equ 16h ;AN000; | ||
| 155 | Find_Next equ 4Fh ;AN000; | ||
| 156 | Get_Verify_Setting equ 54h ;AN000; | ||
| 157 | Rename equ 56h ;AN000; | ||
| 158 | File_Date_Time equ 57h ;AN000; | ||
| 159 | Get_File_Time equ 00h ;AN000; | ||
| 160 | Set_File_Time equ 01h ;AN000; | ||
| 161 | Get_Extended_Error equ 59h ;AN000; | ||
| 162 | Create_Temp equ 5Ah ;AN000; | ||
| 163 | Create_New equ 5Bh ;AN000; | ||
| 164 | File_Access equ 5Ch ;AN000; | ||
| 165 | Lockf equ 00h ;AN000; | ||
| 166 | Unlock equ 01h ;AN000; | ||
| 167 | Get_PSP equ 62h ;AN000; | ||
| 168 | Upper_Case_String equ 6521h ;AN000;GET EXTENDED COUNTRY INFORMATION | ||
| 169 | ; | ||
| 170 | ;****************************************************************************** | ||
| 171 | ; DOS File Handles | ||
| 172 | ;****************************************************************************** | ||
| 173 | ; | ||
| 174 | |||
| 175 | STDIN equ 00h ;AN000; | ||
| 176 | STDOUT equ 01h ;AN000; | ||
| 177 | STDERR equ 02h ;AN000; | ||
| 178 | STDAUX equ 03h ;AN000; | ||
| 179 | STDPRN equ 04h ;AN000; | ||
| 180 | |||
| 181 | |||
| 182 | ; | ||
| 183 | ;****************************************************************************** | ||
| 184 | ; File's attributes in a Directory entry | ||
| 185 | ;****************************************************************************** | ||
| 186 | ; | ||
| 187 | read_only_file equ 01h ;AN000; | ||
| 188 | hidden_file equ 02h ;AN000; | ||
| 189 | system_file equ 04h ;AN000; | ||
| 190 | has_volume_label equ 08h ;AN000; | ||
| 191 | is_subdirectory equ 10h ;AN000; | ||
| 192 | archive_on equ 20h ;AN000; | ||
| 193 | |||
| 194 | ; | ||
| 195 | ;****************************************************************************** | ||
| 196 | ; Return Codes | ||
| 197 | ;****************************************************************************** | ||
| 198 | ; | ||
| 199 | |||
| 200 | Errorlevel_0 equ 0 ;AN000; | ||
| 201 | Errorlevel_1 equ 1 ;AN000; | ||
| 202 | Errorlevel_2 equ 2 ;AN000; | ||
| 203 | Errorlevel_3 equ 3 ;AN000; | ||
| 204 | Errorlevel_4 equ 4 ;AN000; | ||
| 205 | Errorlevel_5 equ 5 ;AN000; | ||
| 206 | Errorlevel_6 equ 6 ;AN000; | ||
| 207 | Errorlevel_7 equ 7 ;AN000; | ||
| 208 | Errorlevel_8 equ 8 ;AN000; | ||
| 209 | |||
| 210 | ; | ||
| 211 | ;****************************************************************************** | ||
| 212 | ; Extended Error Codes | ||
| 213 | ;****************************************************************************** | ||
| 214 | ; | ||
| 215 | |||
| 216 | Error_No_Error equ 00 ;AN000; | ||
| 217 | Error_Invalid_Function equ 01 ;AN000; | ||
| 218 | Error_File_Not_Found equ 02 ;AN000; | ||
| 219 | Error_Path_Not_Found equ 03 ;AN000; | ||
| 220 | Error_No_Handles_Left equ 04 ;AN000; | ||
| 221 | Error_Access_Denied equ 05 ;AN000; | ||
| 222 | Error_Invalid_Handle equ 06 ;AN000; | ||
| 223 | Error_Memory_Blocks_Bad equ 07 ;AN000; | ||
| 224 | Error_Insufficient_Memory equ 08 ;AN000; | ||
| 225 | Error_Inv_Address equ 09 ;AN000; | ||
| 226 | Error_Inv_Environment equ 10 ;AN000; | ||
| 227 | Error_Inv_Format equ 11 ;AN000; | ||
| 228 | Error_Inv_Access_Code equ 12 ;AN000; | ||
| 229 | Error_Inv_Data equ 13 ;AN000; | ||
| 230 | Error_Inv_Drive equ 15 ;AN000; | ||
| 231 | Error_Rmdir_Current_Dir equ 16 ;AN000; | ||
| 232 | Error_Not_Same_Device equ 17 ;AN000; | ||
| 233 | Error_No_More_Files equ 18 ;AN000; | ||
| 234 | Error_Write_Protect equ 19 ;AN000; | ||
| 235 | Error_Unknown_Unit equ 20 ;AN000; | ||
| 236 | Error_Drive_Not_Ready equ 21 ;AN000; | ||
| 237 | Error_Unknown_Command equ 22 ;AN000; | ||
| 238 | Error_Data_Error equ 23 ;AN000; | ||
| 239 | Error_Bad_Request_Len equ 24 ;AN000; | ||
| 240 | Error_Seek_Error equ 25 ;AN000; | ||
| 241 | Error_Unknown_Media_Type equ 26 ;AN000; | ||
| 242 | Error_Sector_Not_Found equ 27 ;AN000; | ||
| 243 | Error_Out_Of_Paper equ 28 ;AN000; | ||
| 244 | Error_Write_Fault equ 29 ;AN000; | ||
| 245 | Error_Read_Fault equ 30 ;AN000; | ||
| 246 | Error_Gerneral_Failure equ 31 ;AN000; | ||
| 247 | Error_Sharing_Violation equ 32 ;AN000; | ||
| 248 | Error_Lock_Violation equ 33 ;AN000; | ||
| 249 | Error_Inv_Disk_Change equ 34 ;AN000; | ||
| 250 | Error_FCB_Unavailable equ 35 ;AN000; | ||
| 251 | Error_File_Exists equ 80 ;AN000; | ||
| 252 | Error_Cannot_Make equ 82 ;AN000; | ||
| 253 | Error_Fail_On_Int24 equ 83 ;AN000; | ||
| 254 | |||
| 255 | ; | ||
| 256 | ;****************************************************************************** | ||
| 257 | ; Extended Error Classes | ||
| 258 | ;****************************************************************************** | ||
| 259 | ; | ||
| 260 | |||
| 261 | Out_Of_Resource equ 1 ;AN000; | ||
| 262 | Temporary equ 2 ;AN000; | ||
| 263 | Authorization equ 3 ;AN000; | ||
| 264 | Internal equ 4 ;AN000; | ||
| 265 | Hardware_Failure equ 5 ;AN000; | ||
| 266 | System_Failure equ 6 ;AN000; | ||
| 267 | Program_Error equ 7 ;AN000; | ||
| 268 | Not_Found equ 8 ;AN000; | ||
| 269 | Bad_Format equ 9 ;AN000; | ||
| 270 | Locked equ 10 ;AN000; | ||
| 271 | Media equ 11 ;AN000; | ||
| 272 | Already_Exists equ 12 ;AN000; | ||
| 273 | Unknown equ 13 ;AN000; | ||
| 274 | |||
| 275 | ; | ||
| 276 | ;***************************************************************************** | ||
| 277 | ; Extended Error Actions | ||
| 278 | ;***************************************************************************** | ||
| 279 | ; | ||
| 280 | |||
| 281 | Retry equ 1 ;AN000; | ||
| 282 | Delay_Retry equ 2 ;AN000; | ||
| 283 | User equ 3 ;AN000; | ||
| 284 | Abort equ 4 ;AN000; | ||
| 285 | Immediate_Exit equ 5 ;AN000; | ||
| 286 | Ignore equ 6 ;AN000; | ||
| 287 | Retry_After_User equ 7 ;AN000; | ||
| 288 | |||
| 289 | ; | ||
| 290 | ;****************************************************************************** | ||
| 291 | ; Extended Error Locus | ||
| 292 | ;****************************************************************************** | ||
| 293 | ; | ||
| 294 | |||
| 295 | Non_Specific equ 1 ;AN000; | ||
| 296 | Block_Device equ 2 ;AN000; | ||
| 297 | Serial_Device equ 4 ;AN000; | ||
| 298 | Memory equ 5 ;AN000; | ||
| 299 | |||
| 300 | ; | ||
| 301 | ;****************************************************************************** | ||
| 302 | ; Internal Program Initialization Errors | ||
| 303 | ;****************************************************************************** | ||
| 304 | ; | ||
| 305 | |||
| 306 | Init_Err_DOS_Ver_1 equ 1 ;AN000;Bad DOS version prior to 2.0 | ||
| 307 | Init_Err_DOS_Ver_2 equ 2 ;AN000;Bad DOS version 2.0 or above | ||
| 308 | Init_Err_Inv_Drive equ 3 ;AN000;Invalid drive specification | ||
| 309 | Init_Err_Inv_Parm equ 4 ;AN000;Invalid parameter | ||
| 310 | Init_Err_Inv_Num_Parm equ 5 ;AN000;Invalid number of parameters | ||
| 311 | Init_Err_Inv_Path equ 6 ;AN000;Invalid path | ||
| 312 | Init_Err_Insuff_Mem equ 7 ;AN000;Insufficient memory | ||
| 313 | Init_Err_Inv_Date equ 8 ;AN000;Invalid date | ||
| 314 | Init_Err_Inv_Time equ 9 ;AN000;Invalid time | ||
| 315 | Init_Err_Inv_Device equ 10 ;AN000;Invalid device name | ||
| 316 | Init_Err_Ill_Device equ 11 ;AN000;Illegal device name | ||
| 317 | Init_Err_Inv_Filename equ 12 ;AN000;Invalid filename | ||
| 318 | |||
| 319 | ; | ||
| 320 | ;****************************************************************************** | ||
| 321 | ; FCB Structure | ||
| 322 | ;****************************************************************************** | ||
| 323 | ; | ||
| 324 | |||
| 325 | FCB STRUC ;AN000; | ||
| 326 | Drive_Number db 0 ;AN000; | ||
| 327 | Filename_FCB db 8 dup(0) ;AN000; | ||
| 328 | Extension db 3 dup(0) ;AN000; | ||
| 329 | Current_Block dw 0 ;AN000; | ||
| 330 | Record_Size dw 0 ;AN000; | ||
| 331 | File_Size_Low_FCB dw 0 ;AN000; | ||
| 332 | File_Size_High_FCB dw 0 ;AN000; | ||
| 333 | File_Date_Time_FCB dw 0 ;AN000; | ||
| 334 | Reserved_FCB db 10 dup(0) ;AN000; | ||
| 335 | Current_Record db 0 ;AN000; | ||
| 336 | Relative_Record_Low dw 0 ;AN000; | ||
| 337 | Relative_Record_High dw 0 ;AN000; | ||
| 338 | FCB ENDS ;AN000; | ||
| 339 | |||
| 340 | |||
| 341 | ; | ||
| 342 | ;****************************************************************************** | ||
| 343 | ; Find First/Next DTA area | ||
| 344 | ;****************************************************************************** | ||
| 345 | ; | ||
| 346 | |||
| 347 | Find_DTA STRUC ;AN000; | ||
| 348 | DTA_Reserved db 21 dup(0) ;AN000; | ||
| 349 | DTA_Attribute db 0 ;AN000; | ||
| 350 | DTA_File_Time dw 0 ;AN000; | ||
| 351 | DTA_File_Date dw 0 ;AN000; | ||
| 352 | DTA_File_Size_Low dw 0 ;AN000; | ||
| 353 | DTA_File_Size_High dw 0 ;AN000; | ||
| 354 | DTA_Filename db 13 dup(0) ;AN000; | ||
| 355 | Find_DTA ENDS ;AN000; | ||
| 356 | |||
| 357 | |||
| 358 | |||
| 359 | \ No newline at end of file | ||