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

T.BITS 2

FILE INFORMATION

FILENAME(S): T.BITS 2

FILE TYPE(S): PRG

FILE SIZE: 5.1K

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

APPEARS ON: 1 disk(s)

FILE HASH

4705c2cde450900a1ca924bcee8e00d5a1f7f9371e27f7ddac85fd286666037a

FOUND ON DISKS (1 DISKS)

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

FILE CONTENT & ANALYSIS

00000000: 00 80 5E 55 3A 5A 45 52  4F 0D 20 20 20 C2 C9 D4  |..^U:ZERO.   ...|
00000010: D3 3A 20 20 D2 41 53 54  45 52 20 C9 4E 54 45 52  |.:  .ASTER .NTER|
00000020: 52 55 50 54 53 2C 20 D0  41 52 54 20 32 0D 0D 20  |RUPTS, .ART 2.. |
00000030: 20 20 20 20 20 20 20 20  20 20 20 20 42 59 20 CA  |            BY .|
00000040: 49 4D 20 D2 4F 57 0D 0D  20 20 20 20 C9 46 20 C2  |IM .OW..    .F .|
00000050: 49 54 20 30 20 4F 46 20  C9 CE D4 C5 CE C1 20 49  |IT 0 OF ...... I|
00000060: 53 20 53 45 54 20 54 48  45 0D 43 4F 4D 50 55 54  |S SET THE.COMPUT|
00000070: 45 52 20 4B 4E 4F 57 53  20 54 48 41 54 20 49 54  |ER KNOWS THAT IT|
00000080: 27 53 20 45 58 50 45 43  54 45 44 20 54 4F 0D 50  |'S EXPECTED TO.P|
00000090: 45 52 46 4F 52 4D 20 41  20 52 41 53 54 45 52 20  |ERFORM A RASTER |
000000A0: 43 4F 4D 50 41 52 45 2E  20 20 D4 48 45 0D 4E 55  |COMPARE.  .HE.NU|
000000B0: 4D 42 45 52 53 20 54 4F  20 42 45 20 43 4F 4D 50  |MBERS TO BE COMP|
000000C0: 41 52 45 44 20 41 52 45  20 54 48 45 0D 43 55 52  |ARED ARE THE.CUR|
000000D0: 52 45 4E 54 20 53 43 41  4E 20 4C 49 4E 45 20 41  |RENT SCAN LINE A|
000000E0: 4E 44 20 D2 C1 D3 CC C9  CE 2E 20 20 D7 48 45 4E  |ND .......  .HEN|
000000F0: 0D 54 48 45 53 45 20 54  57 4F 20 41 52 45 20 45  |.THESE TWO ARE E|
00000100: 51 55 41 4C 20 41 4E 20  49 4E 54 45 52 52 55 50  |QUAL AN INTERRUP|
00000110: 54 20 57 49 4C 4C 0D 4F  43 43 55 52 20 41 4E 44  |T WILL.OCCUR AND|
00000120: 20 54 48 45 20 50 52 4F  47 52 41 4D 20 57 49 4C  | THE PROGRAM WIL|
00000130: 4C 20 47 4F 20 54 4F 20  54 48 45 0D 41 44 44 52  |L GO TO THE.ADDR|
00000140: 45 53 53 20 46 4F 55 4E  44 20 49 4E 20 C9 D2 D1  |ESS FOUND IN ...|
00000150: D6 C5 C3 20 41 4E 44 20  45 58 45 43 55 54 45 0D  |... AND EXECUTE.|
00000160: 57 48 41 54 45 56 45 52  20 49 53 20 54 48 45 52  |WHATEVER IS THER|
00000170: 45 20 28 49 4E 20 54 48  49 53 20 43 41 53 45 2C  |E (IN THIS CASE,|
00000180: 0D CE C5 D7 C9 D2 D1 29  2E 0D 0D 20 20 20 20 D3  |.......)...    .|
00000190: 49 4E 43 45 20 C9 CE D4  C5 CE C1 20 49 53 20 41  |INCE ...... IS A|
000001A0: 4C 53 4F 20 55 53 45 44  20 46 4F 52 0D 4F 54 48  |LSO USED FOR.OTH|
000001B0: 45 52 20 49 4E 54 45 52  52 55 50 54 53 2C 20 57  |ER INTERRUPTS, W|
000001C0: 45 20 57 49 4C 4C 20 4E  45 45 44 20 54 4F 0D 4D  |E WILL NEED TO.M|
000001D0: 41 4B 45 20 53 55 52 45  20 54 48 41 54 20 41 4C  |AKE SURE THAT AL|
000001E0: 4C 20 4F 54 48 45 52 20  42 49 54 53 20 41 52 45  |L OTHER BITS ARE|
000001F0: 0D 4F 46 46 2E 0D 20 20  20 20 20 20 20 20 20 20  |.OFF..          |
00000200: CC C4 C1 20 23 30 31 20  20 20 20 20 20 3B 42 49  |... #01      ;BI|
00000210: 54 20 23 30 0D 20 20 20  20 20 20 20 20 20 20 D3  |T #0.          .|
00000220: D4 C1 20 C9 CE D4 C5 CE  C1 0D 0D 20 20 20 20 D4  |.. ........    .|
00000230: 48 45 20 4E 45 58 54 20  53 54 45 50 20 49 53 20  |HE NEXT STEP IS |
00000240: 54 4F 20 43 4C 45 41 52  20 41 4C 4C 0D 49 4E 54  |TO CLEAR ALL.INT|
00000250: 45 52 52 55 50 54 53 20  41 4E 44 20 54 48 45 4E  |ERRUPTS AND THEN|
00000260: 20 52 45 54 55 52 4E 20  54 4F 20 C2 C1 D3 C9 C3  | RETURN TO .....|
00000270: 2E 0D 0D 20 20 20 20 20  20 20 20 20 20 C3 CC C9  |...          ...|
00000280: 0D 20 20 20 20 20 20 20  20 20 20 D2 D4 D3 0D 0D  |.          .....|
00000290: 20 20 20 20 C5 56 45 52  59 54 48 49 4E 47 20 49  |    .VERYTHING I|
000002A0: 53 20 4E 4F 57 20 53 45  54 20 46 4F 52 20 4F 55  |S NOW SET FOR OU|
000002B0: 52 0D 46 49 52 53 54 20  52 41 53 54 45 52 20 49  |R.FIRST RASTER I|
000002C0: 4E 54 45 52 52 55 50 54  2E 20 20 D7 48 45 4E 20  |NTERRUPT.  .HEN |
000002D0: 49 54 0D 4F 43 43 55 52  53 20 57 45 20 57 49 4C  |IT.OCCURS WE WIL|
000002E0: 4C 20 43 48 41 4E 47 45  20 D2 C1 D3 CC C9 CE 20  |L CHANGE ...... |
000002F0: 54 4F 20 43 48 45 43 4B  0D 46 4F 52 20 4F 55 52  |TO CHECK.FOR OUR|
00000300: 20 4E 45 58 54 20 49 4E  54 45 52 52 55 50 54 2E  | NEXT INTERRUPT.|
00000310: 0D 0D 20 20 20 20 CD 41  43 48 49 4E 45 20 4C 41  |..    .ACHINE LA|
00000320: 4E 47 55 41 47 45 20 49  53 20 41 20 27 4D 4F 44  |NGUAGE IS A 'MOD|
00000330: 55 4C 41 52 27 0D 4C 41  4E 47 55 41 47 45 2E 20  |ULAR'.LANGUAGE. |
00000340: 20 D7 48 45 4E 20 59 4F  55 20 45 4E 54 45 52 20  | .HEN YOU ENTER |
00000350: 41 4C 4C 20 4F 46 20 54  48 45 0D 41 42 4F 56 45  |ALL OF THE.ABOVE|
00000360: 20 43 4F 44 45 20 49 4E  54 4F 20 59 4F 55 52 20  | CODE INTO YOUR |
00000370: 41 53 53 45 4D 42 4C 45  52 20 59 4F 55 27 4C 4C  |ASSEMBLER YOU'LL|
00000380: 0D 4E 4F 54 49 43 45 20  54 48 41 54 20 49 54 27  |.NOTICE THAT IT'|
00000390: 53 20 42 41 53 49 43 41  4C 4C 59 20 4F 4E 45 20  |S BASICALLY ONE |
000003A0: 4C 4F 4F 50 0D 54 48 41  54 20 43 41 4C 4C 53 20  |LOOP.THAT CALLS |
000003B0: 4D 4F 44 55 4C 45 53 20  41 53 20 4E 45 45 44 45  |MODULES AS NEEDE|
000003C0: 44 2E 0D 20 20 20 20 D4  48 45 20 46 4F 4C 4C 4F  |D..    .HE FOLLO|
000003D0: 57 49 4E 47 20 4D 4F 44  55 4C 45 20 49 53 20 54  |WING MODULE IS T|
000003E0: 48 45 0D 52 4F 55 54 49  4E 45 20 54 48 41 54 20  |HE.ROUTINE THAT |
000003F0: 43 48 45 43 4B 53 20 49  46 20 41 4E 20 49 4E 54  |CHECKS IF AN INT|
00000400: 45 52 52 55 50 54 0D 48  41 53 20 4F 43 43 55 52  |ERRUPT.HAS OCCUR|
00000410: 52 45 44 2E 20 20 D4 48  45 20 46 49 52 53 54 20  |RED.  .HE FIRST |
00000420: 43 4F 55 50 4C 45 20 4F  46 0D 43 4F 4D 4D 41 4E  |COUPLE OF.COMMAN|
00000430: 44 53 20 4D 41 59 20 4C  4F 4F 4B 20 41 20 4C 49  |DS MAY LOOK A LI|
00000440: 54 54 4C 45 20 53 54 52  41 4E 47 45 0D 41 4E 44  |TTLE STRANGE.AND|
00000450: 20 55 53 45 4C 45 53 53  2C 20 42 55 54 20 54 48  | USELESS, BUT TH|
00000460: 45 59 20 41 52 45 20 55  53 45 44 20 42 59 20 54  |EY ARE USED BY T|
00000470: 48 45 0D C3 D0 D5 20 46  4F 52 20 52 45 53 45 54  |HE.... FOR RESET|
00000480: 54 49 4E 47 20 43 45 52  54 41 49 4E 20 4C 41 54  |TING CERTAIN LAT|
00000490: 43 48 45 53 0D 54 48 41  54 20 4E 45 45 44 20 54  |CHES.THAT NEED T|
000004A0: 4F 20 42 45 20 43 4C 45  41 52 45 44 2E 20 20 C9  |O BE CLEARED.  .|
000004B0: 46 20 54 48 45 0D 49 4E  54 45 52 52 55 50 54 20  |F THE.INTERRUPT |
000004C0: 48 41 53 20 4F 43 43 55  52 52 45 44 20 54 48 45  |HAS OCCURRED THE|
000004D0: 20 48 49 47 48 20 42 49  54 0D 4F 46 20 C9 CE D4  | HIGH BIT.OF ...|
000004E0: D3 D4 C1 20 57 49 4C 4C  20 42 45 20 53 45 54 20  |... WILL BE SET |
000004F0: 41 4E 44 20 54 48 45 20  50 52 4F 47 52 41 4D 0D  |AND THE PROGRAM.|
00000500: 57 49 4C 4C 20 42 52 41  4E 43 48 20 54 4F 20 D6  |WILL BRANCH TO .|
00000510: C9 C3 D2 C1 D3 D4 D2 2E  0D 0D 20 CE C5 D7 C9 D2  |.......... .....|
00000520: D1 20 20 20 CC C4 C1 20  C9 CE D4 D3 D4 C1 20 20  |.   ... ......  |
00000530: 20 20 3B C9 CE D4 D3 D4  C1 20 3D 0D 20 20 20 20  |  ;...... =.    |
00000540: 20 20 20 20 20 20 D3 D4  C1 20 C9 CE D4 D3 D4 C1  |      ... ......|
00000550: 20 20 20 20 3B 49 4E 54  45 52 52 55 50 54 0D 20  |    ;INTERRUPT. |
00000560: 20 20 20 20 20 20 20 20  20 C2 CD C9 20 D6 C9 C3  |         ... ...|
00000570: D2 C1 D3 D4 D2 20 20 3B  53 54 41 54 55 53 0D 0D  |.....  ;STATUS..|
00000580: 0D 0D 0D 0D 20 20 20 20  C9 46 20 54 48 45 20 48  |....    .F THE H|
00000590: 49 47 48 20 42 49 54 20  57 41 53 20 4E 4F 54 20  |IGH BIT WAS NOT |
000005A0: 53 45 54 20 28 4F 55 52  0D 49 4E 54 45 52 52 55  |SET (OUR.INTERRU|
000005B0: 50 54 20 44 49 44 20 4E  4F 54 20 4F 43 43 55 52  |PT DID NOT OCCUR|
000005C0: 29 20 57 45 20 4E 45 45  44 20 54 4F 0D 4C 4F 41  |) WE NEED TO.LOA|
000005D0: 44 20 2E C1 20 57 49 54  48 20 C9 CE D4 D4 C9 CD  |D .. WITH ......|
000005E0: 20 41 4E 44 20 43 4C 45  41 52 20 41 4C 4C 0D 49  | AND CLEAR ALL.I|
000005F0: 4E 54 45 52 52 55 50 54  53 2E 20 20 D4 48 49 53  |NTERRUPTS.  .HIS|
00000600: 20 49 53 20 41 4E 4F 54  48 45 52 0D 43 4C 45 41  | IS ANOTHER.CLEA|
00000610: 52 49 4E 47 20 4D 41 4E  45 55 56 45 52 2E 0D 0D  |RING MANEUVER...|
00000620: 20 20 20 20 20 20 20 20  20 20 CC C4 C1 20 C9 CE  |          ... ..|
00000630: D4 D4 C9 CD 0D 20 20 20  20 20 20 20 20 20 20 C3  |.....          .|
00000640: CC C9 0D 0D 20 20 20 20  D3 49 4E 43 45 20 54 48  |....    .INCE TH|
00000650: 45 20 49 4E 54 45 52 52  55 50 54 20 44 49 44 4E  |E INTERRUPT DIDN|
00000660: 27 54 20 4F 43 43 55 52  0D 57 45 20 4E 45 45 44  |'T OCCUR.WE NEED|
00000670: 20 54 4F 20 43 4F 4E 54  49 4E 55 45 20 4F 4E 20  | TO CONTINUE ON |
00000680: 57 49 54 48 20 54 48 45  0D 4E 4F 52 4D 41 4C 20  |WITH THE.NORMAL |
00000690: C9 D2 D1 20 52 4F 55 54  49 4E 45 2E 20 20 D4 48  |... ROUTINE.  .H|
000006A0: 49 53 20 49 53 20 4B 4E  4F 57 4E 20 41 53 0D 41  |IS IS KNOWN AS.A|
000006B0: 4E 20 49 4E 44 49 52 45  43 54 20 4A 55 4D 50 2E  |N INDIRECT JUMP.|
000006C0: 0D 0D 20 20 20 20 20 20  20 20 20 20 CA CD D0 20  |..          ... |
000006D0: 28 CF D2 C7 C9 D2 D1 29  0D 0D 0D 0D 0D 20 20 20  |(......).....   |
000006E0: 20 D7 48 45 4E 45 56 45  52 20 59 4F 55 20 57 4F  | .HENEVER YOU WO|
000006F0: 52 4B 20 57 49 54 48 20  52 41 53 54 45 52 0D 49  |RK WITH RASTER.I|
00000700: 4E 54 45 52 52 55 50 54  53 20 54 4F 20 53 50 4C  |NTERRUPTS TO SPL|
00000710: 49 54 20 41 20 53 43 52  45 45 4E 2C 20 59 4F 55  |IT A SCREEN, YOU|
00000720: 0D 57 49 4C 4C 20 41 43  54 55 41 4C 4C 59 20 48  |.WILL ACTUALLY H|
00000730: 41 56 45 20 54 4F 20 48  41 56 45 20 D4 D7 CF 0D  |AVE TO HAVE ....|
00000740: 49 4E 54 45 52 52 55 50  54 53 2E 20 20 D3 41 59  |INTERRUPTS.  .AY|
00000750: 20 59 4F 55 20 57 41 4E  54 20 54 48 45 20 54 4F  | YOU WANT THE TO|
00000760: 50 20 4F 46 0D 54 48 45  20 53 43 52 45 45 4E 20  |P OF.THE SCREEN |
00000770: 42 4C 55 45 20 41 4E 44  20 54 48 45 20 42 4F 54  |BLUE AND THE BOT|
00000780: 54 4F 4D 20 47 52 45 45  4E 2E 0D D9 4F 55 27 4C  |TOM GREEN...OU'L|
00000790: 4C 20 4E 45 45 44 20 54  4F 20 48 41 56 45 20 41  |L NEED TO HAVE A|
000007A0: 20 52 41 53 54 45 52 0D  49 4E 54 45 52 52 55 50  | RASTER.INTERRUP|
000007B0: 54 20 41 54 20 54 48 45  20 42 52 45 41 4B 20 4C  |T AT THE BREAK L|
000007C0: 49 4E 45 20 54 4F 20 D0  CF CB C5 0D 35 33 32 38  |INE TO .....5328|
000007D0: 31 2C 36 20 28 4F 52 20  54 48 45 20 CD CC 20 45  |1,6 (OR THE .. E|
000007E0: 51 55 49 56 41 4C 45 4E  54 29 20 41 4E 44 0D 54  |QUIVALENT) AND.T|
000007F0: 48 45 4E 20 41 4E 4F 54  48 45 52 20 52 41 53 54  |HEN ANOTHER RAST|
00000800: 45 52 20 49 4E 54 45 52  52 55 50 54 20 41 54 20  |ER INTERRUPT AT |
00000810: 54 48 45 0D 42 4F 54 54  4F 4D 20 4F 46 20 54 48  |THE.BOTTOM OF TH|
00000820: 45 20 53 43 52 45 45 4E  20 54 4F 20 D0 CF CB C5  |E SCREEN TO ....|
00000830: 20 35 33 32 38 31 2C 35  0D 42 41 43 4B 20 41 47  | 53281,5.BACK AG|
00000840: 41 49 4E 2E 0D 0D 20 20  20 20 D4 48 45 20 54 57  |AIN...    .HE TW|
00000850: 4F 20 49 4E 54 45 52 52  55 50 54 20 50 4F 49 4E  |O INTERRUPT POIN|
00000860: 54 53 20 49 4E 20 54 48  49 53 0D 44 45 4D 4F 20  |TS IN THIS.DEMO |
00000870: 41 52 45 20 46 4F 55 4E  44 20 49 4E 20 54 48 45  |ARE FOUND IN THE|
00000880: 20 4D 45 4D 4F 52 59 0D  4C 4F 43 41 54 49 4F 4E  | MEMORY.LOCATION|
00000890: 53 20 43 41 4C 4C 45 44  20 CC CF CE D5 CD C2 20  |S CALLED ...... |
000008A0: 28 54 48 45 20 54 4F 50  20 4F 46 0D 54 48 45 20  |(THE TOP OF.THE |
000008B0: 42 41 52 29 20 41 4E 44  20 C8 C9 CE D5 CD C2 20  |BAR) AND ...... |
000008C0: 28 54 48 45 20 42 4F 54  54 4F 4D 29 2E 0D 0D 0D  |(THE BOTTOM)....|
000008D0: 0D 20 20 20 20 D7 45 20  57 49 4C 4C 20 43 4F 4D  |.    .E WILL COM|
000008E0: 50 41 52 45 20 54 48 45  20 43 55 52 52 45 4E 54  |PARE THE CURRENT|
000008F0: 20 53 43 41 4E 0D 4C 49  4E 45 20 28 D2 C1 D3 CC  | SCAN.LINE (....|
00000900: C9 CE 29 20 57 49 54 48  20 54 48 45 53 45 20 54  |..) WITH THESE T|
00000910: 57 4F 20 4E 55 4D 42 45  52 53 0D 54 4F 20 44 45  |WO NUMBERS.TO DE|
00000920: 54 45 52 4D 49 4E 45 20  57 48 45 54 48 45 52 20  |TERMINE WHETHER |
00000930: 54 4F 20 49 4E 54 45 52  52 55 50 54 20 4F 52 0D  |TO INTERRUPT OR.|
00000940: 4E 4F 54 2E 20 20 C9 46  20 D2 C1 D3 CC C9 CE 20  |NOT.  .F ...... |
00000950: 49 53 20 47 52 45 41 54  45 52 20 54 48 41 4E 20  |IS GREATER THAN |
00000960: 4F 52 0D 45 51 55 41 4C  20 54 4F 20 C8 C9 CE D5  |OR.EQUAL TO ....|
00000970: CD C2 20 57 45 20 42 52  41 4E 43 48 20 54 4F 20  |.. WE BRANCH TO |
00000980: C7 D2 C5 C1 D4 C5 D2 2E  0D C9 46 20 4E 4F 54 2C  |..........F NOT,|
00000990: 20 57 45 20 46 41 4C 4C  20 54 48 52 4F 55 47 48  | WE FALL THROUGH|
000009A0: 20 54 4F 20 54 48 45 20  4E 45 58 54 0D 43 4F 4D  | TO THE NEXT.COM|
000009B0: 4D 41 4E 44 2E 0D 0D 20  D6 C9 C3 D2 C1 D3 D4 D2  |MAND... ........|
000009C0: 20 CC C4 C1 20 D2 C1 D3  CC C9 CE 0D 20 20 20 20  | ... .......    |
000009D0: 20 20 20 20 20 20 C3 CD  D0 20 C8 C9 CE D5 CD C2  |      ... ......|
000009E0: 0D 20 20 20 20 20 20 20  20 20 20 C2 C3 D3 20 C7  |.          ... .|
000009F0: D2 C5 C1 D4 C5 D2 0D 0D  20 20 20 20 D2 45 4D 45  |........    .EME|
00000A00: 4D 42 45 52 2C 20 D6 C9  C3 D2 C1 D3 D4 D2 20 49  |MBER, ........ I|
00000A10: 53 20 4F 4E 4C 59 20 43  41 4C 4C 45 44 0D 57 48  |S ONLY CALLED.WH|
00000A20: 45 4E 20 41 20 52 41 53  54 45 52 20 49 4E 54 45  |EN A RASTER INTE|
00000A30: 52 52 55 50 54 20 49 53  20 54 41 4B 49 4E 47 0D  |RRUPT IS TAKING.|
00000A40: 50 4C 41 43 45 20 53 4F  20 49 46 20 54 48 45 20  |PLACE SO IF THE |
00000A50: 41 42 4F 56 45 20 C2 C3  D3 20 49 53 20 4E 4F 54  |ABOVE ... IS NOT|
00000A60: 20 54 52 55 45 0D 54 48  45 4E 20 57 45 20 4B 4E  | TRUE.THEN WE KN|
00000A70: 4F 57 20 54 48 41 54 20  D2 C1 D3 CC C9 CE 20 4D  |OW THAT ...... M|
00000A80: 55 53 54 20 42 45 0D 45  51 55 41 4C 20 54 4F 20  |UST BE.EQUAL TO |
00000A90: CC CF CE D5 CD C2 20 41  4E 44 20 57 45 20 57 41  |...... AND WE WA|
00000AA0: 4E 54 20 54 4F 20 43 48  41 4E 47 45 0D 54 48 45  |NT TO CHANGE.THE|
00000AB0: 20 53 43 52 45 45 4E 20  41 4E 44 20 42 4F 52 44  | SCREEN AND BORD|
00000AC0: 45 52 20 43 4F 4C 4F 52  53 2E 0D 0D 20 20 20 20  |ER COLORS...    |
00000AD0: 20 20 20 20 20 20 CC C4  C1 20 C3 CF CC CF D2 31  |      ... .....1|
00000AE0: 20 3B CE 45 57 20 D3 43  52 45 45 4E 20 43 4F 4C  | ;.EW .CREEN COL|
00000AF0: 4F 52 0D 20 20 20 20 20  20 20 20 20 20 D3 D4 C1  |OR.          ...|
00000B00: 20 C2 C1 C3 CB C7 D2 20  3B 28 35 33 32 38 31 29  | ...... ;(53281)|
00000B10: 0D 20 20 20 20 20 20 20  20 20 20 CC C4 C1 20 C3  |.          ... .|
00000B20: CF CC CF D2 32 20 3B CE  45 57 20 C2 4F 52 44 45  |....2 ;.EW .ORDE|
00000B30: 52 20 43 4F 4C 4F 52 0D  20 20 20 20 20 20 20 20  |R COLOR.        |
00000B40: 20 20 D3 D4 C1 20 C2 CF  D2 C4 C5 D2 20 3B 28 35  |  ... ...... ;(5|
00000B50: 33 32 38 30 29 0D 0D 20  20 20 20 D2 C1 D3 CC C9  |3280)..    .....|
00000B60: CE 20 28 35 33 32 36 36  29 20 48 41 53 20 54 57  |. (53266) HAS TW|
00000B70: 4F 20 44 49 46 46 45 52  45 4E 54 0D 46 55 4E 43  |O DIFFERENT.FUNC|
00000B80: 54 49 4F 4E 53 20 44 45  50 45 4E 44 49 4E 47 20  |TIONS DEPENDING |
00000B90: 55 50 4F 4E 20 57 48 45  54 48 45 52 20 59 4F 55  |UPON WHETHER YOU|
00000BA0: 0D 41 52 45 20 52 45 41  44 49 4E 47 20 49 54 20  |.ARE READING IT |
00000BB0: 4F 52 20 57 52 49 54 49  4E 47 20 54 4F 20 49 54  |OR WRITING TO IT|
00000BC0: 2E 20 20 C9 46 0D 59 4F  55 20 57 52 49 54 45 20  |.  .F.YOU WRITE |
00000BD0: 54 4F 20 49 54 2C 20 59  4F 55 20 41 52 45 20 54  |TO IT, YOU ARE T|
00000BE0: 45 4C 4C 49 4E 47 20 54  48 45 0D C3 D0 D5 20 54  |ELLING THE.... T|
00000BF0: 4F 20 43 41 55 53 45 20  41 4E 20 49 4E 54 45 52  |O CAUSE AN INTER|
00000C00: 52 55 50 54 20 57 48 45  4E 20 54 48 41 54 0D 50  |RUPT WHEN THAT.P|
00000C10: 41 52 54 49 43 55 4C 41  52 20 53 43 41 4E 20 4C  |ARTICULAR SCAN L|
00000C20: 49 4E 45 20 49 53 20 52  45 41 43 48 45 44 2E 0D  |INE IS REACHED..|
00000C30: D4 48 49 53 20 27 4C 41  54 43 48 45 53 27 20 41  |.HIS 'LATCHES' A|
00000C40: 20 42 49 54 2C 20 48 4F  57 45 56 45 52 2C 20 41  | BIT, HOWEVER, A|
00000C50: 4E 44 0D 54 48 45 52 45  46 4F 52 45 20 57 45 20  |ND.THEREFORE WE |
00000C60: 43 41 4E 27 54 20 4A 55  53 54 20 57 52 49 54 45  |CAN'T JUST WRITE|
00000C70: 20 54 4F 0D D2 C1 D3 CC  C9 CE 20 46 4F 52 20 54  | TO....... FOR T|
00000C80: 48 45 20 52 45 53 54 20  4F 46 20 4F 55 52 20 49  |HE REST OF OUR I|
00000C90: 4E 54 45 52 52 55 50 54  0D 52 4F 55 54 49 4E 45  |NTERRUPT.ROUTINE|
00000CA0: 2E 20 20 D7 45 20 48 41  56 45 20 54 4F 20 52 45  |.  .E HAVE TO RE|
00000CB0: 41 44 20 49 54 20 41 4C  53 4F 2C 0D 57 48 49 43  |AD IT ALSO,.WHIC|
00000CC0: 48 20 57 49 4C 4C 20 55  4E 4C 41 54 43 48 20 54  |H WILL UNLATCH T|
00000CD0: 48 45 20 42 49 54 2E 0D  0D 0D 0D 20 20 20 20 C1  |HE BIT.....    .|
00000CE0: 4C 4C 20 4F 46 20 54 48  45 20 41 42 4F 56 45 20  |LL OF THE ABOVE |
00000CF0: 57 49 4C 4C 20 54 41 4B  45 20 50 4C 41 43 45 0D  |WILL TAKE PLACE.|
00000D00: 49 4E 20 54 48 45 20 C5  D8 C9 D4 20 4D 4F 44 55  |IN THE .... MODU|
00000D10: 4C 45 20 42 55 54 20 53  49 4E 43 45 20 C5 D8 C9  |LE BUT SINCE ...|
00000D20: D4 20 49 53 0D 49 4E 56  4F 4B 45 44 20 46 4F 52  |. IS.INVOKED FOR|
00000D30: 20 42 4F 54 48 20 52 41  53 54 45 52 20 49 4E 54  | BOTH RASTER INT|
00000D40: 45 52 52 55 50 54 53 20  57 45 0D 46 49 52 53 54  |ERRUPTS WE.FIRST|
00000D50: 20 53 45 54 20 49 54 20  55 50 20 46 4F 52 20 54  | SET IT UP FOR T|
00000D60: 48 45 20 C8 C9 CE D5 CD  C2 0D 49 4E 54 45 52 52  |HE .......INTERR|
00000D70: 55 50 54 20 54 48 45 4E  20 47 4F 20 54 4F 20 C5  |UPT THEN GO TO .|
00000D80: D8 C9 D4 2E 0D 0D 20 20  20 20 20 20 20 20 20 20  |......          |
00000D90: CC C4 C1 20 C8 C9 CE D5  CD C2 0D 20 20 20 20 20  |... .......     |
00000DA0: 20 20 20 20 20 CA CD D0  20 C5 D8 C9 D4 0D 0D 20  |     ... ...... |
00000DB0: 20 20 20 D4 48 45 20 46  4F 4C 4C 4F 57 49 4E 47  |   .HE FOLLOWING|
00000DC0: 20 49 53 20 54 48 45 20  C7 D2 C5 C1 D4 C5 D2 0D  | IS THE ........|
00000DD0: 4D 4F 44 55 4C 45 20 57  48 49 43 48 20 49 53 20  |MODULE WHICH IS |
00000DE0: 43 41 4C 4C 45 44 20 49  46 20 D2 C1 D3 CC C9 CE  |CALLED IF ......|
00000DF0: 20 49 53 0D 47 52 45 41  54 45 52 20 54 48 41 4E  | IS.GREATER THAN|
00000E00: 20 4F 52 20 45 51 55 41  4C 20 54 4F 20 C8 C9 CE  | OR EQUAL TO ...|
00000E10: D5 CD C2 2E 20 20 D7 45  0D 4E 45 45 44 20 54 4F  |....  .E.NEED TO|
00000E20: 20 52 45 53 54 4F 52 45  20 4F 55 52 20 4F 52 49  | RESTORE OUR ORI|
00000E30: 47 49 4E 41 4C 20 53 43  52 45 45 4E 0D 41 4E 44  |GINAL SCREEN.AND|
00000E40: 20 42 4F 52 44 45 52 20  43 4F 4C 4F 52 53 2E 0D  | BORDER COLORS..|
00000E50: 0D 20 C7 D2 C5 C1 D4 C5  D2 20 20 CC C4 C1 20 D4  |. .......  ... .|
00000E60: C2 C1 C3 CB C7 D2 0D 20  20 20 20 20 20 20 20 20  |.......         |
00000E70: 20 D3 D4 C1 20 C2 C1 C3  CB C7 D2 20 20 20 20 3B  | ... ......    ;|
00000E80: 28 35 33 32 38 31 29 0D  20 20 20 20 20 20 20 20  |(53281).        |
00000E90: 20 20 CC C4 C1 20 D4 C2  CF D2 C4 C5 D2 0D 20 20  |  ... ........  |
00000EA0: 20 20 20 20 20 20 20 20  D3 D4 C1 20 C2 CF D2 C4  |        ... ....|
00000EB0: C5 D2 20 20 20 20 3B 28  35 33 32 38 30 29 0D 0D  |..    ;(53280)..|
00000EC0: 20 20 20 20 D7 45 20 57  41 4E 54 20 54 48 45 20  |    .E WANT THE |
00000ED0: 4E 45 58 54 20 49 4E 54  45 52 52 55 50 54 20 54  |NEXT INTERRUPT T|
00000EE0: 4F 0D 4F 43 43 55 52 20  57 48 45 4E 20 54 48 45  |O.OCCUR WHEN THE|
00000EF0: 20 52 41 53 54 45 52 20  53 43 41 4E 20 4C 49 4E  | RASTER SCAN LIN|
00000F00: 45 20 49 53 0D 45 51 55  41 4C 20 54 4F 20 CC CF  |E IS.EQUAL TO ..|
00000F10: CE D5 CD C2 20 53 4F 20  4C 45 54 27 53 20 57 52  |.... SO LET'S WR|
00000F20: 49 54 45 20 CC CF CE D5  CD C2 0D 54 4F 20 D2 C1  |ITE .......TO ..|
00000F30: D3 CC C9 CE 2E 20 20 D4  48 45 20 57 52 49 54 49  |.....  .HE WRITI|
00000F40: 4E 47 20 50 41 52 54 20  49 53 20 44 4F 4E 45 0D  |NG PART IS DONE.|
00000F50: 49 4E 20 C5 D8 C9 D4 20  28 57 48 49 43 48 20 49  |IN .... (WHICH I|
00000F60: 4D 4D 45 44 49 41 54 45  4C 59 20 46 4F 4C 4C 4F  |MMEDIATELY FOLLO|
00000F70: 57 53 29 0D 53 4F 20 41  4C 4C 20 57 45 20 4E 45  |WS).SO ALL WE NE|
00000F80: 45 44 20 54 4F 20 44 4F  20 49 53 20 4C 4F 41 44  |ED TO DO IS LOAD|
00000F90: 20 2E C1 20 57 49 54 48  0D CC CF CE D5 CD C2 2E  | .. WITH........|
00000FA0: 0D 0D 20 20 20 20 20 20  20 20 20 20 CC C4 C1 20  |..          ... |
00000FB0: CC CF CE D5 CD C2 0D 0D  20 20 20 20 C2 45 46 4F  |........    .EFO|
00000FC0: 52 45 20 57 45 20 52 45  54 55 52 4E 20 54 4F 20  |RE WE RETURN TO |
00000FD0: C2 C1 D3 C9 C3 20 54 48  45 52 45 0D 41 52 45 20  |..... THERE.ARE |
00000FE0: 45 56 45 4E 20 4D 4F 52  45 20 27 48 4F 55 53 45  |EVEN MORE 'HOUSE|
00000FF0: 4B 45 45 50 49 4E 47 27  20 52 4F 55 54 49 4E 45  |KEEPING' ROUTINE|
00001000: 53 0D 54 48 41 54 20 4E  45 45 44 20 54 4F 20 42  |S.THAT NEED TO B|
00001010: 45 20 54 41 4B 45 4E 20  43 41 52 45 20 4F 46 2C  |E TAKEN CARE OF,|
00001020: 20 42 55 54 0D 46 4F 52  54 55 4E 41 54 45 4C 59  | BUT.FORTUNATELY|
00001030: 20 54 48 45 52 45 20 49  53 20 41 4E 20 55 4E 44  | THERE IS AN UND|
00001040: 4F 43 55 4D 45 4E 54 45  44 0D CB C5 D2 CE C1 CC  |OCUMENTED.......|
00001050: 20 52 4F 55 54 49 4E 45  20 54 48 41 54 20 44 4F  | ROUTINE THAT DO|
00001060: 45 53 20 45 56 45 52 59  54 48 49 4E 47 0D 46 4F  |ES EVERYTHING.FO|
00001070: 52 20 55 53 2E 20 20 C9  54 20 52 45 54 55 52 4E  |R US.  .T RETURN|
00001080: 53 20 54 4F 20 54 48 45  20 4E 4F 52 4D 41 4C 0D  |S TO THE NORMAL.|
00001090: 49 4E 54 45 52 52 55 50  54 20 56 45 43 54 4F 52  |INTERRUPT VECTOR|
000010A0: 20 46 4F 4C 4C 4F 57 49  4E 47 20 57 48 45 52 45  | FOLLOWING WHERE|
000010B0: 20 57 45 0D 50 4C 41 43  45 44 20 4F 55 52 20 49  | WE.PLACED OUR I|
000010C0: 4E 54 45 52 52 55 50 54  20 56 45 43 54 4F 52 53  |NTERRUPT VECTORS|
000010D0: 2E 0D C5 D8 C9 D4 20 20  20 20 20 20 D3 D4 C1 20  |......      ... |
000010E0: D2 C1 D3 CC C9 CE 0D 20  20 20 20 20 20 20 20 20  |.......         |
000010F0: 20 CA CD D0 20 24 C6 C5  C2 C3 0D 0D 20 20 20 20  | ... $......    |
00001100: D4 48 45 20 46 4F 4C 4C  4F 57 49 4E 47 20 41 52  |.HE FOLLOWING AR|
00001110: 45 20 27 44 45 46 49 4E  45 44 20 42 59 54 45 53  |E 'DEFINED BYTES|
00001120: 27 0D 4F 52 20 53 54 4F  52 41 47 45 20 41 52 45  |'.OR STORAGE ARE|
00001130: 41 53 20 46 4F 52 20 4F  55 52 20 4F 52 49 47 49  |AS FOR OUR ORIGI|
00001140: 4E 41 4C 0D 56 45 43 54  4F 52 53 20 41 4E 44 20  |NAL.VECTORS AND |
00001150: 56 41 4C 55 45 53 20 54  48 41 54 20 57 45 20 44  |VALUES THAT WE D|
00001160: 4F 4E 27 54 20 57 41 4E  54 0D 54 4F 20 46 4F 52  |ON'T WANT.TO FOR|
00001170: 47 45 54 2E 0D 0D CF D2  C7 C9 D2 D1 20 20 20 20  |GET.........    |
00001180: C4 C6 C2 20 30 30 2C 30  30 0D D4 C2 C1 C3 CB C7  |... 00,00.......|
00001190: D2 20 20 20 C4 C6 C2 20  30 30 0D D4 C2 CF D2 C4  |.   ... 00......|
000011A0: C5 D2 20 20 20 C4 C6 C2  20 30 30 0D 0D 20 20 20  |..   ... 00..   |
000011B0: 20 C1 53 20 59 4F 55 20  43 41 4E 20 53 45 45 2C  | .S YOU CAN SEE,|
000011C0: 20 54 48 45 20 54 48 45  4F 52 59 20 49 53 0D 53  | THE THEORY IS.S|
000011D0: 49 4D 50 4C 45 20 42 55  54 20 54 48 45 52 45 20  |IMPLE BUT THERE |
000011E0: 41 52 45 20 41 20 4C 4F  54 20 4F 46 20 54 48 49  |ARE A LOT OF THI|
000011F0: 4E 47 53 0D 54 4F 20 57  41 54 43 48 20 4F 55 54  |NGS.TO WATCH OUT|
00001200: 20 46 4F 52 20 57 48 45  4E 20 55 53 49 4E 47 20  | FOR WHEN USING |
00001210: 52 41 53 54 45 52 0D 49  4E 54 45 52 52 55 50 54  |RASTER.INTERRUPT|
00001220: 53 2E 20 20 CF 4E 43 45  20 59 4F 55 20 48 41 56  |S.  .NCE YOU HAV|
00001230: 45 20 54 48 45 0D 53 4B  45 4C 45 54 4F 4E 20 4F  |E THE.SKELETON O|
00001240: 46 20 54 48 45 20 43 4F  44 45 20 54 48 4F 55 47  |F THE CODE THOUG|
00001250: 48 2C 20 59 4F 55 20 43  41 4E 0D 44 4F 20 41 4C  |H, YOU CAN.DO AL|
00001260: 4C 20 53 4F 52 54 53 20  4F 46 20 43 4C 45 56 45  |L SORTS OF CLEVE|
00001270: 52 20 53 43 52 45 45 4E  20 4F 52 0D 53 50 52 49  |R SCREEN OR.SPRI|
00001280: 54 45 20 4D 41 4E 49 50  55 4C 41 54 49 4F 4E 53  |TE MANIPULATIONS|
00001290: 20 41 4E 44 20 49 4E 53  45 52 54 20 54 48 45 4D  | AND INSERT THEM|
000012A0: 2E 0D 20 20 20 20 CD 41  4E 59 20 4F 46 20 54 48  |..    .ANY OF TH|
000012B0: 45 20 41 42 4F 56 45 20  54 45 43 48 4E 49 51 55  |E ABOVE TECHNIQU|
000012C0: 45 53 20 41 52 45 0D 45  4C 41 42 4F 52 41 54 45  |ES ARE.ELABORATE|
000012D0: 44 20 55 50 4F 4E 20 49  4E 20 D3 48 45 4C 44 4F  |D UPON IN .HELDO|
000012E0: 4E 20 CC 45 45 4D 4F 4E  27 53 0D 22 CD 41 50 50  |N .EEMON'S.".APP|
000012F0: 49 4E 47 20 54 48 45 20  C3 4F 4D 4D 4F 44 4F 52  |ING THE .OMMODOR|
00001300: 45 20 36 34 22 20 41 4E  44 20 49 4E 20 CA 49 4D  |E 64" AND IN .IM|
00001310: 0D C2 55 54 54 45 52 46  49 45 4C 44 27 53 20 41  |..UTTERFIELD'S A|
00001320: 52 54 49 43 4C 45 53 20  22 D3 50 4C 49 54 0D D3  |RTICLES ".PLIT..|
00001330: 43 52 45 45 4E 53 22 20  41 4E 44 20 22 D3 4F 4E  |CREENS" AND ".ON|
00001340: 20 4F 46 20 D3 50 4C 49  54 20 D3 43 52 45 45 4E  | OF .PLIT .CREEN|
00001350: 53 22 20 49 4E 0D 22 C3  4F 4D 50 55 54 45 21 27  |S" IN.".OMPUTE!'|
00001360: 53 20 C6 49 52 53 54 20  C2 4F 4F 4B 20 4F 46 20  |S .IRST .OOK OF |
00001370: 54 48 45 20 C3 36 34 22  2E 0D C7 4F 4F 44 20 52  |THE .64"...OOD R|
00001380: 45 41 44 49 4E 47 2E 0D  0D 20 20 20 20 D4 48 45  |EADING...    .HE|
00001390: 20 53 4F 55 52 43 45 20  43 4F 44 45 20 46 4F 52  | SOURCE CODE FOR|
000013A0: 20 54 48 45 20 52 41 53  54 45 52 0D 49 4E 54 45  | THE RASTER.INTE|
000013B0: 52 52 55 50 54 20 52 4F  55 54 49 4E 45 20 49 4E  |RRUPT ROUTINE IN|
000013C0: 20 CD 45 52 4C 49 4E 20  46 4F 52 4D 41 54 20 49  | .ERLIN FORMAT I|
000013D0: 53 0D 4F 4E 20 D3 49 44  45 20 CF 4E 45 20 4F 46  |S.ON .IDE .NE OF|
000013E0: 20 CC CF C1 C4 D3 D4 C1  D2 20 23 35 30 20 55 4E  | ........ #50 UN|
000013F0: 44 45 52 20 54 48 45 0D  46 49 4C 45 4E 41 4D 45  |DER THE.FILENAME|
00001400: 20 22 52 41 53 54 45 52  2E 53 22 2E 20 20 D4 4F  | "RASTER.S".  .O|
00001410: 20 53 45 45 20 54 48 45  20 44 45 4D 4F 0D 49 4E  | SEE THE DEMO.IN|
00001420: 20 41 43 54 49 4F 4E 2C  20 43 48 4F 4F 53 45 20  | ACTION, CHOOSE |
00001430: D2 55 4E 20 C9 54 20 46  52 4F 4D 20 54 48 45 0D  |.UN .T FROM THE.|
00001440: 4D 45 4E 55 20 46 4F 52  20 54 48 49 53 20 50 41  |MENU FOR THIS PA|
00001450: 52 54 20 4F 46 20 DA C5  D2 CF 20 D0 C1 C7 C5 3A  |RT OF .... ....:|
00001460: 20 C2 C9 D4 D3 2E 0D 0D  20 20 20 20 20 20 20 20  | .......        |
00001470: 2A 2A 2A 2A 20 C5 4E 44  20 4F 46 20 D4 45 58 54  |**** .ND OF .EXT|
00001480: 20 2A 2A 2A 2A 0D                                 | ****.          |
..^U:ZERO.   BITS:  RASTER INTERRUPTS, P
ART 2..             BY JIM ROW..    IF B
IT 0 OF INTENA IS SET THE.COMPUTER KNOWS
 THAT IT'S EXPECTED TO.PERFORM A RASTER 
