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

T.BITS

FILE INFORMATION

FILENAME(S): T.BITS

FILE TYPE(S): PRG

FILE SIZE: 4.6K

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

APPEARS ON: 1 disk(s)

FILE HASH

de7d8e53f3f5204db41e9299ff31996ba28d94d14aa97b17f29281fb83a70d7f

FOUND ON DISKS (1 DISKS)

DISK TITLE FILENAME FILE TYPE COLLECTION TRACK SECTOR ACTIONS
LOADSTAR 56 S 1 T.BITS PRG Sailor, Ganheden 9 0 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 D4 48 45  20 CD 41 47 49 43 20 C2  |...: .HE .AGIC .|
00000020: 45 48 49 4E 44 20 CD C1  C7 C9 C3 0D 0D 20 20 20  |EHIND .......   |
00000030: 20 20 20 20 20 20 20 20  42 59 20 CD 49 4B 45 20  |        BY .IKE |
00000040: CD 41 59 4E 41 52 44 0D  0D 20 20 20 20 D7 45 20  |.AYNARD..    .E |
00000050: 52 45 43 45 4E 54 4C 59  20 52 45 43 45 49 56 45  |RECENTLY RECEIVE|
00000060: 44 20 41 20 4C 45 54 54  45 52 0D 41 53 4B 49 4E  |D A LETTER.ASKIN|
00000070: 47 20 48 4F 57 20 57 45  20 42 4F 4F 54 45 44 20  |G HOW WE BOOTED |
00000080: CC CF C1 C4 D3 D4 C1 D2  20 36 34 0D 46 52 4F 4D  |........ 64.FROM|
00000090: 20 57 49 54 48 49 4E 20  54 48 45 20 31 32 38 20  | WITHIN THE 128 |
000000A0: 4D 45 4E 55 20 28 31 32  38 20 4D 4F 44 45 29 2E  |MENU (128 MODE).|
000000B0: 0D D7 45 4C 4C 2C 20 54  48 45 20 41 4E 53 57 45  |..ELL, THE ANSWE|
000000C0: 52 20 49 53 20 50 55 52  45 20 41 4E 44 20 53 49  |R IS PURE AND SI|
000000D0: 4D 50 4C 45 20 2D 2D 0D  4D 41 47 49 43 3B 20 54  |MPLE --.MAGIC; T|
000000E0: 48 41 54 20 49 53 2C 20  22 CD C1 C7 C9 C3 20 C9  |HAT IS, "..... .|
000000F0: C9 22 2E 20 20 D4 48 49  53 0D 4D 41 43 48 49 4E  |.".  .HIS.MACHIN|
00000100: 45 20 4C 41 4E 47 55 41  47 45 20 52 4F 55 54 49  |E LANGUAGE ROUTI|
00000110: 4E 45 20 49 53 20 4C 4F  41 44 45 44 0D 49 4E 54  |NE IS LOADED.INT|
00000120: 4F 20 4D 45 4D 4F 52 59  20 41 54 20 33 32 37 36  |O MEMORY AT 3276|
00000130: 38 20 57 48 45 4E 20 54  48 45 20 22 C3 D4 D2 CC  |8 WHEN THE "....|
00000140: 20 C5 22 0D 4F 50 54 49  4F 4E 20 49 53 20 53 45  | .".OPTION IS SE|
00000150: 4C 45 43 54 45 44 20 46  52 4F 4D 20 54 48 45 20  |LECTED FROM THE |
00000160: 31 32 38 0D 4D 45 4E 55  2E 20 20 C1 46 54 45 52  |128.MENU.  .FTER|
00000170: 20 54 48 45 20 CC CF C1  C4 2C 20 57 45 20 22 C7  | THE ...., WE ".|
00000180: CF 20 36 34 22 20 54 4F  0D 47 45 54 20 54 4F 20  |. 64" TO.GET TO |
00000190: 54 48 45 20 36 34 20 4D  4F 44 45 20 57 48 45 52  |THE 64 MODE WHER|
000001A0: 45 20 CD C1 C7 C9 C3 20  C9 C9 20 49 53 0D 50 41  |E ..... .. IS.PA|
000001B0: 54 49 45 4E 54 4C 59 20  57 41 49 54 49 4E 47 20  |TIENTLY WAITING |
000001C0: 54 4F 20 42 4F 4F 54 20  CC CF C1 C4 D3 D4 C1 D2  |TO BOOT ........|
000001D0: 2E 0D 0D 0D 0D 0D 20 20  20 20 D9 4F 55 20 53 45  |......    .OU SE|
000001E0: 45 2C 20 4F 4E 45 20 4F  46 20 54 48 45 20 46 49  |E, ONE OF THE FI|
000001F0: 52 53 54 20 54 48 49 4E  47 53 0D 54 48 45 20 C3  |RST THINGS.THE .|
00000200: 2D 36 34 20 44 4F 45 53  20 57 48 45 4E 20 49 54  |-64 DOES WHEN IT|
00000210: 20 42 4F 4F 54 53 20 55  50 20 49 53 0D 43 48 45  | BOOTS UP IS.CHE|
00000220: 43 4B 20 46 4F 52 20 41  4E 20 41 55 54 4F 53 54  |CK FOR AN AUTOST|
00000230: 41 52 54 20 43 41 52 54  52 49 44 47 45 2E 20 20  |ART CARTRIDGE.  |
00000240: D4 48 45 0D 43 4F 4D 50  55 54 45 52 20 44 4F 45  |.HE.COMPUTER DOE|
00000250: 53 20 54 48 49 53 20 42  59 20 43 48 45 43 4B 49  |S THIS BY CHECKI|
00000260: 4E 47 20 54 48 45 20 D2  CF CD 0D 41 44 44 52 45  |NG THE ....ADDRE|
00000270: 53 53 45 53 20 33 32 37  37 32 2D 33 32 37 37 36  |SSES 32772-32776|
00000280: 20 28 46 52 4F 4D 20 54  48 45 0D 43 41 52 54 52  | (FROM THE.CARTR|
00000290: 49 44 47 45 29 20 46 4F  52 20 54 48 45 20 C1 D3  |IDGE) FOR THE ..|
000002A0: C3 C9 C9 20 43 48 41 52  41 43 54 45 52 53 0D 22  |... CHARACTERS."|
000002B0: C3 C2 CD 38 30 22 2E 20  20 C9 46 20 54 48 45 53  |...80".  .F THES|
000002C0: 45 20 43 48 41 52 41 43  54 45 52 53 20 41 52 45  |E CHARACTERS ARE|
000002D0: 0D 46 4F 55 4E 44 2C 20  49 54 20 45 58 45 43 55  |.FOUND, IT EXECU|
000002E0: 54 45 53 20 54 48 45 20  CD CC 20 52 4F 55 54 49  |TES THE .. ROUTI|
000002F0: 4E 45 0D 50 4F 49 4E 54  45 44 20 54 4F 20 42 59  |NE.POINTED TO BY|
00000300: 20 54 48 45 20 56 45 43  54 4F 52 20 41 54 0D 33  | THE VECTOR AT.3|
00000310: 32 37 36 38 2F 33 32 37  36 39 20 28 4C 4F 57 20  |2768/32769 (LOW |
00000320: 42 59 54 45 2F 48 49 47  48 20 42 59 54 45 29 2E  |BYTE/HIGH BYTE).|
00000330: 0D D4 48 49 53 20 49 53  20 48 4F 57 20 41 20 43  |..HIS IS HOW A C|
00000340: 41 52 54 52 49 44 47 45  20 43 41 4E 20 49 4E 53  |ARTRIDGE CAN INS|
00000350: 54 41 4E 54 4C 59 0D 54  41 4B 45 20 4F 56 45 52  |TANTLY.TAKE OVER|
00000360: 20 54 48 45 20 43 4F 4D  50 55 54 45 52 2E 0D 0D  | THE COMPUTER...|
00000370: 20 20 20 20 C2 55 54 20  59 4F 55 20 44 4F 4E 27  |    .UT YOU DON'|
00000380: 54 20 48 41 56 45 20 54  4F 20 48 41 56 45 20 41  |T HAVE TO HAVE A|
00000390: 0D 43 41 52 54 52 49 44  47 45 20 50 52 45 53 45  |.CARTRIDGE PRESE|
000003A0: 4E 54 20 54 4F 20 54 41  4B 45 20 41 44 56 41 4E  |NT TO TAKE ADVAN|
000003B0: 54 41 47 45 0D 4F 46 20  54 48 49 53 20 C3 2D 36  |TAGE.OF THIS .-6|
000003C0: 34 20 46 45 41 54 55 52  45 2E 20 20 D9 4F 55 20  |4 FEATURE.  .OU |
000003D0: 43 41 4E 20 53 49 4D 50  4C 59 0D 50 55 54 20 22  |CAN SIMPLY.PUT "|
000003E0: C3 C2 CD 38 30 22 20 49  4E 20 D2 C1 CD 20 41 54  |...80" IN ... AT|
000003F0: 20 33 32 37 37 32 2D 33  32 37 37 36 0D 41 4E 44  | 32772-32776.AND|
00000400: 20 52 45 53 45 54 20 54  48 45 20 43 4F 4D 50 55  | RESET THE COMPU|
00000410: 54 45 52 2E 0D 0D 20 20  20 20 D4 48 45 20 C3 2D  |TER...    .HE .-|
00000420: 36 34 20 41 4C 53 4F 20  43 48 45 43 4B 53 20 33  |64 ALSO CHECKS 3|
00000430: 32 37 37 32 2D 33 32 37  37 36 0D 46 4F 52 20 22  |2772-32776.FOR "|
00000440: C3 C2 CD 38 30 22 20 57  48 45 4E 20 54 48 45 20  |...80" WHEN THE |
00000450: D2 C5 D3 D4 CF D2 C5 20  4B 45 59 20 49 53 0D 50  |....... KEY IS.P|
00000460: 52 45 53 53 45 44 20 28  57 48 49 43 48 20 43 52  |RESSED (WHICH CR|
00000470: 45 41 54 45 53 20 41 20  CE 4F 4E 2D CD 41 53 4B  |EATES A .ON-.ASK|
00000480: 41 42 4C 45 0D C9 4E 54  45 52 52 55 50 54 29 2E  |ABLE..NTERRUPT).|
00000490: 20 20 C9 46 20 54 48 45  20 43 48 41 52 41 43 54  |  .F THE CHARACT|
000004A0: 45 52 53 20 41 52 45 0D  46 4F 55 4E 44 2C 20 49  |ERS ARE.FOUND, I|
000004B0: 54 20 45 58 45 43 55 54  45 53 20 54 48 45 20 CD  |T EXECUTES THE .|
000004C0: CC 20 52 4F 55 54 49 4E  45 0D 50 4F 49 4E 54 45  |. ROUTINE.POINTE|
000004D0: 44 20 54 4F 20 42 59 20  54 48 45 20 56 45 43 54  |D TO BY THE VECT|
000004E0: 4F 52 20 41 54 0D 33 32  37 37 30 2F 33 32 37 37  |OR AT.32770/3277|
000004F0: 31 2E 20 20 C2 55 54 20  53 49 4E 43 45 20 57 45  |1.  .UT SINCE WE|
00000500: 20 41 52 45 20 4F 4E 4C  59 0D 43 4F 4E 43 45 52  | ARE ONLY.CONCER|
00000510: 4E 45 44 20 57 49 54 48  20 54 48 45 20 41 55 54  |NED WITH THE AUT|
00000520: 4F 53 54 41 52 54 20 56  45 43 54 4F 52 0D 41 54  |OSTART VECTOR.AT|
00000530: 20 33 32 37 36 38 2F 33  32 37 36 39 20 54 48 45  | 32768/32769 THE|
00000540: 52 45 27 53 20 4E 4F 20  4E 45 45 44 20 54 4F 0D  |RE'S NO NEED TO.|
00000550: 41 4C 54 45 52 20 33 32  37 37 30 2F 33 32 37 37  |ALTER 32770/3277|
00000560: 31 20 49 4E 20 CD C1 C7  C9 C3 20 C9 C9 2E 0D 0D  |1 IN ..... .....|
00000570: 20 20 20 20 CE 4F 57 20  54 48 41 54 20 57 45 20  |    .OW THAT WE |
00000580: 4B 4E 4F 57 20 57 48 41  54 20 54 48 45 20 C3 2D  |KNOW WHAT THE .-|
00000590: 36 34 0D 44 4F 45 53 20  4F 4E 20 42 4F 4F 54 2D  |64.DOES ON BOOT-|
000005A0: 55 50 53 20 28 41 4E 44  20 CE CD C9 27 53 29 2C  |UPS (AND ...'S),|
000005B0: 20 4C 45 54 27 53 0D 54  41 4B 45 20 41 20 4C 4F  | LET'S.TAKE A LO|
000005C0: 4F 4B 20 41 54 20 54 48  45 20 4D 41 47 49 43 41  |OK AT THE MAGICA|
000005D0: 4C 20 52 4F 55 54 49 4E  45 0D 54 48 41 54 20 48  |L ROUTINE.THAT H|
000005E0: 4F 4F 4B 53 20 45 56 45  52 59 54 48 49 4E 47 20  |OOKS EVERYTHING |
000005F0: 54 4F 47 45 54 48 45 52  2E 0D 0D 0D 0D 0D 20 20  |TOGETHER......  |
00000600: 20 20 D4 48 45 20 46 4F  4C 4C 4F 57 49 4E 47 20  |  .HE FOLLOWING |
00000610: C5 D1 D5 27 53 20 53 48  4F 57 20 54 48 45 0D 41  |...'S SHOW THE.A|
00000620: 44 44 52 45 53 53 20 4F  46 20 45 41 43 48 20 4C  |DDRESS OF EACH L|
00000630: 41 42 45 4C 2E 0D 0D 0D  20 20 20 20 20 20 20 C9  |ABEL....       .|
00000640: CF C9 CE C9 D4 20 20 20  C5 D1 D5 20 36 35 34 31  |.....   ... 6541|
00000650: 32 0D 20 20 20 20 20 20  20 D2 C1 CD D4 C1 D3 20  |2.       ...... |
00000660: 20 20 C5 D1 D5 20 36 35  34 31 35 0D 20 20 20 20  |  ... 65415.    |
00000670: 20 20 20 D2 C5 D3 D4 CF  D2 20 20 20 C5 D1 D5 20  |   ......   ... |
00000680: 36 35 34 31 38 0D 20 20  20 20 20 20 20 C3 C9 CE  |65418.       ...|
00000690: D4 20 20 20 20 20 C5 D1  D5 20 36 35 34 30 39 0D  |.     ... 65409.|
000006A0: 20 20 20 20 20 20 20 C3  CF D0 D9 D6 C5 C3 20 20  |       .......  |
000006B0: C5 D1 D5 20 35 38 34 35  31 0D 20 20 20 20 20 20  |... 58451.      |
000006C0: 20 C9 CE C9 D4 20 20 20  20 20 C5 D1 D5 20 35 38  | ....     ... 58|
000006D0: 33 30 33 0D 20 20 20 20  20 20 20 C3 C8 D2 CF D5  |303.       .....|
000006E0: D4 20 20 20 C5 D1 D5 20  36 35 34 39 30 0D 20 20  |.   ... 65490.  |
000006F0: 20 20 20 20 20 CB C5 D9  C2 D5 C6 20 20 20 C5 D1  |     ......   ..|
00000700: D5 20 36 33 31 0D 20 20  20 20 20 20 20 CE C4 D8  |. 631.       ...|
00000710: 20 20 20 20 20 20 C5 D1  D5 20 31 39 38 0D 20 20  |      ... 198.  |
00000720: 20 20 20 20 20 D2 C5 C1  C4 D9 20 20 20 20 C5 D1  |     .....    ..|
00000730: D5 20 34 32 31 30 30 0D  20 20 20 20 20 20 20 C1  |. 42100.       .|
00000740: D5 D4 CF D3 D4 D2 D4 20  C5 D1 D5 20 33 32 37 37  |....... ... 3277|
00000750: 32 0D 0D 20 20 20 20 C1  53 20 41 4C 57 41 59 53  |2..    .S ALWAYS|
00000760: 2C 20 54 48 45 20 43 4F  44 45 20 54 48 41 54 20  |, THE CODE THAT |
00000770: 46 4F 4C 4C 4F 57 53 0D  49 53 20 50 52 45 53 45  |FOLLOWS.IS PRESE|
00000780: 4E 54 45 44 20 49 4E 20  CD C5 D2 CC C9 CE 20 46  |NTED IN ...... F|
00000790: 4F 52 4D 41 54 2E 0D 0D  20 20 20 20 C1 53 20 49  |ORMAT...    .S I|
000007A0: 53 2C 20 54 48 49 53 20  52 4F 55 54 49 4E 45 20  |S, THIS ROUTINE |
000007B0: 57 49 4C 4C 20 4F 4E 4C  59 0D 57 4F 52 4B 20 57  |WILL ONLY.WORK W|
000007C0: 48 45 4E 20 41 53 53 45  4D 42 4C 45 44 20 41 54  |HEN ASSEMBLED AT|
000007D0: 20 33 32 37 36 38 2E 20  20 D7 48 45 4E 0D 41 53  | 32768.  .HEN.AS|
000007E0: 53 45 4D 42 4C 45 44 2C  20 54 48 45 20 46 4F 4C  |SEMBLED, THE FOL|
000007F0: 4C 4F 57 49 4E 47 20 54  57 4F 20 C4 45 C6 49 4E  |LOWING TWO .E.IN|
00000800: 45 44 0D C2 59 54 45 53  20 41 52 45 20 50 55 54  |ED..YTES ARE PUT|
00000810: 20 41 54 20 33 32 37 36  38 2F 33 32 37 36 39 2C  | AT 32768/32769,|
00000820: 20 54 48 45 0D 41 55 54  4F 53 54 41 52 54 20 56  | THE.AUTOSTART V|
00000830: 45 43 54 4F 52 2E 20 20  D4 48 45 20 22 23 3C 22  |ECTOR.  .HE "#<"|
00000840: 20 41 4E 44 20 22 23 3E  22 0D 54 45 4C 4C 53 20  | AND "#>".TELLS |
00000850: CD C5 D2 CC C9 CE 20 54  4F 20 55 53 45 20 54 48  |...... TO USE TH|
00000860: 45 20 4C 4F 57 20 41 4E  44 0D 48 49 47 48 20 42  |E LOW AND.HIGH B|
00000870: 59 54 45 53 20 4F 46 20  54 48 45 20 41 44 44 52  |YTES OF THE ADDR|
00000880: 45 53 53 20 4F 46 20 D3  D4 C1 D2 D4 2E 0D 0D 20  |ESS OF ........ |
00000890: 20 20 20 20 20 20 20 20  20 20 20 C4 C6 C2 20 23  |           ... #|
000008A0: 3C D3 D4 C1 D2 D4 0D 20  20 20 20 20 20 20 20 20  |<......         |
000008B0: 20 20 20 C4 C6 C2 20 23  3E D3 D4 C1 D2 D4 0D 0D  |   ... #>.......|
000008C0: 20 20 20 20 D4 48 45 20  4E 45 58 54 20 54 57 4F  |    .HE NEXT TWO|
000008D0: 20 C4 C6 C2 27 53 20 41  52 45 20 46 4F 52 20 54  | ...'S ARE FOR T|
000008E0: 48 45 0D CE CD C9 20 41  4E 44 20 41 52 45 20 4E  |HE.... AND ARE N|
000008F0: 4F 54 20 55 53 45 44 2E  20 20 C8 4F 57 45 56 45  |OT USED.  .OWEVE|
00000900: 52 2C 20 57 45 0D 53 54  49 4C 4C 20 4E 45 45 44  |R, WE.STILL NEED|
00000910: 20 54 4F 20 50 55 54 20  53 4F 4D 45 20 56 41 4C  | TO PUT SOME VAL|
00000920: 55 45 20 54 48 45 52 45  20 54 4F 0D 54 41 4B 45  |UE THERE TO.TAKE|
00000930: 20 55 50 20 53 50 41 43  45 2E 0D 0D 20 20 20 20  | UP SPACE...    |
00000940: 20 20 20 20 20 20 20 20  C4 C6 C2 20 23 30 30 0D  |        ... #00.|
00000950: 20 20 20 20 20 20 20 20  20 20 20 20 C4 C6 C2 20  |            ... |
00000960: 23 30 30 0D 0D 20 20 20  20 D4 48 45 20 4E 45 58  |#00..    .HE NEX|
00000970: 54 20 35 20 42 59 54 45  53 20 41 52 45 20 54 48  |T 5 BYTES ARE TH|
00000980: 45 20 C1 D3 C3 C9 C9 0D  45 51 55 49 56 41 4C 45  |E ......EQUIVALE|
00000990: 4E 54 53 20 54 4F 20 22  C3 C2 CD 38 30 22 2E 20  |NTS TO "...80". |
000009A0: 20 CE 4F 54 45 20 54 48  41 54 20 54 48 45 0D C3  | .OTE THAT THE..|
000009B0: 2C 20 C2 2C 20 41 4E 44  20 CD 20 41 52 45 20 53  |, ., AND . ARE S|
000009C0: 48 49 46 54 45 44 20 43  48 41 52 41 43 54 45 52  |HIFTED CHARACTER|
000009D0: 53 2E 0D 0D 20 20 20 20  20 20 20 C4 C6 C2 20 31  |S...       ... 1|
000009E0: 39 35 2C 31 39 34 2C 32  30 35 2C 35 36 2C 34 38  |95,194,205,56,48|
000009F0: 0D 0D 20 20 20 20 D4 48  45 20 46 4F 4C 4C 4F 57  |..    .HE FOLLOW|
00000A00: 49 4E 47 20 53 49 58 20  CA D3 D2 27 53 20 48 41  |ING SIX ...'S HA|
00000A10: 4E 44 4C 45 20 41 4C 4C  0D 4F 46 20 54 48 45 20  |NDLE ALL.OF THE |
00000A20: 49 4E 49 54 49 41 4C 49  5A 41 54 49 4F 4E 20 52  |INITIALIZATION R|
00000A30: 4F 55 54 49 4E 45 53 20  54 48 41 54 0D 57 45 20  |OUTINES THAT.WE |
00000A40: 49 4E 54 45 52 52 55 50  54 45 44 2E 20 20 C9 46  |INTERRUPTED.  .F|
00000A50: 20 57 45 20 4A 55 53 54  20 46 45 4C 4C 0D 54 48  | WE JUST FELL.TH|
00000A60: 52 4F 55 47 48 54 20 54  4F 20 C2 C1 D3 C9 C3 20  |ROUGHT TO ..... |
00000A70: 42 45 46 4F 52 45 20 45  58 45 43 55 54 49 4E 47  |BEFORE EXECUTING|
00000A80: 0D 54 48 45 53 45 20 52  4F 55 54 49 4E 45 53 2C  |.THESE ROUTINES,|
00000A90: 20 41 20 4C 4F 43 4B 2D  55 50 20 57 4F 55 4C 44  | A LOCK-UP WOULD|
00000AA0: 20 4F 43 43 55 52 2E 0D  0D 20 20 20 20 20 20 20  | OCCUR...       |
00000AB0: D3 D4 C1 D2 D4 20 CA D3  D2 20 C9 CF C9 CE C9 D4  |..... ... ......|
00000AC0: 0D 20 20 20 20 20 20 20  20 20 20 20 20 20 CA D3  |.             ..|
00000AD0: D2 20 D2 C1 CD D4 C1 D3  0D 20 20 20 20 20 20 20  |. .......       |
00000AE0: 20 20 20 20 20 20 CA D3  D2 20 D2 C5 D3 D4 CF D2  |      ... ......|
00000AF0: 0D 20 20 20 20 20 20 20  20 20 20 20 20 20 CA D3  |.             ..|
00000B00: D2 20 C3 C9 CE D4 0D 20  20 20 20 20 20 20 20 20  |. .....         |
00000B10: 20 20 20 20 CA D3 D2 20  C3 CF D0 D9 D6 C5 C3 0D  |    ... ........|
00000B20: 20 20 20 20 20 20 20 20  20 20 20 20 20 CA D3 D2  |             ...|
00000B30: 20 C9 CE C9 D4 0D 0D 20  20 20 20 D0 55 54 20 32  | ......    .UT 2|
00000B40: 35 31 20 4F 4E 20 54 48  45 20 53 54 41 43 4B 20  |51 ON THE STACK |
00000B50: 52 45 47 49 53 54 45 52  2E 0D 0D 20 20 20 20 20  |REGISTER...     |
00000B60: 20 20 20 20 20 20 20 20  CC C4 D8 20 23 32 35 31  |        ... #251|
00000B70: 0D 20 20 20 20 20 20 20  20 20 20 20 20 20 D4 D8  |.             ..|
00000B80: D3 0D 0D 20 20 20 20 D4  48 49 53 20 4C 4F 4F 50  |...    .HIS LOOP|
00000B90: 20 50 52 49 4E 54 53 20  54 48 45 20 CC CF C1 C4  | PRINTS THE ....|
00000BA0: 20 41 4E 44 20 D2 D5 CE  0D 54 45 58 54 20 54 4F  | AND ....TEXT TO|
00000BB0: 20 54 48 45 20 53 43 52  45 45 4E 2E 0D 0D 20 20  | THE SCREEN...  |
00000BC0: 20 20 20 20 20 20 20 20  20 20 20 CC C4 D9 20 23  |           ... #|
00000BD0: 30 30 0D 20 20 20 20 20  20 20 5D CC CF CF D0 20  |00.       ].... |
00000BE0: CC C4 C1 20 D4 C5 D8 D4  2C D9 0D 20 20 20 20 20  |... ....,..     |
00000BF0: 20 20 20 20 20 20 20 20  C2 C5 D1 20 C5 CE C4 D4  |        ... ....|
00000C00: D8 D4 0D 20 20 20 20 20  20 20 20 20 20 20 20 20  |...             |
00000C10: CA D3 D2 20 C3 C8 D2 CF  D5 D4 0D 20 20 20 20 20  |... .......     |
00000C20: 20 20 20 20 20 20 20 20  C9 CE D9 0D 20 20 20 20  |        ....    |
00000C30: 20 20 20 20 20 20 20 20  20 CA CD D0 20 5D CC CF  |         ... ]..|
00000C40: CF D0 0D 0D 0D 0D 0D 0D  20 20 20 20 D4 48 49 53  |........    .HIS|
00000C50: 20 43 4F 44 45 20 53 45  54 53 20 55 50 20 54 48  | CODE SETS UP TH|
00000C60: 45 20 4B 45 59 42 4F 41  52 44 0D 42 55 46 46 45  |E KEYBOARD.BUFFE|
00000C70: 52 20 42 59 20 50 55 54  54 49 4E 47 20 54 57 4F  |R BY PUTTING TWO|
00000C80: 20 D2 C5 D4 D5 D2 CE D3  20 49 4E 54 4F 0D 49 54  | ....... INTO.IT|
00000C90: 2E 20 20 C1 4C 53 4F 2C  20 41 20 32 20 49 53 20  |.  .LSO, A 2 IS |
00000CA0: 50 4C 41 43 45 44 20 49  4E 54 4F 20 54 48 45 0D  |PLACED INTO THE.|
00000CB0: 41 44 44 52 45 53 53 20  54 48 41 54 20 48 4F 4C  |ADDRESS THAT HOL|
00000CC0: 44 53 20 54 48 45 20 4E  55 4D 42 45 52 20 4F 46  |DS THE NUMBER OF|
00000CD0: 0D 43 48 41 52 41 43 54  45 52 53 20 43 55 52 52  |.CHARACTERS CURR|
00000CE0: 45 4E 54 4C 59 20 49 4E  20 54 48 45 20 42 55 46  |ENTLY IN THE BUF|
00000CF0: 46 45 52 2E 0D 0D 20 20  20 20 20 20 C5 CE C4 D4  |FER...      ....|
00000D00: D8 D4 20 CC C4 C1 20 23  31 33 0D 20 20 20 20 20  |.. ... #13.     |
00000D10: 20 20 20 20 20 20 20 20  D3 D4 C1 20 CB C5 D9 C2  |        ... ....|
00000D20: D5 C6 0D 20 20 20 20 20  20 20 20 20 20 20 20 20  |...             |
00000D30: D3 D4 C1 20 CB C5 D9 C2  D5 C6 2B 31 0D 0D 20 20  |... ......+1..  |
00000D40: 20 20 20 20 20 20 20 20  20 20 20 CC C4 C1 20 23  |           ... #|
00000D50: 30 32 0D 20 20 20 20 20  20 20 20 20 20 20 20 20  |02.             |
00000D60: D3 D4 C1 20 CE C4 D8 0D  0D 0D 0D 0D 0D 0D 0D 20  |... ........... |
00000D70: 20 20 20 CE 45 58 54 20  57 45 20 43 4C 45 41 52  |   .EXT WE CLEAR|
00000D80: 20 54 48 45 20 22 C3 C2  CD 38 30 22 20 46 52 4F  | THE "...80" FRO|
00000D90: 4D 0D 4D 45 4D 4F 52 59  20 54 4F 20 44 49 53 41  |M.MEMORY TO DISA|
00000DA0: 42 4C 45 20 54 48 45 20  41 55 54 4F 53 54 41 52  |BLE THE AUTOSTAR|
00000DB0: 54 0D 46 45 41 54 55 52  45 2E 0D 0D 20 20 20 20  |T.FEATURE...    |
00000DC0: 20 20 20 20 20 20 20 20  20 CC C4 D8 20 23 30 35  |         ... #05|
00000DD0: 0D 20 20 20 20 20 20 20  20 20 20 20 20 20 CC C4  |.             ..|
00000DE0: C1 20 23 30 30 0D 20 20  20 20 20 20 20 5D CC CF  |. #00.       ]..|
00000DF0: CF D0 20 D3 D4 C1 20 C1  D5 D4 CF D3 D4 D2 D4 2D  |.. ... ........-|
00000E00: 31 2C D8 0D 20 20 20 20  20 20 20 20 20 20 20 20  |1,..            |
00000E10: 20 C4 C5 D8 0D 20 20 20  20 20 20 20 20 20 20 20  | ....           |
00000E20: 20 20 C2 CE C5 20 5D CC  CF CF D0 0D 0D 20 20 20  |  ... ]......   |
00000E30: 20 C6 49 4E 41 4C 4C 59  2C 20 57 45 20 4A 55 4D  | .INALLY, WE JUM|
00000E40: 50 20 54 4F 20 54 48 45  20 D2 CF CD 0D 52 4F 55  |P TO THE ....ROU|
00000E50: 54 49 4E 45 20 54 48 41  54 20 50 52 49 4E 54 53  |TINE THAT PRINTS|
00000E60: 20 D2 C5 C1 C4 D9 20 4F  4E 20 54 48 45 0D 53 43  | ..... ON THE.SC|
00000E70: 52 45 45 4E 2C 20 57 48  49 43 48 20 54 48 45 4E  |REEN, WHICH THEN|
00000E80: 20 46 41 4C 4C 53 20 54  48 52 4F 55 47 48 20 54  | FALLS THROUGH T|
00000E90: 4F 0D 54 48 45 20 4D 41  49 4E 20 C2 C1 D3 C9 C3  |O.THE MAIN .....|
00000EA0: 20 4C 4F 4F 50 20 54 48  41 54 20 52 55 4E 53 20  | LOOP THAT RUNS |
00000EB0: 54 48 45 0D 49 4E 54 45  52 50 52 45 54 4F 52 2E  |THE.INTERPRETOR.|
00000EC0: 0D 0D 20 20 20 20 20 20  20 20 20 20 20 20 20 CA  |..             .|
00000ED0: CD D0 20 D2 C5 C1 C4 D9  0D 0D 0D 20 20 20 20 D4  |.. ........    .|
00000EE0: 48 45 20 46 4F 4C 4C 4F  57 49 4E 47 20 54 45 58  |HE FOLLOWING TEX|
00000EF0: 54 20 49 53 20 50 52 49  4E 54 45 44 20 54 4F 0D  |T IS PRINTED TO.|
00000F00: 54 48 45 20 53 43 52 45  45 4E 20 41 4E 44 20 CC  |THE SCREEN AND .|
00000F10: CF C1 C4 53 20 22 D3 D4  C1 D2 22 2E 0D CF 52 49  |...S "...."...RI|
00000F20: 47 49 4E 41 4C 4C 59 2C  20 54 48 45 20 43 4F 44  |GINALLY, THE COD|
00000F30: 45 20 48 41 44 20 41 20  33 31 20 28 42 4C 55 45  |E HAD A 31 (BLUE|
00000F40: 29 0D 42 45 46 4F 52 45  20 54 48 45 20 31 34 37  |).BEFORE THE 147|
00000F50: 2E 20 20 D4 48 49 53 20  4D 41 44 45 20 54 48 45  |.  .HIS MADE THE|
00000F60: 20 54 45 58 54 0D 49 4E  56 49 53 49 42 4C 45 20  | TEXT.INVISIBLE |
00000F70: 57 48 45 4E 20 50 52 49  4E 54 45 44 20 4F 4E 20  |WHEN PRINTED ON |
00000F80: 54 48 45 20 42 4C 55 45  0D 53 43 52 45 45 4E 2E  |THE BLUE.SCREEN.|
00000F90: 20 20 C9 20 4C 45 46 54  20 49 54 20 4F 55 54 20  |  . LEFT IT OUT |
00000FA0: 53 4F 20 59 4F 55 20 43  41 4E 20 53 45 45 0D 54  |SO YOU CAN SEE.T|
00000FB0: 48 45 20 54 45 58 54 20  57 48 45 4E 20 54 45 53  |HE TEXT WHEN TES|
00000FC0: 54 49 4E 47 20 54 48 45  20 43 4F 44 45 2E 0D 0D  |TING THE CODE...|
00000FD0: 20 20 20 20 20 20 20 20  D4 C5 D8 D4 20 C4 C6 C2  |        .... ...|
00000FE0: 20 31 34 37 2C 31 37 2C  31 37 0D 20 20 20 20 20  | 147,17,17.     |
00000FF0: 20 20 20 20 20 20 20 20  D4 D8 D4 20 27 4C 4F 41  |        ... 'LOA|
00001000: 44 27 0D 20 20 20 20 20  20 20 20 20 20 20 20 20  |D'.             |
00001010: C4 C6 C2 20 33 34 0D 20  20 20 20 20 20 20 20 20  |... 34.         |
00001020: 20 20 20 20 D4 D8 D4 20  27 53 54 41 52 27 0D 20  |    ... 'STAR'. |
00001030: 20 20 20 20 20 20 20 20  20 20 20 20 C4 C6 C2 20  |            ... |
00001040: 33 34 0D 20 20 20 20 20  20 20 20 20 20 20 20 20  |34.             |
00001050: D4 D8 D4 20 27 2C 38 27  0D 20 20 20 20 20 20 20  |... ',8'.       |
00001060: 20 20 20 20 20 20 C4 C6  C2 20 31 33 0D 20 20 20  |      ... 13.   |
00001070: 20 20 20 20 20 20 20 20  20 20 C4 C6 C2 20 31 37  |          ... 17|
00001080: 2C 31 37 2C 31 37 2C 31  37 0D 20 20 20 20 20 20  |,17,17,17.      |
00001090: 20 20 20 20 20 20 20 D4  D8 D4 20 27 52 55 4E 27  |       ... 'RUN'|
000010A0: 0D 20 20 20 20 20 20 20  20 20 20 20 20 20 C4 C6  |.             ..|
000010B0: C2 20 31 39 2C 30 0D 0D  20 20 20 20 D7 45 4C 4C  |. 19,0..    .ELL|
000010C0: 2C 20 54 48 41 54 27 53  20 41 4C 4C 20 54 48 45  |, THAT'S ALL THE|
000010D0: 52 45 20 49 53 20 54 4F  20 49 54 21 0D D7 45 27  |RE IS TO IT!..E'|
000010E0: 56 45 20 45 46 46 45 43  54 49 56 45 4C 59 20 42  |VE EFFECTIVELY B|
000010F0: 4F 4F 54 45 44 20 41 20  36 34 20 50 52 4F 47 52  |OOTED A 64 PROGR|
00001100: 41 4D 0D 46 52 4F 4D 20  57 49 54 48 49 4E 20 31  |AM.FROM WITHIN 1|
00001110: 32 38 20 4D 4F 44 45 2E  20 20 D4 48 45 20 41 55  |28 MODE.  .HE AU|
00001120: 54 4F 53 54 41 52 54 0D  46 45 41 54 55 52 45 20  |TOSTART.FEATURE |
00001130: 43 41 4E 20 42 45 20 55  53 45 44 20 46 4F 52 20  |CAN BE USED FOR |
00001140: 4D 41 4E 59 0D 44 49 46  46 45 52 45 4E 54 20 41  |MANY.DIFFERENT A|
00001150: 50 50 4C 49 43 41 54 49  4F 4E 53 20 2D 2D 20 54  |PPLICATIONS -- T|
00001160: 48 49 53 20 49 53 0D 53  49 4D 50 4C 59 20 4F 4E  |HIS IS.SIMPLY ON|
00001170: 45 20 4F 46 20 54 48 45  4D 2E 20 20 D3 45 45 20  |E OF THEM.  .EE |
00001180: 57 48 41 54 20 59 4F 55  20 43 41 4E 0D 43 4F 4D  |WHAT YOU CAN.COM|
00001190: 45 20 55 50 20 57 49 54  48 2E 0D 0D 20 20 20 20  |E UP WITH...    |
000011A0: C1 53 20 41 4C 57 41 59  53 2C 20 54 48 45 20 53  |.S ALWAYS, THE S|
000011B0: 4F 55 52 43 45 20 43 4F  44 45 2C 20 49 4E 0D CD  |OURCE CODE, IN..|
000011C0: C5 D2 CC C9 CE 20 46 4F  52 4D 41 54 2C 20 49 53  |..... FORMAT, IS|
000011D0: 20 4F 4E 20 54 48 49 53  20 53 49 44 45 20 4F 46  | ON THIS SIDE OF|
000011E0: 20 54 48 45 0D 44 49 53  4B 2E 20 20 D4 48 45 20  | THE.DISK.  .HE |
000011F0: 46 49 4C 45 20 49 53 20  43 41 4C 4C 45 44 20 22  |FILE IS CALLED "|
00001200: 4D 41 47 49 43 0D 49 49  2E 41 53 4D 22 2E 20 20  |MAGIC.II.ASM".  |
00001210: D4 48 45 20 4F 42 4A 45  43 54 20 43 4F 44 45 20  |.HE OBJECT CODE |
00001220: 49 53 20 46 4F 55 4E 44  20 4F 4E 0D 4A 55 53 54  |IS FOUND ON.JUST|
00001230: 20 41 42 4F 55 54 20 45  56 45 52 59 20 CC CF C1  | ABOUT EVERY ...|
00001240: C4 D3 D4 C1 D2 20 4F 4E  20 D3 49 44 45 0D D4 57  |..... ON .IDE..W|
00001250: 4F 2E 0D 0D 20 20 20 20  20 20 20 20 2A 2A 2A 2A  |O...        ****|
00001260: 20 C5 4E 44 20 CF 46 20  D4 45 58 54 20 2A 2A 2A  | .ND .F .EXT ***|
00001270: 2A 0D                                             |*.              |
..^U:ZERO.     BITS: THE MAGIC BEHIND MA
GIC..           BY MIKE MAYNARD..    WE 
RECENTLY RECEIVED A LETTER.ASKING HOW WE
 BOOTED LOADSTAR 64.FROM WITHIN THE 128 
