Random game
Random game
Random demo
  • Entry name:
     GTIA Part 2 - Listing 3A 
  • Category:
    Graphics
  • Publisher/Developer:
    SoftSide Publications
  • Year:
    1983
  • Code:
    Alan J. Zett
  • Programming language:
    Atari BASIC
source: GTIA Part 2 - Listing 3A
Listing 1
100 GRAPHICS 9:POKE 712,0:POKE 559,0
110 DL=PEEK(560)+PEEK(561)*256+4
120 FOR X=0 TO 79:COLOR X
130 PLOT X,0:DRAWTO X,191:NEXT X
140 FOR X=11 TO 83 STEP 12
150 POKE DL+X,143:NEXT X
160 FOR X=109 TO 190 STEP 12
170 POKE DL+X,143:NEXT X
180 POKE 512,128:POKE 513,6:M=1663
190 M=M+1:READ D:IF D=999 THEN 210
200 POKE M,D:GOTO 190
210 POKE DL+95,207:POKE 54286,192
220 POKE 559,34:GOTO 220
300 DATA 216,72,173,153,6,141,10,212
310 DATA 24,105,16,141,26,208,201,240
320 DATA 208,2,169,0,141,153,6,104
330 DATA 64,0,999	
Listing 2
               1000       .OR $0680
               1010       .TA $4000
               1020 *
               1030 * DEFINE SYSTEM EQUATES
               1040 *
D40A-          1050 WSYNC .EQ $D40A ;WAIT VERTICAL SYNC REGISTER.
D01A-          1060 COLBK .EQ $D01A ;STIA BACKGROUND COLOR REGISTER.
               1070 *
               1080 * START OF GTIA HANDLER
               1090 *
0680- D8       1100 START CLD       ;CLEAR THE DECIMAL MODE.
0681- 48       1110       PHA       ;SAVE THE 'A' REGISTER ON STACK.
0682- AD 99 06 1120       LDA STORE ;GET COLOR VALUE INTO THE
0685- 18       1130       CLC       ; 'A' REGISTER, CLEAR THE
0686- 69 10    1140       ADC #$10  ; CARRY FLAG AND ADD TEN.
0688- 80 0A D4 1150       STA WSYNC ;WAIT FOR VERTICAL SYNC.
068B- 8D 1A D0 1160       STA COLBK ;CHANGE BACKGROUND COLOR.
068E- C9 F0    1170       CMP #$F0  ;TEST FOR LAST LEGAL COLOR.
0690- D0 02    1180       BNE OUT   ;SKIP IF SO.
0692- A9 00    1190       LDA #$00  ;RESET COLOR REGISTER POINTER.
0694- 8D 99 06 1200 OUT   STA STORE ;SAVE FOR NEXT DLI.
0697- 68       1210       PLA       ;RESTORE THE 'A' REGISTER.
0698- 40       1220       RTI       ;RETURN FROM INTERRUPT.
               1230 *
               1240 * COLOR POINTER
               1250 *
0699- 00       1260 STORE .HS 00	

This is non-commercial site, its content is based on Atari 8-bit home computer contents and references.
If you feel your rights are violated by showing/using any part of contents of your product represented on this page, please contact me immediatelly so I can remove it!