diff --git a/compiler/src/prog8/compiler/target/c64/AsmGen.kt b/compiler/src/prog8/compiler/target/c64/AsmGen.kt index b5f558514..9cc38e05c 100644 --- a/compiler/src/prog8/compiler/target/c64/AsmGen.kt +++ b/compiler/src/prog8/compiler/target/c64/AsmGen.kt @@ -704,7 +704,7 @@ class AsmGen(val options: CompilationOptions, val program: IntermediateProgram, Opcode.CAST_F_TO_W -> " jsr prog8_lib.stack_float2w" Opcode.CAST_UB_TO_UW, Opcode.CAST_UB_TO_W -> " lda #0 | sta ${ESTACK_HI+1},x" // clear the msb Opcode.CAST_B_TO_UW, Opcode.CAST_B_TO_W -> " ${signExtendA("${ESTACK_HI+1},x")}" // sign extend the lsb @todo missing an lda??? - Opcode.MSB -> " lda ${(ESTACK_HI+1).toHex()},x | sta ${(ESTACK_LO+1).toHex()},x" + Opcode.MSB -> " lda ${(ESTACK_HI+1).toHex()},x | sta ${(ESTACK_LO+1).toHex()},x" Opcode.ADD_UB, Opcode.ADD_B -> { """ @@ -1182,7 +1182,7 @@ class AsmGen(val options: CompilationOptions, val program: IntermediateProgram, "A" -> " sta ${segment[1].callLabel}" "X" -> " stx ${segment[1].callLabel}" "Y" -> " sty ${segment[1].callLabel}" - else -> " lda ${segment[0].callLabel} | sta ${segment[1].callLabel}" + else -> " lda ${segment[0].callLabel} | sta ${segment[1].callLabel}" } } }, diff --git a/prog8lib/c64utils.p8 b/prog8lib/c64utils.p8 index e854e837f..4f5b98d02 100644 --- a/prog8lib/c64utils.p8 +++ b/prog8lib/c64utils.p8 @@ -1076,10 +1076,6 @@ sub setchrclr (ubyte column, ubyte row, ubyte char, ubyte color) { _charmod sta $ffff ; modified lda setchrclr_color _colormod sta $ffff ; modified - inx - inx - inx - inx rts }} }