/ crt2.s (emx+gcc) -- Copyright (c) 1990-1994 by Eberhard Mattes

        .globl  __entry2
        .globl  __dos_init
        .globl  __dos_syscall
        .globl  __emx_env
        .globl  __emx_vcmp
        .globl  __emx_vprt
        .globl  __emx_rev
        .globl  __osmajor
        .globl  __osminor
#if !defined (_LIBCDLL)
        .globl  __osmode
#endif

        .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
        ret

__dos_init:
        ret     $4

        .align  2, 0x90

__dos_syscall:
        int     $0x21
        ret

        .data

        .comm   __emx_rev, 4
        .comm   __emx_env, 4
        .comm   __emx_vcmp, 4
        .comm   __emx_vprt, 5
        .comm   __osmajor, 1
        .comm   __osminor, 1
#if !defined (_LIBCDLL)
        .comm   __osmode, 1
#endif
