diff --git a/codeGeneration/src/prog8/codegen/target/cpu6502/codegen/ForLoopsAsmGen.kt b/codeGeneration/src/prog8/codegen/target/cpu6502/codegen/ForLoopsAsmGen.kt index c0566e8d4..bb466c649 100644 --- a/codeGeneration/src/prog8/codegen/target/cpu6502/codegen/ForLoopsAsmGen.kt +++ b/codeGeneration/src/prog8/codegen/target/cpu6502/codegen/ForLoopsAsmGen.kt @@ -293,7 +293,7 @@ $loopLabel sty $indexVar // allocate index var on ZP if possible val result = asmgen.zeropage.allocate(listOf(indexVar), DataType.UBYTE, null, stmt.position, asmgen.errors) result.fold( - success = { zpAddr-> asmgen.out("""$indexVar = $zpAddr ; auto zp UBYTE""") }, + success = { (address,_)-> asmgen.out("""$indexVar = $address ; auto zp UBYTE""") }, failure = { asmgen.out("$indexVar .byte 0") } ) } else { @@ -334,7 +334,7 @@ $loopLabel sty $indexVar // allocate index var on ZP if possible val result = asmgen.zeropage.allocate(listOf(indexVar), DataType.UBYTE, null, stmt.position, asmgen.errors) result.fold( - success = { zpAddr-> asmgen.out("""$indexVar = $zpAddr ; auto zp UBYTE""") }, + success = { (address,_)-> asmgen.out("""$indexVar = $address ; auto zp UBYTE""") }, failure = { asmgen.out("$indexVar .byte 0") } ) } else { diff --git a/docs/source/todo.rst b/docs/source/todo.rst index ed332e62e..5d816f6b1 100644 --- a/docs/source/todo.rst +++ b/docs/source/todo.rst @@ -3,8 +3,6 @@ TODO For next compiler release (7.7) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -- fix crash after enter in bdmusic (caused by ZP branch) -- fix crash in sorting (caused by ZP branch) - if zp option = dontuse, give error if any variable has @requirezp Need help with