COMPARE.  THE.NUMBERS TO BE COMPARED ARE
 THE.CURRENT SCAN LINE AND RASLIN.  WHEN
.THESE TWO ARE EQUAL AN INTERRUPT WILL.O
CCUR AND THE PROGRAM WILL GO TO THE.ADDR
ESS FOUND IN IRQVEC AND EXECUTE.WHATEVER
 IS THERE (IN THIS CASE,.NEWIRQ)...    S
INCE INTENA IS ALSO USED FOR.OTHER INTER
RUPTS, WE WILL NEED TO.MAKE SURE THAT AL
L OTHER BITS ARE.OFF..          LDA #01 
     ;BIT #0.          STA INTENA..    T
HE NEXT STEP IS TO CLEAR ALL.INTERRUPTS 
AND THEN RETURN TO BASIC...          CLI
.          RTS..    EVERYTHING IS NOW SE
T FOR OUR.FIRST RASTER INTERRUPT.  WHEN 
IT.OCCURS WE WILL CHANGE RASLIN TO CHECK
.FOR OUR NEXT INTERRUPT...    MACHINE LA
NGUAGE IS A 'MODULAR'.LANGUAGE.  WHEN YO
U ENTER ALL OF THE.ABOVE CODE INTO YOUR 
ASSEMBLER YOU'LL.NOTICE THAT IT'S BASICA
LLY ONE LOOP.THAT CALLS MODULES AS NEEDE
D..    THE FOLLOWING MODULE IS THE.ROUTI
NE THAT CHECKS IF AN INTERRUPT.HAS OCCUR
RED.  THE FIRST COUPLE OF.COMMANDS MAY L
OOK A LITTLE STRANGE.AND USELESS, BUT TH
EY ARE USED BY THE.CPU FOR RESETTING CER
TAIN LATCHES.THAT NEED TO BE CLEARED.  I
F THE.INTERRUPT HAS OCCURRED THE HIGH BI
T.OF INTSTA WILL BE SET AND THE PROGRAM.
WILL BRANCH TO VICRASTR... NEWIRQ   LDA 
INTSTA    ;INTSTA =.          STA INTSTA
    ;INTERRUPT.          BMI VICRASTR  ;
