correct branch instruction, fixes #137

This commit is contained in:
Irmen de Jong 2024-05-24 20:54:40 +02:00
parent 3ea0f0cbaa
commit fd1e6796ef
2 changed files with 6 additions and 21 deletions

View File

@ -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
+""")
}

View File

@ -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]
}
}