2019-07-10 18:54:35 +00:00
|
|
|
// Problem with assigning negative word constant (vwuz1=vbuc1)
|
|
|
|
.pc = $801 "Basic"
|
|
|
|
:BasicUpstart(main)
|
|
|
|
.pc = $80d "Program"
|
|
|
|
.label screen = $400
|
|
|
|
main: {
|
|
|
|
.label w = 2
|
|
|
|
ldx #0
|
2019-09-29 21:13:37 +00:00
|
|
|
__b1:
|
2019-07-10 18:54:35 +00:00
|
|
|
txa
|
|
|
|
and #1
|
|
|
|
cmp #0
|
2019-09-29 21:13:37 +00:00
|
|
|
beq __b3
|
2019-07-10 18:54:35 +00:00
|
|
|
lda #<-1
|
2019-08-07 19:00:19 +00:00
|
|
|
sta.z w
|
2019-07-10 18:54:35 +00:00
|
|
|
lda #>-1
|
2019-08-07 19:00:19 +00:00
|
|
|
sta.z w+1
|
2019-09-29 21:13:37 +00:00
|
|
|
jmp __b2
|
|
|
|
__b3:
|
2019-07-10 18:54:35 +00:00
|
|
|
txa
|
2019-08-07 19:00:19 +00:00
|
|
|
sta.z w
|
2019-07-10 18:54:35 +00:00
|
|
|
lda #0
|
2019-08-07 19:00:19 +00:00
|
|
|
sta.z w+1
|
2019-09-29 21:13:37 +00:00
|
|
|
__b2:
|
2019-07-10 18:54:35 +00:00
|
|
|
txa
|
|
|
|
asl
|
|
|
|
tay
|
2019-08-07 19:00:19 +00:00
|
|
|
lda.z w
|
2019-07-10 18:54:35 +00:00
|
|
|
sta screen,y
|
2019-08-07 19:00:19 +00:00
|
|
|
lda.z w+1
|
2019-07-10 18:54:35 +00:00
|
|
|
sta screen+1,y
|
|
|
|
inx
|
|
|
|
cpx #8
|
2019-09-29 21:13:37 +00:00
|
|
|
bne __b1
|
2019-07-10 18:54:35 +00:00
|
|
|
rts
|
|
|
|
}
|