mirror of
https://github.com/irmen/prog8.git
synced 2024-11-27 19:49:24 +00:00
fix certain corruption of A register argument on asm sub call
This commit is contained in:
parent
bd7f75c130
commit
f14dda4eca
@ -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 -> {
|
||||||
|
Loading…
Reference in New Issue
Block a user