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#<(PFCOLS)
const PFCOLSHI = #(>PFCOLS) & $0F
; CURSOR
missile0x=6
missile0y=4
missile0height=2
COLUM0 = $8E
z=2
_main
NUSIZ0 = $30
if z>0 && joy0up then missile0y=missile0y-2 : z=z-1
if z<87 && joy0down then missile0y=missile0y+2 : z=z+1
if joy0fire then COLUM0 = COLUM0 +2
;THE IMPORTANT CODE
DF0LOW = PFCOLSLOW + z
DF0HI = PFCOLSHI
DF0PUSH = COLUM0 ; PUSHES THE COLOR OF THE CURSOR TO THE ROWNUMBER (Z)
; ADD MORE TO COLOR MORE ROWS (GROWS UPWARDS)
rem DF0PUSH = COLUM0
rem DF0PUSH = COLUM0
; DISPLAYS ROWNUMBER IN THE SCORE
temp4 = z + 1
_sc2 = _sc2 & 240 : _sc3 = 0
if temp4 >= 50 then _sc3 = _sc3 + 80 : temp4 = temp4 - 50
if temp4 >= 30 then _sc3 = _sc3 + 48 : temp4 = temp4 - 30
if temp4 >= 20 then _sc3 = _sc3 + 32 : temp4 = temp4 - 20
if temp4 >= 10 then _sc3 = _sc3 + 16 : temp4 = temp4 - 10
_sc3 = _sc3 | temp4
;***************************************************************
;
; 88 rows that are 2 scanlines high.
;
DF6FRACINC = 255 : DF4FRACINC = 255
DF0FRACINC = 128 : DF1FRACINC = 128 : DF2FRACINC = 128 : DF3FRACINC = 128
;***************************************************************
;
; Displays the screen.
;
drawscreen
goto _main
bank 3
temp1=temp1
bank 4
temp1=temp1
bank 5
temp1=temp1
bank 6
temp1=temp1
bank 7
temp1=temp1