2 * COPYRIGHT: GPL - See COPYING in the top level directory
3 * PROJECT: ReactOS Virtual DOS Machine
4 * FILE: subsystems/mvdm/ntvdm/io.h
5 * PURPOSE: I/O Port Handlers
6 * PROGRAMMERS: Aleksandar Andrejevic <theflash AT sdf DOT lonestar DOT org>
7 * Hermes Belusca-Maito (hermes.belusca@sfr.fr)
13 /* DEFINES ********************************************************************/
15 #define EMULATOR_MAX_IOPORTS_NUM 0x10000
17 /* FUNCTIONS ******************************************************************/
19 typedef UCHAR (WINAPI
*EMULATOR_INB_PROC
)(USHORT Port
);
20 typedef USHORT (WINAPI
*EMULATOR_INW_PROC
)(USHORT Port
);
21 typedef ULONG (WINAPI
*EMULATOR_IND_PROC
)(USHORT Port
);
23 typedef VOID (WINAPI
*EMULATOR_INSB_PROC
)(USHORT Port
, PUCHAR Buffer
, ULONG Count
);
24 typedef VOID (WINAPI
*EMULATOR_INSW_PROC
)(USHORT Port
, PUSHORT Buffer
, ULONG Count
);
25 typedef VOID (WINAPI
*EMULATOR_INSD_PROC
)(USHORT Port
, PULONG Buffer
, ULONG Count
);
27 typedef VOID (WINAPI
*EMULATOR_OUTB_PROC
)(USHORT Port
, UCHAR Data
);
28 typedef VOID (WINAPI
*EMULATOR_OUTW_PROC
)(USHORT Port
, USHORT Data
);
29 typedef VOID (WINAPI
*EMULATOR_OUTD_PROC
)(USHORT Port
, ULONG Data
);
31 typedef VOID (WINAPI
*EMULATOR_OUTSB_PROC
)(USHORT Port
, PUCHAR Buffer
, ULONG Count
);
32 typedef VOID (WINAPI
*EMULATOR_OUTSW_PROC
)(USHORT Port
, PUSHORT Buffer
, ULONG Count
);
33 typedef VOID (WINAPI
*EMULATOR_OUTSD_PROC
)(USHORT Port
, PULONG Buffer
, ULONG Count
);
39 IOReadStrB(USHORT Port
,
47 IOWriteStrB(USHORT Port
,
54 IOReadStrW(USHORT Port
,
62 IOWriteStrW(USHORT Port
,
69 IOReadStrD(USHORT Port
,
77 IOWriteStrD(USHORT Port
,
82 VOID
RegisterIoPort(USHORT Port
,
83 EMULATOR_INB_PROC InHandler
,
84 EMULATOR_OUTB_PROC OutHandler
);
86 VOID
UnregisterIoPort(USHORT Port
);
88 VOID FASTCALL EmulatorReadIo
97 VOID FASTCALL EmulatorWriteIo