|
|
1.1 ! root 1: ;*** ! 2: ;msdos.inc - MS-DOS definitions for C runtime ! 3: ; ! 4: ; Copyright (c) 1987, Microsoft Corporation. All rights reserved. ! 5: ; ! 6: ;Purpose: ! 7: ; This file contains the MS-DOS definitions (DOS function request ! 8: ; numbers, flags, etc) used by the C runtime. ! 9: ; ! 10: ;******************************************************************************* ! 11: ! 12: ! 13: ;_NFILE equ 20 ; maximum # files per process ! 14: ! 15: STACKSLOP equ 256 ; stack slop for interrupt overhead ! 16: ! 17: ! 18: ; __osfile flag values for DOS file handles ! 19: ! 20: FOPEN equ 01H ; file handle open ! 21: FEOFLAG equ 02H ; end of file has been encountered ! 22: FCRLF equ 04H ; CR-LF across read buffer (in text mode) ! 23: FPIPE equ 08H ; file handle refers to a pipe ! 24: FRDONLY equ 10H ; file handle associated with read only file ! 25: FAPPEND equ 20H ; file handle opened O_APPEND ! 26: FDEV equ 40H ; file handle refers to device ! 27: FTEXT equ 80H ; file handle is in text mode ! 28: ! 29: ! 30: callos MACRO func ! 31: ifnb <func> ! 32: mov ah,DOS_&func ! 33: endif ! 34: int DOS ! 35: ENDM ! 36: ! 37: ! 38: DOS equ 21H ; MS-DOS interrupt ! 39: ! 40: DOS_exit equ 00000H ; exit offset (PSP:0000) ! 41: DOS_maxpara equ 00002H ; maximum paragraph (PSP:0002) ! 42: DOS_envp equ 0002cH ; environment address (PSP:002c) ! 43: DOS_cmdline equ 00080H ; command line offset (PSP:0080) ! 44: ! 45: DOS_kill equ 00H ; terminate ! 46: DOS_echoread equ 01H ; read keyboard and echo ! 47: DOS_display equ 02H ; display character ! 48: DOS_auxinput equ 03H ; auxiliary input ! 49: DOS_auxoutput equ 04H ; auxiliary output ! 50: DOS_print equ 05H ; print character ! 51: DOS_conio equ 06H ; direct console i/o ! 52: DOS_coninput equ 07H ; direct console input ! 53: DOS_readkbd equ 08H ; read keyboard ! 54: DOS_message equ 09H ; display string ! 55: DOS_bufkbdin equ 0aH ; buffered keyboard input ! 56: DOS_kbdstatus equ 0bH ; check keyboard status ! 57: DOS_flshread equ 0cH ; flush buffer and read keyboard ! 58: DOS_diskreset equ 0dH ; disk reset ! 59: DOS_selectdisk equ 0eH ; select default disk ! 60: DOS_fcbopen equ 0fH ; open file with fcb ! 61: DOS_fcbclose equ 10H ; close file with fcb ! 62: DOS_fcbfirst equ 11H ; search for first entry with fcb ! 63: DOS_fcbnext equ 12H ; search for next entry with fcb ! 64: DOS_fcbdelete equ 13H ; delete file with fcb ! 65: DOS_fcbsread equ 14H ; sequential read with fcb ! 66: DOS_fcbswrite equ 15H ; sequential write with fcb ! 67: DOS_fcbcreate equ 16H ; create file with fcb ! 68: DOS_fcbrename equ 17H ; rename file with fcb ! 69: DOS_currentd equ 19H ; current default disk ! 70: DOS_setDMA equ 1aH ; set DMA ! 71: DOS_fcbrread equ 21H ; random read with fcb ! 72: DOS_fcbrwrite equ 22H ; random write with fcb ! 73: DOS_fcbsize equ 23H ; file size with fcb ! 74: DOS_fcbsetrec equ 24H ; set relative record with fcb ! 75: DOS_setvector equ 25H ; set interrupt vector ! 76: DOS_fcbbread equ 27H ; random block read with fcb ! 77: DOS_fcbbwrite equ 28H ; random block write with fcb ! 78: DOS_fcbparse equ 29H ; parse file name with fcb ! 79: DOS_getdate equ 2aH ; get date ! 80: DOS_setdate equ 2bH ; set date ! 81: DOS_gettime equ 2cH ; get time ! 82: DOS_settime equ 2dH ; set time ! 83: DOS_verify equ 2eH ; set/reset verify flag ! 84: DOS_getDMA equ 2fH ; get DMA ! 85: DOS_version equ 30H ; get version number ! 86: DOS_keep equ 31H ; keep process ! 87: DOS_cntlc equ 33H ; Cntl-C check ! 88: DOS_getvector equ 35H ; get interrupt vector ! 89: DOS_getdskspc equ 36H ; get disk free space ! 90: DOS_country equ 38H ; get country dependent info ! 91: DOS_mkdir equ 39H ; make subdirectory ! 92: DOS_rmdir equ 3aH ; remove subdirectory ! 93: DOS_chdir equ 3bH ; change subdirectory ! 94: DOS_create equ 3cH ; create pathname ! 95: DOS_open equ 3dH ; open pathname ! 96: DOS_close equ 3eH ; close file handle ! 97: DOS_read equ 3fH ; read from file handle ! 98: DOS_write equ 40H ; write from file handle ! 99: DOS_delete equ 41H ; delete pathname ! 100: DOS_lseek equ 42H ; move file pointer ! 101: DOS_filemode equ 43H ; get/set attributes of pathname ! 102: DOS_ioctl equ 44H ; ioctl for devices ! 103: DOS_dup equ 45H ; duplicate file handle ! 104: DOS_forcedup equ 46H ; force duplicate file handle ! 105: DOS_curdir equ 47H ; get current directory ! 106: DOS_allocmem equ 48H ; allocate memory block ! 107: DOS_freemem equ 49H ; free memory block ! 108: DOS_setmem equ 4aH ; set size of memory block ! 109: DOS_exec equ 4bH ; load and execute program ! 110: DOS_terminate equ 4cH ; terminate process with errorcode ! 111: DOS_wait equ 4dH ; get child process return code ! 112: DOS_findfirst equ 4eH ; find first file match ! 113: DOS_findnext equ 4fH ; find next file match ! 114: DOS_getverify equ 54H ; return current verify flag ! 115: DOS_rename equ 56H ; rename pathname ! 116: DOS_filedate equ 57H ; get/set file handle date/time ! 117: DOS_createnew equ 5BH ; create new file ! 118: DOS_locking equ 5CH ; file record locking/unlocking ! 119: DOS_sleep equ 89H ; delay process execution ! 120: ! 121: ! 122: ; DOS error codes ! 123: ! 124: doserr MACRO num,name,text ! 125: name equ num ! 126: ENDM ! 127: ! 128: doserr 1, E_ifunc, <invalid function code> ! 129: doserr 2, E_nofile, <file not found> ! 130: doserr 3, E_nopath, <path not found> ! 131: doserr 4, E_toomany, <too many open files> ! 132: doserr 5, E_access, <access denied> ! 133: doserr 6, E_ihandle, <invalid handle> ! 134: doserr 7, E_arena, <arena trashed> ! 135: doserr 8, E_nomem, <not enough memory> ! 136: doserr 9, E_iblock, <invalid block> ! 137: doserr 10, E_badenv, <bad environment> ! 138: doserr 11, E_badfmt, <bad format> ! 139: doserr 12, E_iaccess, <invalid access code> ! 140: doserr 13, E_idata, <invalid data> ! 141: doserr 14, E_unknown, <??? unknown error ???> ! 142: doserr 15, E_idrive, <invalid drive> ! 143: doserr 16, E_curdir, <current directory> ! 144: doserr 17, E_difdev, <not same device> ! 145: doserr 18, E_nomore, <no more files> ! 146: doserr 19, E_maxerr2, <unknown error - Version 2.0> ! 147: ! 148: ; the following errors can occur only in DOS 3.0 ! 149: ! 150: doserr 32, E_sharerr, <sharing violation> ! 151: doserr 33, E_lockerr, <locking violation> ! 152: doserr 34, E_maxerr3, <unknown error - Version 3.0> ! 153: ! 154: ! 155: ; DOS file attributes ! 156: ! 157: A_ro equ 01H ; read-only file ! 158: A_h equ 02H ; hidden ! 159: A_s equ 04H ; system ! 160: A_v equ 08H ; volume ID ! 161: A_d equ 10H ; directory ! 162: A_a equ 20H ; archive ! 163: ! 164: A_mod equ A_ro+A_h+A_s+A_a ; modifiable attributes ! 165: ! 166: ; OS/2 file creation bits ! 167: ! 168: F_CREATFLAG equ 10h ! 169: F_OPENFLAG equ 01h ! 170: F_TRUNCFLAG equ 02H ! 171: ! 172: ; OS/2 device mask ! 173: ! 174: IS_DEV equ 1 ! 175: IS_PIPE equ 2 ! 176: ! 177: ; end of msdos.inc ! 178: ;-----------------------------------------------------------------------
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.