fix certain corruption of A register argument on asm sub call

This commit is contained in:
Irmen de Jong 2020-08-16 19:15:44 +02:00
parent bd7f75c130
commit f14dda4eca

View File

@ -182,12 +182,13 @@ internal class FunctionCallAsmGen(private val program: Program, private val asmg
is IdentifierReference -> { is IdentifierReference -> {
val sourceName = asmgen.asmIdentifierName(value) val sourceName = asmgen.asmIdentifierName(value)
asmgen.out(""" asmgen.out("""
pha
lda $sourceName lda $sourceName
beq + beq +
sec sec
bcs ++ bcs ++
+ clc + clc
+ + pla
""") """)
} }
else -> { else -> {