Random software
Random hardware
Random game
  • Entry name:
     Display List Interrupts 
  • Category:
    Graphics
  • Publisher/Developer:
    SoftSide Publications
  • Year:
    1982
  • Code:
    Alan J. Zett
  • Programming language:
    Atari BASIC
source: Display List Interrupts
Listing 1
10000 N0=0:N1=1:N2=2:N3=3:N4=4:N5=5:N6=6:N7=7:N8=8:N9=9:N10=10
11000 GRAPHICS 21:POKE 752,N1:C=N0:POKE 87,N0
11010 DL=PEEK(560)+PEEK(561)*256+N4
11020 MEM=PEEK(DL)+PEEK(DL+1)*256+40
11030 MH=INT(MEM/256):ML=MEM-MH*256
11040 POKE 559,N0:POKE DL-N1,198
11050 POKE DL+N2,66:POKE DL+N3,ML
11060 POKE DL+N4,MH
11070 FOR J=N5 TO 26:POKE DL+J,N2:NEXT J
11080 POKE DL+12,130:POKE DL+15,130
11090 POKE DL+22,130:POKE DL+27,65
11100 POKE DL+28,PEEK(560)
11110 POKE DL+29,PEEK(561)
11120 READ A:IF A=999 THEN 11140
11130 POKE 1744+C,A:C=C+N1:GOTO 11120
11140 POKE 512,208:POKE 513,N6
11150 POKE 1774,176:POKE 1775,180
11160 POKE 1776,N0:POKE 1777,144
11170 POKE 1778,N0:POKE 54286,192
11180 POKE 559,34
11190 DATA 72,138,72,174,242,6,189,238,6,141,10,212,141,24,208,232
11200 DATA 224,4,144,2,162,0,138,141
11210 DATA 242,6,104,170,104,64,999	
Listing 2
                 0100        *= $06D0      ;SET START OF ASSEMBLY.
                 0110 ;
                 0120 ; DEFINE SYSTEM EQUATES
                 0130 ;
                 0140 WSYNC = $D40A        ;WAIT FOR HORIZONTAL SYNC REGISTER.
                 0150 BGRND = $D018        ;BACKGROUND COLOR HARDWARE REGISTER. 
                 0160 ;
                 0170 ; START OF DLI HANDLER ROUTINE
                 0180 ;
06D0: 48         0190 START PHA            ;SAVE THE A REGISTER ONTO THE STACK.
06D1: 8A         0200 TXA                  ;PUT X REGISTER INTO A AND THEN
06D2: 48         0210 PHA                  ;SAVE IT ONTO THE STACK ALSO.
06D3: AE F2 06   0220 LDX STORE            ;GET THE CONTENTS OF STORE INTO X.
06D6: BD EE 06   0230 LDA TABLE,X          ;SET COLOR POINTED TO BY X INTO A.
06D9: 8D 0A D4   0240 STA WSYNC            ;WAIT FOR TIMING, THEN PROCEED.
06DC: 8D 18 D0   0250 STA BGRND            ;CHANGE COLORS IN HARDWARE REGISTER.
06DF: E8         0260 INX                  ;POINT X TO NEXT COLOR FOR DLI USE. 
06E0: E0 04      0270 CPX #$04             ;IF WE'RE NOT PAST THE TABLE'S END,
06E2: 90 02      0280 BCC OUT              ;THEN GET READY TO LEAVE,
06E4: A2 00      0290 LDX #$00             ;ELSE POINT X TO THE TABLE'S START.
                 0300 ;
                 0310 ; END DLI, SET UP FOR NEXT
                 0320 ;
06E6: 8A         0330 OUT TXA              ;PUT X BACK INTO THE A REGISTER.
06E7: 8D F2 06   0340 STA STORE            ;SAVE UPDATED COLOR TABLE POINTER. 
06EA: 68         0350 PLA                  ;REMOVE OLD X REGISTER.
06EB: AA         0360 TAX                  ;PUT IT BACK IN PLACE.
06EC: 68         0370 PLA                  ;RESTORE OLD A REGISTER.
06ED: 40         0380 RTI                  ;EXECUTE RETURN FROM INTERRUPT.
                 0390 ;
                 0400 ; DLI COLOR TABLE AND POINTER
                 0410 ;
06EF: 00 00      0420 TABLE .WORD $00      ;RESERVE 4 BYTES FOR COLOR TABLE.
06F1: 00 00      0430 .WORD $00 
06F3: 00         0440 STORE .BYTE $00 ;RESERVE 1 BYTE FOR TABLE POINTER
                 0450 .END	

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!