2019-02-17 23:12:29 +00:00
|
|
|
// Allocates ZP to j/k-variables even though all of i, j, k could be allocates to x and be more efficient.
|
|
|
|
// Reason: Pass4RegisterUpliftCombinations.isAllocationOverlapping() believes i/j/k variables overlaps insode plot()
|
2017-11-07 08:32:16 +00:00
|
|
|
.pc = $801 "Basic"
|
|
|
|
:BasicUpstart(main)
|
|
|
|
.pc = $80d "Program"
|
2018-01-31 20:27:22 +00:00
|
|
|
.label SCREEN = $400
|
2017-11-07 08:32:16 +00:00
|
|
|
main: {
|
|
|
|
ldx #0
|
2019-09-29 21:13:37 +00:00
|
|
|
__b1:
|
2017-11-07 08:32:16 +00:00
|
|
|
jsr plot
|
|
|
|
inx
|
|
|
|
cpx #$b
|
2019-09-29 21:13:37 +00:00
|
|
|
bne __b1
|
2017-11-07 08:32:16 +00:00
|
|
|
ldx #0
|
2019-09-29 21:13:37 +00:00
|
|
|
__b2:
|
2017-11-07 08:32:16 +00:00
|
|
|
jsr plot
|
|
|
|
inx
|
|
|
|
cpx #$b
|
2019-09-29 21:13:37 +00:00
|
|
|
bne __b2
|
2017-11-07 08:32:16 +00:00
|
|
|
ldx #0
|
2019-09-29 21:13:37 +00:00
|
|
|
__b3:
|
2017-11-07 08:32:16 +00:00
|
|
|
jsr plot
|
|
|
|
inx
|
|
|
|
cpx #$b
|
2019-09-29 21:13:37 +00:00
|
|
|
bne __b3
|
2017-11-07 08:32:16 +00:00
|
|
|
rts
|
|
|
|
}
|
2019-02-19 19:51:48 +00:00
|
|
|
// plot(byte register(X) x)
|
2017-11-07 08:32:16 +00:00
|
|
|
plot: {
|
|
|
|
lda #'*'
|
|
|
|
sta SCREEN,x
|
|
|
|
rts
|
|
|
|
}
|