diff --git a/codeGenCpu6502/src/prog8/codegen/cpu6502/AsmGen.kt b/codeGenCpu6502/src/prog8/codegen/cpu6502/AsmGen.kt index 1fbadce05..d4a069705 100644 --- a/codeGenCpu6502/src/prog8/codegen/cpu6502/AsmGen.kt +++ b/codeGenCpu6502/src/prog8/codegen/cpu6502/AsmGen.kt @@ -979,7 +979,7 @@ $repeatLabel lda $counterVar internal fun pointerViaIndexRegisterPossible(pointerOffsetExpr: PtExpression): Pair? { if(pointerOffsetExpr is PtBinaryExpression && pointerOffsetExpr.operator=="+") { val leftDt = pointerOffsetExpr.left.type - val rightDt = pointerOffsetExpr.left.type + val rightDt = pointerOffsetExpr.right.type if(leftDt == DataType.UWORD && rightDt == DataType.UBYTE) return Pair(pointerOffsetExpr.left, pointerOffsetExpr.right) if(leftDt == DataType.UBYTE && rightDt == DataType.UWORD) diff --git a/codeGenCpu6502/src/prog8/codegen/cpu6502/ExpressionsAsmGen.kt b/codeGenCpu6502/src/prog8/codegen/cpu6502/ExpressionsAsmGen.kt index 0bd0d43c9..b91957d0b 100644 --- a/codeGenCpu6502/src/prog8/codegen/cpu6502/ExpressionsAsmGen.kt +++ b/codeGenCpu6502/src/prog8/codegen/cpu6502/ExpressionsAsmGen.kt @@ -657,7 +657,7 @@ internal class ExpressionsAsmGen(private val program: PtProgram, "<=" -> { when(dt) { DataType.UBYTE -> asmgen.out(" jsr prog8_lib.equalzero_b") - DataType.BYTE -> asmgen.out(" jsr prog8_lib.lessequalzeros_b") + DataType.BYTE -> asmgen.out(" jsr prog8_lib.lessequalzero_sb") DataType.UWORD -> asmgen.out(" jsr prog8_lib.equalzero_w") DataType.WORD -> asmgen.out(" jsr prog8_lib.lessequalzero_sw") DataType.FLOAT -> asmgen.out(" jsr floats.lessequal_zero")