STATUS......    IF THE HIGH BIT WAS NOT 
SET (OUR.INTERRUPT DID NOT OCCUR) WE NEE
D TO.LOAD .A WITH INTTIM AND CLEAR ALL.I
NTERRUPTS.  THIS IS ANOTHER.CLEARING MAN
EUVER...          LDA INTTIM.          C
LI..    SINCE THE INTERRUPT DIDN'T OCCUR
.WE NEED TO CONTINUE ON WITH THE.NORMAL 
IRQ ROUTINE.  THIS IS KNOWN AS.AN INDIRE
CT JUMP...          JMP (ORGIRQ).....   
 WHENEVER YOU WORK WITH RASTER.INTERRUPT
S TO SPLIT A SCREEN, YOU.WILL ACTUALLY H
AVE TO HAVE TWO.INTERRUPTS.  SAY YOU WAN
T THE TOP OF.THE SCREEN BLUE AND THE BOT
TOM GREEN..YOU'LL NEED TO HAVE A RASTER.
INTERRUPT AT THE BREAK LINE TO POKE.5328
1,6 (OR THE ML EQUIVALENT) AND.THEN ANOT
HER RASTER INTERRUPT AT THE.BOTTOM OF TH
E SCREEN TO POKE 53281,5.BACK AGAIN...  
  THE TWO INTERRUPT POINTS IN THIS.DEMO 