MENU (128 MODE)..WELL, THE ANSWER IS PUR
E AND SIMPLE --.MAGIC; THAT IS, "MAGIC I
I".  THIS.MACHINE LANGUAGE ROUTINE IS LO
ADED.INTO MEMORY AT 32768 WHEN THE "CTRL
 E".OPTION IS SELECTED FROM THE 128.MENU
.  AFTER THE LOAD, WE "GO 64" TO.GET TO 
THE 64 MODE WHERE MAGIC II IS.PATIENTLY 
WAITING TO BOOT LOADSTAR......    YOU SE
E, ONE OF THE FIRST THINGS.THE C-64 DOES
 WHEN IT BOOTS UP IS.CHECK FOR AN AUTOST
ART CARTRIDGE.  THE.COMPUTER DOES THIS B
Y CHECKING THE ROM.ADDRESSES 32772-32776
 (FROM THE.CARTRIDGE) FOR THE ASCII CHAR
ACTERS."CBM80".  IF THESE CHARACTERS ARE
.FOUND, IT EXECUTES THE ML ROUTINE.POINT
ED TO BY THE VECTOR AT.32768/32769 (LOW 
BYTE/HIGH BYTE)..THIS IS HOW A CARTRIDGE
 CAN INSTANTLY.TAKE OVER THE COMPUTER...
    BUT YOU DON'T HAVE TO HAVE A.CARTRID
