1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-09-08 17:54:40 +00:00
kickc/src/test/ref/arrays-init-short.asm
2019-09-09 23:29:18 +02:00

34 lines
483 B
NASM

// Test a short array initializer - the rest should be zero-filled
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
.label SCREEN = $400
main: {
ldx #0
b1:
lda msg1,x
cmp #0
bne b2
ldx #0
b3:
lda msg2,x
cmp #0
bne b4
rts
b4:
lda msg2,x
sta SCREEN+$28,x
inx
jmp b3
b2:
lda msg1,x
sta SCREEN,x
inx
jmp b1
}
msg1: .text "camelot"
.byte 0
.fill 8, 0
msg2: .byte 'c', 'm', 'l'
.fill 13, 0