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