diff options
Diffstat (limited to 'v2.0/source/MSHEAD.ASM')
| -rw-r--r-- | v2.0/source/MSHEAD.ASM | 198 |
1 files changed, 198 insertions, 0 deletions
diff --git a/v2.0/source/MSHEAD.ASM b/v2.0/source/MSHEAD.ASM new file mode 100644 index 0000000..108197d --- /dev/null +++ b/v2.0/source/MSHEAD.ASM | |||
| @@ -0,0 +1,198 @@ | |||
| 1 | ; TITLE MSHEAD.ASM -- MS-DOS DEFINITIONS | ||
| 2 | PAGE | ||
| 3 | ; MS-DOS High-performance operating system for the 8086 version 1.28 | ||
| 4 | ; by Microsoft MSDOS development group: | ||
| 5 | ; Tim Paterson (Ret.) | ||
| 6 | ; Aaron Reynolds | ||
| 7 | ; Nancy Panners (Parenting) | ||
| 8 | ; Mark Zbikowski | ||
| 9 | ; Chris Peters (BIOS) (ret.) | ||
| 10 | |||
| 11 | ; ****************** Revision History ************************* | ||
| 12 | ; >> EVERY change must noted below!! << | ||
| 13 | ; | ||
| 14 | ; 0.34 12/29/80 General release, updating all past customers | ||
| 15 | ; 0.42 02/25/81 32-byte directory entries added | ||
| 16 | ; 0.56 03/23/81 Variable record and sector sizes | ||
| 17 | ; 0.60 03/27/81 Ctrl-C exit changes, including register save on user stack | ||
| 18 | ; 0.74 04/15/81 Recognize I/O devices with file names | ||
| 19 | ; 0.75 04/17/81 Improve and correct buffer handling | ||
| 20 | ; 0.76 04/23/81 Correct directory size when not 2^N entries | ||
| 21 | ; 0.80 04/27/81 Add console input without echo, Functions 7 & 8 | ||
| 22 | ; 1.00 04/28/81 Renumber for general release | ||
| 23 | ; 1.01 05/12/81 Fix bug in `STORE' | ||
| 24 | ; 1.10 07/21/81 Fatal error trapping, NUL device, hidden files, date & time, | ||
| 25 | ; RENAME fix, general cleanup | ||
| 26 | ; 1.11 09/03/81 Don't set CURRENT BLOCK to 0 on open; fix SET FILE SIZE | ||
| 27 | ; 1.12 10/09/81 Zero high half of CURRENT BLOCK after all (CP/M programs don't) | ||
| 28 | ; 1.13 10/29/81 Fix classic "no write-through" error in buffer handling | ||
| 29 | ; 1.20 12/31/81 Add time to FCB; separate FAT from DPT; Kill SMALLDIR; Add | ||
| 30 | ; FLUSH and MAPDEV calls; allow disk mapping in DSKCHG; Lots | ||
| 31 | ; of smaller improvements | ||
| 32 | ; 1.21 01/06/82 HIGHMEM switch to run DOS in high memory | ||
| 33 | ; 1.22 01/12/82 Add VERIFY system call to enable/disable verify after write | ||
| 34 | ; 1.23 02/11/82 Add defaulting to parser; use variable escape character Don't | ||
| 35 | ; zero extent field in IBM version (back to 1.01!) | ||
| 36 | ; 1.24 03/01/82 Restore fcn. 27 to 1.0 level; add fcn. 28 | ||
| 37 | ; 1.25 03/03/82 Put marker (00) at end of directory to speed searches | ||
| 38 | ; 1.26 03/03/82 Directory buffers searched as a circular queue, current buffer | ||
| 39 | ; is searched first when possible to minimize I/O | ||
| 40 | ; 03/03/82 STORE routine optimized to tack on partial sector tail as | ||
| 41 | ; full sector write when file is growing | ||
| 42 | ; 03/09/82 Multiple I/O buffers | ||
| 43 | ; 03/29/82 Two bugs: Delete all case resets search to start at beginning | ||
| 44 | ; of directory (infinite loop possible otherwise), DSKRESET | ||
| 45 | ; must invalidate all buffers (disk and directory). | ||
| 46 | ; 1.27 03/31/82 Installable device drivers | ||
| 47 | ; Function call 47 - Get pointer to device table list | ||
| 48 | ; Function call 48 - Assign CON AUX LIST | ||
| 49 | ; 04/01/82 Spooler interrupt (INT 28) added. | ||
| 50 | ; 1.28 04/15/82 DOS retructured to use ASSUMEs and PROC labels around system | ||
| 51 | ; call entries. Most CS relative references changed to SS | ||
| 52 | ; relative with an eye toward putting a portion of the DOS in | ||
| 53 | ; ROM. DOS source also broken into header, data and code pieces | ||
| 54 | ; 04/15/82 GETDMA and GETVECT calls added as 24 and 32. These calls | ||
| 55 | ; return the current values. | ||
| 56 | ; 04/15/82 INDOS flag implemented for interrupt processing along with | ||
| 57 | ; call to return flag location (call 29) | ||
| 58 | ; 04/15/82 Volume ID attribute added | ||
| 59 | ; 04/17/82 Changed ABORT return to user to a long ret from a long jump to | ||
| 60 | ; avoid a CS relative reference. | ||
| 61 | ; 04/17/82 Put call to STATCHK in dispatcher to catch ^C more often | ||
| 62 | ; 04/20/82 Added INT int_upooler into loop ^S wait | ||
| 63 | ; 04/22/82 Dynamic disk I/O buffer allocation and call to manage them | ||
| 64 | ; call 49. | ||
| 65 | ; 04/23/82 Added GETDSKPTDL as call 50, similar to GETFATPT(DL), returns | ||
| 66 | ; address of DPB | ||
| 67 | ; 04/29/82 Mod to WRTDEV to look for ^C or ^S at console input when | ||
| 68 | ; writting to console device via file I/O. Added a console | ||
| 69 | ; output attribute to devices. | ||
| 70 | ; 04/30/82 Call to en/dis able ^C check in dispatcher Call 51 | ||
| 71 | ; 04/30/82 Code to allow assignment of func 1-12 to disk files as well | ||
| 72 | ; as devices.... pipes, redirection now possible | ||
| 73 | ; 04/30/82 Expanded GETLIST call to 2.0 standard | ||
| 74 | ; 05/04/82 Change to INT int_fatal_abort callout int HARDERR. DOS SS | ||
| 75 | ; (data segment) stashed in ES, INT int_fatal_abort routines must | ||
| 76 | ; preserve ES. This mod so HARDERR can be ROMed. | ||
| 77 | ; 1.29 06/01/82 Installable block and character devices as per 2.0 spec | ||
| 78 | ; 06/04/82 Fixed Bug in CLOSE regarding call to CHKFATWRT. It got left | ||
| 79 | ; out back about 1.27 or so (oops). ARR | ||
| 80 | ; 1.30 06/07/82 Directory sector buffering added to main DOS buffer queue | ||
| 81 | ; 1.40 06/15/82 Tree structured directories. XENIX Path Parser MKDIR CHDIR | ||
| 82 | ; RMDIR Xenix calls | ||
| 83 | ; 1.41 06/13/82 Made GETBUFFR call PLACEBUF | ||
| 84 | ; 1.50 06/17/82 FATs cached in buffer pool, get FAT pointer calls disappear | ||
| 85 | ; Frees up lots of memory. | ||
| 86 | ; 1.51 06/24/82 BREAKDOWN modified to do EXACT one sector read/write through | ||
| 87 | ; system buffers | ||
| 88 | ; 1.52 06/30/82 OPEN, CLOSE, READ, WRITE, DUP, DUP2, LSEEK implemented | ||
| 89 | ; 1.53 07/01/82 OPEN CLOSE mod for Xenix calls, saves and gets remote dir | ||
| 90 | ; 1.54 07/11/82 Function calls 1-12 make use of new 2.0 PDB. Init code | ||
| 91 | ; changed to set file handle environment. | ||
| 92 | ; 2.00 08/01/82 Number for IBM release | ||
| 93 | ; 01/19/83 No environ bug in EXEC | ||
| 94 | ; 01/19/83 MS-DOS OEM INT 21 extensions (SET_OEM_HANDLER) | ||
| 95 | ; 01/19/83 Performance bug fix in cooked write to NUL | ||
| 96 | ; 01/27/83 Growcnt fixed for 32-bits | ||
| 97 | ; 01/27/83 Find-first problem after create | ||
| 98 | ; 2.01 02/17/83 International DOS | ||
| 99 | ; 2.11 08/12/83 Dos split into several more modules for assembly on | ||
| 100 | ; an IBM PC | ||
| 101 | ; | ||
| 102 | ; ************************************************************* | ||
| 103 | |||
| 104 | |||
| 105 | SUBTTL EQUATES | ||
| 106 | PAGE | ||
| 107 | ; Interrupt Entry Points: | ||
| 108 | |||
| 109 | ; INTBASE: ABORT | ||
| 110 | ; INTBASE+4: COMMAND | ||
| 111 | ; INTBASE+8: BASE EXIT ADDRESS | ||
| 112 | ; INTBASE+C: CONTROL-C ABORT | ||
| 113 | ; INTBASE+10H: FATAL ERROR ABORT | ||
| 114 | ; INTBASE+14H: BIOS DISK READ | ||
| 115 | ; INTBASE+18H: BIOS DISK WRITE | ||
| 116 | ; INTBASE+1CH: END BUT STAY RESIDENT (NOT SET BY DOS) | ||
| 117 | ; INTBASE+20H: SPOOLER INTERRUPT | ||
| 118 | ; INTBASE+40H: Long jump to CALL entry point | ||
| 119 | |||
| 120 | ENTRYPOINTSEG EQU 0CH | ||
| 121 | MAXDIF EQU 0FFFH | ||
| 122 | SAVEXIT EQU 10 | ||
| 123 | |||
| 124 | INCLUDE DOSSYM.ASM | ||
| 125 | INCLUDE DEVSYM.ASM | ||
| 126 | |||
| 127 | SUBTTL ^C, terminate/abort/exit and Hard error actions | ||
| 128 | PAGE | ||
| 129 | ; | ||
| 130 | ; There are three kinds of context resets that can occur during normal DOS | ||
| 131 | ; functioning: ^C trap, terminate/abort/exit, and Hard-disk error. These must | ||
| 132 | ; be handles in a clean fashion that allows nested executions along with the | ||
| 133 | ; ability to trap one's own errors. | ||
| 134 | ; | ||
| 135 | ; ^C trap - A process may elect to catch his own ^Cs. This is achieved by | ||
| 136 | ; using the $GET_INTERRUPT_VECTOR and $SET_INTERRUPT_VECTOR as | ||
| 137 | ; follows: | ||
| 138 | ; | ||
| 139 | ; $GET_INTERRUPT_VECTOR for INT int_ctrl_c | ||
| 140 | ; Save it in static memory. | ||
| 141 | ; $SET_INTERRUPT_VECTOR for INT int_ctrl_c | ||
| 142 | ; | ||
| 143 | ; The interrupt service routine must preserve all registers and | ||
| 144 | ; return carry set iff the operation is to be aborted (via abort | ||
| 145 | ; system call), otherwise, carry is reset and the operation is | ||
| 146 | ; restarted. ANY DEVIATION FROM THIS WILL LEAD TO UNRELIABLE | ||
| 147 | ; RESULTS. | ||
| 148 | ; | ||
| 149 | ; To restore original ^C processing (done on terminate/abort/exit), | ||
| 150 | ; restore INT int_ctrl_c from the saved vector. | ||
| 151 | ; | ||
| 152 | ; Hard-disk error -- The interrupt service routine for INT int_fatal_abort must | ||
| 153 | ; also preserve registers and return one of three values in AL: 0 and | ||
| 154 | ; 1 imply retry and ignore (???) and 2 indicates an abort. The user | ||
| 155 | ; himself is not to issue the abort, rather, the dos will do it for | ||
| 156 | ; him by simulating a normal abort/exit system call. ANY DEVIATION | ||
| 157 | ; FROM THIS WILL LEAD TO UNRELIABLE RESULTS. | ||
| 158 | ; | ||
| 159 | ; terminate/abort/exit -- The user may not, under any circumstances trap an | ||
| 160 | ; abort call. This is reserved for knowledgeable system programs. | ||
| 161 | ; ANY DEVIATION FROM THIS WILL LEAD TO UNRELIABLE RESULTS. | ||
| 162 | |||
| 163 | SUBTTL SEGMENT DECLARATIONS | ||
| 164 | PAGE | ||
| 165 | |||
| 166 | ; The following are all of the segments used. They are declared in the order | ||
| 167 | ; that they should be placed in the executable | ||
| 168 | |||
| 169 | ; | ||
| 170 | ; segment ordering for MSDOS | ||
| 171 | ; | ||
| 172 | |||
| 173 | START SEGMENT BYTE PUBLIC 'START' | ||
| 174 | START ENDS | ||
| 175 | |||
| 176 | CONSTANTS SEGMENT BYTE PUBLIC 'CONST' | ||
| 177 | CONSTANTS ENDS | ||
| 178 | |||
| 179 | DATA SEGMENT WORD PUBLIC 'DATA' | ||
| 180 | DATA ENDS | ||
| 181 | |||
| 182 | CODE SEGMENT BYTE PUBLIC 'CODE' | ||
| 183 | CODE ENDS | ||
| 184 | |||
| 185 | LAST SEGMENT BYTE PUBLIC 'LAST' | ||
| 186 | LAST ENDS | ||
| 187 | |||
| 188 | DOSGROUP GROUP CODE,CONSTANTS,DATA,LAST | ||
| 189 | |||
| 190 | ; The following segment is defined such that the data/const classes appear | ||
| 191 | ; before the code class for ROMification | ||
| 192 | |||
| 193 | START SEGMENT BYTE PUBLIC 'START' | ||
| 194 | ASSUME CS:DOSGROUP,DS:NOTHING,ES:NOTHING,SS:NOTHING | ||
| 195 | JMP DOSINIT | ||
| 196 | START ENDS | ||
| 197 | |||
| 198 | \ No newline at end of file | ||