mirror of
https://github.com/KarolS/millfork.git
synced 2025-08-08 18:25:03 +00:00
Flow analyser should correctly analyse INC A and DEC A
This commit is contained in:
@@ -223,6 +223,10 @@ object CoarseFlowAnalyzer {
|
|||||||
currentStatus = currentStatus.copy(n = currentStatus.y.n(_ + 1), z = currentStatus.y.z(_ + 1), y = currentStatus.y.map(_ + 1))
|
currentStatus = currentStatus.copy(n = currentStatus.y.n(_ + 1), z = currentStatus.y.z(_ + 1), y = currentStatus.y.map(_ + 1))
|
||||||
case AssemblyLine(DEY, Implied, _, _) =>
|
case AssemblyLine(DEY, Implied, _, _) =>
|
||||||
currentStatus = currentStatus.copy(n = currentStatus.y.n(_ - 1), z = currentStatus.y.z(_ - 1), y = currentStatus.y.map(_ - 1))
|
currentStatus = currentStatus.copy(n = currentStatus.y.n(_ - 1), z = currentStatus.y.z(_ - 1), y = currentStatus.y.map(_ - 1))
|
||||||
|
case AssemblyLine(INC, Implied, _, _) =>
|
||||||
|
currentStatus = currentStatus.copy(n = currentStatus.a.n(_ + 1), z = currentStatus.a.z(_ + 1), a = currentStatus.a.map(_ + 1))
|
||||||
|
case AssemblyLine(DEC, Implied, _, _) =>
|
||||||
|
currentStatus = currentStatus.copy(n = currentStatus.a.n(_ - 1), z = currentStatus.a.z(_ - 1), a = currentStatus.a.map(_ - 1))
|
||||||
case AssemblyLine(TAX, _, _, _) =>
|
case AssemblyLine(TAX, _, _, _) =>
|
||||||
currentStatus = currentStatus.copy(x = currentStatus.a, n = currentStatus.a.n(), z = currentStatus.a.z())
|
currentStatus = currentStatus.copy(x = currentStatus.a, n = currentStatus.a.n(), z = currentStatus.a.z())
|
||||||
case AssemblyLine(TXA, _, _, _) =>
|
case AssemblyLine(TXA, _, _, _) =>
|
||||||
|
@@ -308,6 +308,10 @@ object QuantumFlowAnalyzer {
|
|||||||
currentStatus = currentStatus.mapRegisters(r => r.changeY(_ - 1)).changeNZFromY
|
currentStatus = currentStatus.mapRegisters(r => r.changeY(_ - 1)).changeNZFromY
|
||||||
case AssemblyLine(DEY, Implied, _, _) =>
|
case AssemblyLine(DEY, Implied, _, _) =>
|
||||||
currentStatus = currentStatus.mapRegisters(r => r.changeY(_ - 1)).changeNZFromY
|
currentStatus = currentStatus.mapRegisters(r => r.changeY(_ - 1)).changeNZFromY
|
||||||
|
case AssemblyLine(INC, Implied, _, _) =>
|
||||||
|
currentStatus = currentStatus.mapRegisters(r => r.changeA(_ - 1)).changeNZFromA
|
||||||
|
case AssemblyLine(DEC, Implied, _, _) =>
|
||||||
|
currentStatus = currentStatus.mapRegisters(r => r.changeA(_ - 1)).changeNZFromA
|
||||||
case AssemblyLine(TAX, _, _, _) =>
|
case AssemblyLine(TAX, _, _, _) =>
|
||||||
currentStatus = currentStatus.mapRegisters(r => r.copy(x = r.a).afterTransfer(RegEquality.AX)).changeNZFromX
|
currentStatus = currentStatus.mapRegisters(r => r.copy(x = r.a).afterTransfer(RegEquality.AX)).changeNZFromX
|
||||||
case AssemblyLine(TXA, _, _, _) =>
|
case AssemblyLine(TXA, _, _, _) =>
|
||||||
|
Reference in New Issue
Block a user