From d8c23d9b98237fa72d0d1564fde080744caea622 Mon Sep 17 00:00:00 2001 From: Sjoerd van der Berg Date: Fri, 4 Apr 2003 16:32:03 +0000 Subject: [PATCH] Fix LOOPZ and LOOPNZ Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@865 --- src/cpu/core_full/op.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cpu/core_full/op.h b/src/cpu/core_full/op.h index b2800dcf..e2c7426e 100644 --- a/src/cpu/core_full/op.h +++ b/src/cpu/core_full/op.h @@ -316,10 +316,10 @@ switch (inst.code.op) { if (--reg_cx) break; goto nextopcode; case O_LOOPZ: - if (--reg_cx && !get_ZF()) break; + if (--reg_cx && get_ZF()) break; goto nextopcode; case O_LOOPNZ: - if (--reg_cx && get_ZF()) break; + if (--reg_cx && !get_ZF()) break; goto nextopcode; case O_JCXZ: if (reg_cx) goto nextopcode;