mirror of
https://github.com/KarolS/millfork.git
synced 2024-10-25 05:24:11 +00:00
6502: Fix word addition if zpreg is larger than 2
This commit is contained in:
parent
3e7bbaf5fc
commit
f937355c54
@ -67,7 +67,7 @@ object PseudoregisterBuiltIns {
|
|||||||
}
|
}
|
||||||
val b = ctx.env.get[Type]("byte")
|
val b = ctx.env.get[Type]("byte")
|
||||||
val w = ctx.env.get[Type]("word")
|
val w = ctx.env.get[Type]("word")
|
||||||
val reg = ctx.env.get[VariableInMemory]("__reg")
|
val reg = ctx.env.get[VariableInMemory]("__reg.loword")
|
||||||
// TODO: smarter on 65816
|
// TODO: smarter on 65816
|
||||||
val op = if (subtract) SBC else ADC
|
val op = if (subtract) SBC else ADC
|
||||||
val prepareCarry = AssemblyLine.implied(if (subtract) SEC else CLC)
|
val prepareCarry = AssemblyLine.implied(if (subtract) SEC else CLC)
|
||||||
|
Loading…
Reference in New Issue
Block a user