Classic Computer Magazine Archive PROGRAM LISTING: bestofanticv1b/INTRUPT.SRC


0 ; ** PROGRAM EXAMPLE 1 **
20 ;PROGRAM SETS UP A VVBLKD ISR
30 ;
40 ; SET UP NEW VECTOR WITH A BASIC USR CALL A=USR(1536)
50 ; NEED TO DO THIS WHENEVER SYSTEM IS RESET
60  *= $600      PUT IN PAGE 6 DECIMAL 1536
70  PLA          NULL VALUE FROM BASIC
80  LDA #7       INDICATOR FOR VVBLKD
90  LDX #06      HIGH BYTE FOR VECTOR ADDR
0100  LDY #$40   LOW BYTE FOR VECTOR ADDR
0110  JSR $E45C     SET UP DEFER
0120  RTS        RETURN TO BASIC
0130 ; **  **  **  **
0140 ; ROUTINE AT DECIMAL 1600 IS DESIGNED TO WASTE TIME.
0150 ; PUT A NUMBER FROM 1 - 5 IN DECIMAL 1568.
0160 ; USE POKE 1568,N
0170 ; THIS IS THE ISR WHICH SIMPLY WASTES TIME.
0180  *= $640
0190  LDX 0         INIT COUNTERS
0200  LDY 0
0210 LOOP1 INX     INCR COUNT
0220  CPX $620      DELAY VALUE
0230  BEQ LOOP2
0240  CLC           FORCE BRANCH
0250  BCC LOOP1
0260 LOOP2 INY
0270  CPY $620      DELAY VALUE
0280  BEQ EXIT      DONE ?
0290  CLC           NO-FORCE BRANCH
0300  BCC LOOP1
0310 EXIT JMP $E93E TAKE NORMAL VBLANK EXIT

Back to previous page