diff --git a/compiler/src/prog8/compiler/target/c64/codegen/assignment/AugmentableAssignmentAsmGen.kt b/compiler/src/prog8/compiler/target/c64/codegen/assignment/AugmentableAssignmentAsmGen.kt index c33a5c8d7..0ebbdfe6e 100644 --- a/compiler/src/prog8/compiler/target/c64/codegen/assignment/AugmentableAssignmentAsmGen.kt +++ b/compiler/src/prog8/compiler/target/c64/codegen/assignment/AugmentableAssignmentAsmGen.kt @@ -1207,7 +1207,7 @@ internal class AugmentableAssignmentAsmGen(private val program: Program, sec sbc P8ESTACK_LO+1,x sta $name - bcc + + bcs + dec $name+1 +""") else diff --git a/examples/test.p8 b/examples/test.p8 index 0fc0b07d1..e4d1c051b 100644 --- a/examples/test.p8 +++ b/examples/test.p8 @@ -17,7 +17,7 @@ main { txt.chrout('\n') uw = 1000 - uw -= ub+ub2 ; TODO FIX COMPUTATION ERROR + uw -= ub+ub2 txt.print_uw(uw) txt.chrout('\n')