Assembly Language Help (alang.hlp) (
Table of Contents;
Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
Generate Start-Up/Exit Code
◄Example► ◄Up► ◄Contents► ◄Index► ◄Back►
────────────────────────────────────────────────────────────────────────────
Syntax: .STARTUP
.EXIT [expression]
See also: .MODEL, END, ORG, INCLUDELIB, @Exit DOS Macro,
Table of Memory Models
The .STARTUP directive generates start-up code for the given CPU
type and the memory model, operating system, and stack type
defined by the .MODEL directive. Defines a start-address label,
so that you don't need to give a start address with END. .STARTUP
initializes DS, SS, and SP under DOS.
The .EXIT directive generates code that terminates the program and
returns control to the operating system or calling program. Use of
the <expression> parameter returns a numeric exit code to the
operating system or calling program.
The <expression> parameter is an optional return code that can be
read by the calling program or by a batch file. It can be a byte-
sized register (word-sized under OS_OS2), memory location, or
constant.
With the TINY model, the .STARTUP directive also generates an
ORG 100h.
The .MODEL directive must precede these directives. The default
OSType is DOS.
To use the .EXIT directive under OS/2, you must link with a library
that provides a termination procedure with a prototype.
-♦-