ARE FOUND IN THE MEMORY.LOCATIONS CALLED
 LONUMB (THE TOP OF.THE BAR) AND HINUMB 
(THE BOTTOM).....    WE WILL COMPARE THE
 CURRENT SCAN.LINE (RASLIN) WITH THESE T
WO NUMBERS.TO DETERMINE WHETHER TO INTER
RUPT OR.NOT.  IF RASLIN IS GREATER THAN 
OR.EQUAL TO HINUMB WE BRANCH TO GREATER.
.IF NOT, WE FALL THROUGH TO THE NEXT.COM
MAND... VICRASTR LDA RASLIN.          CM
P HINUMB.          BCS GREATER..    REME
MBER, VICRASTR IS ONLY CALLED.WHEN A RAS
TER INTERRUPT IS TAKING.PLACE SO IF THE 
ABOVE BCS IS NOT TRUE.THEN WE KNOW THAT 
RASLIN MUST BE.EQUAL TO LONUMB AND WE WA
NT TO CHANGE.THE SCREEN AND BORDER COLOR
S...          LDA COLOR1 ;NEW SCREEN COL
OR.          STA BACKGR ;(53281).       
   LDA COLOR2 ;NEW BORDER COLOR.        
  STA BORDER ;(53280)..    RASLIN (53266
) HAS TWO DIFFERENT.FUNCTIONS DEPENDING 
UPON WHETHER YOU.ARE READING IT OR WRITI
NG TO IT.  IF.YOU WRITE TO IT, YOU ARE T
ELLING THE.CPU TO CAUSE AN INTERRUPT WHE
N THAT.PARTICULAR SCAN LINE IS REACHED..
THIS 'LATCHES' A BIT, HOWEVER, AND.THERE
FORE WE CAN'T JUST WRITE TO.RASLIN FOR T
HE REST OF OUR INTERRUPT.ROUTINE.  WE HA
VE TO READ IT ALSO,.WHICH WILL UNLATCH T
HE BIT.....    ALL OF THE ABOVE WILL TAK
E PLACE.IN THE EXIT MODULE BUT SINCE EXI
T IS.INVOKED FOR BOTH RASTER INTERRUPTS 
WE.FIRST SET IT UP FOR THE HINUMB.INTERR
UPT THEN GO TO EXIT...          LDA HINU
MB.          JMP EXIT..    THE FOLLOWING
 IS THE GREATER.MODULE WHICH IS CALLED I
