fix 65c02 codegen for certain in-place byte bitwise invert

This commit is contained in:
Irmen de Jong
2024-01-31 23:54:22 +01:00
parent 932035cdc5
commit 9f8e61789a
2 changed files with 2 additions and 5 deletions

View File

@@ -4061,9 +4061,9 @@ internal class AssignmentAsmGen(private val program: PtProgram,
sta $addr""")
}
is PtIdentifier -> {
val sourceName = asmgen.loadByteFromPointerIntoA(memory.address as PtIdentifier)
asmgen.loadByteFromPointerIntoA(memory.address as PtIdentifier)
asmgen.out(" eor #255")
asmgen.out(" sta ($sourceName),y")
asmgen.storeAIntoPointerVar(memory.address as PtIdentifier)
}
else -> {
asmgen.assignExpressionToVariable(memory.address, "P8ZP_SCRATCH_W2", DataType.UWORD)