Skip to content

Commit

Permalink
fix 65c02 codegen for certain in-place byte bitwise invert
Browse files Browse the repository at this point in the history
  • Loading branch information
irmen committed Jan 31, 2024
1 parent 932035c commit 9f8e617
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 0 additions & 3 deletions docs/source/todo.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
TODO
====

fix "return <stmt>" not being an error.


maze: if cell & UP!=0 and @(celladdr(cx,cy-1)) & (WALKED|BACKTRACKED) ==0
^^ adding this !=0 caused a weird beq + / lda #1 / + to appear in front of the shortcircuit beq...

Expand Down

0 comments on commit 9f8e617

Please sign in to comment.