mirror of
https://github.com/KarolS/millfork.git
synced 2025-01-11 12:29:46 +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 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
|
||||
val op = if (subtract) SBC else ADC
|
||||
val prepareCarry = AssemblyLine.implied(if (subtract) SEC else CLC)
|
||||
|
Loading…
x
Reference in New Issue
Block a user