4 * Copyright 1998 Ove Kåven
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
{
17 struct _DOSSYSTEM
*next
;
22 typedef struct _DOSTASK
{
25 WORD psp_seg
,load_seg
;
26 WORD init_cs
,init_ip
,init_ss
,init_sp
;
28 WORD dpmi_seg
,dpmi_sel
,dpmi_flag
;
31 HANDLE hReadPipe
,hXPipe
,hConInput
,hConOutput
;
32 int read_pipe
,write_pipe
;
34 int sig_sent
,entered
,idling
;
35 struct _DOSEVENT
*pending
,*current
;
37 } DOSTASK
, *LPDOSTASK
;
39 typedef struct _DOSEVENT
{
41 void (*relay
)(LPDOSTASK
,CONTEXT86
*,void*);
43 struct _DOSEVENT
*next
;
44 } DOSEVENT
, *LPDOSEVENT
;
46 #define DOS_PRIORITY_REALTIME 0 /* IRQ0 */
47 #define DOS_PRIORITY_KEYBOARD 1 /* IRQ1 */
48 #define DOS_PRIORITY_VGA 2 /* IRQ9 */
49 #define DOS_PRIORITY_MOUSE 5 /* IRQ12 */
50 #define DOS_PRIORITY_SERIAL 10 /* IRQ4 */
52 #if defined(linux) && defined(__i386__)
56 extern BOOL
MZ_InitTask( LPDOSTASK lpDosTask
);
57 extern void MZ_KillTask( LPDOSTASK lpDosTask
);
58 extern LPDOSTASK
MZ_AllocDPMITask( void );
60 #endif /* linux-i386 */
62 #define V86_FLAG 0x00020000
64 extern BOOL
MZ_LoadImage( HMODULE module
, HANDLE hFile
, LPCSTR filename
);
65 extern LPDOSTASK
MZ_Current( void );
66 extern int DOSVM_Enter( CONTEXT86
*context
);
67 extern void DOSVM_Wait( int read_pipe
, HANDLE hObject
);
68 extern void DOSVM_QueueEvent( int irq
, int priority
, void (*relay
)(LPDOSTASK
,CONTEXT86
*,void*), void *data
);
69 extern void DOSVM_PIC_ioport_out( WORD port
, BYTE val
);
70 extern void DOSVM_SetTimer( unsigned ticks
);
71 extern unsigned DOSVM_GetTimer( void );
72 extern void DOSVM_SetSystemData( int id
, void *data
);
73 extern void* DOSVM_GetSystemData( int id
);
75 #endif /* __WINE_DOSEXE_H */