> DETECTED: COMMODORE BASIC PROGRAM (LOAD ADDRESS $0801)
00000000: 01 08 20 08 02 00 3B 20 52 41 53 54 45 52 20 49 |.. ...; RASTER I|
00000010: 4E 54 45 52 52 55 50 54 20 52 4F 55 54 49 4E 45 |NTERRUPT ROUTINE|
00000020: 00 3D 08 03 00 3B 20 49 4E 46 4F 20 41 54 20 45 |.=...; INFO AT E|
00000030: 4E 44 20 4F 46 20 4C 49 53 54 49 4E 47 00 67 08 |ND OF LISTING.g.|
00000040: 04 00 4A 53 52 54 41 44 20 20 B2 20 34 39 31 38 |..JSRTAD . 4918|
00000050: 33 20 3B 28 34 39 31 38 33 20 49 53 20 4C 49 4E |3 ;(49183 IS LIN|
00000060: 45 20 23 31 35 30 29 00 74 08 06 00 AC 20 B2 34 |E #150).t.... .4|
00000070: 39 31 35 32 00 7C 08 0A 00 53 45 49 00 99 08 14 |9152.|...SEI....|
00000080: 00 4C 44 41 20 23 B3 4A 53 52 54 41 44 20 3B 53 |.LDA #.JSRTAD ;S|
00000090: 45 54 20 49 4E 54 20 41 44 00 A5 08 1E 00 53 54 |ET INT AD.....ST|
000000A0: 41 20 37 38 38 00 B6 08 28 00 4C 44 41 20 23 B1 |A 788...(.LDA #.|
000000B0: 4A 53 52 54 41 44 00 C2 08 32 00 53 54 41 20 37 |JSRTAD...2.STA 7|
000000C0: 38 39 00 D7 08 3C 00 4C 44 41 20 23 30 20 3B 52 |89...<.LDA #0 ;R|
000000D0: 41 53 20 4C 49 4E 45 00 E5 08 46 00 53 54 41 20 |AS LINE...F.STA |
000000E0: 35 33 32 36 36 00 F3 08 50 00 4C 44 41 20 35 33 |53266...P.LDA 53|
000000F0: 32 36 35 00 0A 09 5A 00 AF 20 23 31 32 37 20 3B |265...Z.. #127 ;|
00000100: 43 4C 45 41 52 42 49 54 20 37 00 18 09 64 00 53 |CLEARBIT 7...d.S|
00000110: 54 41 20 35 33 32 36 35 00 31 09 6E 00 4C 44 41 |TA 53265.1.n.LDA|
00000120: 20 23 31 32 39 20 3B 49 4E 54 20 42 59 20 52 41 | #129 ;INT BY RA|
00000130: 53 00 3F 09 78 00 53 54 41 20 35 33 32 37 34 00 |S.?.x.STA 53274.|
00000140: 47 09 82 00 43 4C 49 00 4F 09 8C 00 52 54 53 00 |G...CLI.O...RTS.|
00000150: 6E 09 96 00 4C 44 41 20 35 33 32 37 33 20 3B 43 |n...LDA 53273 ;C|
00000160: 48 45 43 4B 20 43 41 55 53 45 20 49 4E 54 00 7C |HECK CAUSE INT.||
00000170: 09 A0 00 53 54 41 20 35 33 32 37 33 00 85 09 AA |...STA 53273....|
00000180: 00 AF 20 23 31 00 93 09 B4 00 42 4E 45 20 53 54 |.. #1.....BNE ST|
00000190: 41 52 54 00 AE 09 BE 00 4C 44 41 20 35 36 33 33 |ART.....LDA 5633|
000001A0: 33 20 3B 43 4C 45 41 52 20 54 49 4D 45 52 00 B6 |3 ;CLEAR TIMER..|
000001B0: 09 C8 00 43 4C 49 00 D1 09 CA 00 4A 4D 50 20 35 |...CLI.....JMP 5|
000001C0: 39 39 35 33 20 3B 20 54 4F 20 52 4F 4D 20 49 4E |9953 ; TO ROM IN|
000001D0: 54 00 F4 09 CD 00 3B 20 2A 2A 59 4F 55 52 20 52 |T.....; **YOUR R|
000001E0: 4F 55 54 49 4E 45 20 53 54 41 52 54 53 20 48 45 |OUTINE STARTS HE|
000001F0: 52 45 2A 2A 00 16 0A CE 00 53 54 41 52 54 20 4C |RE**.....START L|
00000200: 44 41 20 37 32 38 20 3B 53 45 45 20 49 4E 46 4F |DA 728 ;SEE INFO|
00000210: 20 42 45 4C 4F 57 00 21 0A CF 00 43 4D 50 20 23 | BELOW.!...CMP #|
00000220: 31 00 2B 0A D0 00 42 4E 45 20 E2 00 47 0A D1 00 |1.+...BNE ..G...|
00000230: 4A 4D 50 20 36 30 30 33 33 20 20 20 20 20 20 20 |JMP 60033 |
00000240: 20 20 3B 45 58 49 54 00 69 0A D2 00 E2 20 49 4E | ;EXIT.i.... IN|
00000250: 43 20 35 33 32 38 30 20 20 3B 43 48 41 4E 47 45 |C 53280 ;CHANGE|
00000260: 20 42 4F 52 44 45 52 20 26 00 8A 0A DC 00 4A 4D | BORDER &.....JM|
00000270: 50 20 36 30 30 33 33 20 20 20 20 20 20 20 20 20 |P 60033 |
00000280: 3B 54 48 45 4E 20 45 58 49 54 00 90 0A 2C 01 3B |;THEN EXIT...,.;|
00000290: 00 CC 0A 36 01 3B 20 54 48 49 53 20 49 53 20 41 |...6.; THIS IS A|
000002A0: 20 42 41 53 49 43 20 52 4F 55 54 49 4E 45 20 54 | BASIC ROUTINE T|
000002B0: 4F 20 53 45 54 20 55 50 20 41 20 52 41 53 54 45 |O SET UP A RASTE|
000002C0: 52 20 49 4E 54 45 52 52 55 50 54 2E 00 1B 0B 40 |R INTERRUPT....@|
000002D0: 01 3B 20 41 4E 59 20 43 4F 44 45 20 57 52 49 54 |.; ANY CODE WRIT|
000002E0: 54 45 4E 20 46 52 4F 4D 20 4C 49 4E 45 20 32 30 |TEN FROM LINE 20|
000002F0: 36 20 57 49 4C 4C 20 52 55 4E 20 4F 4E 20 41 4E |6 WILL RUN ON AN|
00000300: 20 49 4E 54 45 52 52 55 50 54 20 57 48 45 4E 20 | INTERRUPT WHEN |
00000310: 52 41 53 54 45 52 20 4C 49 4E 45 00 3D 0B 4A 01 |RASTER LINE.=.J.|
00000320: 3B 20 52 45 41 43 48 45 53 20 30 20 28 53 45 54 |; REACHES 0 (SET|
00000330: 20 41 54 20 4C 49 4E 45 20 36 30 29 2E 00 8D 0B | AT LINE 60)....|
00000340: 54 01 3B 20 52 41 53 54 45 52 20 49 4E 54 45 52 |T.; RASTER INTER|
00000350: 52 55 50 54 53 20 43 41 4E 20 42 45 20 55 53 45 |RUPTS CAN BE USE|
00000360: 44 20 54 4F 20 43 41 55 53 45 20 41 20 53 50 4C |D TO CAUSE A SPL|
00000370: 49 54 20 53 43 52 45 45 4E 20 28 45 47 20 4D 4F |IT SCREEN (EG MO|
00000380: 4E 4F 20 43 48 41 52 41 43 54 45 52 53 00 DB 0B |NO CHARACTERS...|
00000390: 5E 01 3B 20 4F 4E 20 54 4F 50 20 48 41 4C 46 20 |^.; ON TOP HALF |
000003A0: 26 20 4D 55 4C 54 49 43 4F 4C 4F 55 52 20 4F 4E |& MULTICOLOUR ON|
000003B0: 20 42 4F 54 54 4F 4D 20 48 41 4C 46 29 20 4F 52 | BOTTOM HALF) OR|
000003C0: 20 50 55 54 20 4D 4F 52 45 20 54 48 41 4E 20 38 | PUT MORE THAN 8|
000003D0: 20 53 50 52 49 54 45 53 20 4F 4E 00 0B 0C 68 01 | SPRITES ON...h.|
000003E0: 3B 20 53 43 52 45 45 4E 20 55 53 49 4E 47 20 4D |; SCREEN USING M|
000003F0: 55 4C 54 49 50 4C 45 20 49 4E 54 45 52 52 55 50 |ULTIPLE INTERRUP|
00000400: 54 53 20 45 54 43 20 45 54 43 2E 00 55 0C 72 01 |TS ETC ETC..U.r.|
00000410: 3B 20 43 4F 44 45 20 57 52 49 54 54 45 4E 20 4F |; CODE WRITTEN O|
00000420: 4E 20 41 4E 20 49 4E 54 45 52 52 55 50 54 20 57 |N AN INTERRUPT W|
00000430: 49 4C 4C 20 46 55 4E 43 54 49 4F 4E 20 43 4F 4E |ILL FUNCTION CON|
00000440: 54 49 4E 55 41 4C 4C 59 20 55 4E 4C 45 53 53 20 |TINUALLY UNLESS |
00000450: 49 54 20 49 53 00 9F 0C 7C 01 3B 20 44 49 53 41 |IT IS...|.; DISA|
00000460: 42 4C 45 44 2E 20 49 4E 20 54 48 45 20 20 41 42 |BLED. IN THE AB|
00000470: 4F 56 45 20 20 45 58 41 4D 50 4C 45 20 42 59 54 |OVE EXAMPLE BYT|
00000480: 45 20 37 32 38 20 49 53 20 55 53 45 44 20 41 53 |E 728 IS USED AS|
00000490: 20 20 41 20 47 55 49 44 45 20 42 59 54 45 2E 00 | A GUIDE BYTE..|
000004A0: ED 0C 86 01 3B 20 49 46 20 37 32 38 20 43 4F 4E |....; IF 728 CON|
000004B0: 54 41 49 4E 53 20 41 20 31 20 54 48 45 4E 20 54 |TAINS A 1 THEN T|
000004C0: 48 45 20 46 4F 4C 4C 4F 57 49 4E 47 20 52 4F 55 |HE FOLLOWING ROU|
000004D0: 54 49 4E 45 20 20 28 43 48 41 4E 47 45 20 42 4F |TINE (CHANGE BO|
000004E0: 52 44 45 52 29 20 57 49 4C 4C 20 42 45 00 37 0D |RDER) WILL BE.7.|
000004F0: 90 01 3B 20 45 58 45 43 55 54 45 44 2E 20 53 4F |..; EXECUTED. SO|
00000500: 20 46 52 4F 4D 20 42 41 53 49 43 20 50 4F 4B 45 | FROM BASIC POKE|
00000510: 20 37 32 38 2C 31 20 44 49 53 41 42 4C 45 53 20 | 728,1 DISABLES |
00000520: 41 4E 44 20 50 4F 4B 45 20 37 32 38 2C 30 20 45 |AND POKE 728,0 E|
00000530: 4E 41 42 4C 45 53 2E 00 85 0D 9A 01 3B 20 54 48 |NABLES......; TH|
00000540: 49 53 20 49 53 20 41 20 56 45 52 59 20 53 49 4D |IS IS A VERY SIM|
00000550: 50 4C 45 20 45 58 41 4D 50 4C 45 2E 20 4D 55 4C |PLE EXAMPLE. MUL|
00000560: 54 49 50 4C 45 20 49 4E 54 45 52 52 55 50 54 53 |TIPLE INTERRUPTS|
00000570: 20 41 52 45 20 55 53 45 44 20 45 58 54 45 4E 53 | ARE USED EXTENS|
00000580: 49 56 45 4C 59 00 CF 0D A4 01 3B 20 49 4E 20 43 |IVELY.....; IN C|
00000590: 4F 4D 4D 45 52 43 49 41 4C 20 50 52 47 53 2C 20 |OMMERCIAL PRGS, |
000005A0: 45 4E 41 42 4C 49 4E 47 20 53 50 52 49 54 45 20 |ENABLING SPRITE |
000005B0: 41 4E 49 4D 41 54 49 4F 4E 2C 20 43 4F 4C 4C 49 |ANIMATION, COLLI|
000005C0: 53 49 4F 4E 20 44 45 54 45 43 54 49 4F 4E 2C 00 |SION DETECTION,.|
000005D0: 13 0E AE 01 3B 20 4D 55 53 49 43 2C 20 53 46 58 |....; MUSIC, SFX|
000005E0: 20 45 54 43 20 45 54 43 20 41 4C 4C 20 54 4F 20 | ETC ETC ALL TO |
000005F0: 42 45 20 45 58 45 43 55 54 45 44 20 41 54 20 48 |BE EXECUTED AT H|
00000600: 49 47 48 20 53 50 45 45 44 20 53 45 45 4D 49 4E |IGH SPEED SEEMIN|
00000610: 47 4C 59 00 3A 0E B8 01 3B 20 49 4E 53 54 41 4E |GLY.:...; INSTAN|
00000620: 54 41 4E 45 4F 55 53 4C 59 20 28 49 45 20 56 45 |TANEOUSLY (IE VE|
00000630: 52 59 20 46 41 53 54 20 21 29 00 68 0E BD 01 3B |RY FAST !).h...;|
00000640: 20 52 4F 55 54 49 4E 45 53 20 4D 55 53 54 20 45 | ROUTINES MUST E|
00000650: 58 49 54 20 41 54 20 36 30 30 33 33 20 20 28 41 |XIT AT 60033 (A|
00000660: 53 20 41 42 4F 56 45 29 00 AB 0E C2 01 3B 20 50 |S ABOVE).....; P|
00000670: 45 54 45 52 20 42 4F 4F 54 48 4D 41 4E 20 50 2E |ETER BOOTHMAN P.|
00000680: 4F 2E 20 42 4F 58 20 37 34 35 20 43 41 4D 50 53 |O. BOX 745 CAMPS|
00000690: 49 45 20 4E 53 57 20 32 31 39 34 20 28 4E 4F 56 |IE NSW 2194 (NOV|
000006A0: 45 4D 42 45 52 20 31 39 39 33 29 00 00 00 |EMBER 1993)... |
.. ...; RASTER INTERRUPT ROUTINE.=...; I
NFO AT END OF LISTING.G...JSRTAD . 4918
3 ;(49183 IS LINE #150).T.... .49152.|..
.SEI.....LDA #.JSRTAD ;SET INT AD.....ST
A 788...(.LDA #.JSRTAD.B.2.STA 789.W.<.L
DA #0 ;RAS LINE...F.STA 53266...P.LDA 53
265...Z.. #127 ;CLEARBIT 7...D.STA 53265
.1.N.LDA #129 ;INT BY RAS.?.X.STA 53274.
G...CLI.O...RTS.N...LDA 53273 ;CHECK CAU
SE INT.|. .STA 53273...... #1.....BNE ST
ART.....LDA 56333 ;CLEAR TIMER...H.CLI.Q
.J.JMP 59953 ; TO ROM INT...M.; **YOUR R
OUTINE STARTS HERE**...N.START LDA 728 ;
SEE INFO BELOW.!.O.CMP #1.+.P.BNE ..G.Q.
JMP 60033 ;EXIT.I.R.. INC 53280
;CHANGE BORDER &.....JMP 60033
;THEN EXIT...,.;.L.6.; THIS IS A BASIC R
OUTINE TO SET UP A RASTER INTERRUPT....@
.; ANY CODE WRITTEN FROM LINE 206 WILL R
UN ON AN INTERRUPT WHEN RASTER LINE.=.J.
; REACHES 0 (SET AT LINE 60)....T.; RAST
ER INTERRUPTS CAN BE USED TO CAUSE A SPL
IT SCREEN (EG MONO CHARACTERS...^.; ON T
OP HALF & MULTICOLOUR ON BOTTOM HALF) OR
PUT MORE THAN 8 SPRITES ON...H.; SCREEN
USING MULTIPLE INTERRUPTS ETC ETC..U.R.
; CODE WRITTEN ON AN INTERRUPT WILL FUNC
TION CONTINUALLY UNLESS IT IS...|.; DISA
BLED. IN THE ABOVE EXAMPLE BYTE 728 IS
USED AS A GUIDE BYTE......; IF 728 CON
TAINS A 1 THEN THE FOLLOWING ROUTINE (C
HANGE BORDER) WILL BE.7...; EXECUTED. SO
FROM BASIC POKE 728,1 DISABLES AND POKE
728,0 ENABLES......; THIS IS A VERY SIM
PLE EXAMPLE. MULTIPLE INTERRUPTS ARE USE
D EXTENSIVELY.O...; IN COMMERCIAL PRGS,
ENABLING SPRITE ANIMATION, COLLISION DET
ECTION,.....; MUSIC, SFX ETC ETC ALL TO
BE EXECUTED AT HIGH SPEED SEEMINGLY.:...
; INSTANTANEOUSLY (IE VERY FAST !).H...;
ROUTINES MUST EXIT AT 60033 (AS ABOVE)
...B.; PETER BOOTHMAN P.O. BOX 745 CAMPS
IE NSW 2194 (NOVEMBER 1993)...
×
C64 Image
> CLICK IMAGE PREVIEW FOR FULL MODAL