10 ;   COLOR PALETTE INTERRUPTS›20 ;   JOHN W. FELTON›30 ;   (c) 1985, ANTIC PUBLISHING›40 ;›50 DRKMSK =  $4E     ; ATTRACT MODE REDUCED LUMINANCE MASK›60 COLRSH =  $4F     ; ATTRACT MODE COLOR SHIFT MASK›70 WSYNC =   $D40A   ; WAIT FOR HORIZONTAL SYNCHRONIZATION REGISTER›80 COLPF0 =  $D016   ; COLOR REGISTER FOR PLAYFIELD ZERO›90 COLPF1 =  $D017   ; COLOR REGISTER FOR PLAYFIELD ONE›0100 COLPF2 = $D018  ; COLOR REGISTER FOR PLAYFIELD TWO›0110 COLPF3 = $D019  ; COLOR REGISTER FOR PLAYFIELD THREE›0120 COLOR4 = $02C8  ; BACKGROUND COLOR REGISTER SHADOW›0130 VDSLST = $0200  ; DISPLAY LIST INTERRUPT VECTOR›0140 SYSVBV = $E45F  ; STAGE ONE VERTICAL BLANK ENTRY›0150 SETVBV = $E45C  ; SET VERTICAL BLANK VECTOR ROUTINE›0160 CHBASE = $D409  ; CHARACTER BASE ADDRESS›0170     .ORG $0600  ; POSITION ON PAGE SIX›0180 COLR0 .DS 1     ; DEFINE STORAGE FOR DISPLAY COLORS›0190 COLR1 .DS 1›0200 COLR2 .DS 1›0210 COLR3 .DS 1›0220 COLR4 .DS 1›0230 COLR5 .DS 1›0240 COLR6 .DS 1›0250 COLR7 .DS 1›0260     .DS 4       ; EXTRA STORAGE›0270 ;›0280 ; INTERRUPT #1›0290 ;›0300 INT1 PHA        ; PUSH ACCUMULATOR ON STACK›0310     LDA COLOR4  ; LOAD BACKGROUND COLOR›0320     EOR COLRSH  ; PERFORM ATTRACT MODE OPERATIONS›0330     AND DRKMSK›0340     STA WSYNC   ; WAIT FOR HORIZONTAL BLANK›0350     STA COLPF2  ; STORE IN GR.0 BACKGROUND COLOR REGISTER›0360     LDA COLR7   ; LOAD DISPLAY COLOR SEVEN›0370     EOR COLRSH  ; PERFORM ATTRACT MODE OPERATIONS›0380     AND DRKMSK›0390     STA COLPF1  ; STORE IN GR.0 LUMINANCE COLOR REGISTER›0400     LDA # <INT2 ; LOAD ADDRESS OF NEXT›0410     STA VDSLST  ; INTERRUPT INTO THE›0420     LDA # >INT2 ; DISPLAY LIST INTERRUPT›0430     STA VDSLST+1 ; VECTOR›0440     PLA         ; POP ACCUMULATOR OFF OF STACK›0450     RTI         ; RETURN FROM INTERRUPT›0460 ;›0470 ; INTERRUPT #2›0480 ;›0490 INT2 PHA        ; PUSH ACCUMULATOR ON STACK›0500     LDA COLR0   ; LOAD DISPLAY COLOR ZERO›0510     EOR COLRSH  ; PERFORM ATTRACT MODE OPERATIONS›0520     AND DRKMSK›0530     STA WSYNC   ; WAIT FOR HORIZONTAL BLANK›0540     STA COLPF0  ; STORE IN COLOR REGISTER ZERO›0550     LDA COLR1   ; LOAD DISPLAY COLOR ONE›0560     EOR COLRSH  ; PERFORM ATTRACT OPERATIONS›0570     AND DRKMSK›0580     STA COLPF1  ; STORE IN COLOR REGISTER ONE›0590     LDA COLR2   ; LOAD DISPLAY COLOR TWO›0600     EOR COLRSH  ; PERFORM ATTRACT OPERATIONS›0610     AND DRKMSK›0620     STA COLPF2  ; STORE IN COLOR REGISTER TWO›0630     LDA COLR3   ; LOAD DISPLAY COLOR 3›0640     EOR COLRSH  ; PERFORM ATTRACT MODE OPERATIONS›0650     AND DRKMSK›0660     STA COLPF3  ; STORE IN COLOR REGISTER THREE›0670     LDA # <INT3 ; LOAD ADDRESS OF NEXT›0680     STA VDSLST  ; INTERRUPT INTO›0690     LDA # >INT3 ; DISPLAY LIST INTERRUPT›0700     STA VDSLST+1 ; VECTOR›0710     PLA         ; POP ACCUMULATOR OFF OF STACK›0720     RTI         ; RETURN FROM INTERRUPT›0730 ;›0740 ; INTERRUPT #3›0750 ;›0760 INT3 PHA        ; PUSH ACCUMULATOR ON STACK›0770     LDA COLOR4  ; LOAD BACKGROUND COLOR›0780     EOR COLRSH  ; PERFORM ATTRACT MODE OPERATIONS›0790     AND DRKMSK›0800     STA WSYNC   ; WAIT FOR HORIZONTAL BLANK›0810     STA COLPF2  ; STORE IN GR.0 BACKGROUND COLOR REGISTER›0820     LDA COLR7   ; LOAD DISPLAY COLOR SEVEN›0830     EOR COLRSH  ; PERFORM ATTRACT MODE OPERATIONS›0840     AND DRKMSK›0850     STA COLPF1  ; STORE IN GR.0 LUMINANCE COLOR REGISTER›0860     LDA # <INT4 ; LOAD ADDRESS OF NEXT›0870     STA VDSLST  ; INTERRUPT INTO THE›0880     LDA # >INT4 ; DISPLAY LIST INTERRUPT›0890     STA VDSLST+1 ; VECTOR›0900     PLA         ; POP ACCUMULATOR OFF OF STACK›0910     RTI         ; RETURN FROM INTERRUPT›0920 ;›0930 ; INTERRUPT #4›0940 ;›0950 INT4 PHA        ; PUSH ACCUMULATOR ON STACK›0960     LDA COLR4   ; LOAD DISPLAY COLOR FOUR›0970     EOR COLRSH  ; PERFORM ATTRACT MODE OPERATIONS›0980     AND DRKMSK›0990     STA WSYNC   ; WAIT FOR HORIZONTAL BLANK›1000     STA COLPF0  ; STORE IN COLOR REGISTER ZERO›1010     LDA COLR5   ; LOAD DISPLAY COLOR FIVE›1020     EOR COLRSH  ; PERFORM ATTRACT OPERATIONS›1030     AND DRKMSK›1040     STA COLPF1  ; STORE IN COLOR REGISTER ONE›1050     LDA COLR6   ; LOAD DISPLAY COLOR SIX›1060     EOR COLRSH  ; PERFORM ATTRACT OPERATIONS›1070     AND DRKMSK›1080     STA COLPF2  ; STORE IN COLOR REGISTER TWO›1090     LDA # <INT5 ; LOAD ADDRESS OF NEXT›1100     STA VDSLST  ; INTERRUPT INTO›1110     LDA # >INT5 ; DISPLAY LIST INTERRUPT›1120     STA VDSLST+1 ; VECTOR›1130     PLA         ; POP ACCUMULATOR OFF OF STACK›1140     RTI         ; RETURN FROM INTERRUPT›1150 ;›1160 ; INTERRUPT #5›1170 ;›1180 INT5 PHA        ; PUSH ACCUMULATOR ON STACK›1190     LDA COLOR4  ; LOAD BACKGROUND COLOR›1200     EOR COLRSH  ; PERFORM ATTRACT MODE OPERATIONS›1210     AND DRKMSK›1220     STA WSYNC   ; WAIT FOR HORIZONTAL BLANK›1230     STA COLPF2  ; STORE IN GR.0 BACKGROUND COLOR REGISTER›1240     LDA #$E0    ; LOAD MSB OF ADDRESS OF CHARACTER SET IN ROM›1250     STA CHBASE  ; STORE IN CHARACTER SET BASE POINTER›1260     LDA COLR7   ; LOAD DISPLAY COLOR SEVEN›1270     EOR COLRSH  ; PERFORM ATTRACT MODE OPERATIONS›1280     AND DRKMSK›1290     STA COLPF1  ; STORE IN GR.0 LUMINANCE COLOR REGISTER›1300     PLA         ; POP ACCUMULATOR OFF OF STACK›1310     RTI         ; RETURN FROM INTERRUPT›1320 ;›1330 ; VERTICAL BLANK INTERRUPT›1340 ;›1350 VBI LDA # <INT1 ; LOAD ADDRESS OF FIRST›1360     STA VDSLST  ; INTERRUPT INTO THE›1370     LDA # >INT1 ; DISPLAY LIST INTERRUPT›1380     STA VDSLST+1 ; VECTOR›1390     JMP SYSVBV  ; JUMP TO OS VERTICAL BLANK ROUTINE›1400 ;›1410 ; SET VECTOR TO VERTICAL BLANK INTERRUPT›1420 ;›1430     PLA         ; DISCARD NUMBER OF PARAMETERS PASSED IN BASIC CALL›1440     LDY # <VBI  ; LOAD Y WITH LSB OF INTERRUPT ADDRESS›1450     LDX # >VBI  ; LOAD X WITH MSB OF INTERRUPT ADDRESS›1460     LDA #6      ; LOAD ACCUMULATOR WITH SIX FOR IMMEDIATE VBI›1470     JSR SETVBV  ; CALL OS ROUTINE TO SET VECTOR›1480     RTS         ; RETURN FROM SUBROUTINE›