Modularized CallFrom/To16 routines. Adapted dependent routines,
[wine/testsucceed.git] / include / builtin16.h
blobf905beae021f30472a7a8612121c7ad12efd7476
1 /*
2 * Win16 built-in DLLs definitions
4 * Copyright 1999 Ulrich Weigand
5 */
7 #ifndef __WINE_BUILTIN16_H
8 #define __WINE_BUILTIN16_H
10 #include "windef.h"
12 #include "pshpack1.h"
14 typedef struct
16 WORD pushw_bp; /* pushw %bp */
17 BYTE pushl; /* pushl $target */
18 DWORD target;
19 BYTE lcall; /* lcall __FLATCS__:relay */
20 DWORD relay;
21 WORD flatcs;
22 } STD_ENTRYPOINT16;
24 typedef struct
26 WORD movw_ax; /* movw $<ax>, %ax */
27 WORD ax;
28 WORD movw_dx; /* movw $<dx>, %dx */
29 WORD dx;
30 WORD lret; /* lret $<args> */
31 WORD args;
32 WORD nopnop; /* nop; nop */
33 } RET_ENTRYPOINT16;
35 typedef union
37 STD_ENTRYPOINT16 std;
38 RET_ENTRYPOINT16 ret;
39 } ENTRYPOINT16;
41 #define EP_STD( target, relay ) \
42 { std: { 0x5566, 0x68, (DWORD)(target), 0x9a, (DWORD)(relay), __FLATCS__ } }
44 #define EP_RET( retval, nargs ) \
45 { ret: { 0xb866, LOWORD(retval), 0xba66, HIWORD(retval), \
46 (nargs)? 0xca66 : 0xcb66, (nargs)? (nargs) : 0x9090, 0x9090 } }
48 #include "poppack.h"
50 typedef struct
52 const char *name; /* DLL name */
53 void *module_start; /* 32-bit address of the module data */
54 int module_size; /* Size of the module data */
55 const BYTE *code_start; /* 32-bit address of DLL code */
56 const BYTE *data_start; /* 32-bit address of DLL data */
57 } WIN16_DESCRIPTOR;
60 extern void RELAY_Unimplemented16(void);
63 #endif /* __WINE_BUILTIN16_H */