1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-11-16 21:07:56 +00:00
kickc/src/test/ref/local-string.asm
2020-02-23 09:44:36 +01:00

25 lines
489 B
NASM

// Local constant strings are placed at the start of the method. This means the generated ASM jumps / calls straignt into the constant string
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
main: {
.label screen = $400
ldx #0
__b1:
// while(msg[i])
lda msg,x
cmp #0
bne __b2
// }
rts
__b2:
// screen[i++] = msg[i]
lda msg,x
sta screen,x
// screen[i++] = msg[i];
inx
jmp __b1
msg: .text "message 2 "
.byte 0
}