F RASLIN IS.GREATER THAN OR EQUAL TO HIN
UMB.  WE.NEED TO RESTORE OUR ORIGINAL SC
REEN.AND BORDER COLORS... GREATER  LDA T
BACKGR.          STA BACKGR    ;(53281).
          LDA TBORDER.          STA BORD
ER    ;(53280)..    WE WANT THE NEXT INT
ERRUPT TO.OCCUR WHEN THE RASTER SCAN LIN
E IS.EQUAL TO LONUMB SO LET'S WRITE LONU
MB.TO RASLIN.  THE WRITING PART IS DONE.
IN EXIT (WHICH IMMEDIATELY FOLLOWS).SO A
LL WE NEED TO DO IS LOAD .A WITH.LONUMB.
..          LDA LONUMB..    BEFORE WE RE
TURN TO BASIC THERE.ARE EVEN MORE 'HOUSE
KEEPING' ROUTINES.THAT NEED TO BE TAKEN 
CARE OF, BUT.FORTUNATELY THERE IS AN UND
OCUMENTED.KERNAL ROUTINE THAT DOES EVERY
THING.FOR US.  IT RETURNS TO THE NORMAL.
INTERRUPT VECTOR FOLLOWING WHERE WE.PLAC
ED OUR INTERRUPT VECTORS..EXIT      STA 
RASLIN.          JMP $FEBC..    THE FOLL
OWING ARE 'DEFINED BYTES'.OR STORAGE ARE
AS FOR OUR ORIGINAL.VECTORS AND VALUES T
HAT WE DON'T WANT.TO FORGET...ORGIRQ    
DFB 00,00.TBACKGR   DFB 00.TBORDER   DFB
 00..    AS YOU CAN SEE, THE THEORY IS.S
