mirror of
https://github.com/irmen/prog8.git
synced 2024-11-25 19:31:36 +00:00
correct branch instruction, fixes #137
This commit is contained in:
parent
3ea0f0cbaa
commit
fd1e6796ef
@ -2323,7 +2323,7 @@ internal class AssignmentAsmGen(private val program: PtProgram,
|
|||||||
asmgen.out("""
|
asmgen.out("""
|
||||||
clc
|
clc
|
||||||
adc #$constIndex
|
adc #$constIndex
|
||||||
bne +
|
bcc +
|
||||||
iny
|
iny
|
||||||
+""")
|
+""")
|
||||||
}
|
}
|
||||||
@ -2348,7 +2348,7 @@ internal class AssignmentAsmGen(private val program: PtProgram,
|
|||||||
asmgen.out("""
|
asmgen.out("""
|
||||||
clc
|
clc
|
||||||
adc P8ZP_SCRATCH_REG
|
adc P8ZP_SCRATCH_REG
|
||||||
bne +
|
bcc +
|
||||||
iny
|
iny
|
||||||
+""")
|
+""")
|
||||||
}
|
}
|
||||||
@ -2358,7 +2358,7 @@ internal class AssignmentAsmGen(private val program: PtProgram,
|
|||||||
ldy #>$sourceName
|
ldy #>$sourceName
|
||||||
clc
|
clc
|
||||||
adc #<$sourceName
|
adc #<$sourceName
|
||||||
bne +
|
bcc +
|
||||||
iny
|
iny
|
||||||
+""")
|
+""")
|
||||||
}
|
}
|
||||||
|
@ -1,25 +1,10 @@
|
|||||||
%import diskio
|
|
||||||
%import textio
|
|
||||||
%zeropage basicsafe
|
%zeropage basicsafe
|
||||||
|
|
||||||
main {
|
main {
|
||||||
sub start() {
|
sub start() {
|
||||||
if diskio.f_open("tehtriz.asm") {
|
uword @shared curr_sequence
|
||||||
repeat 10 {
|
ubyte @shared sequence_curr_step
|
||||||
void diskio.f_read($6000, 9999)
|
|
||||||
}
|
|
||||||
uword pl, ph, sl, sh
|
|
||||||
pl, ph, sl, sh = diskio.f_tell()
|
|
||||||
|
|
||||||
txt.print("\npos: ")
|
uword @shared sequence_offset = &curr_sequence[sequence_curr_step]
|
||||||
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()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user