10 DOS_MAJOR_VERSION EQU
2
11 DOS_MINOR_VERSION EQU
11
13 BREAK <Control character definitions
>
15 c_DEL EQU 7Fh
; ASCII rubout or delete previous char
16 c_BS EQU
08h ; ^H ASCII backspace
17 c_CR EQU
0Dh ; ^M ASCII carriage return
18 c_LF EQU
0Ah ; ^J ASCII linefeed
19 c_ETB EQU 17h
; ^W ASCII end of transmission
20 c_NAK EQU 15h
; ^U ASCII negative acknowledge
21 c_ETX EQU
03h ; ^C ASCII end of text
22 c_HT EQU
09h ; ^I ASCII tab
24 BREAK <BPB Definition
>
27 ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
29 ; C A V E A T P R O G R A M M E R ;
31 ; Certain structures, constants and system calls below are private to ;
32 ; the DOS and are extremely version-dependent. They may change at any ;
33 ; time at the implementors' whim. As a result, they must not be ;
34 ; documented to the general public. If an extreme case arises, they ;
35 ; must be documented with this warning. ;
37 ; Those structures and constants that are subject to the above will be ;
38 ; marked and bracketed with the flag: ;
40 ; C A V E A T P R O G R A M M E R ;
42 ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
44 BREAK <Bios Parameter Block
>
45 ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
46 ; C A V E A T P R O G R A M M E R ;
49 ; Bios Parameter Block definition
50 ; This structure is used to build a full DPB
53 BPSECSZ
DW ?
; Size in bytes of physical sector
54 BPCLUS
DB ?
; Sectors/Alloc unit
55 BPRES
DW ?
; Number of reserved sectors
56 BPFTCNT
DB ?
; Number of FATs
57 BPDRCNT
DW ?
; Number of directory entries
58 BPSCCNT
DW ?
; Total number of sectors
59 BPMEDIA
DB ?
; Media descriptor byte
60 BPFTSEC
DW ?
; Number of sectors taken up by one FAT
63 ; C A V E A T P R O G R A M M E R ;
64 ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
66 BREAK <Disk I
/O Buffer Header
>
67 ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
68 ; C A V E A T P R O G R A M M E R ;
71 ; Field definition for I/O buffer information
74 NEXTBUF
DD ?
; Pointer to next buffer in list
75 ; The next two items are often refed as a word
76 BUFDRV
DB ?
; Logical drive # assoc with buffer FF = free
77 BUFDIRTY
DB ?
; Dirty flag
78 BUFPRI
DB ?
; Buffer selection priority (see EQUs below)
79 VISIT
DB ?
; Visit flag for buffer pool scans
80 BUFSECNO
DW ?
; Sector number of buffer
81 ; The next two items are often refed as a word
82 BUFWRTCNT
DB ?
; For FAT sectors, # times sector written out
83 BUFWRTINC
DB ?
; " " " , # sectors between each write
84 BUFDRVDP
DD ?
; Pointer to drive parameters
87 BUFINSIZ EQU SIZE BUFFINFO
88 ; Size of structure in bytes
91 LBRPRI EQU
2 ; Last byte of buffer read
92 LBWPRI EQU
4 ; Last byte written
93 RPRI EQU
6 ; Read but not last byte
94 WPRI EQU
8 ; Written but not last byte
95 DIRPRI EQU
15 ; Directory Sector
96 FATPRI EQU
30 ; FAT sector
98 ; C A V E A T P R O G R A M M E R ;
99 ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
101 BREAK <User
stack inside of system
call>
102 ; Location of user registers relative user stack pointer
119 BREAK <interrupt definitions
>
122 INTBASE EQU
4 * inttab
123 ENTRYPOINT EQU INTBASE
+40H
127 ALTBASE EQU
4 * ALTTAB
131 ; interrupt assignments
134 int_abort EQU INTTAB
; abort process
135 int_command EQU int_abort
+1 ; call MSDOS
136 int_terminate EQU int_abort
+2 ; int to terminate address
137 int_ctrl_c EQU int_abort
+3 ; ^c trapper
138 int_fatal_abort EQU int_abort
+4 ; hard disk error
139 int_disk_read EQU int_abort
+5 ; logical sector disk read
140 int_disk_write EQU int_abort
+6 ; logical sector disk write
141 int_keep_process EQU int_abort
+7 ; terminate program and stay
143 ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
144 ; C A V E A T P R O G R A M M E R ;
146 int_spooler EQU int_abort
+8 ; spooler call
147 int_fastcon EQU int_abort
+9 ; fast CON interrupt
149 ; C A V E A T P R O G R A M M E R ;
150 ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
152 int_abort EQU INTTAB
; abort process
153 int_command EQU int_abort
+1 ; call MSDOS
154 int_terminate EQU ALTTAB
; int to terminate address
155 int_ctrl_c EQU int_terminate
+1 ; ^c trapper
156 int_fatal_abort EQU int_terminate
+2 ; hard disk error
157 int_disk_read EQU int_abort
+5 ; logical sector disk read
158 int_disk_write EQU int_abort
+6 ; logical sector disk write
159 int_keep_process EQU int_abort
+7 ; terminate program and stay
161 ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
162 ; C A V E A T P R O G R A M M E R ;
164 int_spooler EQU int_terminate
+3 ; spooler call
165 int_fastcon EQU int_abort
+9 ; fast CON interrupt
167 ; C A V E A T P R O G R A M M E R ;
168 ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
171 addr_int_abort EQU
4 * int_abort
172 addr_int_command EQU
4 * int_command
173 addr_int_terminate EQU
4 * int_terminate
174 addr_int_ctrl_c EQU
4 * int_ctrl_c
175 addr_int_fatal_abort EQU
4 * int_fatal_abort
176 addr_int_disk_read EQU
4 * int_disk_read
177 addr_int_disk_write EQU
4 * int_disk_write
178 addr_int_keep_process EQU
4 * int_keep_process
179 ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
180 ; C A V E A T P R O G R A M M E R ;
182 addr_int_spooler EQU
4 * int_spooler
183 addr_int_fastcon EQU
4 * int_fastcon
185 ; C A V E A T P R O G R A M M E R ;
186 ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
189 ; MSDOS partitions the disk into 4 sections:
191 ; phys sector 0: +-------------------+
192 ; | | boot/reserved |
193 ; | +-------------------+
194 ; | | File allocation |
196 ; | (multiple copies |
198 ; +-------------------+
200 ; +-------------------+
202 ; +-------------------+
204 ; | (to end of disk) |
205 ; +-------------------+
207 ; All partition boundaries are sector boundaries. The size of the FAT is
208 ; adjusted to maximize the file space addressable.
210 BREAK <Directory
entry>
213 ; +---------------------------+
214 ; | (12 BYTE) filename/ext | 0 0
215 ; +---------------------------+
216 ; | (BYTE) attributes | 11 B
217 ; +---------------------------+
218 ; | (10 BYTE) reserved | 12 C
219 ; +---------------------------+
220 ; | (WORD) time of last write | 22 16
221 ; +---------------------------+
222 ; | (WORD) date of last write | 24 18
223 ; +---------------------------+
224 ; | (WORD) First cluster | 26 1A
225 ; +---------------------------+
226 ; | (DWORD) file size | 28 1C
227 ; +---------------------------+
229 ; First byte of filename = E5 -> free directory entry
230 ; = 00 -> end of allocated directory
231 ; Time: Bits 0-4=seconds/2, bits 5-10=minute, 11-15=hour
232 ; Date: Bits 0-4=day, bits 5-8=month, bits 9-15=year-1980
235 dir_name
DB 11 DUP (?
) ; file name
236 dir_attr
DB ?
; attribute bits
237 dir_pad
DB 10 DUP (?
) ; reserved for expansion
238 dir_time
DW ?
; time of last write
239 dir_date
DW ?
; date of last write
240 dir_first
DW ?
; first allocation unit of file
241 dir_size_l
DW ?
; low 16 bits of file size
242 dir_size_h
DW ?
; high 16 bits of file size
245 attr_read_only EQU 1h
248 attr_volume_id EQU 8h
249 attr_directory EQU 10h
252 attr_all EQU attr_hidden
+attr_system
+attr_directory
253 ; OR of hard attributes for FINDENTRY
255 attr_ignore EQU attr_read_only
+attr_archive
256 ; ignore this(ese) attribute(s) during
259 attr_changeable EQU attr_read_only
+attr_hidden
+attr_system
+attr_archive
260 ; changeable via CHMOD
262 BREAK <File allocation Table information
>
264 ; The File Allocation Table uses a 12-bit entry for each allocation unit on
265 ; the disk. These entries are packed, two for every three bytes. The contents
266 ; of entry number N is found by 1) multiplying N by 1.5; 2) adding the result
267 ; to the base address of the Allocation Table; 3) fetching the 16-bit word
268 ; at this address; 4) If N was odd (so that N*1.5 was not an integer), shift
269 ; the word right four bits; 5) mask to 12 bits (AND with 0FFF hex). Entry
270 ; number zero is used as an end-of-file trap in the OS and is passed to the
271 ; BIOS to help determine disk format. Entry 1 is reserved for future use.
272 ; The first available allocation unit is assigned entry number two, and even
273 ; though it is the first, is called cluster 2. Entries greater than 0FF8H
274 ; are end of file marks; entries of zero are unallocated. Otherwise, the
275 ; contents of a FAT entry is the number of the next cluster in the file.
277 ; Clusters with bad sectors are tagged with FF7H. Any non-zero number would
278 ; do because these clusters show as allocated, but are not part of any
279 ; allocation chain and thus will never be allocated to a file. A particular
280 ; number is selected so that disk checking programs know what to do (ie. a
281 ; cluster with entry FF7H which is not in a chain is not an error).
283 BREAK <DPB structure
>
284 ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
285 ; C A V E A T P R O G R A M M E R ;
288 DIRSTRLEN EQU
64 ; Max length in bytes of directory strings
291 dpb_drive
DB ?
; Logical drive # assoc with DPB (A=0,B=1,...)
292 dpb_UNIT
DB ?
; Driver unit number of DPB
293 dpb_sector_size
DW ?
; Size of physical sector in bytes
294 dpb_cluster_mask
DB ?
; Sectors/cluster - 1
295 dpb_cluster_shift
DB ?
; Log2 of sectors/cluster
296 dpb_first_FAT
DW ?
; Starting record of FATs
297 dpb_FAT_count
DB ?
; Number of FATs for this drive
298 dpb_root_entries
DW ?
; Number of directory entries
299 dpb_first_sector
DW ?
; First sector of first cluster
300 dpb_max_cluster
DW ?
; Number of clusters on drive + 1
301 dpb_FAT_size
DB ?
; Number of records occupied by FAT
302 dpb_dir_sector
DW ?
; Starting record of directory
303 dpb_driver_addr
DD ?
; Pointer to driver
304 dpb_media
DB ?
; Media byte
305 dpb_first_access
DB ?
; This is initialized to -1 to force a media
306 ; check the first time this DPB is used
307 dpb_next_dpb
DD ?
; Pointer to next Drive parameter block
308 dpb_current_dir
DW ?
; Cluster number of start of current directory
309 ; 0 indicates root, -1 indicates invalid (disk
311 dpb_dir_text
DB DIRSTRLEN
DUP(?
)
312 ; ASCIZ string of current directory
315 DPBSIZ EQU SIZE dpb
; Size of the structure in bytes
317 DSKSIZ
= dpb_max_cluster
; Size of disk (temp used during init only)
319 ; C A V E A T P R O G R A M M E R ;
320 ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
322 BREAK <File Control Block definition
>
324 ; Field definition for FCBs
325 ; The FCB has the following structure:
327 ; +---------------------------+
328 ; | Drive indicator(byte) |
329 ; +---------------------------+
330 ; | Filename (8 chars) |
331 ; +---------------------------+
332 ; | Extension (3 chars) |
333 ; +---------------------------+
334 ; | Current Extent(word) |
335 ; +---------------------------+
336 ; | Record size (word) |
337 ; +---------------------------+
338 ; | File Size (2 words) |
339 ; +---------------------------+
341 ; +---------------------------+
343 ; +---------------------------+
344 ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
345 ; C A V E A T P R O G R A M M E R ;
348 ; | bit 7=0 file/1 device |
349 ; | bit 6=0 if dirty |
350 ; | bits 0-5 deviceid |
351 ; +---------------------------+
352 ; | first cluster in file |
353 ; +---------------------------+
354 ; | position of last cluster |
355 ; +---------------------------+
356 ; | last cluster accessed | 12 bit-+--- packed in 3 bytes
357 ; +---------------------------+ |
358 ; | parent directory | <------+
359 ; +---------------------------+
361 ; C A V E A T P R O G R A M M E R ;
362 ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
363 ; | next record number |
364 ; +---------------------------+
365 ; | random record number |
366 ; +---------------------------+
371 fcb_name
DB 8 DUP (?
)
374 fcb_RECSIZ
DW ?
; Size of record (user settable)
375 fcb_FILSIZ
DW ?
; Size of file in bytes; used with the following
377 fcb_DRVBP
DW ?
; BP for SEARCH FIRST and SEARCH NEXT
378 fcb_FDATE
DW ?
; Date of last writing
379 fcb_FTIME
DW ?
; Time of last writing
380 ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
381 ; C A V E A T P R O G R A M M E R ;
383 fcb_DEVID
DB ?
; Device ID number, bits 0-5 if file.
384 ; bit 7=0 for file, bit 7=1 for I/O device
385 ; If file, bit 6=0 if dirty
386 ; If I/O device, bit 6=0 if EOF (input)
387 ; Bit 5=1 if Raw mode
388 ; Bit 0=1 if console input device
389 ; Bit 1=1 if console output device
390 ; Bit 2=1 if null device
391 ; Bit 3=1 if clock device
392 fcb_FIRCLUS
DW ?
; First cluster of file
393 fcb_CLUSPOS
DW ?
; Position of last cluster accessed
394 fcb_LSTCLUS
DW ?
; Last cluster accessed and directory pack 2 12
395 DB ?
; bit numbers into 24 bits...
397 ; C A V E A T P R O G R A M M E R ;
398 ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
399 fcb_NR
DB ?
; Next record
400 fcb_RR
DB 4 DUP (?
) ; Random record
403 FILDIRENT
= fcb_FILSIZ
; Used only by SEARCH FIRST and SEARCH
406 ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
407 ; C A V E A T P R O G R A M M E R ;
409 devid_file_clean EQU 40h
; true if file and not written
410 devid_file_mask_drive EQU 3Fh
; mask for drive number
412 devid_device EQU 80h
; true if a device
413 devid_device_EOF EQU 40h
; true if end of file reached
414 devid_device_raw EQU 20h
; true if in raw mode
415 devid_device_special EQU 10h
; true if special device
416 devid_device_clock EQU
08h ; true if clock device
417 devid_device_null EQU
04h ; true if null device
418 devid_device_con_out EQU
02h ; true if console output
419 devid_device_con_in EQU
01h ; true if consle input
422 ; structure of devid field as returned by IOCTL is:
424 ; BIT 7 6 5 4 3 2 1 0
425 ; |---|---|---|---|---|---|---|---|
426 ; | I | E | R | S | I | I | I | I |
427 ; | S | O | A | P | S | S | S | S |
428 ; | D | F | W | E | C | N | C | C |
429 ; | E | | | C | L | U | O | I |
430 ; | V | | | L | K | L | T | N |
431 ; |---|---|---|---|---|---|---|---|
432 ; ISDEV = 1 if this channel is a device
433 ; = 0 if this channel is a disk file
437 ; EOF = 0 if End Of File on input
438 ; RAW = 1 if this device is in Raw mode
439 ; = 0 if this device is cooked
440 ; ISCLK = 1 if this device is the clock device
441 ; ISNUL = 1 if this device is the null device
442 ; ISCOT = 1 if this device is the console output
443 ; ISCIN = 1 if this device is the console input
446 ; EOF = 0 if channel has been written
447 ; Bits 0-5 are the block device number for
448 ; the channel (0 = A, 1 = B, ...)
453 devid_SPECIAL EQU 10H
459 devid_block_dev EQU 1Fh
; mask for block device number
462 ; find first/next buffer
465 find_buf_sattr
DB ?
; attribute of search
466 find_buf_drive
DB ?
; drive of search
467 find_buf_name
DB 11 DUP (?
) ; formatted name
468 find_buf_LastEnt
DW ?
; LastEnt
469 find_buf_ThisDPB
DD ?
; This DPB
470 find_buf_DirStart
DW ?
; DirStart
472 ; C A V E A T P R O G R A M M E R ;
473 ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
475 find_buf_attr
DB ?
; attribute found
476 find_buf_time
DW ?
; time
477 find_buf_date
DW ?
; date
478 find_buf_size_l
DW ?
; low(size)
479 find_buf_size_h
DW ?
; high(size)
480 find_buf_pname
DB 13 DUP (?
) ; packed name
483 BREAK <Process
data block
>
485 ; Process data block (otherwise known as program header)
490 Process_data_block
STRUC
491 PDB_Exit_Call
DW ?
; INT int_abort system terminate
492 PDB_block_len
DW ?
; size of execution block
494 PDB_CPM_Call
DB 5 DUP (?
) ; ancient call to system
495 PDB_Exit
DD ?
; pointer to exit routine
496 PDB_Ctrl_C
DD ?
; pointer to ^C routine
497 PDB_Fatal_abort
DD ?
; pointer to fatal error
498 ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
499 ; C A V E A T P R O G R A M M E R ;
501 PDB_Parent_PID
DW ?
; PID of parent (terminate PID)
502 PDB_JFN_Table
DB FilPerProc
DUP (?
)
503 ; indices into system table
505 ; C A V E A T P R O G R A M M E R ;
506 ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
507 PDB_environ
DW ?
; seg addr of environment
508 ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
509 ; C A V E A T P R O G R A M M E R ;
511 PDB_User_stack
DD ?
; stack of self during system calls
512 PDB_PAD1
DB 1Eh
DUP (?
)
514 ; C A V E A T P R O G R A M M E R ;
515 ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
516 PDB_Call_system
DB 5 DUP (?
) ; portable method of system call
517 ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
518 ; C A V E A T P R O G R A M M E R ;
520 PDB_PAD2
DB 6h
DUP (?
) ;
522 ; C A V E A T P R O G R A M M E R ;
523 ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
524 Process_data_block ENDS
526 BREAK <EXEC
and EXE
file structures
>
528 ; EXEC arg block - load/go program
532 ; The following get used as arguments to the EXEC system call. They indicate
533 ; whether or not the program is executed or whether or not a program header
536 exec_func_no_execute EQU
1 ; no execute bit
537 exec_func_overlay EQU
2 ; overlay bit
540 Exec0_environ
DW ?
; seg addr of environment
541 Exec0_com_line
DD ?
; pointer to asciz command line
542 Exec0_5C_FCB
DD ?
; default fcb at 5C
543 Exec0_6C_FCB
DD ?
; default fcb at 6C
547 Exec1_environ
DW ?
; seg addr of environment
548 Exec1_com_line
DD ?
; pointer to asciz command line
549 Exec1_5C_FCB
DD ?
; default fcb at 5C
550 Exec1_6C_FCB
DD ?
; default fcb at 6C
551 Exec1_SP
DW ?
; stack pointer of program
552 Exec1_SS
DW ?
; stack seg register of program
553 Exec1_IP
DW ?
; entry point IP
554 Exec1_CS
DW ?
; entry point CS
558 Exec3_load_addr
DW ?
; seg address of load point
559 Exec3_reloc_fac
DW ?
; relocation factor
563 ; Exit codes in upper byte
568 Exit_Hard_Error EQU
2
569 Exit_Keep_process EQU
3
576 exe_signature
DW ?
; must contain 4D5A (yay zibo!)
577 exe_len_mod_512
DW ?
; low 9 bits of length
578 exe_pages
DW ?
; number of 512b pages in file
579 exe_rle_count
DW ?
; count of reloc entries
580 exe_par_dir
DW ?
; number of paragraphs before image
581 exe_min_BSS
DW ?
; minimum number of para of BSS
582 exe_max_BSS
DW ?
; max number of para of BSS
583 exe_SS
DW ?
; stack of image
584 exe_SP
DW ?
; SP of image
585 exe_chksum
DW ?
; checksum of file (ignored)
586 exe_IP
DW ?
; IP of entry
587 exe_CS
DW ?
; CS of entry
588 exe_rle_table
DW ?
; byte offset of reloc table
589 exe_iov
DW ?
; overlay number (0 for root)
590 exe_sym_tab
DD ?
; offset of symbol table in file
593 exe_valid_signature EQU 5A4Dh
594 exe_valid_old_signature EQU 4D5Ah
600 sym_name
DB 255 dup (?
)
603 BREAK <Internal system
file table
format>
604 ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
605 ; C A V E A T P R O G R A M M E R ;
613 sft_count
DW ?
; number of entries
614 sft_table
DW ?
; beginning of array of the following
618 ; system file table entry
622 sf_ref_count
DB ?
; number of processes sharing fcb
623 sf_mode
DB ?
; mode of access
624 sf_attr
DB ?
; attribute of file
625 sf_fcb
DB (SIZE sys_fcb
) DUP (?
)
629 sf_default_number EQU 5h
631 ; C A V E A T P R O G R A M M E R ;
632 ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
634 BREAK <Memory arena structure
>
635 ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
636 ; C A V E A T P R O G R A M M E R ;
642 arena_signature
DB ?
; 4D for valid item, 5A for last item
643 arena_owner
DW ?
; owner of arena item
644 arena_size
DW ?
; size in paragraphs of item
648 ; Current structure of the data returned by the international call
652 Date_tim_format
DW ?
; 0-USA, 1-EUR, 2-JAP
653 Currency_sym
DB ?
; Currency Symbol 5 bytes
658 Thous_sep
DB ?
; Thousands separator 2 bytes
660 Decimal_sep
DB ?
; Decimal separator 2 bytes
662 Date_sep
DB ?
; Date separator 2 bytes
664 Time_sep
DB ?
; Decimal separator 2 bytes
666 Bit_feild
DB ?
; Bit values
667 ; Bit 0 = 0 if currency symbol first
668 ; = 1 if currency symbol last
669 ; Bit 1 = 0 if No space after currency symbol
670 ; = 1 if space after currency symbol
671 Currency_cents
DB ?
; Number of places after currency dec point
672 Time_24
DB ?
; 1 if 24 hour time, 0 if 12 hour time
673 Map_call
DW ?
; Address of case mapping call (DWORD)
674 DW ?
; THIS IS TWO WORDS SO IT CAN BE INITIALIZED
676 Data_sep
DB ?
; Data list separator character
681 ; Max size of the block returned by the INTERNATIONAL call
683 internat_block_max EQU
32
686 ; CAUTION: The routines in ALLOC.ASM rely on the fact that arena_signature
687 ; and arena_owner_system are all equal to zero and are contained in DI. Change
688 ; them and change ALLOC.ASM.
690 arena_owner_system EQU
0 ; free block indication
692 arena_signature_normal EQU 4
Dh ; valid signature, not end of arena
693 arena_signature_end EQU 5
Ah ; valid signature, last block in arena
695 ; C A V E A T P R O G R A M M E R ;
696 ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
698 BREAK <Machine instruction definitions
>
702 mi_Long_CALL EQU
09Ah
705 BREAK <Standard I
/O assignments
>
713 BREAK <Xenix subfunction assignments
>
719 BREAK <Xenix error codes
>
722 ; XENIX calls all return error codes through AX. If an error occurred then
723 ; the carry bit will be set and the error code is in AX. If no error occurred
724 ; then the carry bit is reset and AX contains returned info.
727 no_error_occurred EQU
0 ?
729 error_invalid_function EQU
1
730 error_file_not_found EQU
2
731 error_path_not_found EQU
3
732 error_too_many_open_files EQU
4
733 error_access_denied EQU
5
734 error_invalid_handle EQU
6
735 error_arena_trashed EQU
7
736 error_not_enough_memory EQU
8
737 error_invalid_block EQU
9
738 error_bad_environment EQU
10
739 error_bad_format EQU
11
740 error_invalid_access EQU
12
741 error_invalid_data EQU
13
743 error_invalid_drive EQU
15
744 error_current_directory EQU
16
745 error_not_same_device EQU
17
746 error_no_more_files EQU
18
748 country_not_found EQU error_file_not_found
749 alloc_not_enough_memory EQU error_not_enough_memory
750 alloc_arena_trashed EQU error_arena_trashed
752 close_invalid_handle EQU error_invalid_handle
753 close_invalid_function EQU error_invalid_function
755 chdir_path_not_found EQU error_path_not_found
757 chmod_path_not_found EQU error_path_not_found
758 chmod_access_denied EQU error_access_denied
759 chmod_invalid_function EQU error_invalid_function
761 creat_access_denied EQU error_access_denied
762 creat_path_not_found EQU error_path_not_found
763 creat_too_many_open_files EQU error_too_many_open_files
765 curdir_invalid_drive EQU error_invalid_drive
767 dealloc_invalid_block EQU error_invalid_block
768 dealloc_arena_trashed EQU error_arena_trashed
770 dup_invalid_handle EQU error_invalid_handle
771 dup_too_many_open_files EQU error_too_many_open_files
773 dup2_invalid_handle EQU error_invalid_handle
775 exec_invalid_function EQU error_invalid_function
776 exec_bad_environment EQU error_bad_environment
777 exec_bad_format EQU error_bad_format
778 exec_not_enough_memory EQU error_not_enough_memory
779 exec_file_not_found EQU error_file_not_found
781 filetimes_invalid_function EQU error_invalid_function
782 filetimes_invalid_handle EQU error_invalid_handle
784 findfirst_file_not_found EQU error_file_not_found
785 findfirst_no_more_files EQU error_no_more_files
786 findnext_no_more_files EQU error_no_more_files
788 international_invalid_function EQU error_invalid_function
790 ioctl_invalid_handle EQU error_invalid_handle
791 ioctl_invalid_function EQU error_invalid_function
792 ioctl_invalid_data EQU error_invalid_data
794 lseek_invalid_handle EQU error_invalid_handle
795 lseek_invalid_function EQU error_invalid_function
797 mkdir_path_not_found EQU error_path_not_found
798 mkdir_access_denied EQU error_access_denied
800 open_invalid_access EQU error_invalid_access
801 open_file_not_found EQU error_file_not_found
802 open_access_denied EQU error_access_denied
803 open_too_many_open_files EQU error_too_many_open_files
805 read_invalid_handle EQU error_invalid_handle
806 read_access_denied EQU error_access_denied
808 rename_file_not_found EQU error_file_not_found
809 rename_not_same_device EQU error_not_same_device
810 rename_access_denied EQU error_access_denied
812 rmdir_path_not_found EQU error_path_not_found
813 rmdir_access_denied EQU error_access_denied
814 rmdir_current_directory EQU error_current_directory
816 setblock_invalid_block EQU error_invalid_block
817 setblock_arena_trashed EQU error_arena_trashed
818 setblock_not_enough_memory EQU error_not_enough_memory
819 setblock_invalid_function EQU error_invalid_function
821 unlink_file_not_found EQU error_file_not_found
822 unlink_access_denied EQU error_access_denied
824 write_invalid_handle EQU error_invalid_handle
825 write_access_denied EQU error_access_denied
827 BREAK <system
call definitions
>
830 Std_Con_Input EQU
1 ; 1 1
831 Std_Con_Output EQU
2 ; 2 2
832 Std_Aux_Input EQU
3 ; 3 3
833 Std_Aux_Output EQU
4 ; 4 4
834 Std_Printer_Output EQU
5 ; 5 5
835 Raw_Con_IO EQU
6 ; 6 6
836 Raw_Con_Input EQU
7 ; 7 7
837 Std_Con_Input_No_Echo EQU
8 ; 8 8
838 Std_Con_String_Output EQU
9 ; 9 9
839 Std_Con_String_Input EQU
10 ; 10 A
840 Std_Con_Input_Status EQU
11 ; 11 B
841 Std_Con_Input_Flush EQU
12 ; 12 C
842 Disk_Reset EQU
13 ; 13 D
843 Set_Default_Drive EQU
14 ; 14 E
844 FCB_Open EQU
15 ; 15 F
845 FCB_Close EQU
16 ; 16 10
846 Dir_Search_First EQU
17 ; 17 11
847 Dir_Search_Next EQU
18 ; 18 12
848 FCB_Delete EQU
19 ; 19 13
849 FCB_Seq_Read EQU
20 ; 20 14
850 FCB_Seq_Write EQU
21 ; 21 15
851 FCB_Create EQU
22 ; 22 16
852 FCB_Rename EQU
23 ; 23 17
853 Get_Default_Drive EQU
25 ; 25 19
854 Set_DMA EQU
26 ; 26 1A
855 ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
856 ; C A V E A T P R O G R A M M E R ;
858 Get_Default_DPB EQU
31 ; 31 1F
860 ; C A V E A T P R O G R A M M E R ;
861 ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
862 FCB_Random_Read EQU
33 ; 33 21
863 FCB_Random_Write EQU
34 ; 34 22
864 Get_FCB_File_Length EQU
35 ; 35 23
865 Get_FCB_Position EQU
36 ; 36 24
866 Set_Interrupt_Vector EQU
37 ; 37 25
867 Create_Process_Data_Block EQU
38 ; 38 26
868 FCB_Random_Read_Block EQU
39 ; 39 27
869 FCB_Random_Write_Block EQU
40 ; 40 28
870 Parse_File_Descriptor EQU
41 ; 41 29
871 Get_Date EQU
42 ; 42 2A
872 Set_Date EQU
43 ; 43 2B
873 Get_Time EQU
44 ; 44 2C
874 Set_Time EQU
45 ; 45 2D
875 Set_Verify_On_Write EQU
46 ; 46 2E
876 ; Extended functionality group
877 Get_DMA EQU
47 ; 47 2F
878 Get_Version EQU
48 ; 48 30
879 Keep_Process EQU
49 ; 49 31
880 ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
881 ; C A V E A T P R O G R A M M E R ;
883 Get_DPB EQU
50 ; 50 32
885 ; C A V E A T P R O G R A M M E R ;
886 ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
887 Set_CTRL_C_Trapping EQU
51 ; 51 33
888 Get_InDOS_Flag EQU
52 ; 52 34
889 Get_Interrupt_Vector EQU
53 ; 53 35
890 Get_Drive_Freespace EQU
54 ; 54 36
891 Char_Oper EQU
55 ; 55 37
892 International EQU
56 ; 56 38
903 Unlink EQU
65 ; 65 41
909 Current_Dir EQU
71 ; 71 47
912 Dealloc EQU
73 ; 73 49
913 Setblock EQU
74 ; 74 4A
918 Find_First EQU
78 ; 78 4E
920 Find_Next EQU
79 ; 79 4F
921 ; SPECIAL SYSTEM GROUP
922 ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
923 ; C A V E A T P R O G R A M M E R ;
925 Set_Current_PDB EQU
80 ; 80 50
926 Get_Current_PDB EQU
81 ; 81 51
927 Get_In_Vars EQU
82 ; 82 52
928 SetDPB EQU
83 ; 83 53
930 ; C A V E A T P R O G R A M M E R ;
931 ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
932 Get_Verify_On_Write EQU
84 ; 84 54
933 ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
934 ; C A V E A T P R O G R A M M E R ;
936 Dup_PDB EQU
85 ; 85 55
938 ; C A V E A T P R O G R A M M E R ;
939 ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
940 Rename EQU
86 ; 86 56
941 File_Times EQU
87 ; 87 57
942 AllocOper EQU
88 ; 88 58
943 ; Network extention system calls
944 GetExtendedError EQU
89 ; 89 59
945 CreateTempFile EQU
90 ; 90 5A
946 CreateNewFile EQU
91 ; 91 5B
947 LockOper EQU
92 ; 92 5C Lock and Unlock
948 ServerCall EQU
93 ; 93 5D CommitAll, ServerDOSCall,
949 ; CloseByName, CloseUser,
952 UserIDOper EQU
94 ; 94 5E Get and Set
953 AssignOper EQU
95 ; 95 5F On, Off, Get, Set, Cancel
955 Set_Oem_Handler EQU
248 ; 248 F8
956 OEM_C1 EQU
249 ; 249 F9
957 OEM_C2 EQU
250 ; 250 FA
958 OEM_C3 EQU
251 ; 251 FB
959 OEM_C4 EQU
252 ; 252 FC
960 OEM_C5 EQU
253 ; 253 FD
961 OEM_C6 EQU
254 ; 254 FE
962 OEM_C7 EQU
255 ; 255 FF