1
0
mirror of https://github.com/KarolS/millfork.git synced 2024-07-05 09:28:54 +00:00

6502: Fix zeropage register if larger than 2 bytes

This commit is contained in:
Karol Stasiak 2018-08-03 11:11:03 +02:00
parent e952d89849
commit 0a01dd30e1

View File

@ -1093,6 +1093,11 @@ class Environment(val parent: Option[Environment], val prefix: String, val cpuFa
def getSubvariables(typ: Type): List[(String, Int, VariableType)] = {
val b = get[VariableType]("byte")
val w = get[VariableType]("word")
if (typ.name == "__reg$type") {
return (".lo", 0, b) ::
(".hi", 1, b) ::
List.tabulate(typ.size) { i => (".b" + i, i, b) }
}
typ match {
case _: PlainType => typ.size match {
case 2 => List(