summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/src/cmd/aux/realemu/xec.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/src/cmd/aux/realemu/xec.c b/sys/src/cmd/aux/realemu/xec.c
index 3371f21f6..5a5f8a8cf 100644
--- a/sys/src/cmd/aux/realemu/xec.c
+++ b/sys/src/cmd/aux/realemu/xec.c
@@ -1067,7 +1067,7 @@ repcond(ulong *f, int rep)
{
if(rep == OREPNE)
return (*f & ZF) == 0;
- return !rep || (*f & ZF) != 0;
+ return (*f & ZF) != 0;
}
static void
@@ -1098,7 +1098,7 @@ opscas(Cpu *cpu, Inst *i)
d->off += n;
d->off &= m;
c--;
- if(repcond(f, i->rep))
+ if(!repcond(f, i->rep))
break;
}
aw(areg(cpu, i->alen, RDI), d->off);
@@ -1135,7 +1135,7 @@ opcmps(Cpu *cpu, Inst *i)
d->off += n;
d->off &= m;
c--;
- if(repcond(f, i->rep))
+ if(!repcond(f, i->rep))
break;
}
aw(areg(cpu, i->alen, RDI), d->off);