diff --git a/codeGenCpu6502/src/prog8/codegen/cpu6502/assignment/AssignmentAsmGen.kt b/codeGenCpu6502/src/prog8/codegen/cpu6502/assignment/AssignmentAsmGen.kt index 6ed470fe0..5a8ca90b9 100644 --- a/codeGenCpu6502/src/prog8/codegen/cpu6502/assignment/AssignmentAsmGen.kt +++ b/codeGenCpu6502/src/prog8/codegen/cpu6502/assignment/AssignmentAsmGen.kt @@ -2323,7 +2323,7 @@ internal class AssignmentAsmGen(private val program: PtProgram, asmgen.out(""" clc adc #$constIndex - bne + + bcc + iny +""") } @@ -2348,7 +2348,7 @@ internal class AssignmentAsmGen(private val program: PtProgram, asmgen.out(""" clc adc P8ZP_SCRATCH_REG - bne + + bcc + iny +""") } @@ -2358,7 +2358,7 @@ internal class AssignmentAsmGen(private val program: PtProgram, ldy #>$sourceName clc adc #<$sourceName - bne + + bcc + iny +""") } diff --git a/examples/test.p8 b/examples/test.p8 index 6deba3208..51ee38b14 100644 --- a/examples/test.p8 +++ b/examples/test.p8 @@ -1,25 +1,10 @@ -%import diskio -%import textio %zeropage basicsafe main { sub start() { - if diskio.f_open("tehtriz.asm") { - repeat 10 { - void diskio.f_read($6000, 9999) - } - uword pl, ph, sl, sh - pl, ph, sl, sh = diskio.f_tell() + uword @shared curr_sequence + ubyte @shared sequence_curr_step - txt.print("\npos: ") - txt.print_uwhex(ph, true) - txt.print_uwhex(pl, false) - txt.print("\nsize: ") - txt.print_uwhex(sh, true) - txt.print_uwhex(sl, false) - txt.nl() - - diskio.f_close() - } + uword @shared sequence_offset = &curr_sequence[sequence_curr_step] } }