1
0
mirror of https://github.com/KarolS/millfork.git synced 2024-08-12 11:29:20 +00:00

8080: Fix comparisons

This commit is contained in:
Karol Stasiak 2018-12-14 21:07:14 +01:00
parent eb6b7d7769
commit db1ce07ed6

View File

@ -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
}