MODULE; VBI DEMO FOR ANTIC DEFINE RTI="$40", PHA="$48", PLA="$68", TXA="$8A", TAX="$AA", TYA="$98", TAY="$A8", JMP="$4C", XITVBV="$E462", SAVETEMPS="[$A2 $07 $B5 $C0 $48 $B5 $A8 $48 $B5 $A0 $48 $B5 $80 $48 $CA $10 $F2 $A5 $D3 $48]", GETTEMPS="[$68 $85 $D3 $A2 $00 $68 $95 $80 $68 $95 $A0 $68 $95 $A8 $68 $95 $C0 $E8 $E0 $08 $D0 $F0]" CARD SDLST=560,VDSLST=512, VVBLKD=$224 BYTE NMIEN=$D40E,COLBK=$D01A, WSYNC=$D40A,COUNT=[0] BYTE ARRAY DLIST BYTE ARRAY CLRS(0)=[64 66 68 70 72 74 72 70 68 66 64 66 68 70 72 74 72 70 68 66 64 66 68 70 72 74 76 ] PROC DLINT(); a DLI written in ACTION! BYTE DUM [PHA TXA PHA TYA PHA] IF COUNT=26 THEN DUM=0 ELSE DUM=CLRS(COUNT) FI WSYNC=1 COLBK=DUM COUNT=COUNT+1 IF COUNT=27 THEN COUNT=0 FI [PLA TAY PLA TAX PLA RTI] PROC INIT7() GRAPHICS(7) SETCOLOR(0,2,10) SETCOLOR(1,5,12) SETCOLOR(2,0,0) RETURN PROC DLSETUP(); custom Display List BYTE I INIT7() NMIEN=$40 DLIST=SDLST VDSLST=DLINT FOR I=30 TO 40 DO DLIST(I)=141 OD FOR I=42 TO 54 STEP 2 DO DLIST(I)=141 OD FOR I=57 TO 72 STEP 3 DO DLIST(I)=141 OD FOR I=76 TO 84 STEP 4 DO DLIST(I)=141 OD NMIEN=$C0 RETURN PROC ROTATE(); the VBI routine BYTE HOLD,CTR,CNTR SAVETEMPS; save the temp registers HOLD=CLRS(26); save the last element FOR CTR=0 TO 25; the loop DO CNTR=25-CTR; to count backwards, ; ACTION has no STEP-1 ; statement CLRS(CNTR+1)=CLRS(CNTR) OD; rotate CLRS(0)=HOLD; put the last element ; into the first GETTEMPS; get the temp registers [JMP XITVBV]; exit the VBI PROC VBINST(); install the VBI NMIEN=0; turn off the interrupts VVBLKD=ROTATE; vector to PROC ROTATE NMIEN=$40; turn the interrupts back on RETURN PROC DJD(); the driver routine, named BYTE CRSINH=752; for a famous ; computer genius VBINST(); install the VBI DLSETUP(); set up the Display List CRSINH=1 PRINTE() PRINTE("����� Interrupts in ACTION!") PRINT(" by DAVID PLOTKIN") DO OD; an endless loop... RETURN
Back to previous page