From 6a216d0eb755650f13b2788e2888d699f2e53304 Mon Sep 17 00:00:00 2001 From: Jukka Heinonen Date: Mon, 4 Nov 2002 22:35:15 +0000 Subject: [PATCH] When returning from 32-bit default interrupt handlers, eflags are now returned correctly. --- dlls/winedos/interrupts.c | 2 +- msdos/dosmem.c | 20 +++++++++++--------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/dlls/winedos/interrupts.c b/dlls/winedos/interrupts.c index d1001aa3f2b..83b829b5fc6 100644 --- a/dlls/winedos/interrupts.c +++ b/dlls/winedos/interrupts.c @@ -232,7 +232,7 @@ FARPROC48 DOSVM_GetPMHandler48( BYTE intnum ) if (!DOSVM_Vectors48[intnum].selector) { DOSVM_Vectors48[intnum].selector = DOSVM_dpmi_segments->int48_sel; - DOSVM_Vectors48[intnum].offset = 4 * intnum; + DOSVM_Vectors48[intnum].offset = 6 * intnum; } return DOSVM_Vectors48[intnum]; } diff --git a/msdos/dosmem.c b/msdos/dosmem.c index c4685c4812b..7cf86f3b567 100644 --- a/msdos/dosmem.c +++ b/msdos/dosmem.c @@ -212,19 +212,21 @@ static void DOSMEM_InitDPMI(void) memcpy( ptr, enter_pm, sizeof(enter_pm) ); DOSMEM_dpmi_segments.dpmi_sel = SELECTOR_AllocBlock( ptr, sizeof(enter_pm), WINE_LDT_FLAGS_CODE ); - ptr = DOSMEM_GetBlock( 4 * 256, &DOSMEM_dpmi_segments.int48_seg ); + ptr = DOSMEM_GetBlock( 6 * 256, &DOSMEM_dpmi_segments.int48_seg ); for(i=0; i<256; i++) { /* - * Each 32-bit interrupt handler is 4 bytes: - * 0xCD, = int (nested 16-bit interrupt) - * 0x66,0xCF = iretd (32-bit interrupt return) + * Each 32-bit interrupt handler is 6 bytes: + * 0xCD, = int (nested 16-bit interrupt) + * 0x66,0xCA,0x04,0x00 = ret 4 (32-bit far return and pop 4 bytes) */ - ptr[i * 4 + 0] = 0xCD; - ptr[i * 4 + 1] = i; - ptr[i * 4 + 2] = 0x66; - ptr[i * 4 + 3] = 0xCF; + ptr[i * 6 + 0] = 0xCD; + ptr[i * 6 + 1] = i; + ptr[i * 6 + 2] = 0x66; + ptr[i * 6 + 3] = 0xCA; + ptr[i * 6 + 4] = 0x04; + ptr[i * 6 + 5] = 0x00; } - DOSMEM_dpmi_segments.int48_sel = SELECTOR_AllocBlock( ptr, 4 * 256, WINE_LDT_FLAGS_CODE ); + DOSMEM_dpmi_segments.int48_sel = SELECTOR_AllocBlock( ptr, 6 * 256, WINE_LDT_FLAGS_CODE ); } static BIOSDATA * DOSMEM_BiosData(void)