From 4ae8f2d260457b747468bde30c89c4957186be28 Mon Sep 17 00:00:00 2001 From: SarahW Date: Tue, 28 Jun 2016 21:58:21 +0100 Subject: [PATCH] REP instructions now handle trap flag correctly, Windows NT 3.51 now works on 386 systems. --- src/386_dynarec.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/386_dynarec.c b/src/386_dynarec.c index 329e24f..60aaffe 100644 --- a/src/386_dynarec.c +++ b/src/386_dynarec.c @@ -297,6 +297,9 @@ int rep386(int fv) that high frequency timers still work okay. This amount is different for interpreter and recompiler*/ int cycles_end = cycles - ((is386 && cpu_use_dynarec) ? 1000 : 100); + + if (trap) + cycles_end = cycles+1; /*Force the instruction to end after only one iteration when trap flag set*/ cpu_reps++;