home *** CD-ROM | disk | FTP | other *** search
- ;_ main.asm Thu Feb 4 1988 Modified by: Walter Bright */
- ; Copyright (C) 1986-1988 by Northwest Software
- ; All Rights Reserved
- ; Written by Walter Bright
-
- include MACROS.ASM
-
- ;Code definitions must appear outside the begcode-endcode pairs for
- ;the P and L models. If they are inside, you get a fixup error from
- ;the linker. I think the way this works is terrible.
-
- if MSC
- if LCODE
- extrn _main:far
- else
- extrn _main:near
- endif
-
- begcode main
-
- public __main
- else
- if LCODE
- extrn main:far
- else
- extrn main:near
- endif
-
- begcode main
-
- public _main
- endif
-
- ;;;;;;;;;;;;;;;;;;;;;;;;;;
- ; This is the default _main. It is here so that another _main() can
- ; be installed which does things like wild card expansion.
- ; See _main.c for one which does wild card expansion.
-
- if MSC
-
- if LCODE
- __main proc far
- jmp far ptr _main
- else
- __main proc near
- jmp near ptr _main
- endif
- __main endp
-
- else
-
- if LCODE
- _main proc far
- jmp far ptr main
- else
- _main proc near
- jmp near ptr main
- endif
- _main endp
-
- endif
-
- endcode main
-
- end
-