_  __   _  _         _ _     _      _           _           
  __| |/ /_ | || |     __| (_)___| | __ (_)_ __   __| | _____  __
 / _` | '_ \| || |_   / _` | / __| |/ / | | '_ \ / _` |/ _ \ \/ /
| (_| | (_) |__   _| | (_| | \__ \   <  | | | | | (_| |  __/>  < 
 \__,_|\___/   |_|    \__,_|_|___/_|\_\ |_|_| |_|\__,_|\___/_/\_\
                                                                 
            

T.BITS 1

FILE INFORMATION

FILENAME(S): T.BITS 1

FILE TYPE(S): PRG

FILE SIZE: 4.4K

FIRST SEEN: 2025-11-30 18:12:10

APPEARS ON: 1 disk(s)

FILE HASH

e4e6e541f56e08ef96468c708a83f3bb398813b51e4e380638d07950d5ad09c1

FOUND ON DISKS (1 DISKS)

DISK TITLE FILENAME FILE TYPE COLLECTION TRACK SECTOR ACTIONS
LOADSTAR 50 S 1 T.BITS 1 PRG Sailor, Ganheden 11 2 DOWNLOAD FILE

FILE CONTENT & ANALYSIS

00000000: 00 80 5E 55 3A 5A 45 52  4F 0D 20 20 20 20 20 C2  |..^U:ZERO.     .|
00000010: C9 D4 D3 3A 20 20 D2 41  53 54 45 52 20 C9 4E 54  |...:  .ASTER .NT|
00000020: 45 52 52 55 50 54 53 0D  0D 20 20 20 20 20 20 20  |ERRUPTS..       |
00000030: 20 20 20 20 20 42 59 20  CA 49 4D 20 D2 4F 57 0D  |     BY .IM .OW.|
00000040: 0D 20 20 20 20 C9 46 20  59 4F 55 20 57 4F 55 4C  |.    .F YOU WOUL|
00000050: 44 20 4C 49 4B 45 20 54  4F 20 41 44 44 20 45 46  |D LIKE TO ADD EF|
00000060: 46 45 43 54 53 0D 54 4F  20 59 4F 55 52 20 50 52  |FECTS.TO YOUR PR|
00000070: 4F 47 52 41 4D 53 20 54  48 41 54 20 41 52 45 20  |OGRAMS THAT ARE |
00000080: 41 4C 4D 4F 53 54 0D 27  4D 41 47 49 43 41 4C 27  |ALMOST.'MAGICAL'|
00000090: 20 43 4F 4E 53 49 44 45  52 49 4E 47 20 54 48 45  | CONSIDERING THE|
000000A0: 20 4C 49 4D 49 54 41 54  49 4F 4E 53 0D 4F 46 20  | LIMITATIONS.OF |
000000B0: 54 48 45 20 56 41 52 49  4F 55 53 20 4D 4F 44 45  |THE VARIOUS MODE|
000000C0: 53 20 4F 46 20 54 48 45  20 C3 36 34 2C 0D 52 41  |S OF THE .64,.RA|
000000D0: 53 54 45 52 20 49 4E 54  45 52 52 55 50 54 53 20  |STER INTERRUPTS |
000000E0: 43 41 4E 20 48 45 4C 50  20 59 4F 55 2E 20 20 D4  |CAN HELP YOU.  .|
000000F0: 48 45 59 0D 41 52 45 20  4E 4F 54 20 41 53 20 43  |HEY.ARE NOT AS C|
00000100: 4F 4D 50 4C 49 43 41 54  45 44 20 41 53 20 59 4F  |OMPLICATED AS YO|
00000110: 55 20 4D 41 59 0D 54 48  49 4E 4B 2C 20 41 4C 54  |U MAY.THINK, ALT|
00000120: 48 4F 55 47 48 20 54 48  45 59 20 44 4F 20 52 45  |HOUGH THEY DO RE|
00000130: 51 55 49 52 45 0D 50 52  45 50 41 52 41 54 49 4F  |QUIRE.PREPARATIO|
00000140: 4E 2E 20 20 D7 45 27 56  45 20 49 4E 43 4C 55 44  |N.  .E'VE INCLUD|
00000150: 45 44 20 41 20 53 48 4F  52 54 0D 44 45 4D 4F 20  |ED A SHORT.DEMO |
00000160: 50 52 4F 47 52 41 4D 20  57 49 54 48 20 54 48 49  |PROGRAM WITH THI|
00000170: 53 20 49 4E 53 54 41 4C  4C 4D 45 4E 54 20 4F 46  |S INSTALLMENT OF|
00000180: 0D C2 C9 D4 D3 20 54 4F  20 53 48 4F 57 20 59 4F  |..... TO SHOW YO|
00000190: 55 20 57 48 41 54 20 43  41 4E 20 42 45 20 44 4F  |U WHAT CAN BE DO|
000001A0: 4E 45 20 41 4E 44 0D 48  4F 57 20 59 4F 55 52 20  |NE AND.HOW YOUR |
000001B0: 43 4F 44 45 20 57 49 4C  4C 20 4C 4F 4F 4B 2E 20  |CODE WILL LOOK. |
000001C0: 20 D4 4F 20 53 45 45 20  54 48 45 0D 44 45 4D 4F  | .O SEE THE.DEMO|
000001D0: 2C 20 43 48 4F 4F 53 45  20 D2 55 4E 20 C9 54 20  |, CHOOSE .UN .T |
000001E0: 46 52 4F 4D 20 54 48 45  20 C2 49 54 53 20 32 0D  |FROM THE .ITS 2.|
000001F0: 4D 45 4E 55 20 42 4F 58  2E 0D 0D 0D 20 20 20 20  |MENU BOX....    |
00000200: D9 4F 55 52 20 4D 4F 4E  49 54 4F 52 20 4F 52 20  |.OUR MONITOR OR |
00000210: D4 D6 20 44 49 53 50 4C  41 59 53 20 49 54 53 0D  |.. DISPLAYS ITS.|
00000220: 50 49 43 54 55 52 45 20  42 59 20 50 4C 41 43 49  |PICTURE BY PLACI|
00000230: 4E 47 20 44 4F 54 53 20  28 42 49 54 53 29 20 4F  |NG DOTS (BITS) O|
00000240: 4E 20 54 48 45 0D 53 43  52 45 45 4E 20 49 4E 20  |N THE.SCREEN IN |
00000250: 48 4F 52 49 5A 4F 4E 54  41 4C 20 27 53 43 41 4E  |HORIZONTAL 'SCAN|
00000260: 27 20 4C 49 4E 45 53 2C  0D 53 54 41 52 54 49 4E  |' LINES,.STARTIN|
00000270: 47 20 46 52 4F 4D 20 54  48 45 20 55 50 50 45 52  |G FROM THE UPPER|
00000280: 20 4C 45 46 54 20 48 41  4E 44 0D 43 4F 52 4E 45  | LEFT HAND.CORNE|
00000290: 52 20 55 4E 54 49 4C 20  52 45 41 43 48 49 4E 47  |R UNTIL REACHING|
000002A0: 20 54 48 45 20 42 4F 54  54 4F 4D 0D 4F 46 20 54  | THE BOTTOM.OF T|
000002B0: 48 45 20 53 43 52 45 45  4E 2E 20 20 C5 56 45 52  |HE SCREEN.  .VER|
000002C0: 59 20 36 30 54 48 20 4F  46 20 41 0D 53 45 43 4F  |Y 60TH OF A.SECO|
000002D0: 4E 44 20 41 4C 4C 20 32  36 32 20 53 43 41 4E 20  |ND ALL 262 SCAN |
000002E0: 4C 49 4E 45 53 20 41 52  45 20 44 52 41 57 4E 0D  |LINES ARE DRAWN.|
000002F0: 4F 4E 20 54 48 45 20 53  43 52 45 45 4E 2E 20 20  |ON THE SCREEN.  |
00000300: D4 48 41 54 27 53 20 46  41 53 54 2C 20 41 4E 44  |.HAT'S FAST, AND|
00000310: 20 49 54 27 53 0D 42 45  43 41 55 53 45 20 4F 46  | IT'S.BECAUSE OF|
00000320: 20 54 48 49 53 20 53 50  45 45 44 20 54 48 41 54  | THIS SPEED THAT|
00000330: 20 52 41 53 54 45 52 0D  49 4E 54 45 52 52 55 50  | RASTER.INTERRUP|
00000340: 54 53 20 41 52 45 20 53  4F 20 48 41 4E 44 59 2E  |TS ARE SO HANDY.|
00000350: 0D 0D 20 20 20 20 C1 53  20 46 41 53 54 20 41 53  |..    .S FAST AS|
00000360: 20 54 48 45 20 53 43 52  45 45 4E 20 44 49 53 50  | THE SCREEN DISP|
00000370: 4C 41 59 20 49 53 2C 0D  54 48 4F 55 47 48 2C 20  |LAY IS,.THOUGH, |
00000380: 54 48 45 20 C3 D0 D5 20  49 53 20 45 56 45 4E 20  |THE ... IS EVEN |
00000390: 46 41 53 54 45 52 20 53  4F 20 57 45 0D 43 41 4E  |FASTER SO WE.CAN|
000003A0: 20 48 41 56 45 20 54 48  45 20 C3 D0 D5 20 54 45  | HAVE THE ... TE|
000003B0: 4C 4C 20 4F 55 52 20 50  52 4F 47 52 41 4D 0D 57  |LL OUR PROGRAM.W|
000003C0: 48 45 4E 20 54 48 45 20  52 41 53 54 45 52 20 49  |HEN THE RASTER I|
000003D0: 53 20 41 54 20 41 4E 59  20 50 41 52 54 49 43 55  |S AT ANY PARTICU|
000003E0: 4C 41 52 0D 53 43 41 4E  20 4C 49 4E 45 2E 20 20  |LAR.SCAN LINE.  |
000003F0: C1 54 20 54 48 49 53 20  50 4F 49 4E 54 20 57 45  |.T THIS POINT WE|
00000400: 27 4C 4C 20 50 4C 41 43  45 0D 41 4E 20 27 49 4E  |'LL PLACE.AN 'IN|
00000410: 54 45 52 52 55 50 54 27  20 54 48 41 54 20 57 49  |TERRUPT' THAT WI|
00000420: 4C 4C 20 50 45 52 46 4F  52 4D 20 53 4F 4D 45 0D  |LL PERFORM SOME.|
00000430: 46 55 4E 43 54 49 4F 4E  2C 20 49 4E 20 54 48 49  |FUNCTION, IN THI|
00000440: 53 20 43 41 53 45 2C 20  43 48 41 4E 47 45 20 54  |S CASE, CHANGE T|
00000450: 48 45 0D 43 4F 4C 4F 52  20 4F 46 20 54 48 45 20  |HE.COLOR OF THE |
00000460: 53 43 52 45 45 4E 20 41  4E 44 20 42 4F 52 44 45  |SCREEN AND BORDE|
00000470: 52 2E 0D 20 20 20 20 C1  54 20 CD CC 20 53 50 45  |R..    .T .. SPE|
00000480: 45 44 53 2C 20 49 54 20  43 4F 55 4C 44 20 42 45  |EDS, IT COULD BE|
00000490: 20 41 0D 56 41 52 49 45  54 59 20 4F 46 20 54 48  | A.VARIETY OF TH|
000004A0: 49 4E 47 53 2C 20 43 4F  4C 4F 52 20 43 48 41 4E  |INGS, COLOR CHAN|
000004B0: 47 45 53 2C 0D 43 48 41  52 41 43 54 45 52 20 53  |GES,.CHARACTER S|
000004C0: 45 54 20 53 57 49 54 43  48 2C 20 53 50 52 49 54  |ET SWITCH, SPRIT|
000004D0: 45 53 2C 20 45 54 43 2E  0D C9 46 20 59 4F 55 20  |ES, ETC...F YOU |
000004E0: 57 41 4E 54 20 4D 4F 52  45 20 54 48 41 4E 20 45  |WANT MORE THAN E|
000004F0: 49 47 48 54 0D 53 50 52  49 54 45 53 20 4F 4E 20  |IGHT.SPRITES ON |
00000500: 54 48 45 20 53 43 52 45  45 4E 20 41 54 20 41 20  |THE SCREEN AT A |
00000510: 54 49 4D 45 2C 0D 59 4F  55 27 4C 4C 20 4E 45 45  |TIME,.YOU'LL NEE|
00000520: 44 20 52 41 53 54 45 52  20 49 4E 54 45 52 52 55  |D RASTER INTERRU|
00000530: 50 54 53 2E 0D C3 48 41  52 41 43 54 45 52 20 45  |PTS...HARACTER E|
00000540: 44 49 54 4F 52 53 20 4F  46 54 45 4E 20 55 53 45  |DITORS OFTEN USE|
00000550: 20 54 48 45 4D 20 53 4F  0D 54 48 41 54 20 45 56  | THEM SO.THAT EV|
00000560: 45 4E 20 54 48 4F 55 47  48 20 54 48 45 20 43 48  |EN THOUGH THE CH|
00000570: 41 52 41 43 54 45 52 20  53 45 54 20 41 54 0D 54  |ARACTER SET AT.T|
00000580: 48 45 20 54 4F 50 20 4F  46 20 54 48 45 20 53 43  |HE TOP OF THE SC|
00000590: 52 45 45 4E 20 49 53 20  42 45 49 4E 47 0D 43 48  |REEN IS BEING.CH|
000005A0: 41 4E 47 45 44 2C 20 54  48 45 20 50 52 4F 4D 50  |ANGED, THE PROMP|
000005B0: 54 53 20 4F 52 20 44 49  52 45 43 54 49 4F 4E 53  |TS OR DIRECTIONS|
000005C0: 20 41 54 0D 54 48 45 20  42 4F 54 54 4F 4D 20 4F  | AT.THE BOTTOM O|
000005D0: 46 20 54 48 45 20 53 43  52 45 45 4E 20 52 45 4D  |F THE SCREEN REM|
000005E0: 41 49 4E 20 4F 55 52 0D  55 53 55 41 4C 20 C3 4F  |AIN OUR.USUAL .O|
000005F0: 4D 4D 4F 44 4F 52 45 20  43 48 41 52 41 43 54 45  |MMODORE CHARACTE|
00000600: 52 53 2E 0D 0D 20 20 20  20 CF 55 52 20 52 4F 55  |RS...    .UR ROU|
00000610: 54 49 4E 45 20 57 49 4C  4C 20 42 45 20 55 53 49  |TINE WILL BE USI|
00000620: 4E 47 20 54 57 4F 0D 52  41 53 54 45 52 20 49 4E  |NG TWO.RASTER IN|
00000630: 54 45 52 52 55 50 54 53  2E 20 20 C2 45 54 57 45  |TERRUPTS.  .ETWE|
00000640: 45 4E 20 54 48 45 20 54  57 4F 0D 52 41 53 54 45  |EN THE TWO.RASTE|
00000650: 52 20 49 4E 54 45 52 52  55 50 54 53 20 57 45 20  |R INTERRUPTS WE |
00000660: 57 49 4C 4C 20 42 45 20  43 48 41 4E 47 49 4E 47  |WILL BE CHANGING|
00000670: 0D 53 43 52 45 45 4E 20  41 4E 44 20 42 4F 52 44  |.SCREEN AND BORD|
00000680: 45 52 20 43 4F 4C 4F 52  53 20 54 4F 20 41 4E 59  |ER COLORS TO ANY|
00000690: 20 43 4F 4C 4F 52 0D 54  48 41 54 20 57 45 20 43  | COLOR.THAT WE C|
000006A0: 48 4F 4F 53 45 2E 0D 0D  20 20 20 20 D4 48 45 20  |HOOSE...    .HE |
000006B0: 41 53 53 45 4D 42 4C 45  52 20 57 45 20 55 53 45  |ASSEMBLER WE USE|
000006C0: 44 20 46 4F 52 20 54 48  49 53 0D 52 4F 55 54 49  |D FOR THIS.ROUTI|
000006D0: 4E 45 20 49 53 20 22 CD  C5 D2 CC C9 CE 22 20 C2  |NE IS "......" .|
000006E0: 59 20 D2 4F 47 45 52 20  D7 41 47 4E 45 52 0D D0  |Y .OGER .AGNER..|
000006F0: 55 42 4C 49 53 48 49 4E  47 20 C9 4E 43 2E 20 20  |UBLISHING .NC.  |
00000700: D7 45 20 57 49 4C 4C 20  55 53 45 20 54 48 45 53  |.E WILL USE THES|
00000710: 45 0D 41 42 42 52 45 56  49 41 54 49 4F 4E 53 3A  |E.ABBREVIATIONS:|
00000720: 0D 0D 20 20 20 20 20 20  20 20 20 2E C1 20 20 3D  |..         ..  =|
00000730: 20 20 C1 43 55 4D 4C 55  41 54 4F 52 0D 20 20 20  |  .CUMLUATOR.   |
00000740: 20 20 20 20 20 20 2E D8  20 20 3D 20 20 D8 20 D2  |      ..  =  . .|
00000750: 45 47 49 53 54 45 52 0D  20 20 20 20 20 20 20 20  |EGISTER.        |
00000760: 20 2E D9 20 20 3D 20 20  D9 20 D2 45 47 49 53 54  | ..  =  . .EGIST|
00000770: 45 52 0D 0D 20 20 20 20  D4 48 45 20 52 4F 55 54  |ER..    .HE ROUT|
00000780: 49 4E 45 53 20 57 49 4C  4C 20 42 45 20 41 53 53  |INES WILL BE ASS|
00000790: 45 4D 42 4C 45 44 20 41  54 0D 33 32 37 36 38 20  |EMBLED AT.32768 |
000007A0: 28 24 38 30 30 30 29 20  53 4F 20 4F 55 52 20 50  |($8000) SO OUR P|
000007B0: 52 4F 47 52 41 4D 20 42  45 47 49 4E 53 3A 0D 0D  |ROGRAM BEGINS:..|
000007C0: 20 20 20 20 20 20 20 20  CF D2 C7 20 33 32 37 36  |        ... 3276|
000007D0: 38 0D 0D CC CF CE D5 CD  C2 20 57 49 4C 4C 20 42  |8........ WILL B|
000007E0: 45 20 54 48 45 20 46 49  52 53 54 20 28 54 4F 50  |E THE FIRST (TOP|
000007F0: 29 20 52 41 53 54 45 52  0D 49 4E 54 45 52 52 55  |) RASTER.INTERRU|
00000800: 50 54 20 41 4E 44 20 C8  C9 CE D5 CD C2 20 57 49  |PT AND ...... WI|
00000810: 4C 4C 20 42 45 20 54 48  45 0D 53 45 43 4F 4E 44  |LL BE THE.SECOND|
00000820: 20 49 4E 54 45 52 52 55  50 54 2E 20 20 C9 54 20  | INTERRUPT.  .T |
00000830: 53 4F 55 4E 44 53 20 42  41 43 4B 57 41 52 44 0D  |SOUNDS BACKWARD.|
00000840: 42 55 54 20 57 45 20 43  4F 55 4E 54 20 46 52 4F  |BUT WE COUNT FRO|
00000850: 4D 20 54 48 45 20 54 4F  50 20 4F 46 20 54 48 45  |M THE TOP OF THE|
00000860: 0D 53 43 52 45 45 4E 20  44 4F 57 4E 2E 0D 20 20  |.SCREEN DOWN..  |
00000870: 20 20 D3 49 4E 43 45 20  54 48 45 20 44 45 4D 4F  |  .INCE THE DEMO|
00000880: 20 49 53 20 49 4E 20 C2  C1 D3 C9 C3 20 57 45 0D  | IS IN ..... WE.|
00000890: 57 49 4C 4C 20 42 45 20  D0 CF CB C5 49 4E 47 20  |WILL BE ....ING |
000008A0: 56 41 4C 55 45 53 20 49  4E 54 4F 20 54 48 45 53  |VALUES INTO THES|
000008B0: 45 0D 4C 4F 43 41 54 49  4F 4E 53 20 46 52 4F 4D  |E.LOCATIONS FROM|
000008C0: 20 C2 C1 D3 C9 C3 2E 0D  0D 20 20 20 20 20 20 CC  | ........      .|
000008D0: CF CE D5 CD C2 20 20 C5  D1 D5 20 32 35 33 0D 20  |.....  ... 253. |
000008E0: 20 20 20 20 20 C8 C9 CE  D5 CD C2 20 20 C5 D1 D5  |     ......  ...|
000008F0: 20 32 35 34 0D 0D 20 20  20 20 D4 48 45 20 46 4F  | 254..    .HE FO|
00000900: 4C 4C 4F 57 49 4E 47 20  54 57 4F 20 4D 45 4D 4F  |LLOWING TWO MEMO|
00000910: 52 59 0D 4C 4F 43 41 54  49 4F 4E 53 20 57 49 4C  |RY.LOCATIONS WIL|
00000920: 4C 20 43 4F 4E 54 41 49  4E 20 54 48 45 20 43 4F  |L CONTAIN THE CO|
00000930: 4C 4F 52 0D 4E 55 4D 42  45 52 20 54 48 41 54 20  |LOR.NUMBER THAT |
00000940: 57 45 20 57 49 4C 4C 20  42 45 20 43 48 41 4E 47  |WE WILL BE CHANG|
00000950: 49 4E 47 20 54 48 45 0D  42 4F 52 44 45 52 20 41  |ING THE.BORDER A|
00000960: 4E 44 20 53 43 52 45 45  4E 20 54 4F 20 57 49 54  |ND SCREEN TO WIT|
00000970: 48 20 4F 55 52 20 C2 C1  D3 C9 C3 0D 44 45 4D 4F  |H OUR ......DEMO|
00000980: 2E 0D 0D 20 20 20 20 20  20 C3 CF CC CF D2 31 20  |...      .....1 |
00000990: 20 C5 D1 D5 20 32 35 31  0D 20 20 20 20 20 20 C3  | ... 251.      .|
000009A0: CF CC CF D2 32 20 20 C5  D1 D5 20 32 35 32 0D 0D  |....2  ... 252..|
000009B0: 0D 0D 0D 20 20 20 20 C8  45 52 45 20 41 52 45 20  |...    .ERE ARE |
000009C0: 53 4F 4D 45 20 52 4F 55  54 49 4E 45 53 20 54 48  |SOME ROUTINES TH|
000009D0: 41 54 20 57 45 0D 57 49  4C 4C 20 55 53 45 2E 20  |AT WE.WILL USE. |
000009E0: 20 D4 48 45 53 45 20 41  52 45 20 4E 4F 54 20 54  | .HESE ARE NOT T|
000009F0: 48 45 49 52 20 55 53 55  41 4C 0D 4C 41 42 45 4C  |HEIR USUAL.LABEL|
00000A00: 53 2E 0D 0D 20 20 C9 D2  D1 D6 C5 C3 20 20 C5 D1  |S...  ......  ..|
00000A10: D5 20 37 38 38 0D 20 20  D2 C1 D3 CC C9 CE 20 20  |. 788.  ......  |
00000A20: C5 D1 D5 20 35 33 32 36  36 0D 20 20 C9 CE D4 D3  |... 53266.  ....|
00000A30: D4 C1 20 20 C5 D1 D5 20  35 33 32 37 33 0D 20 20  |..  ... 53273.  |
00000A40: C9 CE D4 C5 CE C1 20 20  C5 D1 D5 20 35 33 32 37  |......  ... 5327|
00000A50: 34 0D 20 20 C2 C1 C3 CB  C7 D2 20 20 C5 D1 D5 20  |4.  ......  ... |
00000A60: 35 33 32 38 31 0D 20 20  C2 CF D2 C4 C5 D2 20 20  |53281.  ......  |
00000A70: C5 D1 D5 20 35 33 32 38  30 0D 20 20 C9 CE D4 D4  |... 53280.  ....|
00000A80: C9 CD 20 20 C5 D1 D5 20  35 36 33 33 33 0D 0D 0D  |..  ... 56333...|
00000A90: 20 20 20 20 C9 D2 D1 D6  C5 C3 20 49 53 20 57 48  |    ...... IS WH|
00000AA0: 45 52 45 20 57 45 20 57  49 4C 4C 20 48 4F 4F 4B  |ERE WE WILL HOOK|
00000AB0: 20 49 4E 54 4F 0D 54 48  45 20 4E 4F 52 4D 41 4C  | INTO.THE NORMAL|
00000AC0: 20 53 54 52 45 41 4D 20  4F 46 20 45 56 45 4E 54  | STREAM OF EVENT|
00000AD0: 53 2E 20 20 D4 48 49 53  20 49 53 0D 54 48 45 20  |S.  .HIS IS.THE |
00000AE0: 42 45 47 49 4E 4E 49 4E  47 20 4F 46 20 54 48 45  |BEGINNING OF THE|
00000AF0: 20 52 4F 55 54 49 4E 45  20 54 48 41 54 0D 4F 4E  | ROUTINE THAT.ON|
00000B00: 4C 59 20 4E 45 45 44 53  20 54 4F 20 42 45 20 45  |LY NEEDS TO BE E|
00000B10: 58 45 43 55 54 45 44 20  4F 4E 43 45 2E 0D 0D 0D  |XECUTED ONCE....|
00000B20: 20 20 20 20 C2 55 54 20  46 49 52 53 54 20 57 45  |    .UT FIRST WE|
00000B30: 20 57 49 4C 4C 20 4E 45  45 44 20 54 4F 20 53 45  | WILL NEED TO SE|
00000B40: 54 20 54 48 45 0D 49 4E  54 45 52 52 55 50 54 20  |T THE.INTERRUPT |
00000B50: 46 4C 41 47 20 41 4E 44  20 53 54 4F 52 45 20 54  |FLAG AND STORE T|
00000B60: 48 45 20 4F 52 49 47 49  4E 41 4C 0D 53 43 52 45  |HE ORIGINAL.SCRE|
00000B70: 45 4E 20 41 4E 44 20 42  4F 52 44 45 52 20 43 4F  |EN AND BORDER CO|
00000B80: 4C 4F 52 53 20 49 4E 54  4F 0D 54 45 4D 50 4F 52  |LORS INTO.TEMPOR|
00000B90: 41 52 59 20 4C 4F 43 41  54 49 4F 4E 53 2E 0D 0D  |ARY LOCATIONS...|
00000BA0: 20 D3 C5 D4 C9 D4 D5 D0  20 20 D3 C5 C9 0D 20 20  | .......  ....  |
00000BB0: 20 20 20 20 20 20 20 20  CC C4 C1 20 C2 CF D2 C4  |        ... ....|
00000BC0: C5 D2 20 20 20 20 20 3B  28 35 33 32 38 30 29 0D  |..     ;(53280).|
00000BD0: 20 20 20 20 20 20 20 20  20 20 D3 D4 C1 20 D4 C2  |          ... ..|
00000BE0: CF D2 C4 C5 D2 0D 20 20  20 20 20 20 20 20 20 20  |......          |
00000BF0: CC C4 C1 20 C2 C1 C3 CB  C7 D2 20 20 20 20 20 3B  |... ......     ;|
00000C00: 28 35 33 32 38 31 29 0D  20 20 20 20 20 20 20 20  |(53281).        |
00000C10: 20 20 D3 D4 C1 20 D4 C2  C1 C3 CB C7 D2 0D 0D 20  |  ... ......... |
00000C20: 20 20 20 C2 45 46 4F 52  45 20 57 45 20 43 48 41  |   .EFORE WE CHA|
00000C30: 4E 47 45 20 C9 D2 D1 D6  C5 C3 20 57 45 20 53 48  |NGE ...... WE SH|
00000C40: 4F 55 4C 44 0D 53 54 4F  52 45 20 54 48 45 20 55  |OULD.STORE THE U|
00000C50: 53 55 41 4C 20 56 41 4C  55 45 53 20 53 4F 4D 45  |SUAL VALUES SOME|
00000C60: 57 48 45 52 45 20 53 4F  0D 57 45 20 43 41 4E 20  |WHERE SO.WE CAN |
00000C70: 52 45 53 54 4F 52 45 20  54 48 45 4D 20 4C 41 54  |RESTORE THEM LAT|
00000C80: 45 52 2E 0D 0D 20 20 20  20 20 20 20 20 20 20 CC  |ER...          .|
00000C90: C4 C1 20 C9 D2 D1 D6 C5  C3 20 20 20 20 3B 20 20  |.. ......    ;  |
00000CA0: CC 4F 57 20 C2 59 54 45  0D 20 20 20 20 20 20 20  |.OW .YTE.       |
00000CB0: 20 20 20 D3 D4 C1 20 CF  D2 C7 C9 D2 D1 20 20 20  |   ... ......   |
00000CC0: 20 3B 20 20 D4 45 4D 50  20 CC 4F 43 0D 20 20 20  | ;  .EMP .OC.   |
00000CD0: 20 20 20 20 20 20 20 CC  C4 C1 20 C9 D2 D1 D6 C5  |       ... .....|
00000CE0: C3 2B 31 20 20 3B 20 20  C8 49 20 C2 59 54 45 0D  |.+1  ;  .I .YTE.|
00000CF0: 20 20 20 20 20 20 20 20  20 20 D3 D4 C1 20 CF D2  |          ... ..|
00000D00: C7 C9 D2 D1 2B 31 20 20  3B 20 20 D4 45 4D 50 20  |....+1  ;  .EMP |
00000D10: CC 4F 43 0D 20 20 20 20  CE 4F 57 20 41 4C 4C 20  |.OC.    .OW ALL |
00000D20: 57 45 20 48 41 56 45 20  54 4F 20 44 4F 20 54 4F  |WE HAVE TO DO TO|
00000D30: 20 47 45 54 20 54 48 45  0D 43 4F 4D 50 55 54 45  | GET THE.COMPUTE|
00000D40: 52 20 54 4F 20 47 4F 20  54 4F 20 4F 55 52 20 52  |R TO GO TO OUR R|
00000D50: 4F 55 54 49 4E 45 20 28  57 48 49 43 48 0D 57 45  |OUTINE (WHICH.WE|
00000D60: 20 48 41 56 45 4E 27 54  20 57 52 49 54 54 45 4E  | HAVEN'T WRITTEN|
00000D70: 20 59 45 54 29 20 49 53  20 52 45 50 4C 41 43 45  | YET) IS REPLACE|
00000D80: 0D 54 48 45 20 41 44 44  52 45 53 53 20 46 4F 55  |.THE ADDRESS FOU|
00000D90: 4E 44 20 49 4E 20 C9 D2  D1 D6 C5 C3 20 57 49 54  |ND IN ...... WIT|
00000DA0: 48 20 54 48 45 0D 41 44  44 52 45 53 53 20 4F 46  |H THE.ADDRESS OF|
00000DB0: 20 4F 55 52 20 52 4F 55  54 49 4E 45 2C 20 49 4E  | OUR ROUTINE, IN|
00000DC0: 20 4C 4F 2D 42 59 54 45  2F 0D 48 49 2D 42 59 54  | LO-BYTE/.HI-BYT|
00000DD0: 45 20 46 4F 52 4D 2E 20  20 CF 55 52 20 41 44 44  |E FORM.  .UR ADD|
00000DE0: 52 45 53 53 20 49 53 0D  4C 41 42 45 4C 4C 45 44  |RESS IS.LABELLED|
00000DF0: 20 CE C5 D7 C9 D2 D1 2E  0D 0D 20 20 20 20 20 20  | .........      |
00000E00: 20 20 20 20 CC C4 C1 20  23 3C CE C5 D7 C9 D2 D1  |    ... #<......|
00000E10: 20 20 3B 20 20 CC 4F 57  20 C2 59 54 45 0D 20 20  |  ;  .OW .YTE.  |
00000E20: 20 20 20 20 20 20 20 20  D3 D4 C1 20 C9 D2 D1 D6  |        ... ....|
00000E30: C5 C3 20 20 20 20 3B 0D  20 20 20 20 20 20 20 20  |..    ;.        |
00000E40: 20 20 CC C4 C1 20 23 3E  CE C5 D7 C9 D2 D1 20 20  |  ... #>......  |
00000E50: 3B 20 20 C8 49 20 C2 59  54 45 0D 20 20 20 20 20  |;  .I .YTE.     |
00000E60: 20 20 20 20 20 D3 D4 C1  20 C9 D2 D1 D6 C5 C3 2B  |     ... ......+|
00000E70: 31 20 20 3B 0D 0D 20 20  20 20 D3 49 4E 43 45 20  |1  ;..    .INCE |
00000E80: CC CF CE D5 CD C2 20 49  53 20 42 45 49 4E 47 20  |...... IS BEING |
00000E90: D0 CF CB C5 44 20 42 59  0D 54 48 45 20 C2 C1 D3  |....D BY.THE ...|
00000EA0: C9 C3 20 50 52 4F 47 52  41 4D 20 57 45 20 4E 45  |.. PROGRAM WE NE|
00000EB0: 45 44 20 54 4F 20 54 52  41 4E 53 46 45 52 0D 54  |ED TO TRANSFER.T|
00000EC0: 48 45 20 56 41 4C 55 45  20 49 4E 20 CC CF CE D5  |HE VALUE IN ....|
00000ED0: CD C2 20 54 4F 20 41 4E  4F 54 48 45 52 0D 4C 4F  |.. TO ANOTHER.LO|
00000EE0: 43 41 54 49 4F 4E 2C 20  D2 C1 D3 CC C9 CE 2C 20  |CATION, ......, |
00000EF0: 57 48 49 43 48 20 57 49  4C 4C 20 42 45 20 55 53  |WHICH WILL BE US|
00000F00: 45 44 0D 4C 41 54 45 52  20 4F 4E 20 49 4E 20 54  |ED.LATER ON IN T|
00000F10: 48 45 20 50 52 4F 47 52  41 4D 20 46 4F 52 0D 43  |HE PROGRAM FOR.C|
00000F20: 4F 4D 50 41 52 49 53 4F  4E 20 57 49 54 48 20 54  |OMPARISON WITH T|
00000F30: 48 45 20 53 43 41 4E 20  4C 49 4E 45 2E 0D 0D 20  |HE SCAN LINE... |
00000F40: 20 20 20 20 20 20 20 20  20 CC C4 C1 20 CC CF CE  |         ... ...|
00000F50: D5 CD C2 0D 20 20 20 20  20 20 20 20 20 20 D3 D4  |....          ..|
00000F60: C1 20 D2 C1 D3 CC C9 CE  0D 0D 20 20 20 20 D4 48  |. ........    .H|
00000F70: 45 52 45 20 41 52 45 20  32 36 32 20 53 43 41 4E  |ERE ARE 262 SCAN|
00000F80: 20 4C 49 4E 45 53 2C 20  42 55 54 0D 4F 4E 4C 59  | LINES, BUT.ONLY|
00000F90: 20 35 30 20 54 48 52 4F  55 47 48 20 32 34 39 20  | 50 THROUGH 249 |
00000FA0: 41 52 45 20 56 49 53 49  42 4C 45 20 4F 4E 0D 54  |ARE VISIBLE ON.T|
00000FB0: 48 45 20 53 43 52 45 45  4E 2E 20 20 D4 48 45 20  |HE SCREEN.  .HE |
00000FC0: 4F 54 48 45 52 20 4F 4E  45 53 20 41 52 45 0D 45  |OTHER ONES ARE.E|
00000FD0: 49 54 48 45 52 20 41 42  4F 56 45 20 54 48 45 20  |ITHER ABOVE THE |
00000FE0: 53 43 52 45 45 4E 20 4F  52 20 42 45 4C 4F 57 20  |SCREEN OR BELOW |
00000FF0: 49 54 2E 0D C8 4F 57 45  56 45 52 2C 20 54 48 45  |IT...OWEVER, THE|
00001000: 20 43 4F 4D 50 55 54 45  52 20 55 53 45 53 20 41  | COMPUTER USES A|
00001010: 4C 4C 20 32 36 32 0D 53  43 41 4E 20 4C 49 4E 45  |LL 262.SCAN LINE|
00001020: 53 20 41 4E 44 20 53 49  4E 43 45 20 41 20 42 59  |S AND SINCE A BY|
00001030: 54 45 20 43 41 4E 20 4F  4E 4C 59 0D 48 4F 4C 44  |TE CAN ONLY.HOLD|
00001040: 20 41 20 4E 55 4D 42 45  52 20 55 50 20 54 4F 20  | A NUMBER UP TO |
00001050: 32 35 35 20 41 20 42 49  54 20 49 4E 20 54 48 45  |255 A BIT IN THE|
00001060: 0D 42 59 54 45 20 52 49  47 48 54 20 42 45 46 4F  |.BYTE RIGHT BEFO|
00001070: 52 45 20 D2 C1 D3 CC C9  CE 20 49 53 20 55 53 45  |RE ...... IS USE|
00001080: 44 2E 20 20 D7 45 0D 4D  55 53 54 20 4D 41 4B 45  |D.  .E.MUST MAKE|
00001090: 20 53 55 52 45 20 54 48  41 54 20 54 48 49 53 20  | SURE THAT THIS |
000010A0: 42 49 54 20 49 53 20 4F  46 46 2E 0D 0D 20 20 20  |BIT IS OFF...   |
000010B0: 20 20 20 20 20 20 20 CC  C4 C1 20 D2 C1 D3 CC C9  |       ... .....|
000010C0: CE 2D 31 0D 20 20 20 20  20 20 20 20 20 20 C1 CE  |.-1.          ..|
000010D0: C4 20 23 31 32 37 0D 20  20 20 20 20 20 20 20 20  |. #127.         |
000010E0: 20 D3 D4 C1 20 D2 C1 D3  CC C9 CE 2D 31 0D 0D 0D  | ... ......-1...|
000010F0: 20 20 20 20 C1 52 45 20  59 4F 55 20 53 54 49 4C  |    .RE YOU STIL|
00001100: 4C 20 57 49 54 48 20 55  53 3F 20 20 D4 48 45 0D  |L WITH US?  .HE.|
00001110: CC CF C1 C4 D3 D4 C1 D2  20 54 45 58 54 20 42 55  |........ TEXT BU|
00001120: 46 46 45 52 20 49 53 20  4F 4E 4C 59 20 53 4F 20  |FFER IS ONLY SO |
00001130: 42 49 47 0D 53 4F 20 57  45 27 4C 4C 20 48 41 56  |BIG.SO WE'LL HAV|
00001140: 45 20 54 4F 20 43 4F 4E  54 49 4E 55 45 20 54 48  |E TO CONTINUE TH|
00001150: 49 53 0D 44 49 53 43 55  53 53 49 4F 4E 20 49 4E  |IS.DISCUSSION IN|
00001160: 20 D0 41 52 54 20 32 20  4F 46 20 C2 C9 D4 D3 2E  | .ART 2 OF .....|
00001170: 20 20 D3 45 45 0D 59 4F  55 20 54 48 45 52 45 21  |  .EE.YOU THERE!|
00001180: 0D 0D 20 20 20 20 20 20  20 20 2A 2A 2A 2A 20 C5  |..        **** .|
00001190: 4E 44 20 4F 46 20 D4 45  58 54 20 2A 2A 2A 2A 0D  |ND OF .EXT ****.|
..^U:ZERO.     BITS:  RASTER INTERRUPTS.
.            BY JIM ROW..    IF YOU WOUL
D LIKE TO ADD EFFECTS.TO YOUR PROGRAMS T
HAT ARE ALMOST.'MAGICAL' CONSIDERING THE
 LIMITATIONS.OF THE VARIOUS MODES OF THE
 C64,.RASTER INTERRUPTS CAN HELP YOU.  T
HEY.ARE NOT AS COMPLICATED AS YOU MAY.TH
INK, ALTHOUGH THEY DO REQUIRE.PREPARATIO
N.  WE'VE INCLUDED A SHORT.DEMO PROGRAM 
WITH THIS INSTALLMENT OF.BITS TO SHOW YO
U WHAT CAN BE DONE AND.HOW YOUR CODE WIL
L LOOK.  TO SEE THE.DEMO, CHOOSE RUN IT 
FROM THE BITS 2.MENU BOX....    YOUR MON
ITOR OR TV DISPLAYS ITS.PICTURE BY PLACI
NG DOTS (BITS) ON THE.SCREEN IN HORIZONT
AL 'SCAN' LINES,.STARTING FROM THE UPPER
 LEFT HAND.CORNER UNTIL REACHING THE BOT
TOM.OF THE SCREEN.  EVERY 60TH OF A.SECO
ND ALL 262 SCAN LINES ARE DRAWN.ON THE S
CREEN.  THAT'S FAST, AND IT'S.BECAUSE OF
 THIS SPEED THAT RASTER.INTERRUPTS ARE S
O HANDY...    AS FAST AS THE SCREEN DISP
LAY IS,.THOUGH, THE CPU IS EVEN FASTER S
O WE.CAN HAVE THE CPU TELL OUR PROGRAM.W
HEN THE RASTER IS AT ANY PARTICULAR.SCAN
 LINE.  AT THIS POINT WE'LL PLACE.AN 'IN
TERRUPT' THAT WILL PERFORM SOME.FUNCTION
, IN THIS CASE, CHANGE THE.COLOR OF THE 
SCREEN AND BORDER..    AT ML SPEEDS, IT 
COULD BE A.VARIETY OF THINGS, COLOR CHAN
GES,.CHARACTER SET SWITCH, SPRITES, ETC.
.IF YOU WANT MORE THAN EIGHT.SPRITES ON 
THE SCREEN AT A TIME,.YOU'LL NEED RASTER
 INTERRUPTS..CHARACTER EDITORS OFTEN USE
 THEM SO.THAT EVEN THOUGH THE CHARACTER 
SET AT.THE TOP OF THE SCREEN IS BEING.CH
ANGED, THE PROMPTS OR DIRECTIONS AT.THE 
BOTTOM OF THE SCREEN REMAIN OUR.USUAL CO
MMODORE CHARACTERS...    OUR ROUTINE WIL
L BE USING TWO.RASTER INTERRUPTS.  BETWE
EN THE TWO.RASTER INTERRUPTS WE WILL BE 
CHANGING.SCREEN AND BORDER COLORS TO ANY
 COLOR.THAT WE CHOOSE...    THE ASSEMBLE
R WE USED FOR THIS.ROUTINE IS "MERLIN" B
Y ROGER WAGNER.PUBLISHING INC.  WE WILL 
USE THESE.ABBREVIATIONS:..         .A  =
  ACUMLUATOR.         .X  =  X REGISTER.
         .Y  =  Y REGISTER..    THE ROUT
INES WILL BE ASSEMBLED AT.32768 ($8000) 
SO OUR PROGRAM BEGINS:..        ORG 3276
8..LONUMB WILL BE THE FIRST (TOP) RASTER
.INTERRUPT AND HINUMB WILL BE THE.SECOND
 INTERRUPT.  IT SOUNDS BACKWARD.BUT WE C
OUNT FROM THE TOP OF THE.SCREEN DOWN..  
  SINCE THE DEMO IS IN BASIC WE.WILL BE 
POKEING VALUES INTO THESE.LOCATIONS FROM
 BASIC...      LONUMB  EQU 253.      HIN
UMB  EQU 254..    THE FOLLOWING TWO MEMO
RY.LOCATIONS WILL CONTAIN THE COLOR.NUMB
ER THAT WE WILL BE CHANGING THE.BORDER A
ND SCREEN TO WITH OUR BASIC.DEMO...     
 COLOR1  EQU 251.      COLOR2  EQU 252..
...    HERE ARE SOME ROUTINES THAT WE.WI
LL USE.  THESE ARE NOT THEIR USUAL.LABEL
S...  IRQVEC  EQU 788.  RASLIN  EQU 5326
6.  INTSTA  EQU 53273.  INTENA  EQU 5327
4.  BACKGR  EQU 53281.  BORDER  EQU 5328
0.  INTTIM  EQU 56333...    IRQVEC IS WH
ERE WE WILL HOOK INTO.THE NORMAL STREAM 
OF EVENTS.  THIS IS.THE BEGINNING OF THE
 ROUTINE THAT.ONLY NEEDS TO BE EXECUTED 
ONCE....    BUT FIRST WE WILL NEED TO SE
T THE.INTERRUPT FLAG AND STORE THE ORIGI
NAL.SCREEN AND BORDER COLORS INTO.TEMPOR
ARY LOCATIONS... SETITUP  SEI.          
LDA BORDER     ;(53280).          STA TB
ORDER.          LDA BACKGR     ;(53281).
          STA TBACKGR..    BEFORE WE CHA
NGE IRQVEC WE SHOULD.STORE THE USUAL VAL
UES SOMEWHERE SO.WE CAN RESTORE THEM LAT
ER...          LDA IRQVEC    ;  LOW BYTE
.          STA ORGIRQ    ;  TEMP LOC.   
       LDA IRQVEC+1  ;  HI BYTE.        
  STA ORGIRQ+1  ;  TEMP LOC.    NOW ALL 
WE HAVE TO DO TO GET THE.COMPUTER TO GO 
TO OUR ROUTINE (WHICH.WE HAVEN'T WRITTEN
 YET) IS REPLACE.THE ADDRESS FOUND IN IR
QVEC WITH THE.ADDRESS OF OUR ROUTINE, IN
 LO-BYTE/.HI-BYTE FORM.  OUR ADDRESS IS.
LABELLED NEWIRQ...          LDA #<NEWIRQ
  ;  LOW BYTE.          STA IRQVEC    ;.
          LDA #>NEWIRQ  ;  HI BYTE.     
     STA IRQVEC+1  ;..    SINCE LONUMB I
S BEING POKED BY.THE BASIC PROGRAM WE NE
ED TO TRANSFER.THE VALUE IN LONUMB TO AN
OTHER.LOCATION, RASLIN, WHICH WILL BE US
ED.LATER ON IN THE PROGRAM FOR.COMPARISO
N WITH THE SCAN LINE...          LDA LON
UMB.          STA RASLIN..    THERE ARE 
262 SCAN LINES, BUT.ONLY 50 THROUGH 249 
ARE VISIBLE ON.THE SCREEN.  THE OTHER ON
ES ARE.EITHER ABOVE THE SCREEN OR BELOW 
IT..HOWEVER, THE COMPUTER USES ALL 262.S
CAN LINES AND SINCE A BYTE CAN ONLY.HOLD
 A NUMBER UP TO 255 A BIT IN THE.BYTE RI
GHT BEFORE RASLIN IS USED.  WE.MUST MAKE
 SURE THAT THIS BIT IS OFF...          L
DA RASLIN-1.          AND #127.         
 STA RASLIN-1...    ARE YOU STILL WITH U
S?  THE.LOADSTAR TEXT BUFFER IS ONLY SO 
BIG.SO WE'LL HAVE TO CONTINUE THIS.DISCU
SSION IN PART 2 OF BITS.  SEE.YOU THERE!
..        **** END OF TEXT ****.
C64 Preview

> CLICK IMAGE PREVIEW FOR FULL MODAL