IMPLE BUT THERE ARE A LOT OF THINGS.TO W
ATCH OUT FOR WHEN USING RASTER.INTERRUPT
S.  ONCE YOU HAVE THE.SKELETON OF THE CO
DE THOUGH, YOU CAN.DO ALL SORTS OF CLEVE
R SCREEN OR.SPRITE MANIPULATIONS AND INS
ERT THEM..    MANY OF THE ABOVE TECHNIQU
ES ARE.ELABORATED UPON IN SHELDON LEEMON
'S."MAPPING THE COMMODORE 64" AND IN JIM
.BUTTERFIELD'S ARTICLES "SPLIT.SCREENS" 
AND "SON OF SPLIT SCREENS" IN."COMPUTE!'
S FIRST BOOK OF THE C64"..GOOD READING..
.    THE SOURCE CODE FOR THE RASTER.INTE
RRUPT ROUTINE IN MERLIN FORMAT IS.ON SID
E ONE OF LOADSTAR #50 UNDER THE.FILENAME
 "RASTER.S".  TO SEE THE DEMO.IN ACTION,
 CHOOSE RUN IT FROM THE.MENU FOR THIS PA
RT OF ZERO PAGE: BITS...        **** END
 OF TEXT ****.
C64 Preview

> CLICK IMAGE PREVIEW FOR FULL MODAL