From 277b4c3988e743aca137840d72cfad82bde8e5d0 Mon Sep 17 00:00:00 2001 From: SarahW Date: Thu, 2 May 2019 19:55:29 +0100 Subject: [PATCH] Mask PC correctly on IRET to V86 mode. Fixes Windows NT 3.51 installer. --- src/x86seg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/x86seg.c b/src/x86seg.c index bd7c6db..d58f8c2 100644 --- a/src/x86seg.c +++ b/src/x86seg.c @@ -2152,7 +2152,7 @@ void pmodeiret(int is32) // pclog("V86 IRET %04X:%08X\n",SS,ESP); // output=3; - cpu_state.pc=newpc; + cpu_state.pc = newpc & 0xffff; cpu_state.seg_cs.base=seg<<4; cpu_state.seg_cs.limit=0xFFFF; cpu_state.seg_cs.limit_low = 0;