chapter4/CH4PRG2.LST:

1 RAMTOP=106:REM OS top of RAM pointer
2 PMBASE=54279:REM ANTIC player-missile RAM pointer
3 SDMCTL=559:REM Shadow of DMACTL
4 GRACTL=53277:REM CTIA graphics control register
5 HPOSP0=53248:REM Horizontal position register of P0
6 PCOLR0=704:REM Shadow of player 0 color register
7 SIZEP0=53256:REM Player width control register
8 GPRIOR=623:REM Priority control register
10 GRAPHICS 7
20 SETCOLOR 4,8,4
30 SETCOLOR 2,0,0
40 COLOR 3
50 FOR Y=0 TO 79:REM This loop fills the screen
60 PLOT 0,Y
70 DRAWTO 159,Y
80 NEXT Y
90 A=PEEK(RAMTOP)-20:REM Must back up further for GR. 7
100 POKE PMBASE,A
110 MYPMBASE=256*A
120 POKE SDMCTL,46
130 POKE GRACTL,3
140 POKE HPOSP0,100
150 FOR I=MYPMBASE+512 TO MYPMBASE+640
160 POKE I,255:REM Make player solid color
170 NEXT I
180 POKE PCOLR0,88
190 POKE SIZEP0,3:REM Set player to quadruple width
200 POKE GPRIOR,4:REM Set priority
210 COLOR 4
220 FOR Y=30 TO 40
230 PLOT Y+22,Y
240 DRAWTO Y+43,Y
250 NEXT Y

Back to previous page