fix output of word arrays containing addressofs

This commit is contained in:
Irmen de Jong 2019-08-10 20:43:27 +02:00
parent f08906dba1
commit b54a9b9831

View File

@ -370,9 +370,11 @@ internal class AsmGen2(val program: Program,
"$"+number.toString(16).padStart(2, '0') "$"+number.toString(16).padStart(2, '0')
} }
decl.datatype== DataType.ARRAY_UW -> array.map { decl.datatype== DataType.ARRAY_UW -> array.map {
val number = (it as NumericLiteralValue).number.toInt() if(it is NumericLiteralValue) {
// TODO word array with address-references "$" + it.number.toInt().toString(16).padStart(4, '0')
"$"+number.toString(16).padStart(4, '0') } else {
(it as AddressOf).identifier.nameInSource.joinToString(".")
}
} }
else -> throw AssemblyError("invalid arraysize type") else -> throw AssemblyError("invalid arraysize type")
} }