summaryrefslogtreecommitdiff
path: root/v4.0/src/SELECT/DOS.EQU
diff options
context:
space:
mode:
authorGravatar Mark Zbikowski2024-04-25 21:24:10 +0100
committerGravatar Microsoft Open Source2024-04-25 22:32:27 +0000
commit2d04cacc5322951f187bb17e017c12920ac8ebe2 (patch)
tree80ee017efa878dfd5344b44249e6a241f2a7f6e2 /v4.0/src/SELECT/DOS.EQU
parentMerge pull request #430 from jpbaltazar/typoptbr (diff)
downloadms-dos-main.tar.gz
ms-dos-main.tar.xz
ms-dos-main.zip
MZ is back!HEADmain
Diffstat (limited to 'v4.0/src/SELECT/DOS.EQU')
-rw-r--r--v4.0/src/SELECT/DOS.EQU359
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
15Terminate equ 20h ;AN000;
16DOS_Function equ 21h ;AN000;
17Terminate_Address equ 22h ;AN000;
18CNTRL_BREAK equ 23h ;AN000;
19Critical_Error equ 24h ;AN000;
20Disk_Read equ 25h ;AN000;
21Disk_Write equ 26h ;AN000;
22Terminate_Stay_Resident equ 27h ;AN000;
23Printer equ 2Fh ;AN000;
24CHK_APPEND EQU 0B700H ;AN000; CHECK IF APPEND ACTIVE INT 2FH
25GET_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
28SET_APPEND EQU 0B707H ;AN000; Set /X status with INT 2FH
29EXT_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
38GET_ATTRIB EQU 05702H ;AN000; Get ext. attribute by handle
39QUY_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
48Program_Terminate equ 00h ;AN000;
49Keyboard_Input equ 01h ;AN000;
50Display_Output equ 02h ;AN000;
51Auxiliary_Input equ 03h ;AN000;
52Auxiliary_Output equ 04h ;AN000;
53Printer_Output equ 05h ;AN000;
54Direct_Console_IO equ 06h ;AN000;
55Direct_Input_No_Echo equ 07h ;AN000;
56Console_Input_No_Echo equ 08h ;AN000;
57Print_String equ 09h ;AN000;
58Buffered_Keyboard_Input equ 0Ah ;AN000;
59Check_Std_Input_Status equ 0Bh ;AN000;
60Clear_Keyboard_Buffer equ 0Ch ;AN000;
61Disk_Reset equ 0Dh ;AN000;
62Select_Disk equ 0Eh ;AN000;
63FCB_Open equ 0Fh ;AN000;
64FCB_Close equ 10h ;AN000;
65Search_First equ 11h ;AN000;
66Search_Next equ 12h ;AN000;
67FCB_Delete equ 13h ;AN000;
68Sequential_Read equ 14h ;AN000;
69Sequential_Write equ 15h ;AN000;
70FCB_Create equ 16h ;AN000;
71FCB_Rename equ 17h ;AN000;
72Current_Disk equ 19h ;AN000;
73Set_DTA equ 1Ah ;AN000;
74Allocation_Info equ 1Bh ;AN000;
75Allocation_Info_Device equ 1Ch ;AN000;
76Random_Read equ 21h ;AN000;
77Random_Write equ 22h ;AN000;
78File_Size equ 23h ;AN000;
79Set_Relative_Record equ 24h ;AN000;
80Set_Interrupt_Vector equ 25h ;AN000;
81Create_New_PSP equ 26h ;AN000;
82Random_Block_Read equ 27h ;AN000;
83Random_Block_Write equ 28h ;AN000;
84Parse_Filename equ 29h ;AN000;
85Get_Date equ 2Ah ;AN000;
86Set_Date equ 2Bh ;AN000;
87Get_Time equ 2Ch ;AN000;
88Set_Time equ 2Dh ;AN000;
89Verify equ 2Eh ;AN000;
90 Verify_Off equ 02h ;AN000;
91 Verify_On equ 01h ;AN000;
92Set_Verify_On equ 2E01h ;AN000;
93Get_DTA equ 2Fh ;AN000;
94DOS_Version equ 30h ;AN000;
95Terminate_Resident equ 31h ;AN000;
96Get_Interrupt_Vector equ 35h ;AN000;
97Get_Disk_Free_Space equ 36h ;AN000;
98Country_Code equ 38h ;AN000;
99Mkdir equ 39h ;AN000;
100Rmdir equ 3Ah ;AN000;
101Chdir equ 3Bh ;AN000;
102Create equ 3Ch ;AN000;
103Open 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;
119Close equ 3Eh ;AN000;
120Read equ 3Fh ;AN000;
121Write equ 40h ;AN000;
122Delete equ 41h ;AN000;
123Lseek equ 42h ;AN000;
124 Lseek_Offset equ 00h ;AN000;
125 Lseek_Plus_Offset equ 01h ;AN000;
126 Lseek_End_Offset equ 02h ;AN000;
127Chmod equ 43h ;AN000;
128IOCTL 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;
141Dup_Handle equ 45h ;AN000;
142Force_Dup_Handle equ 46h ;AN000;
143Get_Current_Directory equ 47h ;AN000;
144Free_Memory equ 49h ;AN000;
145Setblock equ 4Ah ;AN000;
146Exec equ 4Bh ;AN000;
147Exit equ 4Ch ;AN000;
148Waitp equ 4Dh ;AN000;
149Find_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;
155Find_Next equ 4Fh ;AN000;
156Get_Verify_Setting equ 54h ;AN000;
157Rename equ 56h ;AN000;
158File_Date_Time equ 57h ;AN000;
159 Get_File_Time equ 00h ;AN000;
160 Set_File_Time equ 01h ;AN000;
161Get_Extended_Error equ 59h ;AN000;
162Create_Temp equ 5Ah ;AN000;
163Create_New equ 5Bh ;AN000;
164File_Access equ 5Ch ;AN000;
165 Lockf equ 00h ;AN000;
166 Unlock equ 01h ;AN000;
167Get_PSP equ 62h ;AN000;
168Upper_Case_String equ 6521h ;AN000;GET EXTENDED COUNTRY INFORMATION
169;
170;******************************************************************************
171; DOS File Handles
172;******************************************************************************
173;
174
175STDIN equ 00h ;AN000;
176STDOUT equ 01h ;AN000;
177STDERR equ 02h ;AN000;
178STDAUX equ 03h ;AN000;
179STDPRN equ 04h ;AN000;
180
181
182;
183;******************************************************************************
184; File's attributes in a Directory entry
185;******************************************************************************
186;
187read_only_file equ 01h ;AN000;
188hidden_file equ 02h ;AN000;
189system_file equ 04h ;AN000;
190has_volume_label equ 08h ;AN000;
191is_subdirectory equ 10h ;AN000;
192archive_on equ 20h ;AN000;
193
194;
195;******************************************************************************
196; Return Codes
197;******************************************************************************
198;
199
200Errorlevel_0 equ 0 ;AN000;
201Errorlevel_1 equ 1 ;AN000;
202Errorlevel_2 equ 2 ;AN000;
203Errorlevel_3 equ 3 ;AN000;
204Errorlevel_4 equ 4 ;AN000;
205Errorlevel_5 equ 5 ;AN000;
206Errorlevel_6 equ 6 ;AN000;
207Errorlevel_7 equ 7 ;AN000;
208Errorlevel_8 equ 8 ;AN000;
209
210;
211;******************************************************************************
212; Extended Error Codes
213;******************************************************************************
214;
215
216Error_No_Error equ 00 ;AN000;
217Error_Invalid_Function equ 01 ;AN000;
218Error_File_Not_Found equ 02 ;AN000;
219Error_Path_Not_Found equ 03 ;AN000;
220Error_No_Handles_Left equ 04 ;AN000;
221Error_Access_Denied equ 05 ;AN000;
222Error_Invalid_Handle equ 06 ;AN000;
223Error_Memory_Blocks_Bad equ 07 ;AN000;
224Error_Insufficient_Memory equ 08 ;AN000;
225Error_Inv_Address equ 09 ;AN000;
226Error_Inv_Environment equ 10 ;AN000;
227Error_Inv_Format equ 11 ;AN000;
228Error_Inv_Access_Code equ 12 ;AN000;
229Error_Inv_Data equ 13 ;AN000;
230Error_Inv_Drive equ 15 ;AN000;
231Error_Rmdir_Current_Dir equ 16 ;AN000;
232Error_Not_Same_Device equ 17 ;AN000;
233Error_No_More_Files equ 18 ;AN000;
234Error_Write_Protect equ 19 ;AN000;
235Error_Unknown_Unit equ 20 ;AN000;
236Error_Drive_Not_Ready equ 21 ;AN000;
237Error_Unknown_Command equ 22 ;AN000;
238Error_Data_Error equ 23 ;AN000;
239Error_Bad_Request_Len equ 24 ;AN000;
240Error_Seek_Error equ 25 ;AN000;
241Error_Unknown_Media_Type equ 26 ;AN000;
242Error_Sector_Not_Found equ 27 ;AN000;
243Error_Out_Of_Paper equ 28 ;AN000;
244Error_Write_Fault equ 29 ;AN000;
245Error_Read_Fault equ 30 ;AN000;
246Error_Gerneral_Failure equ 31 ;AN000;
247Error_Sharing_Violation equ 32 ;AN000;
248Error_Lock_Violation equ 33 ;AN000;
249Error_Inv_Disk_Change equ 34 ;AN000;
250Error_FCB_Unavailable equ 35 ;AN000;
251Error_File_Exists equ 80 ;AN000;
252Error_Cannot_Make equ 82 ;AN000;
253Error_Fail_On_Int24 equ 83 ;AN000;
254
255;
256;******************************************************************************
257; Extended Error Classes
258;******************************************************************************
259;
260
261Out_Of_Resource equ 1 ;AN000;
262Temporary equ 2 ;AN000;
263Authorization equ 3 ;AN000;
264Internal equ 4 ;AN000;
265Hardware_Failure equ 5 ;AN000;
266System_Failure equ 6 ;AN000;
267Program_Error equ 7 ;AN000;
268Not_Found equ 8 ;AN000;
269Bad_Format equ 9 ;AN000;
270Locked equ 10 ;AN000;
271Media equ 11 ;AN000;
272Already_Exists equ 12 ;AN000;
273Unknown equ 13 ;AN000;
274
275;
276;*****************************************************************************
277; Extended Error Actions
278;*****************************************************************************
279;
280
281Retry equ 1 ;AN000;
282Delay_Retry equ 2 ;AN000;
283User equ 3 ;AN000;
284Abort equ 4 ;AN000;
285Immediate_Exit equ 5 ;AN000;
286Ignore equ 6 ;AN000;
287Retry_After_User equ 7 ;AN000;
288
289;
290;******************************************************************************
291; Extended Error Locus
292;******************************************************************************
293;
294
295Non_Specific equ 1 ;AN000;
296Block_Device equ 2 ;AN000;
297Serial_Device equ 4 ;AN000;
298Memory equ 5 ;AN000;
299
300;
301;******************************************************************************
302; Internal Program Initialization Errors
303;******************************************************************************
304;
305
306Init_Err_DOS_Ver_1 equ 1 ;AN000;Bad DOS version prior to 2.0
307Init_Err_DOS_Ver_2 equ 2 ;AN000;Bad DOS version 2.0 or above
308Init_Err_Inv_Drive equ 3 ;AN000;Invalid drive specification
309Init_Err_Inv_Parm equ 4 ;AN000;Invalid parameter
310Init_Err_Inv_Num_Parm equ 5 ;AN000;Invalid number of parameters
311Init_Err_Inv_Path equ 6 ;AN000;Invalid path
312Init_Err_Insuff_Mem equ 7 ;AN000;Insufficient memory
313Init_Err_Inv_Date equ 8 ;AN000;Invalid date
314Init_Err_Inv_Time equ 9 ;AN000;Invalid time
315Init_Err_Inv_Device equ 10 ;AN000;Invalid device name
316Init_Err_Ill_Device equ 11 ;AN000;Illegal device name
317Init_Err_Inv_Filename equ 12 ;AN000;Invalid filename
318
319;
320;******************************************************************************
321; FCB Structure
322;******************************************************************************
323;
324
325FCB STRUC ;AN000;
326Drive_Number db 0 ;AN000;
327Filename_FCB db 8 dup(0) ;AN000;
328Extension db 3 dup(0) ;AN000;
329Current_Block dw 0 ;AN000;
330Record_Size dw 0 ;AN000;
331File_Size_Low_FCB dw 0 ;AN000;
332File_Size_High_FCB dw 0 ;AN000;
333File_Date_Time_FCB dw 0 ;AN000;
334Reserved_FCB db 10 dup(0) ;AN000;
335Current_Record db 0 ;AN000;
336Relative_Record_Low dw 0 ;AN000;
337Relative_Record_High dw 0 ;AN000;
338FCB ENDS ;AN000;
339
340
341;
342;******************************************************************************
343; Find First/Next DTA area
344;******************************************************************************
345;
346
347Find_DTA STRUC ;AN000;
348DTA_Reserved db 21 dup(0) ;AN000;
349DTA_Attribute db 0 ;AN000;
350DTA_File_Time dw 0 ;AN000;
351DTA_File_Date dw 0 ;AN000;
352DTA_File_Size_Low dw 0 ;AN000;
353DTA_File_Size_High dw 0 ;AN000;
354DTA_Filename db 13 dup(0) ;AN000;
355Find_DTA ENDS ;AN000;
356
357
358
359 \ No newline at end of file