Alexandre Julliard | b7258be | 1995-09-01 15:57:28 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Misc. emulation definitions |
| 3 | * |
| 4 | * Copyright 1995 Alexandre Julliard |
Alexandre Julliard | 0799c1a | 2002-03-09 23:29:33 +0000 | [diff] [blame] | 5 | * |
| 6 | * This library is free software; you can redistribute it and/or |
| 7 | * modify it under the terms of the GNU Lesser General Public |
| 8 | * License as published by the Free Software Foundation; either |
| 9 | * version 2.1 of the License, or (at your option) any later version. |
| 10 | * |
| 11 | * This library is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 14 | * Lesser General Public License for more details. |
| 15 | * |
| 16 | * You should have received a copy of the GNU Lesser General Public |
| 17 | * License along with this library; if not, write to the Free Software |
| 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
Alexandre Julliard | b7258be | 1995-09-01 15:57:28 +0000 | [diff] [blame] | 19 | */ |
| 20 | |
Alexandre Julliard | 234bc24 | 1994-12-10 13:02:28 +0000 | [diff] [blame] | 21 | #ifndef __WINE_MISCEMU_H |
| 22 | #define __WINE_MISCEMU_H |
| 23 | |
Alexandre Julliard | 9ea19e5 | 1997-01-01 17:29:55 +0000 | [diff] [blame] | 24 | #include "winnt.h" |
Alexandre Julliard | db0747d | 2000-12-13 20:23:41 +0000 | [diff] [blame] | 25 | #include "selectors.h" |
Alexandre Julliard | 83f52d1 | 2000-09-26 22:20:14 +0000 | [diff] [blame] | 26 | #include "wine/windef16.h" |
Alexandre Julliard | a2f2e01 | 1995-06-06 16:40:35 +0000 | [diff] [blame] | 27 | |
Alexandre Julliard | 638f169 | 1999-01-17 16:32:32 +0000 | [diff] [blame] | 28 | /* msdos/dosconf.c */ |
| 29 | extern int DOSCONF_ReadConfig(void); |
| 30 | |
| 31 | /* msdos/dosmem.c */ |
Patrik Stridvall | c7a8dde | 1999-04-25 12:36:53 +0000 | [diff] [blame] | 32 | #include "pshpack1.h" |
Andreas Mohr | f83cf69 | 1999-03-13 18:00:52 +0000 | [diff] [blame] | 33 | |
| 34 | typedef struct |
| 35 | { |
| 36 | WORD Com1Addr; /* 00: COM1 I/O address */ |
| 37 | WORD Com2Addr; /* 02: COM2 I/O address */ |
| 38 | WORD Com3Addr; /* 04: COM3 I/O address */ |
| 39 | WORD Com4Addr; /* 06: COM4 I/O address */ |
| 40 | WORD Lpt1Addr; /* 08: LPT1 I/O address */ |
| 41 | WORD Lpt2Addr; /* 0a: LPT2 I/O address */ |
| 42 | WORD Lpt3Addr; /* 0c: LPT3 I/O address */ |
| 43 | WORD Lpt4Addr; /* 0e: LPT4 I/O address */ |
| 44 | WORD InstalledHardware; /* 10: Installed hardware flags */ |
| 45 | BYTE POSTstatus; /* 12: Power-On Self Test status */ |
| 46 | WORD MemSize WINE_PACKED; /* 13: Base memory size in Kb */ |
| 47 | WORD unused1 WINE_PACKED; /* 15: Manufacturing test scratch pad */ |
| 48 | BYTE KbdFlags1; /* 17: Keyboard flags 1 */ |
| 49 | BYTE KbdFlags2; /* 18: Keyboard flags 2 */ |
| 50 | BYTE unused2; /* 19: Keyboard driver workspace */ |
| 51 | WORD NextKbdCharPtr; /* 1a: Next character in kbd buffer */ |
| 52 | WORD FirstKbdCharPtr; /* 1c: First character in kbd buffer */ |
| 53 | WORD KbdBuffer[16]; /* 1e: Keyboard buffer */ |
| 54 | BYTE DisketteStatus1; /* 3e: Diskette recalibrate status */ |
| 55 | BYTE DisketteStatus2; /* 3f: Diskette motor status */ |
| 56 | BYTE DisketteStatus3; /* 40: Diskette motor timeout */ |
| 57 | BYTE DisketteStatus4; /* 41: Diskette last operation status */ |
| 58 | BYTE DiskStatus[7]; /* 42: Disk status/command bytes */ |
| 59 | BYTE VideoMode; /* 49: Video mode */ |
| 60 | WORD VideoColumns; /* 4a: Number of columns */ |
| 61 | WORD VideoPageSize; /* 4c: Video page size in bytes */ |
| 62 | WORD VideoPageStartAddr; /* 4e: Video page start address */ |
| 63 | BYTE VideoCursorPos[16]; /* 50: Cursor position for 8 pages */ |
| 64 | WORD VideoCursorType; /* 60: Video cursor type */ |
| 65 | BYTE VideoCurPage; /* 62: Video current page */ |
| 66 | WORD VideoCtrlAddr WINE_PACKED; /* 63: Video controller address */ |
| 67 | BYTE VideoReg1; /* 65: Video mode select register */ |
| 68 | BYTE VideoReg2; /* 66: Video CGA palette register */ |
| 69 | DWORD ResetEntry WINE_PACKED; /* 67: Warm reset entry point */ |
| 70 | BYTE LastIRQ; /* 6b: Last unexpected interrupt */ |
| 71 | DWORD Ticks; /* 6c: Ticks since midnight */ |
| 72 | BYTE TicksOverflow; /* 70: Timer overflow if past midnight */ |
| 73 | BYTE CtrlBreakFlag; /* 71: Ctrl-Break flag */ |
| 74 | WORD ResetFlag; /* 72: POST Reset flag */ |
| 75 | BYTE DiskOpStatus; /* 74: Last hard-disk operation status */ |
| 76 | BYTE NbHardDisks; /* 75: Number of hard disks */ |
| 77 | BYTE DiskCtrlByte; /* 76: Disk control byte */ |
| 78 | BYTE DiskIOPort; /* 77: Disk I/O port offset */ |
| 79 | BYTE LptTimeout[4]; /* 78: Timeouts for parallel ports */ |
| 80 | BYTE ComTimeout[4]; /* 7c: Timeouts for serial ports */ |
| 81 | WORD KbdBufferStart; /* 80: Keyboard buffer start */ |
| 82 | WORD KbdBufferEnd; /* 82: Keyboard buffer end */ |
| 83 | BYTE RowsOnScreenMinus1; /* 84: EGA only */ |
| 84 | WORD BytesPerChar WINE_PACKED; /* 85: EGA only */ |
| 85 | BYTE ModeOptions; /* 87: EGA only */ |
| 86 | BYTE FeatureBitsSwitches; /* 88: EGA only */ |
| 87 | BYTE VGASettings; /* 89: VGA misc settings */ |
| 88 | BYTE DisplayCombination; /* 8A: VGA display combinations */ |
| 89 | BYTE DiskDataRate; /* 8B: Last disk data rate selected */ |
| 90 | } BIOSDATA; |
| 91 | |
Ulrich Weigand | 0121ac1 | 2000-06-07 02:02:56 +0000 | [diff] [blame] | 92 | typedef struct |
| 93 | { |
| 94 | DWORD StaticFuncTable; /* 00: static functionality table */ |
| 95 | BYTE VideoMode; /* 04: video mode in effect */ |
| 96 | WORD NumberColumns; /* 05: number of columns */ |
| 97 | WORD RegenBufLen; /* 07: length of regen buffer in bytes */ |
| 98 | WORD RegenBufAddr; /* 09: starting address of regen buffer */ |
| 99 | WORD CursorPos[8]; /* 0B: cursor position for page 0..7 */ |
| 100 | WORD CursorType; /* 1B: cursor "type" (start/stop scan lines) */ |
| 101 | BYTE ActivePage; /* 1D: active display page */ |
| 102 | WORD CRTCPort; /* 1E: CRTC port address */ |
| 103 | BYTE Port3x8; /* 20: current setting of PORT 03x8h */ |
| 104 | BYTE Port3x9; /* 21: current setting of PORT 03x9h */ |
| 105 | BYTE NumberRows; /* 22: number of rows - 1 */ |
| 106 | WORD BytesPerChar; /* 23: bytes/character */ |
| 107 | BYTE DCCActive; /* 25: display combination code of active display */ |
| 108 | BYTE DCCAlternate; /* 26: DCC of alternate display */ |
| 109 | WORD NumberColors; /* 27: number of colors supported in current mode (0000h = mono) */ |
| 110 | BYTE NumberPages; /* 29: number of pages supported in current mode */ |
| 111 | BYTE NumberScanlines; /* 2A: number of scan lines active */ |
| 112 | BYTE CharBlockPrimary; /* 2B: primary character block */ |
| 113 | BYTE CharBlockSecondary; /* 2C: secondary character block */ |
| 114 | BYTE MiscFlags; /* 2D: miscellaneous flags */ |
| 115 | BYTE NonVGASupport; /* 2E: non-VGA mode support */ |
| 116 | BYTE _reserved1[2]; /* 2F: */ |
| 117 | BYTE VideoMem; /* 31: video memory available */ |
| 118 | BYTE SavePointerState; /* 32: save pointer state flags */ |
| 119 | BYTE DisplayStatus; /* 33: display information and status */ |
| 120 | BYTE _reserved2[12]; /* 34: */ |
| 121 | |
| 122 | } VIDEOSTATE; |
| 123 | |
| 124 | typedef struct |
| 125 | { |
| 126 | BYTE ModeSupport[7]; /* 00: modes supported 1..7 */ |
| 127 | BYTE ScanlineSupport; /* 07: scan lines supported */ |
| 128 | BYTE NumberCharBlocks; /* 08: total number of character blocks */ |
| 129 | BYTE ActiveCharBlocks; /* 09: max. number of active character blocks */ |
| 130 | WORD MiscFlags; /* 0A: miscellaneous function support flags */ |
| 131 | WORD _reserved1; /* 0C: */ |
| 132 | BYTE SavePointerFlags; /* 0E: save pointer function flags */ |
| 133 | BYTE _reserved2; /* OF: */ |
| 134 | |
| 135 | } VIDEOFUNCTIONALITY; |
| 136 | |
Patrik Stridvall | c7a8dde | 1999-04-25 12:36:53 +0000 | [diff] [blame] | 137 | #include "poppack.h" |
Ove Kaaven | 3f89809 | 1999-03-23 13:45:25 +0000 | [diff] [blame] | 138 | |
Alexandre Julliard | 80fc23a | 2000-10-15 00:37:50 +0000 | [diff] [blame] | 139 | extern WORD DOSMEM_0000H; |
Alexandre Julliard | 83f52d1 | 2000-09-26 22:20:14 +0000 | [diff] [blame] | 140 | extern WORD DOSMEM_BiosDataSeg; |
| 141 | extern WORD DOSMEM_BiosSysSeg; |
Andreas Mohr | f83cf69 | 1999-03-13 18:00:52 +0000 | [diff] [blame] | 142 | extern BIOSDATA * DOSMEM_BiosData(); |
| 143 | extern BYTE * DOSMEM_BiosSys(); |
Andreas Mohr | a7894d9 | 1999-01-24 09:32:10 +0000 | [diff] [blame] | 144 | |
Alexandre Julliard | ac9c9b0 | 1996-07-28 18:50:11 +0000 | [diff] [blame] | 145 | extern DWORD DOSMEM_CollateTable; |
Alexandre Julliard | b7258be | 1995-09-01 15:57:28 +0000 | [diff] [blame] | 146 | |
Alexandre Julliard | 770eb51 | 2000-09-24 20:47:50 +0000 | [diff] [blame] | 147 | /* various real-mode code stubs */ |
| 148 | extern WORD DOSMEM_wrap_seg; |
| 149 | extern WORD DOSMEM_xms_seg; |
| 150 | extern WORD DOSMEM_dpmi_seg; |
| 151 | extern WORD DOSMEM_dpmi_sel; |
Alexandre Julliard | a0d7731 | 1998-09-13 16:32:00 +0000 | [diff] [blame] | 152 | |
Ove Kaaven | 07d2a78 | 1999-05-08 10:54:04 +0000 | [diff] [blame] | 153 | extern DWORD DOS_LOLSeg; |
Ove Kaaven | 59c8273 | 1999-05-22 10:41:28 +0000 | [diff] [blame] | 154 | extern struct _DOS_LISTOFLISTS * DOSMEM_LOL(); |
Ove Kaaven | 07d2a78 | 1999-05-08 10:54:04 +0000 | [diff] [blame] | 155 | |
Ove Kaaven | e6d8768 | 2000-07-30 13:32:10 +0000 | [diff] [blame] | 156 | extern BOOL DOSMEM_Init(BOOL); |
Ulrich Weigand | 7b57b24 | 1998-12-10 10:47:26 +0000 | [diff] [blame] | 157 | extern void DOSMEM_Tick(WORD timer); |
Alexandre Julliard | f0cbfa0 | 1997-02-15 14:29:56 +0000 | [diff] [blame] | 158 | extern WORD DOSMEM_AllocSelector(WORD); |
Ove Kaaven | 7b49914 | 2000-07-28 22:23:59 +0000 | [diff] [blame] | 159 | extern char * DOSMEM_MemoryBase(void); |
Ove Kaaven | b27ee9b | 2000-11-13 04:11:57 +0000 | [diff] [blame] | 160 | extern char * DOSMEM_SystemBase(void); |
Alexandre Julliard | 83f52d1 | 2000-09-26 22:20:14 +0000 | [diff] [blame] | 161 | extern LPVOID DOSMEM_GetBlock(UINT size, WORD* p); |
Ove Kaaven | 7b49914 | 2000-07-28 22:23:59 +0000 | [diff] [blame] | 162 | extern BOOL DOSMEM_FreeBlock(void* ptr); |
Alexandre Julliard | 83f52d1 | 2000-09-26 22:20:14 +0000 | [diff] [blame] | 163 | extern LPVOID DOSMEM_ResizeBlock(void* ptr, UINT size, WORD* p); |
Ove Kaaven | 7b49914 | 2000-07-28 22:23:59 +0000 | [diff] [blame] | 164 | extern UINT DOSMEM_Available(void); |
Alexandre Julliard | f0cbfa0 | 1997-02-15 14:29:56 +0000 | [diff] [blame] | 165 | extern LPVOID DOSMEM_MapRealToLinear(DWORD); /* real-mode to linear */ |
Alexandre Julliard | a396029 | 1999-02-26 11:11:13 +0000 | [diff] [blame] | 166 | extern LPVOID DOSMEM_MapDosToLinear(UINT); /* linear DOS to Wine */ |
| 167 | extern UINT DOSMEM_MapLinearToDos(LPVOID); /* linear Wine to DOS */ |
Alexandre Julliard | f0cbfa0 | 1997-02-15 14:29:56 +0000 | [diff] [blame] | 168 | |
Alexandre Julliard | b375678 | 1999-08-01 12:15:12 +0000 | [diff] [blame] | 169 | /* memory/instr.c */ |
| 170 | extern BOOL INSTR_EmulateInstruction( CONTEXT86 *context ); |
| 171 | |
Alexandre Julliard | 9ea19e5 | 1997-01-01 17:29:55 +0000 | [diff] [blame] | 172 | /* msdos/interrupts.c */ |
Patrik Stridvall | f94462f | 2002-01-31 23:22:07 +0000 | [diff] [blame] | 173 | typedef void (WINAPI *INTPROC)(CONTEXT86*); |
Alexandre Julliard | d30dfd2 | 1998-09-27 18:28:36 +0000 | [diff] [blame] | 174 | extern FARPROC16 INT_GetPMHandler( BYTE intnum ); |
| 175 | extern void INT_SetPMHandler( BYTE intnum, FARPROC16 handler ); |
Alexandre Julliard | a2f2e01 | 1995-06-06 16:40:35 +0000 | [diff] [blame] | 176 | |
Alexandre Julliard | 9ea19e5 | 1997-01-01 17:29:55 +0000 | [diff] [blame] | 177 | /* msdos/ioports.c */ |
| 178 | extern DWORD IO_inport( int port, int count ); |
| 179 | extern void IO_outport( int port, int count, DWORD value ); |
| 180 | |
Joseph Pranevich | 20a2c1e | 1998-10-17 11:56:44 +0000 | [diff] [blame] | 181 | /* msdos/int11.c */ |
Alexandre Julliard | 617955d | 1999-06-26 18:40:24 +0000 | [diff] [blame] | 182 | extern void WINAPI INT_Int11Handler(CONTEXT86*); |
Joseph Pranevich | 20a2c1e | 1998-10-17 11:56:44 +0000 | [diff] [blame] | 183 | |
Andreas Mohr | a63458d | 1999-01-30 13:39:21 +0000 | [diff] [blame] | 184 | /* msdos/int12.c */ |
Alexandre Julliard | 617955d | 1999-06-26 18:40:24 +0000 | [diff] [blame] | 185 | extern void WINAPI INT_Int12Handler(CONTEXT86*); |
Andreas Mohr | a63458d | 1999-01-30 13:39:21 +0000 | [diff] [blame] | 186 | |
Joseph Pranevich | 912049d | 1998-10-24 10:40:36 +0000 | [diff] [blame] | 187 | /* msdos/int13.c */ |
Alexandre Julliard | 617955d | 1999-06-26 18:40:24 +0000 | [diff] [blame] | 188 | extern void WINAPI INT_Int13Handler(CONTEXT86*); |
Joseph Pranevich | 912049d | 1998-10-24 10:40:36 +0000 | [diff] [blame] | 189 | |
Andreas Mohr | a63458d | 1999-01-30 13:39:21 +0000 | [diff] [blame] | 190 | /* msdos/int15.c */ |
Alexandre Julliard | 617955d | 1999-06-26 18:40:24 +0000 | [diff] [blame] | 191 | extern void WINAPI INT_Int15Handler(CONTEXT86*); |
Andreas Mohr | a63458d | 1999-01-30 13:39:21 +0000 | [diff] [blame] | 192 | |
Alexandre Julliard | 9ea19e5 | 1997-01-01 17:29:55 +0000 | [diff] [blame] | 193 | /* msdos/int1a.c */ |
Alexandre Julliard | b7258be | 1995-09-01 15:57:28 +0000 | [diff] [blame] | 194 | extern DWORD INT1A_GetTicksSinceMidnight(void); |
Alexandre Julliard | 617955d | 1999-06-26 18:40:24 +0000 | [diff] [blame] | 195 | extern void WINAPI INT_Int1aHandler(CONTEXT86*); |
Alexandre Julliard | 85ed45e | 1998-08-22 19:03:56 +0000 | [diff] [blame] | 196 | |
Alexandre Julliard | a0d7731 | 1998-09-13 16:32:00 +0000 | [diff] [blame] | 197 | /* msdos/int20.c */ |
Alexandre Julliard | 617955d | 1999-06-26 18:40:24 +0000 | [diff] [blame] | 198 | extern void WINAPI INT_Int20Handler(CONTEXT86*); |
Alexandre Julliard | a0d7731 | 1998-09-13 16:32:00 +0000 | [diff] [blame] | 199 | |
Alexandre Julliard | d30dfd2 | 1998-09-27 18:28:36 +0000 | [diff] [blame] | 200 | /* msdos/int25.c */ |
Alexandre Julliard | 617955d | 1999-06-26 18:40:24 +0000 | [diff] [blame] | 201 | extern void WINAPI INT_Int25Handler(CONTEXT86*); |
Alexandre Julliard | d30dfd2 | 1998-09-27 18:28:36 +0000 | [diff] [blame] | 202 | |
Ulrich Weigand | 7129d9f | 1998-11-25 10:29:22 +0000 | [diff] [blame] | 203 | /* msdos/int26.c */ |
Alexandre Julliard | 617955d | 1999-06-26 18:40:24 +0000 | [diff] [blame] | 204 | extern void WINAPI INT_Int26Handler(CONTEXT86*); |
Ulrich Weigand | 7129d9f | 1998-11-25 10:29:22 +0000 | [diff] [blame] | 205 | |
Robert 'Admiral' Coeyman | 0e04d8b | 1999-10-23 19:01:10 +0000 | [diff] [blame] | 206 | /* msdos/int2a.c */ |
| 207 | extern void WINAPI INT_Int2aHandler(CONTEXT86*); |
| 208 | |
Alexandre Julliard | 85ed45e | 1998-08-22 19:03:56 +0000 | [diff] [blame] | 209 | /* msdos/int2f.c */ |
Alexandre Julliard | 617955d | 1999-06-26 18:40:24 +0000 | [diff] [blame] | 210 | extern void WINAPI INT_Int2fHandler(CONTEXT86*); |
Alexandre Julliard | b7258be | 1995-09-01 15:57:28 +0000 | [diff] [blame] | 211 | |
Ove Kaaven | 7dc3c60 | 1998-10-11 12:15:18 +0000 | [diff] [blame] | 212 | /* msdos/dpmi.c */ |
Patrik Stridvall | f94462f | 2002-01-31 23:22:07 +0000 | [diff] [blame] | 213 | typedef void (WINAPI *RMCBPROC)(CONTEXT86*); |
Alexandre Julliard | 617955d | 1999-06-26 18:40:24 +0000 | [diff] [blame] | 214 | extern void WINAPI INT_Int31Handler(CONTEXT86*); |
Ove Kaaven | e5557b3 | 2000-12-26 00:22:45 +0000 | [diff] [blame] | 215 | extern BOOL DPMI_LoadDosSystem(void); |
Ove Kaaven | 2866809 | 1998-12-09 13:14:19 +0000 | [diff] [blame] | 216 | extern FARPROC16 WINAPI DPMI_AllocInternalRMCB(RMCBPROC); |
| 217 | extern void WINAPI DPMI_FreeInternalRMCB(FARPROC16); |
Alexandre Julliard | 617955d | 1999-06-26 18:40:24 +0000 | [diff] [blame] | 218 | extern int DPMI_CallRMProc(CONTEXT86*,LPWORD,int,int); |
Alexandre Julliard | d30dfd2 | 1998-09-27 18:28:36 +0000 | [diff] [blame] | 219 | |
Uwe Bonnes | 6509fa9 | 2001-06-26 21:06:07 +0000 | [diff] [blame] | 220 | /* misc/ppdev.c */ |
| 221 | |
| 222 | extern BOOL IO_pp_outp(int port, DWORD* res); |
| 223 | extern int IO_pp_inp(int port, DWORD* res); |
| 224 | extern char IO_pp_init(void); |
| 225 | |
Alexandre Julliard | db0747d | 2000-12-13 20:23:41 +0000 | [diff] [blame] | 226 | #define PTR_REAL_TO_LIN(seg,off) \ |
| 227 | ((void*)(((unsigned int)(seg) << 4) + LOWORD(off))) |
| 228 | |
Ulrich Weigand | 7129d9f | 1998-11-25 10:29:22 +0000 | [diff] [blame] | 229 | /* NOTE: Interrupts might get called from three modes: real mode, 16-bit, and |
| 230 | * (via DeviceIoControl) 32-bit. For automatic conversion of pointer |
| 231 | * parameters, interrupt handlers should use CTX_SEG_OFF_TO_LIN with |
Andreas Mohr | 217a682 | 2000-08-25 21:56:19 +0000 | [diff] [blame] | 232 | * the contents of a segment register as second and the contents of |
Ulrich Weigand | 7129d9f | 1998-11-25 10:29:22 +0000 | [diff] [blame] | 233 | * a *32-bit* general register as third parameter, e.g. |
| 234 | * CTX_SEG_OFF_TO_LIN( context, DS_reg(context), EDX_reg(context) ) |
| 235 | * This will generate a linear pointer in all three cases: |
Alexandre Julliard | 770eb51 | 2000-09-24 20:47:50 +0000 | [diff] [blame] | 236 | * Real-Mode: Seg*16 + LOWORD(Offset) |
Ulrich Weigand | 7129d9f | 1998-11-25 10:29:22 +0000 | [diff] [blame] | 237 | * 16-bit: convert (Seg, LOWORD(Offset)) to linear |
| 238 | * 32-bit: use Offset as linear address (DeviceIoControl!) |
| 239 | * |
| 240 | * Real-mode is recognized by checking the V86 bit in the flags register, |
| 241 | * 32-bit mode is recognized by checking whether 'seg' is a system selector |
| 242 | * (0 counts also as 32-bit segment). |
| 243 | */ |
Alexandre Julliard | 767e6f6 | 1998-08-09 12:47:43 +0000 | [diff] [blame] | 244 | #define CTX_SEG_OFF_TO_LIN(context,seg,off) \ |
Alexandre Julliard | 770eb51 | 2000-09-24 20:47:50 +0000 | [diff] [blame] | 245 | (ISV86(context) ? PTR_REAL_TO_LIN((seg),(off)) : \ |
Alexandre Julliard | db0747d | 2000-12-13 20:23:41 +0000 | [diff] [blame] | 246 | (!seg || IS_SELECTOR_SYSTEM(seg))? (void *)(off) : MapSL(MAKESEGPTR((seg),(off)))) |
Alexandre Julliard | 767e6f6 | 1998-08-09 12:47:43 +0000 | [diff] [blame] | 247 | |
Alexandre Julliard | 808cb04 | 1995-08-17 17:11:36 +0000 | [diff] [blame] | 248 | #define INT_BARF(context,num) \ |
Alexandre Julliard | 383da68 | 2000-02-10 22:15:21 +0000 | [diff] [blame] | 249 | ERR( "int%x: unknown/not implemented parameters:\n" \ |
Alexandre Julliard | e2991ea | 1995-07-29 13:09:43 +0000 | [diff] [blame] | 250 | "int%x: AX %04x, BX %04x, CX %04x, DX %04x, " \ |
| 251 | "SI %04x, DI %04x, DS %04x, ES %04x\n", \ |
Alexandre Julliard | d8fab2e | 2000-09-25 23:53:07 +0000 | [diff] [blame] | 252 | (num), (num), LOWORD((context)->Eax), LOWORD((context)->Ebx), \ |
| 253 | LOWORD((context)->Ecx), LOWORD((context)->Edx), LOWORD((context)->Esi), \ |
| 254 | LOWORD((context)->Edi), (WORD)(context)->SegDs, (WORD)(context)->SegEs ) |
Alexandre Julliard | e2991ea | 1995-07-29 13:09:43 +0000 | [diff] [blame] | 255 | |
Alexandre Julliard | 234bc24 | 1994-12-10 13:02:28 +0000 | [diff] [blame] | 256 | #endif /* __WINE_MISCEMU_H */ |