GE PRESENT TO TAKE ADVANTAGE.OF THIS C-6
4 FEATURE.  YOU CAN SIMPLY.PUT "CBM80" I
N RAM AT 32772-32776.AND RESET THE COMPU
TER...    THE C-64 ALSO CHECKS 32772-327
76.FOR "CBM80" WHEN THE RESTORE KEY IS.P
RESSED (WHICH CREATES A NON-MASKABLE.INT
ERRUPT).  IF THE CHARACTERS ARE.FOUND, I
T EXECUTES THE ML ROUTINE.POINTED TO BY 
THE VECTOR AT.32770/32771.  BUT SINCE WE
 ARE ONLY.CONCERNED WITH THE AUTOSTART V
ECTOR.AT 32768/32769 THERE'S NO NEED TO.
ALTER 32770/32771 IN MAGIC II...    NOW 
THAT WE KNOW WHAT THE C-64.DOES ON BOOT-
UPS (AND NMI'S), LET'S.TAKE A LOOK AT TH
E MAGICAL ROUTINE.THAT HOOKS EVERYTHING 
TOGETHER......    THE FOLLOWING EQU'S SH
OW THE.ADDRESS OF EACH LABEL....       I
OINIT   EQU 65412.       RAMTAS   EQU 65
415.       RESTOR   EQU 65418.       CIN
T     EQU 65409.       COPYVEC  EQU 5845
1.       INIT     EQU 58303.       CHROU
T   EQU 65490.       KEYBUF   EQU 631.  
     NDX      EQU 198.       READY    EQ
U 42100.       AUTOSTRT EQU 32772..    A
S ALWAYS, THE CODE THAT FOLLOWS.IS PRESE
NTED IN MERLIN FORMAT...    AS IS, THIS 
ROUTINE WILL ONLY.WORK WHEN ASSEMBLED AT
 32768.  WHEN.ASSEMBLED, THE FOLLOWING T
WO DEFINED.BYTES ARE PUT AT 32768/32769,
 THE.AUTOSTART VECTOR.  THE "#<" AND "#>
".TELLS MERLIN TO USE THE LOW AND.HIGH B
YTES OF THE ADDRESS OF START...         
   DFB #<START.            DFB #>START..
    THE NEXT TWO DFB'S ARE FOR THE.NMI A
ND ARE NOT USED.  HOWEVER, WE.STILL NEED
 TO PUT SOME VALUE THERE TO.TAKE UP SPAC
E...            DFB #00.            DFB 
#00..    THE NEXT 5 BYTES ARE THE ASCII.
EQUIVALENTS TO "CBM80".  NOTE THAT THE.C
, B, AND M ARE SHIFTED CHARACTERS...    
   DFB 195,194,205,56,48..    THE FOLLOW
ING SIX JSR'S HANDLE ALL.OF THE INITIALI
ZATION ROUTINES THAT.WE INTERRUPTED.  IF
 WE JUST FELL.THROUGHT TO BASIC BEFORE E
XECUTING.THESE ROUTINES, A LOCK-UP WOULD
 OCCUR...       START JSR IOINIT.       
      JSR RAMTAS.             JSR RESTOR
.             JSR CINT.             JSR 
COPYVEC.             JSR INIT..    PUT 2
51 ON THE STACK REGISTER...             
LDX #251.             TXS..    THIS LOOP
 PRINTS THE LOAD AND RUN.TEXT TO THE SCR
EEN...             LDY #00.       ]LOOP 
LDA TEXT,Y.             BEQ ENDTXT.     
        JSR CHROUT.             INY.    
         JMP ]LOOP......    THIS CODE SE
