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