diff --git a/codeGenCpu6502/src/prog8/codegen/cpu6502/assignment/AugmentableAssignmentAsmGen.kt b/codeGenCpu6502/src/prog8/codegen/cpu6502/assignment/AugmentableAssignmentAsmGen.kt index cf7d3359e..399790a11 100644 --- a/codeGenCpu6502/src/prog8/codegen/cpu6502/assignment/AugmentableAssignmentAsmGen.kt +++ b/codeGenCpu6502/src/prog8/codegen/cpu6502/assignment/AugmentableAssignmentAsmGen.kt @@ -803,6 +803,7 @@ internal class AugmentableAssignmentAsmGen(private val program: PtProgram, and $name sta $name $shortcutLabel:""") + return } "or" -> { // short-circuit LEFT or RIGHT --> if LEFT then LEFT else RIGHT @@ -812,8 +813,14 @@ $shortcutLabel:""") ora $name sta $name $shortcutLabel:""") + return } } + + // normal evaluation + asmgen.assignExpressionToRegister(value, RegisterOrPair.A, dt in SignedDatatypes) + inplacemodificationRegisterAwithVariableWithSwappedOperands(operator, name, dt in SignedDatatypes) + asmgen.out(" sta $name") } private fun inplacemodificationByteVariableWithVariable(name: String, dt: DataType, operator: String, otherName: String) { diff --git a/docs/source/todo.rst b/docs/source/todo.rst index ebb3b268a..3e56d9da1 100644 --- a/docs/source/todo.rst +++ b/docs/source/todo.rst @@ -1,8 +1,6 @@ TODO ==== -imageviewer: bmp palette is off (autumn.bmp) - ...