From db1ce07ed614bbf1c744ce069ee063940bea0384 Mon Sep 17 00:00:00 2001 From: Karol Stasiak Date: Fri, 14 Dec 2018 21:07:14 +0100 Subject: [PATCH] 8080: Fix comparisons --- src/main/scala/millfork/compiler/z80/Z80Comparisons.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/scala/millfork/compiler/z80/Z80Comparisons.scala b/src/main/scala/millfork/compiler/z80/Z80Comparisons.scala index fcce4356..6d355479 100644 --- a/src/main/scala/millfork/compiler/z80/Z80Comparisons.scala +++ b/src/main/scala/millfork/compiler/z80/Z80Comparisons.scala @@ -282,9 +282,9 @@ object Z80Comparisons { case (NotEqual, BranchIfFalse(label)) => ZLine.jump(innerLabel, IfFlagClear(ZFlag.Z)) -> ZLine.jump(label, IfFlagSet(ZFlag.Z)) case (Equal, BranchIfFalse(label)) => - ZLine.jump(innerLabel, IfFlagSet(ZFlag.Z)) -> ZLine.jump(label, IfFlagClear(ZFlag.Z)) + ZLine.jump(label, IfFlagClear(ZFlag.Z)) -> ZLine.jump(label, IfFlagClear(ZFlag.Z)) case (NotEqual, BranchIfTrue(label)) => - ZLine.jump(innerLabel, IfFlagSet(ZFlag.Z)) -> ZLine.jump(label, IfFlagClear(ZFlag.Z)) + ZLine.jump(label, IfFlagClear(ZFlag.Z)) -> ZLine.jump(label, IfFlagClear(ZFlag.Z)) case (_, NoBranching) => ZLine.implied(ZOpcode.NOP) -> ZLine.implied(ZOpcode.NOP) case _ => throw new IllegalArgumentException }