(tests) fill-display - Fix typo / Change constant names to increase clarity and make it easier to update if the flag IDs change again
This commit is contained in:
parent
14770db506
commit
ee1e899108
|
|
@ -1,25 +1,26 @@
|
|||
;; Fill display with $FF
|
||||
; updated for 5x5 display
|
||||
|
||||
#*px $24
|
||||
#fill $25
|
||||
#Zero 1
|
||||
#px_ptr $F0
|
||||
#fill $F1
|
||||
|
||||
; Initialize variables...
|
||||
LDA $00 ; (Address for the first px on the display)
|
||||
STO .*px ; Pointer to current px
|
||||
STO #px_ptr ; Pointer to current px
|
||||
LDA $FF ; ($FF is 'on', $00 is 'off')
|
||||
STO #fill ; Stash value to fill with
|
||||
|
||||
@paint
|
||||
LDA (#fill) ; (A = mem[fill] = $FF)
|
||||
STO (#*px) ; Paint pixel (mem[mem[*px]] = A = $FF)
|
||||
STO (#px_ptr); Paint pixel (mem[mem[*px]] = A = $FF)
|
||||
|
||||
LDA (#*px) ; Increment pixel pointer...
|
||||
LDA (#px_ptr) ; Increment pixel pointer...
|
||||
ADD $01
|
||||
STO #*px
|
||||
STO #px_ptr
|
||||
|
||||
LDA (#*px) ; Test whether to loop or not...
|
||||
LDA (#px_ptr) ; Test whether to loop or not...
|
||||
SUB $19 ; if *px - $19 == 0, we've reached the end
|
||||
FHP 2 ; (Zero flag is #2)
|
||||
FHP #Zero
|
||||
JMP @paint
|
||||
END
|
||||
Loading…
Reference in New Issue