From 47228f94b62cc5bb5d1197033613586393b163bc Mon Sep 17 00:00:00 2001 From: Sjoerd van der Berg Date: Sun, 27 Apr 2003 11:44:47 +0000 Subject: [PATCH] Allow interrupting of non flag changing string operations. Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@969 --- src/cpu/core_full/string.h | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/cpu/core_full/string.h b/src/cpu/core_full/string.h index b1079e85..50e805da 100644 --- a/src/cpu/core_full/string.h +++ b/src/cpu/core_full/string.h @@ -2,7 +2,7 @@ EAPoint si_base,di_base; Bitu si_index,di_index; Bitu add_mask; - Bitu count,count_max; + Bitu count,count_left; Bits add_index; bool restart=false; @@ -22,8 +22,19 @@ } if (!(inst.prefix & PREFIX_REP)) { count=1; + } else { + /* Calculate amount of ops to do before cycles run out */ + if ((count>CPU_Cycles) && (inst.code.op