Zeroing variables in RAM (zero page) added.

This commit is contained in:
Pecusx
2022-10-31 20:25:12 +01:00
parent 8b0ab13c30
commit 6e036b732e
3 changed files with 8 additions and 1 deletions
+8 -1
View File
@@ -26,7 +26,8 @@
;---------------------------------------------------
icl 'definitions.asm'
;---------------------------------------------------
.zpvar DliColorBack .byte = $62
FirstZpageVariable = $62
.zpvar DliColorBack .byte = FirstZpageVariable
.zpvar xdraw .word ;= $64 ;variable X for plot
.zpvar ydraw .word ;variable Y for plot (like in Atari Basic - Y=0 in upper right corner of the screen)
.zpvar xbyte .word
@@ -230,6 +231,12 @@ FirstSTART
dey
bpl @-
; one time zero variables in RAM (zero page)
ldy #FirstZpageVariable
@ sta $0000,y
iny
bne @-
; initialize variables in RAM (non zero page)
ldy #initialvaluesCount-1
@ lda initialvaluesStart,y