- Bugfix: Styles were evaluated as expressions. The NOT in combination
[wine.git] / include / dosexe.h
blobf8e365ffe369aee763b9f7f75cc062eed6d103b2
1 /*
2 * DOS EXE loader
4 * Copyright 1998 Ove Kåven
5 */
7 #ifndef __WINE_DOSEXE_H
8 #define __WINE_DOSEXE_H
10 #include <sys/types.h> /* pid_t */
11 #include "winbase.h" /* for LPSTARTUPINFO32A */
12 #include "winnt.h" /* for PCONTEXT */
14 typedef struct _DOSSYSTEM {
15 int id;
16 void *data;
17 struct _DOSSYSTEM *next;
18 } DOSSYSTEM;
20 struct _DOSEVENT;
22 typedef struct _DOSTASK {
23 LPVOID img;
24 unsigned img_ofs;
25 WORD psp_seg,load_seg;
26 WORD init_cs,init_ip,init_ss,init_sp;
27 WORD xms_seg;
28 WORD dpmi_seg,dpmi_sel,dpmi_flag;
29 HMODULE16 hModule;
30 char mm_name[128];
31 int mm_fd;
32 HANDLE hReadPipe,hXPipe,hConInput,hConOutput;
33 int read_pipe,write_pipe;
34 pid_t task;
35 int sig_sent;
36 struct _DOSEVENT *pending,*current;
37 DOSSYSTEM *sys;
38 } DOSTASK, *LPDOSTASK;
40 typedef struct _DOSEVENT {
41 int irq,priority;
42 void (*relay)(LPDOSTASK,CONTEXT86*,void*);
43 void *data;
44 struct _DOSEVENT *next;
45 } DOSEVENT, *LPDOSEVENT;
47 #define DOS_PRIORITY_REALTIME 0 /* IRQ0 */
48 #define DOS_PRIORITY_KEYBOARD 1 /* IRQ1 */
49 #define DOS_PRIORITY_VGA 2 /* IRQ9 */
50 #define DOS_PRIORITY_MOUSE 5 /* IRQ12 */
51 #define DOS_PRIORITY_SERIAL 10 /* IRQ4 */
53 #if defined(linux) && defined(__i386__)
55 #define MZ_SUPPORTED
57 extern BOOL MZ_InitTask( LPDOSTASK lpDosTask );
58 extern void MZ_KillModule( LPDOSTASK lpDosTask );
59 extern LPDOSTASK MZ_AllocDPMITask( HMODULE16 hModule );
61 #endif /* linux-i386 */
63 #define V86_FLAG 0x00020000
65 extern BOOL MZ_CreateProcess( HFILE hFile, OFSTRUCT *ofs, LPCSTR cmdline, LPCSTR env,
66 LPSECURITY_ATTRIBUTES psa, LPSECURITY_ATTRIBUTES tsa,
67 BOOL inherit, DWORD flags, LPSTARTUPINFOA startup,
68 LPPROCESS_INFORMATION info );
69 extern LPDOSTASK MZ_Current( void );
70 extern int DOSVM_Enter( CONTEXT86 *context );
71 extern void DOSVM_Wait( int read_pipe, HANDLE hObject );
72 extern void DOSVM_QueueEvent( int irq, int priority, void (*relay)(LPDOSTASK,CONTEXT86*,void*), void *data );
73 extern void DOSVM_PIC_ioport_out( WORD port, BYTE val );
74 extern void DOSVM_SetTimer( unsigned ticks );
75 extern unsigned DOSVM_GetTimer( void );
76 extern void DOSVM_SetSystemData( int id, void *data );
77 extern void* DOSVM_GetSystemData( int id );
79 #endif /* __WINE_DOSEXE_H */