/ crt1.s (emx+gcc) -- Copyright (c) 1990-1996 by Eberhard Mattes

#include <emx/asm386.h>

/ This module is used by the following types of executables:
/
/ - Statically linked application programs
/ - Custom C runtime DLLs
/ - Stand-alone DLLs


        .globl  __entry2
#if !defined (__MT__)
        .globl  _errno
#endif
        .globl  __osmode
        .globl  __emx_env
        .globl  __emx_vcmp
        .globl  __emx_vprt
        .globl  __emx_rev
        .globl  __osmajor
        .globl  __osminor

        .text

__entry2:
        call    ___os_version
        movb    %al, __osmajor
        movb    %ah, __osminor
        call    ___emx_version
        movl    %eax, __emx_vcmp
        movl    %ecx, __emx_rev
        movl    %edx, __emx_env
        xchgb   %al, %ah
        rorl    $16, %eax
        xchgb   %al, %ah
        movl    %eax, __emx_vprt
        movb    $0, __emx_vprt+4
        testl   $0x200, %edx
        setne   __osmode
        EPILOGUE(_entry2)

        .data

#if !defined (__MT__)
_errno: .long   0
#endif
__osmode:       .byte 1                         /* OS2_MODE = 1 */
        .comm   __emx_rev, 4
        .comm   __emx_env, 4
        .comm   __emx_vcmp, 4
        .comm   __emx_vprt, 5
        .comm   __osmajor, 1
        .comm   __osminor, 1
