1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-11-20 02:32:36 +00:00
kickc/src/test/ref/array-length-symbolic-min.asm

18 lines
313 B
NASM
Raw Normal View History

2019-02-17 23:12:29 +00:00
// Illustrates symbolic array lengths
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
.const SZ = $f
2019-02-17 23:12:29 +00:00
// Fills the array item by item with $is, where i is the item# and s is the sub#
main: {
ldx #0
__b1:
txa
sta items,x
inx
cpx #SZ+1
bne __b1
rts
}
items: .fill SZ, 0