1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-10-21 02:24:34 +00:00
kickc/src/test/ref/inline-function-print.asm

33 lines
522 B
NASM
Raw Normal View History

2019-02-17 23:12:29 +00:00
// TEst inlining a slightly complex print function (containing a loop)
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
.label screen = $400
main: {
.label print2_at = screen+2*$28
ldx #0
ldy #0
print1_b1:
lda hello,y
sta screen,x
inx
inx
iny
lda hello,y
cmp #'@'
bne print1_b1
ldx #0
ldy #0
print2_b1:
lda hello,y
sta print2_at,x
inx
inx
iny
lda hello,y
cmp #'@'
bne print2_b1
rts
hello: .text "hello world!@"
}