fix a const long value hex asm mistake, fix conv.str_l(0) empty output

This commit is contained in:
Irmen de Jong
2025-10-12 01:44:16 +02:00
parent 13f6efc1d1
commit fc38be6376
4 changed files with 22 additions and 11 deletions

View File

@@ -870,13 +870,13 @@ class AsmGen6502Internal (
when(target.kind) {
TargetStorageKind.VARIABLE -> {
out("""
lda #${hex.substring(6,8)}
lda #$${hex.substring(6,8)}
sta ${target.asmVarname}
lda #${hex.substring(4, 6)}
lda #$${hex.substring(4, 6)}
sta ${target.asmVarname}+1
lda #${hex.substring(2, 4)}
lda #$${hex.substring(2, 4)}
sta ${target.asmVarname}+2
lda #${hex.take(2)}
lda #$${hex.take(2)}
sta ${target.asmVarname}+3""")
}
TargetStorageKind.ARRAY -> TODO("assign long to array ${target.position}")