1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-10-21 17:24:39 +00:00
kickc/src/test/ref/loop-while-min.asm
2020-02-23 09:44:36 +01:00

22 lines
295 B
NASM

// Minimal classic while() loop
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
.label SCREEN = $400
main: {
ldx #0
__b1:
// while(i!=100)
cpx #$64
bne __b2
// }
rts
__b2:
// SCREEN[i] = i
txa
sta SCREEN,x
// i++;
inx
jmp __b1
}