TS UP THE KEYBOARD.BUFFER BY PUTTING TWO
 RETURNS INTO.IT.  ALSO, A 2 IS PLACED I
NTO THE.ADDRESS THAT HOLDS THE NUMBER OF
.CHARACTERS CURRENTLY IN THE BUFFER...  
    ENDTXT LDA #13.             STA KEYB
UF.             STA KEYBUF+1..          
   LDA #02.             STA NDX........ 
   NEXT WE CLEAR THE "CBM80" FROM.MEMORY
 TO DISABLE THE AUTOSTART.FEATURE...    
         LDX #05.             LDA #00.  
     ]LOOP STA AUTOSTRT-1,X.            
 DEX.             BNE ]LOOP..    FINALLY
, WE JUMP TO THE ROM.ROUTINE THAT PRINTS
 READY ON THE.SCREEN, WHICH THEN FALLS T
HROUGH TO.THE MAIN BASIC LOOP THAT RUNS 
THE.INTERPRETOR...             JMP READY
...    THE FOLLOWING TEXT IS PRINTED TO.
THE SCREEN AND LOADS "STAR"..ORIGINALLY,
 THE CODE HAD A 31 (BLUE).BEFORE THE 147
.  THIS MADE THE TEXT.INVISIBLE WHEN PRI
NTED ON THE BLUE.SCREEN.  I LEFT IT OUT 
SO YOU CAN SEE.THE TEXT WHEN TESTING THE
 CODE...        TEXT DFB 147,17,17.     
        TXT 'LOAD'.             DFB 34. 
            TXT 'STAR'.             DFB 
34.             TXT ',8'.             DF
B 13.             DFB 17,17,17,17.      
       TXT 'RUN'.             DFB 19,0..
    WELL, THAT'S ALL THERE IS TO IT!.WE'
VE EFFECTIVELY BOOTED A 64 PROGRAM.FROM 
WITHIN 128 MODE.  THE AUTOSTART.FEATURE 
CAN BE USED FOR MANY.DIFFERENT APPLICATI
ONS -- THIS IS.SIMPLY ONE OF THEM.  SEE 
WHAT YOU CAN.COME UP WITH...    AS ALWAY
S, THE SOURCE CODE, IN.MERLIN FORMAT, IS
 ON THIS SIDE OF THE.DISK.  THE FILE IS 
CALLED "MAGIC.II.ASM".  THE OBJECT CODE 
IS FOUND ON.JUST ABOUT EVERY LOADSTAR ON
 SIDE.TWO...        **** END OF TEXT ***
*.
C64 Preview

> CLICK IMAGE PREVIEW FOR FULL MODAL