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
|
|
|
|
b1:
|
|
|
|
txa
|
|
|
|
and #1
|
|
|
|
cmp #0
|
|
|
|
beq b3
|
|
|
|
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-07-10 18:54:35 +00:00
|
|
|
jmp b2
|
|
|
|
b3:
|
|
|
|
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-07-10 18:54:35 +00:00
|
|
|
b2:
|
|
|
|
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
|
|
|
|
bne b1
|
|
|
|
rts
|
|
|
|
}
|