Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
548 serge 1
/****************************************************************************
2
*
3
*                            Open Watcom Project
4
*
5
*    Portions Copyright (c) 1983-2002 Sybase, Inc. All Rights Reserved.
6
*
7
*  ========================================================================
8
*
9
*    This file contains Original Code and/or Modifications of Original
10
*    Code as defined in and that are subject to the Sybase Open Watcom
11
*    Public License version 1.0 (the 'License'). You may not use this file
12
*    except in compliance with the License. BY USING THIS FILE YOU AGREE TO
13
*    ALL TERMS AND CONDITIONS OF THE LICENSE. A copy of the License is
14
*    provided with the Original Code and Modifications, and is also
15
*    available at www.sybase.com/developer/opensource.
16
*
17
*    The Original Code and all software distributed under the License are
18
*    distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
19
*    EXPRESS OR IMPLIED, AND SYBASE AND ALL CONTRIBUTORS HEREBY DISCLAIM
20
*    ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF
21
*    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR
22
*    NON-INFRINGEMENT. Please see the License for the specific language
23
*    governing rights and limitations under the License.
24
*
25
*  ========================================================================
26
*
27
* Description:  Special interface for calls to non-Watcom routines from
28
*               inside clib (x86 specific).
29
*
30
****************************************************************************/
31
 
32
 
33
#ifndef EXTFUNC_H_INCLUDED
34
#define EXTFUNC_H_INCLUDED
35
 
36
#include "variety.h"
37
 
38
#if defined(_M_IX86)
39
    #if !defined(__WINDOWS__)
40
        #if defined(__BIG_DATA__)
41
            #define __DS        ds
42
        #endif
43
    #endif
44
 
45
    #if !defined(__FLAT__)
46
        #define __ES    es
47
    #endif
48
 
49
    #if defined(__386__)
50
        #if defined(__WINDOWS__) || !defined(__FLAT__)
51
            #define __FS        fs
52
        #endif
53
 
54
        #define __GS    gs
55
        #if defined(__SW_3S)
56
            #define __AX        eax
57
            #define __BX        ebx
58
            #define __CX        ecx
59
            #define __DX        edx
60
        #endif
61
    #endif
62
 
63
    #ifndef __AX
64
        #define __AX
65
    #endif
66
    #ifndef __BX
67
        #define __BX
68
    #endif
69
    #ifndef __CX
70
        #define __CX
71
    #endif
72
    #ifndef __DX
73
        #define __DX
74
    #endif
75
    #ifndef __DS
76
        #define __DS
77
    #endif
78
    #ifndef __ES
79
        #define __ES
80
    #endif
81
    #ifndef __FS
82
        #define __FS
83
    #endif
84
    #ifndef __GS
85
        #define __GS
86
    #endif
87
 
88
    #pragma aux __outside_CLIB modify [__AX __BX __CX __DX __DS __ES __FS __GS];
89
    /*
90
            use as follows:
91
 
92
    typedef void vfv( void );
93
    #pragma aux (__outside_CLIB) __vfv;
94
    */
95
 
96
    #undef __AX
97
    #undef __BX
98
    #undef __CX
99
    #undef __DX
100
    #undef __DS
101
    #undef __ES
102
    #undef __FS
103
    #undef __GS
104
#endif
105
 
106
#endif