MC TUTOR
FILE INFORMATION
FILENAME(S): MC TUTOR
FILE TYPE(S): PRG
FILE SIZE: 16.7K
FIRST SEEN: 2025-11-30 16:59:46
APPEARS ON: 1 disk(s)
FILE HASH
75d39c7c1cc89bb383ed04258bbcf4c1ee6d745a03930ecba05831477c9dfe19
FOUND ON DISKS (1 DISKS)
| DISK TITLE | FILENAME | FILE TYPE | COLLECTION | TRACK | SECTOR | ACTIONS |
|---|---|---|---|---|---|---|
| PD | MC TUTOR | PRG | High Voltage Complete C64 Collection | 10 | 4 | DOWNLOAD FILE |
FILE CONTENT & ANALYSIS
> DETECTED: COMMODORE BASIC PROGRAM (LOAD ADDRESS $0801)
00000000: 01 08 25 08 0A 00 99 22 93 22 3A 97 35 33 32 38 |..%....".":.5328|
00000010: 30 2C 31 31 3A 97 35 33 32 38 31 2C 31 31 3A 97 |0,11:.53281,11:.|
00000020: 36 34 36 2C 30 00 4E 08 14 00 99 22 20 20 20 20 |646,0.N...." |
00000030: 20 49 4E 54 52 4F 44 55 43 54 49 4F 4E 20 54 4F | INTRODUCTION TO|
00000040: 20 4D 41 43 48 49 4E 45 20 43 4F 44 45 22 00 77 | MACHINE CODE".w|
00000050: 08 15 00 99 22 20 20 20 20 20 A3 A3 A3 A3 A3 A3 |...." ......|
00000060: A3 A3 A3 A3 A3 A3 A3 A3 A3 A3 A3 A3 A3 A3 A3 A3 |................|
00000070: A3 A3 A3 A3 A3 A3 22 00 A3 08 1E 00 99 3A 99 22 |......"......:."|
00000080: 54 48 49 53 20 54 55 54 4F 52 49 41 4C 20 49 53 |THIS TUTORIAL IS|
00000090: 20 4E 4F 54 20 4D 45 41 4E 54 20 54 4F 20 42 45 | NOT MEANT TO BE|
000000A0: 20 41 22 00 CB 08 28 00 99 22 43 4F 4D 50 4C 45 | A"...(.."COMPLE|
000000B0: 54 45 20 43 4F 55 52 53 45 20 49 4E 20 4D 41 43 |TE COURSE IN MAC|
000000C0: 48 49 4E 45 20 43 4F 44 45 20 22 00 DF 08 2A 00 |HINE CODE "...*.|
000000D0: 99 22 50 52 4F 47 52 41 4D 4D 49 4E 47 2E 22 00 |."PROGRAMMING.".|
000000E0: 0A 09 32 00 99 3A 99 22 52 41 54 48 45 52 2C 20 |..2..:."RATHER, |
000000F0: 49 54 20 49 53 20 4D 45 41 4E 54 20 54 4F 20 42 |IT IS MEANT TO B|
00000100: 45 20 41 20 53 48 4F 52 54 22 00 36 09 3C 00 99 |E A SHORT".6.<..|
00000110: 22 49 4E 54 52 4F 44 55 43 54 49 4F 4E 20 54 4F |"INTRODUCTION TO|
00000120: 20 54 48 45 20 4D 45 54 48 4F 44 53 20 55 53 45 | THE METHODS USE|
00000130: 44 2C 20 54 4F 22 00 63 09 3E 00 99 22 50 4F 53 |D, TO".c.>.."POS|
00000140: 53 49 42 4C 59 20 48 45 4C 50 20 27 44 45 4D 59 |SIBLY HELP 'DEMY|
00000150: 53 54 49 46 59 27 20 54 48 45 20 53 55 42 4A 45 |STIFY' THE SUBJE|
00000160: 43 54 22 00 8F 09 40 00 99 22 46 4F 52 20 54 48 |CT"...@.."FOR TH|
00000170: 4F 53 45 20 57 48 4F 20 57 49 53 48 20 54 4F 20 |OSE WHO WISH TO |
00000180: 53 54 55 44 59 20 46 55 52 54 48 45 52 2E 22 00 |STUDY FURTHER.".|
00000190: BD 09 42 00 99 3A 99 22 59 4F 55 20 50 52 4F 42 |..B..:."YOU PROB|
000001A0: 41 42 4C 59 20 57 49 4C 4C 20 4E 4F 54 20 55 4E |ABLY WILL NOT UN|
000001B0: 44 45 52 53 54 41 4E 44 20 41 4C 4C 22 00 EB 09 |DERSTAND ALL"...|
000001C0: 43 00 99 22 54 48 45 20 43 4F 4E 43 45 50 54 53 |C.."THE CONCEPTS|
000001D0: 20 41 54 20 46 49 52 53 54 2E 20 52 45 41 44 20 | AT FIRST. READ |
000001E0: 49 54 20 54 48 52 4F 55 47 48 22 00 0E 0A 44 00 |IT THROUGH"...D.|
000001F0: 99 22 41 20 46 45 57 20 54 49 4D 45 53 20 41 4E |."A FEW TIMES AN|
00000200: 44 20 54 41 4B 45 20 4E 4F 54 45 53 2E 22 00 18 |D TAKE NOTES."..|
00000210: 0A 48 00 8D 39 30 30 30 00 3E 0A 64 00 99 22 57 |.H..9000.>.d.."W|
00000220: 48 59 20 50 52 4F 47 52 41 4D 4D 45 20 49 4E 20 |HY PROGRAMME IN |
00000230: 4D 41 43 48 49 4E 45 20 43 4F 44 45 3F 22 00 64 |MACHINE CODE?".d|
00000240: 0A 65 00 99 22 B8 B8 B8 B8 B8 B8 B8 B8 B8 B8 B8 |.e.."...........|
00000250: B8 B8 B8 B8 B8 B8 B8 B8 B8 B8 B8 B8 B8 B8 B8 B8 |................|
00000260: B8 B8 B8 22 00 92 0A 66 00 99 3A 99 22 42 41 53 |..."...f..:."BAS|
00000270: 49 43 20 41 4E 44 20 4F 54 48 45 52 20 4C 41 4E |IC AND OTHER LAN|
00000280: 47 55 41 47 45 53 20 41 52 45 20 45 41 53 49 4C |GUAGES ARE EASIL|
00000290: 59 22 00 BF 0A 68 00 99 22 41 43 43 45 53 53 49 |Y"...h.."ACCESSI|
000002A0: 42 4C 45 20 41 4E 44 20 47 45 4E 45 52 41 4C 4C |BLE AND GENERALL|
000002B0: 59 20 55 53 45 20 43 4F 4D 4D 41 4E 44 53 22 00 |Y USE COMMANDS".|
000002C0: E2 0A 6A 00 99 22 54 48 41 54 20 41 52 45 20 49 |..j.."THAT ARE I|
000002D0: 4E 20 27 50 4C 41 49 4E 20 45 4E 47 4C 49 53 48 |N 'PLAIN ENGLISH|
000002E0: 27 22 00 12 0B 6C 00 99 3A 99 22 48 4F 57 45 56 |'"...l..:."HOWEV|
000002F0: 45 52 20 57 48 45 4E 20 54 48 45 20 43 4F 4D 50 |ER WHEN THE COMP|
00000300: 55 54 45 52 20 52 55 4E 53 20 41 20 42 41 53 49 |UTER RUNS A BASI|
00000310: 43 22 00 36 0B 6E 00 99 22 50 52 47 20 49 54 20 |C".6.n.."PRG IT |
00000320: 53 50 45 4E 44 53 20 41 20 4C 4F 54 20 4F 46 20 |SPENDS A LOT OF |
00000330: 54 49 4D 45 20 22 00 61 0B 70 00 99 22 49 4E 54 |TIME ".a.p.."INT|
00000340: 45 52 50 52 45 54 49 4E 47 20 54 48 45 20 43 4F |ERPRETING THE CO|
00000350: 4D 4D 41 4E 44 53 20 42 45 46 4F 52 45 20 49 54 |MMANDS BEFORE IT|
00000360: 22 00 77 0B 72 00 99 22 4F 50 45 52 41 54 45 53 |".w.r.."OPERATES|
00000370: 20 54 48 45 4D 2E 22 00 A4 0B 74 00 99 3A 99 22 | THEM."...t..:."|
00000380: 4D 41 43 48 49 4E 45 20 43 4F 44 45 20 42 59 50 |MACHINE CODE BYP|
00000390: 41 53 53 45 53 20 54 48 49 53 20 4E 45 45 44 20 |ASSES THIS NEED |
000003A0: 41 4E 44 22 00 D0 0B 76 00 99 22 27 53 50 45 41 |AND"...v.."'SPEA|
000003B0: 4B 53 27 20 54 4F 20 54 48 45 20 43 4F 4D 50 55 |KS' TO THE COMPU|
000003C0: 54 45 52 20 49 4E 20 49 54 27 53 20 4F 57 4E 22 |TER IN IT'S OWN"|
000003D0: 00 E1 0B 78 00 99 22 4C 41 4E 47 55 41 47 45 2E |...x.."LANGUAGE.|
000003E0: 22 00 10 0C 82 00 99 3A 99 22 54 48 49 53 20 4D |"......:."THIS M|
000003F0: 45 41 4E 53 20 54 48 41 54 20 54 48 49 4E 47 53 |EANS THAT THINGS|
00000400: 20 47 45 54 20 44 4F 4E 45 20 4D 55 43 48 20 22 | GET DONE MUCH "|
00000410: 00 1F 0C 84 00 99 22 46 41 53 54 45 52 2E 22 00 |......"FASTER.".|
00000420: 29 0C 86 00 8D 39 30 30 30 00 52 0C 8C 00 99 22 |)....9000.R...."|
00000430: 46 4F 52 20 49 4E 53 54 41 4E 43 45 20 45 56 45 |FOR INSTANCE EVE|
00000440: 4E 20 54 48 45 20 53 49 4D 50 4C 45 53 54 20 4F |N THE SIMPLEST O|
00000450: 46 22 00 7F 0C 8E 00 99 22 43 4F 4D 4D 45 52 43 |F"......"COMMERC|
00000460: 49 41 4C 20 47 41 4D 45 53 20 48 41 56 45 20 41 |IAL GAMES HAVE A|
00000470: 20 4C 4F 54 20 47 4F 49 4E 47 20 4F 4E 2C 22 00 | LOT GOING ON,".|
00000480: A0 0C 90 00 99 22 41 4E 44 20 41 4C 4C 20 41 54 |....."AND ALL AT|
00000490: 20 54 48 45 20 53 41 4D 45 20 54 49 4D 45 2E 22 | THE SAME TIME."|
000004A0: 00 D0 0C 96 00 99 3A 99 22 46 4F 52 20 45 58 41 |......:."FOR EXA|
000004B0: 4D 50 4C 45 20 54 48 45 52 45 20 4D 41 59 20 42 |MPLE THERE MAY B|
000004C0: 45 20 41 20 4D 55 53 49 43 20 54 52 41 43 4B 22 |E A MUSIC TRACK"|
000004D0: 00 FE 0C 98 00 99 22 53 4F 55 4E 44 20 45 46 46 |......"SOUND EFF|
000004E0: 45 43 54 53 2C 20 53 50 52 49 54 45 53 20 5A 41 |ECTS, SPRITES ZA|
000004F0: 50 50 49 4E 47 20 41 52 4F 55 4E 44 2C 22 00 2B |PPING AROUND,".+|
00000500: 0D 9A 00 99 22 42 41 43 4B 47 52 4F 55 4E 44 20 |...."BACKGROUND |
00000510: 47 52 41 50 48 49 43 53 20 43 48 41 4E 47 49 4E |GRAPHICS CHANGIN|
00000520: 47 20 45 54 43 20 45 54 43 2E 22 00 5A 0D 9C 00 |G ETC ETC.".Z...|
00000530: 99 3A 99 22 49 46 20 54 48 49 53 20 57 45 52 45 |.:."IF THIS WERE|
00000540: 20 54 4F 20 42 45 20 44 4F 4E 45 20 49 4E 20 42 | TO BE DONE IN B|
00000550: 41 53 49 43 20 54 48 45 4E 22 00 87 0D 9E 00 99 |ASIC THEN"......|
00000560: 22 54 48 45 20 52 45 53 55 4C 54 20 57 4F 55 4C |"THE RESULT WOUL|
00000570: 44 20 42 45 20 56 45 52 59 20 53 4C 4F 57 20 49 |D BE VERY SLOW I|
00000580: 4E 44 45 45 44 2E 22 00 B5 0D A0 00 99 3A 99 22 |NDEED."......:."|
00000590: 41 4C 53 4F 20 4D 41 43 48 49 4E 45 20 43 4F 44 |ALSO MACHINE COD|
000005A0: 45 20 50 52 47 53 20 54 41 4B 45 20 55 50 20 41 |E PRGS TAKE UP A|
000005B0: 20 4C 4F 54 22 00 D9 0D A2 00 99 22 4C 45 53 53 | LOT"......"LESS|
000005C0: 20 4D 45 4D 4F 52 59 20 54 48 41 4E 20 42 41 53 | MEMORY THAN BAS|
000005D0: 49 43 20 50 52 47 53 2E 22 00 E3 0D AA 00 8D 39 |IC PRGS."......9|
000005E0: 30 30 30 00 12 0E C8 00 99 22 48 4F 57 20 44 4F |000......"HOW DO|
000005F0: 20 50 52 4F 47 52 41 4D 4D 45 52 53 20 57 52 49 | PROGRAMMERS WRI|
00000600: 54 45 20 4D 41 43 48 49 4E 45 20 43 4F 44 45 20 |TE MACHINE CODE |
00000610: 3F 22 00 41 0E CA 00 99 22 B8 B8 B8 B8 B8 B8 B8 |?".A....".......|
00000620: B8 B8 B8 B8 B8 B8 B8 B8 B8 B8 B8 B8 B8 B8 B8 B8 |................|
00000630: B8 B8 B8 B8 B8 B8 B8 B8 B8 B8 B8 B8 B8 B8 B8 B8 |................|
00000640: 22 00 71 0E CC 00 99 3A 99 22 47 45 4E 45 52 41 |".q....:."GENERA|
00000650: 4C 4C 59 20 4D 41 43 48 49 4E 45 20 43 4F 44 45 |LLY MACHINE CODE|
00000660: 20 50 52 4F 47 52 41 4D 4D 45 52 53 20 55 53 45 | PROGRAMMERS USE|
00000670: 22 00 88 0E CE 00 99 22 41 4E 20 27 41 53 53 45 |"......"AN 'ASSE|
00000680: 4D 42 4C 45 52 27 2E 22 00 B7 0E D0 00 99 3A 99 |MBLER'."......:.|
00000690: 22 41 4E 20 41 53 53 45 4D 42 4C 45 52 20 49 53 |"AN ASSEMBLER IS|
000006A0: 20 41 20 55 54 49 4C 49 54 59 20 54 48 41 54 20 | A UTILITY THAT |
000006B0: 41 4C 4C 4F 57 53 22 00 E5 0E D2 00 99 22 54 48 |ALLOWS"......"TH|
000006C0: 45 20 50 52 4F 47 52 41 4D 4D 45 52 20 54 4F 20 |E PROGRAMMER TO |
000006D0: 45 4E 54 45 52 20 49 4E 20 48 49 53 20 43 4F 44 |ENTER IN HIS COD|
000006E0: 45 20 49 4E 22 00 11 0F D4 00 99 22 54 48 45 20 |E IN"......"THE |
000006F0: 45 41 53 49 45 53 54 20 50 4F 53 53 49 42 4C 45 |EASIEST POSSIBLE|
00000700: 20 4D 41 4E 4E 45 52 20 42 59 20 44 4F 49 4E 47 | MANNER BY DOING|
00000710: 22 00 30 0F D6 00 99 22 41 20 4C 4F 54 20 4F 46 |".0...."A LOT OF|
00000720: 20 54 48 45 20 48 41 52 44 20 57 4F 52 4B 2E 22 | THE HARD WORK."|
00000730: 00 5A 0F DC 00 99 3A 99 22 54 48 45 52 45 20 48 |.Z....:."THERE H|
00000740: 41 56 45 20 42 45 45 4E 20 41 20 46 45 57 20 41 |AVE BEEN A FEW A|
00000750: 53 53 45 4D 42 4C 45 52 53 22 00 89 0F DE 00 99 |SSEMBLERS"......|
00000760: 22 57 52 49 54 54 45 4E 20 46 4F 52 20 54 48 45 |"WRITTEN FOR THE|
00000770: 20 36 34 2E 20 54 48 45 20 36 35 31 30 2B 20 41 | 64. THE 6510+ A|
00000780: 53 53 45 4D 42 4C 45 52 22 00 B8 0F E0 00 99 22 |SSEMBLER"......"|
00000790: 4F 4E 20 54 48 49 53 20 44 49 53 4B 20 49 53 20 |ON THIS DISK IS |
000007A0: 56 45 52 59 20 47 4F 4F 44 2E 20 52 45 41 44 20 |VERY GOOD. READ |
000007B0: 54 48 45 20 44 4F 43 22 00 E5 0F E2 00 99 22 46 |THE DOC"......"F|
000007C0: 49 4C 45 20 46 4F 52 20 49 4E 53 54 52 55 43 54 |ILE FOR INSTRUCT|
000007D0: 49 4F 4E 53 20 26 20 4C 4F 41 44 20 53 4F 4D 45 |IONS & LOAD SOME|
000007E0: 20 4F 46 20 22 00 16 10 E4 00 99 22 54 48 45 20 | OF "......"THE |
000007F0: 53 41 4D 50 4C 45 20 53 4F 55 52 43 45 20 46 49 |SAMPLE SOURCE FI|
00000800: 4C 45 53 20 54 4F 20 41 4E 41 4C 59 53 45 20 54 |LES TO ANALYSE T|
00000810: 48 45 4D 2E 22 3B 00 36 10 E6 00 8F 4E 54 22 48 |HEM.";.6....NT"H|
00000820: 41 53 20 46 55 4C 4C 20 49 4E 53 54 52 55 43 54 |AS FULL INSTRUCT|
00000830: 49 4F 4E 53 2E 22 00 40 10 E8 00 8D 39 30 30 30 |IONS.".@....9000|
00000840: 00 6B 10 F0 00 99 22 53 49 4D 50 4C 45 20 52 4F |.k...."SIMPLE RO|
00000850: 55 54 49 4E 45 53 20 43 41 4E 20 41 4C 53 4F 20 |UTINES CAN ALSO |
00000860: 42 45 20 57 52 49 54 54 45 4E 22 00 96 10 F2 00 |BE WRITTEN".....|
00000870: 99 22 57 49 54 48 4F 55 54 20 41 4E 20 41 53 53 |."WITHOUT AN ASS|
00000880: 45 4D 42 4C 45 52 20 41 4E 44 20 50 4F 4B 45 44 |EMBLER AND POKED|
00000890: 20 49 4E 54 4F 22 00 BB 10 F4 00 99 22 4D 45 4D | INTO"......"MEM|
000008A0: 4F 52 59 20 55 53 49 4E 47 20 41 20 27 42 41 53 |ORY USING A 'BAS|
000008B0: 49 43 20 4C 4F 41 44 45 52 27 22 00 E8 10 FA 00 |IC LOADER'".....|
000008C0: 99 3A 99 22 57 45 20 57 49 4C 4C 20 4E 4F 57 20 |.:."WE WILL NOW |
000008D0: 49 4E 56 45 53 54 49 47 41 54 45 20 54 48 49 53 |INVESTIGATE THIS|
000008E0: 20 4D 45 54 48 4F 44 22 00 0C 11 FB 00 99 22 53 | METHOD"......"S|
000008F0: 4F 20 41 53 20 54 4F 20 47 49 56 45 20 59 4F 55 |O AS TO GIVE YOU|
00000900: 20 41 4E 20 49 44 45 41 20 4F 46 22 00 2D 11 FC | AN IDEA OF".-..|
00000910: 00 99 22 4D 41 43 48 49 4E 45 20 43 4F 44 45 20 |.."MACHINE CODE |
00000920: 50 52 4F 47 52 41 4D 4D 49 4E 47 2E 22 00 37 11 |PROGRAMMING.".7.|
00000930: 04 01 8D 39 30 30 30 00 5F 11 2C 01 99 22 4C 45 |...9000._.,.."LE|
00000940: 54 27 53 20 54 41 4B 45 20 41 20 53 49 4D 50 4C |T'S TAKE A SIMPL|
00000950: 45 20 43 4F 4D 4D 41 4E 44 20 49 2E 45 2E 22 00 |E COMMAND I.E.".|
00000960: 8A 11 2E 01 99 22 43 48 41 4E 47 49 4E 47 20 54 |....."CHANGING T|
00000970: 48 45 20 42 4F 52 44 45 52 20 43 4F 4C 4F 55 52 |HE BORDER COLOUR|
00000980: 20 54 4F 20 47 52 45 45 4E 22 00 BA 11 32 01 99 | TO GREEN"...2..|
00000990: 3A 99 22 49 4E 20 42 41 53 49 43 20 59 4F 55 20 |:."IN BASIC YOU |
000009A0: 57 4F 55 4C 44 20 44 4F 20 54 48 49 53 20 42 59 |WOULD DO THIS BY|
000009B0: 20 45 4E 54 45 52 49 4E 47 22 00 CE 11 34 01 99 | ENTERING"...4..|
000009C0: 22 50 4F 4B 45 20 35 33 32 38 30 2C 35 22 00 FB |"POKE 53280,5"..|
000009D0: 11 36 01 99 3A 99 22 49 4E 20 41 53 53 45 4D 42 |.6..:."IN ASSEMB|
000009E0: 4C 59 20 4C 41 4E 47 55 41 47 45 20 54 48 49 53 |LY LANGUAGE THIS|
000009F0: 20 57 4F 55 4C 44 20 42 45 2D 22 00 0B 12 38 01 | WOULD BE-"...8.|
00000A00: 99 3A 99 22 4C 44 41 20 23 35 22 00 1C 12 3A 01 |.:."LDA #5"...:.|
00000A10: 99 22 53 54 41 20 35 33 32 38 30 22 00 27 12 3C |."STA 53280".'.<|
00000A20: 01 99 22 52 54 53 22 00 4F 12 40 01 99 3A 99 22 |.."RTS".O.@..:."|
00000A30: 4C 44 41 2C 53 54 41 2C 20 41 4E 44 20 52 54 53 |LDA,STA, AND RTS|
00000A40: 20 41 52 45 20 27 4F 50 43 4F 44 45 53 27 22 00 | ARE 'OPCODES'".|
00000A50: 80 12 42 01 99 3A 99 22 54 48 45 59 20 41 52 45 |..B..:."THEY ARE|
00000A60: 20 4C 49 4B 45 20 54 48 45 20 43 4F 4D 4D 41 4E | LIKE THE COMMAN|
00000A70: 44 53 20 54 48 41 54 20 59 4F 55 20 55 53 45 22 |DS THAT YOU USE"|
00000A80: 00 91 12 44 01 99 22 49 4E 20 42 41 53 49 43 2E |...D.."IN BASIC.|
00000A90: 22 00 9B 12 4A 01 8D 39 30 30 30 00 C1 12 90 01 |"...J..9000.....|
00000AA0: 99 22 4C 44 41 20 4D 45 41 4E 53 20 4C 4F 41 44 |."LDA MEANS LOAD|
00000AB0: 20 54 48 45 20 41 43 43 55 4D 55 4C 41 54 4F 52 | THE ACCUMULATOR|
00000AC0: 22 00 EA 12 92 01 99 3A 99 22 53 54 41 20 4D 45 |"......:."STA ME|
00000AD0: 41 4E 53 20 53 54 4F 52 45 20 54 48 45 20 41 43 |ANS STORE THE AC|
00000AE0: 43 55 4D 55 4C 41 54 4F 52 22 00 14 13 94 01 99 |CUMULATOR"......|
00000AF0: 3A 99 22 52 54 53 20 4D 45 41 4E 53 20 52 45 54 |:."RTS MEANS RET|
00000B00: 55 52 4E 20 46 52 4F 4D 20 53 55 42 52 4F 55 54 |URN FROM SUBROUT|
00000B10: 49 4E 45 22 00 34 13 96 01 99 3A 99 22 53 4F 20 |INE".4....:."SO |
00000B20: 4F 55 52 20 53 48 4F 52 54 20 50 52 47 20 53 41 |OUR SHORT PRG SA|
00000B30: 59 53 2D 22 00 61 13 98 01 99 3A 99 22 4C 4F 41 |YS-".a....:."LOA|
00000B40: 44 20 54 48 45 20 41 43 43 55 4D 55 4C 41 54 4F |D THE ACCUMULATO|
00000B50: 52 20 57 49 54 48 20 4E 55 4D 42 45 52 20 35 2C |R WITH NUMBER 5,|
00000B60: 22 00 8E 13 9A 01 99 22 53 54 4F 52 45 20 54 48 |"......"STORE TH|
00000B70: 45 20 56 41 4C 55 45 20 49 4E 20 54 48 45 20 41 |E VALUE IN THE A|
00000B80: 43 43 55 4D 55 4C 41 54 4F 52 20 41 54 22 00 BD |CCUMULATOR AT"..|
00000B90: 13 9C 01 99 22 4D 45 4D 20 35 33 32 38 30 2C 20 |...."MEM 53280, |
00000BA0: 54 48 45 4E 20 52 45 54 55 52 4E 20 46 52 4F 4D |THEN RETURN FROM|
00000BB0: 20 54 48 45 20 52 4F 55 54 49 4E 45 22 00 EA 13 | THE ROUTINE"...|
00000BC0: A4 01 99 3A 99 22 49 4E 20 46 41 43 54 20 54 48 |...:."IN FACT TH|
00000BD0: 45 52 45 20 41 52 45 20 4D 41 4E 59 20 4F 50 43 |ERE ARE MANY OPC|
00000BE0: 4F 44 45 53 20 54 48 41 54 22 00 16 14 A6 01 99 |ODES THAT"......|
00000BF0: 22 43 41 4E 20 42 45 20 55 53 45 44 2C 20 54 48 |"CAN BE USED, TH|
00000C00: 45 53 45 20 41 52 45 20 4A 55 53 54 20 33 20 53 |ESE ARE JUST 3 S|
00000C10: 49 4D 50 4C 45 22 00 27 14 A8 01 99 22 45 58 41 |IMPLE".'...."EXA|
00000C20: 4D 50 4C 45 53 2E 22 00 55 14 AE 01 99 3A 99 22 |MPLES.".U....:."|
00000C30: 4E 4F 57 20 57 45 20 57 49 4C 4C 20 53 45 45 20 |NOW WE WILL SEE |
00000C40: 48 4F 57 20 54 4F 20 43 4F 4E 56 45 52 54 20 54 |HOW TO CONVERT T|
00000C50: 48 45 53 45 22 00 78 14 B0 01 99 22 43 4F 4D 4D |HESE".x...."COMM|
00000C60: 41 4E 44 53 20 49 4E 54 4F 20 44 41 54 41 20 4E |ANDS INTO DATA N|
00000C70: 55 4D 42 45 52 53 2E 22 00 82 14 B8 01 8D 39 30 |UMBERS."......90|
00000C80: 30 30 00 AA 14 F4 01 99 22 45 41 43 48 20 4F 50 |00......"EACH OP|
00000C90: 43 4F 44 45 20 49 53 20 52 45 50 52 45 53 45 4E |CODE IS REPRESEN|
00000CA0: 54 45 44 20 42 59 20 41 20 22 00 C2 14 FE 01 99 |TED BY A "......|
00000CB0: 22 53 50 45 43 49 46 49 43 20 4E 55 4D 42 45 52 |"SPECIFIC NUMBER|
00000CC0: 2E 22 00 EF 14 00 02 99 3A 99 22 46 4F 52 20 49 |."......:."FOR I|
00000CD0: 4E 53 54 41 4E 43 45 20 4C 44 41 20 49 53 20 52 |NSTANCE LDA IS R|
00000CE0: 45 50 52 45 53 45 4E 54 45 44 2C 20 49 4E 22 00 |EPRESENTED, IN".|
00000CF0: 12 15 02 02 99 22 54 48 49 53 20 43 41 53 45 20 |....."THIS CASE |
00000D00: 42 59 20 54 48 45 20 4E 55 4D 42 45 52 20 31 36 |BY THE NUMBER 16|
00000D10: 39 22 00 41 15 04 02 99 3A 99 22 28 49 4E 20 46 |9".A....:."(IN F|
00000D20: 41 43 54 20 54 48 45 20 4E 55 4D 42 45 52 20 46 |ACT THE NUMBER F|
00000D30: 4F 52 20 4C 44 41 20 57 49 4C 4C 20 56 41 52 59 |OR LDA WILL VARY|
00000D40: 22 00 70 15 06 02 99 22 41 43 43 4F 52 44 49 4E |".p...."ACCORDIN|
00000D50: 47 20 54 4F 20 54 48 45 20 46 55 4E 43 54 49 4F |G TO THE FUNCTIO|
00000D60: 4E 2E 20 49 4E 20 54 48 49 53 20 43 41 53 45 22 |N. IN THIS CASE"|
00000D70: 00 9A 15 08 02 99 22 54 48 45 20 46 55 4E 43 54 |......"THE FUNCT|
00000D80: 49 4F 4E 20 49 53 20 54 4F 20 4C 4F 41 44 20 41 |ION IS TO LOAD A|
00000D90: 20 53 50 45 43 49 46 49 43 22 00 C8 15 0A 02 99 | SPECIFIC"......|
00000DA0: 22 4E 55 4D 42 45 52 2E 54 48 49 53 20 49 53 20 |"NUMBER.THIS IS |
00000DB0: 43 41 4C 4C 45 44 20 27 54 48 45 20 27 49 4D 4D |CALLED 'THE 'IMM|
00000DC0: 45 44 49 41 54 45 27 22 00 DF 15 0C 02 99 22 4D |EDIATE'"......"M|
00000DD0: 4F 44 45 20 41 4E 44 20 49 53 20 31 36 39 29 00 |ODE AND IS 169).|
00000DE0: 0F 16 0E 02 99 3A 99 22 54 48 45 20 4E 55 4D 42 |.....:."THE NUMB|
00000DF0: 45 52 20 46 4F 52 20 53 54 41 20 49 4E 20 54 48 |ER FOR STA IN TH|
00000E00: 49 53 20 43 41 53 45 20 49 53 20 31 34 31 22 00 |IS CASE IS 141".|
00000E10: 3A 16 10 02 99 22 41 4E 44 20 54 48 45 20 4E 55 |:...."AND THE NU|
00000E20: 4D 42 45 52 20 46 4F 52 20 52 54 53 20 49 53 20 |MBER FOR RTS IS |
00000E30: 41 4C 57 41 59 53 20 39 36 22 00 64 16 12 02 99 |ALWAYS 96".d....|
00000E40: 3A 99 22 53 4F 20 4F 55 52 20 43 4F 44 45 20 4E |:."SO OUR CODE N|
00000E50: 4F 57 20 4C 4F 4F 4B 53 20 4C 49 4B 45 20 54 48 |OW LOOKS LIKE TH|
00000E60: 49 53 2D 22 00 73 16 14 02 99 3A 99 22 31 36 39 |IS-".s....:."169|
00000E70: 20 35 22 00 84 16 16 02 99 22 31 34 31 20 35 33 | 5"......"141 53|
00000E80: 32 38 30 22 00 8E 16 18 02 99 22 39 36 22 00 98 |280"......"96"..|
00000E90: 16 1C 02 8D 39 30 30 30 00 C2 16 58 02 99 22 4E |....9000...X.."N|
00000EA0: 4F 57 20 54 48 45 20 4F 4E 4C 59 20 44 49 46 46 |OW THE ONLY DIFF|
00000EB0: 49 43 55 4C 54 59 20 49 53 20 54 48 41 54 20 49 |ICULTY IS THAT I|
00000EC0: 4E 22 00 F0 16 62 02 99 22 4D 41 43 48 49 4E 45 |N"...b.."MACHINE|
00000ED0: 20 43 4F 44 45 20 59 4F 55 20 43 41 4E 4E 4F 54 | CODE YOU CANNOT|
00000EE0: 20 55 53 45 20 41 4E 59 20 4E 55 4D 42 45 52 22 | USE ANY NUMBER"|
00000EF0: 00 08 17 64 02 99 22 48 49 47 48 45 52 20 54 48 |...d.."HIGHER TH|
00000F00: 41 4E 20 32 35 35 2E 22 00 35 17 66 02 99 22 53 |AN 255.".5.f.."S|
00000F10: 4F 20 35 33 32 38 30 20 4D 55 53 54 20 42 45 20 |O 53280 MUST BE |
00000F20: 43 4F 4E 56 45 52 54 45 44 20 54 4F 20 57 48 41 |CONVERTED TO WHA|
00000F30: 54 20 49 53 22 00 5C 17 6C 02 99 22 43 41 4C 4C |T IS".\.l.."CALL|
00000F40: 45 44 20 48 49 47 48 42 59 54 45 2F 4C 4F 57 42 |ED HIGHBYTE/LOWB|
00000F50: 59 54 45 20 46 4F 52 4D 41 54 2E 22 00 89 17 76 |YTE FORMAT."...v|
00000F60: 02 99 3A 99 22 54 4F 20 44 4F 20 54 48 49 53 20 |..:."TO DO THIS |
00000F70: 46 49 52 53 54 20 44 49 56 49 44 45 20 54 48 45 |FIRST DIVIDE THE|
00000F80: 20 4E 55 4D 42 45 52 20 22 00 A8 17 78 02 99 22 | NUMBER "...x.."|
00000F90: 42 59 20 32 35 36 2D 20 20 20 35 33 32 38 30 2F |BY 256- 53280/|
00000FA0: 32 35 36 3D 32 30 38 22 00 CA 17 7A 02 99 3A 99 |256=208"...z..:.|
00000FB0: 22 32 30 38 20 49 53 20 54 48 45 4E 20 4F 55 52 |"208 IS THEN OUR|
00000FC0: 20 48 49 47 48 42 59 54 45 22 00 F9 17 7C 02 99 | HIGHBYTE"...|..|
00000FD0: 3A 99 22 54 48 45 20 52 45 4D 41 49 4E 44 45 52 |:."THE REMAINDER|
00000FE0: 20 49 53 20 33 32 20 28 35 33 32 38 30 2D 32 30 | IS 32 (53280-20|
00000FF0: 38 2A 32 35 36 3D 33 32 22 00 14 18 7E 02 99 3A |8*256=32"...~..:|
00001000: 99 22 33 32 20 49 53 20 4F 55 52 20 4C 4F 57 42 |."32 IS OUR LOWB|
00001010: 59 54 45 22 00 44 18 80 02 99 3A 99 22 54 48 49 |YTE".D....:."THI|
00001020: 53 20 49 53 20 45 4E 54 45 52 45 44 20 4C 49 4B |S IS ENTERED LIK|
00001030: 45 20 54 48 49 53 28 4C 4F 57 42 59 54 45 20 31 |E THIS(LOWBYTE 1|
00001040: 53 54 29 22 00 58 18 82 02 99 3A 99 22 31 34 31 |ST)".X....:."141|
00001050: 20 33 32 20 32 30 38 22 00 7D 18 84 02 99 3A 99 | 32 208".}....:.|
00001060: 22 54 48 45 20 43 4F 4D 50 55 54 45 52 20 52 45 |"THE COMPUTER RE|
00001070: 41 44 53 20 54 48 49 53 20 41 53 2D 22 00 95 18 |ADS THIS AS-"...|
00001080: 85 02 99 22 27 53 54 4F 52 45 20 41 54 20 35 33 |..."'STORE AT 53|
00001090: 32 38 30 27 22 00 9F 18 86 02 8D 39 30 30 30 00 |280'"......9000.|
000010A0: BC 18 BC 02 99 22 4F 55 52 20 4F 52 49 47 49 4E |....."OUR ORIGIN|
000010B0: 41 4C 20 50 52 47 20 57 41 53 2D 22 00 CC 18 BE |AL PRG WAS-"....|
000010C0: 02 99 3A 99 22 4C 44 41 20 23 35 22 00 DD 18 C0 |..:."LDA #5"....|
000010D0: 02 99 22 53 54 41 20 35 33 32 38 30 22 00 E8 18 |.."STA 53280"...|
000010E0: C2 02 99 22 52 54 53 22 00 18 19 C4 02 99 3A 99 |..."RTS"......:.|
000010F0: 22 4E 4F 57 2C 20 43 4F 4E 56 45 52 54 45 44 20 |"NOW, CONVERTED |
00001100: 54 4F 20 4D 41 43 48 49 4E 45 20 43 4F 44 45 20 |TO MACHINE CODE |
00001110: 44 41 54 41 20 57 45 22 00 29 19 C6 02 99 22 4E |DATA WE".)...."N|
00001120: 4F 57 20 48 41 56 45 2D 22 00 38 19 C8 02 99 3A |OW HAVE-".8....:|
00001130: 99 22 31 36 39 20 35 22 00 4A 19 CA 02 99 22 31 |."169 5".J...."1|
00001140: 34 31 20 33 32 20 32 30 38 22 00 54 19 CC 02 99 |41 32 208".T....|
00001150: 22 39 36 22 00 84 19 D0 02 99 3A 99 22 41 4C 4C |"96"......:."ALL|
00001160: 20 57 45 20 48 41 56 45 20 54 4F 20 44 4F 20 49 | WE HAVE TO DO I|
00001170: 53 20 50 4F 4B 45 20 54 48 49 53 20 44 41 54 41 |S POKE THIS DATA|
00001180: 20 54 4F 22 00 B0 19 D2 02 99 22 4D 45 4D 4F 52 | TO"......"MEMOR|
00001190: 59 2E 54 48 49 53 20 42 41 53 49 43 20 4C 4F 41 |Y.THIS BASIC LOA|
000011A0: 44 45 52 20 57 49 4C 4C 20 44 4F 20 49 54 2D 22 |DER WILL DO IT-"|
000011B0: 00 E2 19 DA 02 99 3A 99 22 31 30 20 46 4F 52 50 |......:."10 FORP|
000011C0: 3D 34 39 31 35 32 54 4F 34 39 31 35 37 3A 52 45 |=49152TO49157:RE|
000011D0: 41 44 20 41 3A 50 4F 4B 45 50 2C 41 3A 4E 45 58 |AD A:POKEP,A:NEX|
000011E0: 54 22 00 05 1A DC 02 99 22 32 30 20 44 41 54 41 |T"......"20 DATA|
000011F0: 20 31 36 39 2C 35 2C 31 34 31 2C 33 32 2C 32 30 | 169,5,141,32,20|
00001200: 38 2C 39 36 22 00 2E 1A DE 02 99 3A 99 22 28 43 |8,96"......:."(C|
00001210: 4F 50 59 20 54 48 49 53 20 44 4F 57 4E 20 26 20 |OPY THIS DOWN & |
00001220: 54 52 59 20 49 54 20 4C 41 54 45 52 29 22 00 38 |TRY IT LATER)".8|
00001230: 1A E4 02 8D 39 30 30 30 00 67 1A 20 03 99 22 4F |....9000.g. .."O|
00001240: 4E 43 45 20 54 48 49 53 20 42 41 53 49 43 20 4C |NCE THIS BASIC L|
00001250: 4F 41 44 45 52 20 49 53 20 45 4E 54 45 52 45 44 |OADER IS ENTERED|
00001260: 20 26 20 52 55 4E 22 00 93 1A 22 03 99 22 41 4C | & RUN"...".."AL|
00001270: 4C 20 59 4F 55 20 44 4F 20 49 53 20 54 59 50 45 |L YOU DO IS TYPE|
00001280: 20 49 4E 20 53 59 53 34 39 31 35 32 20 28 52 54 | IN SYS49152 (RT|
00001290: 4E 29 22 00 BF 1A 24 03 99 3A 99 22 54 48 49 53 |N)"...$..:."THIS|
000012A0: 20 54 45 4C 4C 53 20 54 48 45 20 43 4F 4D 50 55 | TELLS THE COMPU|
000012B0: 54 45 52 20 54 4F 20 45 58 45 43 55 54 45 22 00 |TER TO EXECUTE".|
000012C0: E0 1A 26 03 99 22 54 48 45 20 52 4F 55 54 49 4E |..&.."THE ROUTIN|
000012D0: 45 20 41 54 20 4D 45 4D 20 34 39 31 35 32 2E 22 |E AT MEM 49152."|
000012E0: 00 0F 1B 28 03 99 3A 99 22 49 46 20 59 4F 55 20 |...(..:."IF YOU |
000012F0: 48 41 56 45 20 44 4F 4E 45 20 45 56 45 52 59 54 |HAVE DONE EVERYT|
00001300: 48 49 4E 47 20 43 4F 52 52 45 43 54 4C 59 22 00 |HING CORRECTLY".|
00001310: 3E 1B 2A 03 99 22 54 48 45 4E 20 54 48 45 20 42 |>.*.."THEN THE B|
00001320: 4F 52 44 45 52 20 53 48 4F 55 4C 44 20 43 48 41 |ORDER SHOULD CHA|
00001330: 4E 47 45 20 54 4F 20 47 52 45 45 4E 2E 22 00 6F |NGE TO GREEN.".o|
00001340: 1B 34 03 99 3A 99 22 B7 B7 B7 B7 B7 B7 B7 B7 B7 |.4..:.".........|
00001350: B7 B7 B7 B7 B7 B7 B7 B7 B7 B7 B7 B7 B7 B7 B7 B7 |................|
00001360: B7 B7 B7 B7 B7 B7 B7 B7 B7 B7 B7 B7 B7 B7 22 00 |..............".|
00001370: 9F 1B 3E 03 99 3A 99 22 4F 46 20 43 4F 55 52 53 |..>..:."OF COURS|
00001380: 45 2C 49 4E 20 41 20 53 48 4F 52 54 20 52 4F 55 |E,IN A SHORT ROU|
00001390: 54 49 4E 45 20 4C 49 4B 45 20 54 48 49 53 22 00 |TINE LIKE THIS".|
000013A0: CC 1B 40 03 99 22 54 48 45 20 44 49 46 46 45 52 |..@.."THE DIFFER|
000013B0: 45 4E 43 45 20 49 4E 20 53 50 45 45 44 20 49 53 |ENCE IN SPEED IS|
000013C0: 20 4E 4F 54 20 52 45 41 4C 4C 59 22 00 FB 1B 42 | NOT REALLY"...B|
000013D0: 03 99 22 4E 4F 54 49 43 45 41 42 4C 45 2C 20 42 |.."NOTICEABLE, B|
000013E0: 55 54 20 49 4E 20 4C 4F 4E 47 45 52 20 50 52 47 |UT IN LONGER PRG|
000013F0: 53 20 54 48 45 52 45 20 49 53 22 00 11 1C 44 03 |S THERE IS"...D.|
00001400: 99 22 4E 4F 20 43 4F 4D 50 41 52 49 53 4F 4E 2E |."NO COMPARISON.|
00001410: 22 00 21 1C 48 03 8D 39 30 30 30 3A 89 31 30 30 |".!.H..9000:.100|
00001420: 30 00 4F 1C E8 03 99 22 54 48 45 20 46 4F 4C 4C |0.O...."THE FOLL|
00001430: 4F 57 49 4E 47 20 45 58 41 4D 50 4C 45 20 49 53 |OWING EXAMPLE IS|
00001440: 20 41 4E 4F 54 48 45 52 20 53 48 4F 52 54 22 00 | ANOTHER SHORT".|
00001450: 78 1C EA 03 99 22 52 4F 55 54 49 4E 45 20 54 48 |x...."ROUTINE TH|
00001460: 41 54 20 53 48 4F 57 53 20 54 48 45 20 55 53 45 |AT SHOWS THE USE|
00001470: 20 4F 46 20 54 48 45 22 00 A2 1C EC 03 99 22 58 | OF THE"......"X|
00001480: 20 52 45 47 49 53 54 45 52 20 41 53 20 41 20 27 | REGISTER AS A '|
00001490: 43 4F 55 4E 54 45 52 27 20 41 4E 44 20 41 4C 53 |COUNTER' AND ALS|
000014A0: 4F 22 00 CE 1C EE 03 99 22 49 4E 54 52 4F 44 55 |O"......"INTRODU|
000014B0: 43 45 53 20 54 48 45 20 27 42 52 41 4E 43 48 27 |CES THE 'BRANCH'|
000014C0: 20 49 4E 53 54 52 55 43 54 49 4F 4E 2E 22 00 FD | INSTRUCTION."..|
000014D0: 1C F0 03 99 3A 99 22 54 48 45 20 4E 55 4D 45 52 |....:."THE NUMER|
000014E0: 49 43 41 4C 20 44 41 54 41 20 43 41 4E 20 42 45 |ICAL DATA CAN BE|
000014F0: 20 4C 4F 41 44 45 44 20 49 4E 54 4F 22 00 2C 1D | LOADED INTO".,.|
00001500: F2 03 99 22 4D 45 4D 4F 52 59 20 57 49 54 48 20 |..."MEMORY WITH |
00001510: 41 20 42 41 53 49 43 20 4C 4F 41 44 45 52 20 49 |A BASIC LOADER I|
00001520: 46 20 59 4F 55 20 57 49 53 48 2E 22 00 5B 1D FA |F YOU WISH.".[..|
00001530: 03 99 3A 99 22 54 48 45 20 43 4F 44 45 20 41 53 |..:."THE CODE AS|
00001540: 20 49 54 20 57 4F 55 4C 44 20 42 45 20 57 52 49 | IT WOULD BE WRI|
00001550: 54 54 45 4E 20 42 59 20 41 4E 22 00 83 1D FC 03 |TTEN BY AN".....|
00001560: 99 22 41 53 53 45 4D 42 4C 45 52 20 49 53 20 4F |."ASSEMBLER IS O|
00001570: 4E 20 54 48 45 20 4C 45 46 54 20 41 4E 44 20 54 |N THE LEFT AND T|
00001580: 48 45 22 00 B1 1D FE 03 99 22 52 45 53 55 4C 54 |HE"......"RESULT|
00001590: 49 4E 47 20 4E 55 4D 45 52 49 43 41 4C 20 43 4F |ING NUMERICAL CO|
000015A0: 44 45 20 4F 4E 20 54 48 45 20 52 49 47 48 54 2E |DE ON THE RIGHT.|
000015B0: 22 00 E1 1D 04 04 99 3A 99 22 4E 4F 54 45 20 54 |"......:."NOTE T|
000015C0: 48 41 54 20 41 4E 20 41 53 53 45 4D 42 4C 45 52 |HAT AN ASSEMBLER|
000015D0: 20 41 4C 4C 4F 57 53 20 27 4C 41 42 45 4C 53 27 | ALLOWS 'LABELS'|
000015E0: 22 00 0F 1E 06 04 99 22 46 4F 52 20 4A 55 4D 50 |"......"FOR JUMP|
000015F0: 53 20 41 4E 44 20 41 4C 53 4F 20 41 4C 4C 45 56 |S AND ALSO ALLEV|
00001600: 49 41 54 45 53 20 54 48 45 20 4E 45 45 44 22 00 |IATES THE NEED".|
00001610: 3E 1E 07 04 99 22 54 4F 20 43 4F 4E 56 45 52 54 |>...."TO CONVERT|
00001620: 20 4E 55 4D 42 45 52 53 20 54 4F 20 4C 4F 57 42 | NUMBERS TO LOWB|
00001630: 59 54 45 2F 48 49 47 48 42 59 54 45 2E 22 00 6F |YTE/HIGHBYTE.".o|
00001640: 1E 08 04 99 3A 99 22 59 4F 55 20 43 41 4E 20 55 |....:."YOU CAN U|
00001650: 53 45 20 4C 41 42 45 4C 53 20 4C 49 4B 45 20 27 |SE LABELS LIKE '|
00001660: 4C 4F 4F 50 27 20 45 54 43 20 54 48 41 54 22 00 |LOOP' ETC THAT".|
00001670: 9C 1E 09 04 99 22 44 45 46 49 4E 45 20 54 48 45 |....."DEFINE THE|
00001680: 20 46 55 4E 43 54 49 4F 4E 20 4F 52 20 41 53 20 | FUNCTION OR AS |
00001690: 49 20 48 41 56 45 20 44 4F 4E 45 22 00 C1 1E 0A |I HAVE DONE"....|
000016A0: 04 99 22 55 53 45 20 58 58 58 58 20 4F 52 20 59 |.."USE XXXX OR Y|
000016B0: 59 59 59 20 4F 52 20 57 48 41 54 45 56 45 52 2E |YYY OR WHATEVER.|
000016C0: 22 00 CB 1E 0D 04 8D 39 30 30 30 00 F9 1E 10 04 |"......9000.....|
000016D0: 99 22 54 48 49 53 20 52 4F 55 54 49 4E 45 20 50 |."THIS ROUTINE P|
000016E0: 4F 4B 45 53 20 4C 45 54 54 45 52 20 27 41 27 20 |OKES LETTER 'A' |
000016F0: 28 31 29 20 49 4E 54 4F 22 00 2A 1F 12 04 99 22 |(1) INTO".*...."|
00001700: 53 43 52 45 45 4E 20 4D 45 4D 4F 52 59 20 31 30 |SCREEN MEMORY 10|
00001710: 32 34 2D 31 32 36 33 28 36 20 4C 49 4E 45 53 20 |24-1263(6 LINES |
00001720: 4F 46 20 27 41 27 29 22 3A 99 00 49 1F 16 04 99 |OF 'A')":..I....|
00001730: 22 4C 44 58 20 23 30 20 20 20 20 20 20 20 20 20 |"LDX #0 |
00001740: 20 20 20 31 36 32 20 30 22 00 68 1F 18 04 99 22 | 162 0".h...."|
00001750: 4C 44 41 20 23 31 20 20 20 20 20 20 20 20 20 20 |LDA #1 |
00001760: 20 20 31 36 39 20 31 22 00 89 1F 1A 04 99 22 58 | 169 1"......"X|
00001770: 58 58 58 20 53 54 41 2C 58 20 31 30 32 34 20 20 |XXX STA,X 1024 |
00001780: 20 31 35 37 20 30 20 34 22 00 A6 1F 1C 04 99 22 | 157 0 4"......"|
00001790: 49 4E 58 20 20 20 20 20 20 20 20 20 20 20 20 20 |INX |
000017A0: 20 20 32 33 32 22 00 C7 1F 1E 04 99 22 43 50 58 | 232"......"CPX|
000017B0: 20 23 32 34 31 20 20 20 20 20 20 20 20 20 20 32 | #241 2|
000017C0: 32 34 20 32 34 31 22 00 E8 1F 20 04 99 22 42 4E |24 241"... .."BN|
000017D0: 45 20 58 58 58 58 20 20 20 20 20 20 20 20 20 20 |E XXXX |
000017E0: 32 30 38 20 32 34 38 22 00 06 20 22 04 99 22 52 |208 248".. ".."R|
000017F0: 54 53 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |TS |
00001800: 20 39 36 22 3A 99 00 44 20 28 04 97 36 34 36 2C | 96":..D (..646,|
00001810: 33 3A 99 22 4C 44 58 20 23 30 20 22 3B 3A 97 36 |3:."LDX #0 ";:.6|
00001820: 34 36 2C 30 3A 99 22 4C 4F 41 44 53 20 54 48 45 |46,0:."LOADS THE|
00001830: 20 58 20 52 45 47 49 53 54 45 52 20 57 49 54 48 | X REGISTER WITH|
00001840: 20 23 30 22 00 72 20 2A 04 99 22 54 48 45 20 58 | #0".r *.."THE X|
00001850: 20 52 45 47 49 53 54 45 52 20 49 53 20 55 53 45 | REGISTER IS USE|
00001860: 44 20 41 53 20 41 4E 20 49 4E 44 45 58 20 28 49 |D AS AN INDEX (I|
00001870: 45 22 00 9B 20 2E 04 99 22 41 20 43 4F 55 4E 54 |E".. ..."A COUNT|
00001880: 45 52 29 20 41 53 20 57 45 20 57 49 4C 4C 20 53 |ER) AS WE WILL S|
00001890: 4F 4F 4E 20 53 45 45 2E 22 3A 99 00 DB 20 30 04 |OON SEE.":... 0.|
000018A0: 97 36 34 36 2C 33 3A 99 22 4C 44 41 20 23 31 20 |.646,3:."LDA #1 |
000018B0: 22 3B 3A 97 36 34 36 2C 30 3A 99 22 4C 4F 41 44 |";:.646,0:."LOAD|
000018C0: 53 20 54 48 45 20 41 43 43 55 4D 55 4C 41 54 4F |S THE ACCUMULATO|
000018D0: 52 20 57 49 54 48 20 23 31 2C 22 00 0B 21 31 04 |R WITH #1,"..!1.|
000018E0: 99 22 28 54 48 45 20 53 43 52 45 45 4E 20 43 4F |."(THE SCREEN CO|
000018F0: 44 45 20 4E 55 4D 42 45 52 20 46 4F 52 20 4C 45 |DE NUMBER FOR LE|
00001900: 54 54 45 52 20 27 41 27 22 3A 99 00 47 21 32 04 |TTER 'A'":..G!2.|
00001910: 97 36 34 36 2C 33 3A 99 22 53 54 41 2C 58 20 31 |.646,3:."STA,X 1|
00001920: 30 32 34 20 22 3B 3A 97 36 34 36 2C 30 3A 99 22 |024 ";:.646,0:."|
00001930: 54 48 49 53 20 49 53 20 54 48 45 20 41 42 53 4F |THIS IS THE ABSO|
00001940: 4C 55 54 45 2C 58 22 00 76 21 34 04 99 22 56 45 |LUTE,X".v!4.."VE|
00001950: 52 53 49 4F 4E 20 4F 46 20 53 54 41 2E 20 54 48 |RSION OF STA. TH|
00001960: 45 20 41 43 43 55 4D 55 4C 41 54 4F 52 20 57 49 |E ACCUMULATOR WI|
00001970: 4C 4C 20 20 20 22 00 A5 21 36 04 99 22 53 54 4F |LL "..!6.."STO|
00001980: 52 45 20 49 54 53 20 23 31 20 41 54 20 4D 45 4D |RE ITS #1 AT MEM|
00001990: 4F 52 59 20 31 30 32 34 28 54 48 45 20 53 43 52 |ORY 1024(THE SCR|
000019A0: 45 45 4E 29 22 00 D3 21 38 04 99 22 50 4C 55 53 |EEN)"..!8.."PLUS|
000019B0: 20 54 48 45 20 56 41 4C 55 45 20 4F 46 20 58 20 | THE VALUE OF X |
000019C0: 28 49 45 20 31 30 32 34 2C 31 30 32 35 2C 31 30 |(IE 1024,1025,10|
000019D0: 32 36 22 00 F2 21 39 04 99 22 45 54 43 20 54 4F |26"..!9.."ETC TO|
000019E0: 20 31 32 36 33 20 28 57 48 45 4E 20 58 3D 32 34 | 1263 (WHEN X=24|
000019F0: 31 29 00 1F 22 3A 04 99 22 20 20 20 20 20 20 20 |1)..":.." |
00001A00: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | |
00001A10: 20 2D 50 52 45 53 53 20 41 20 4B 45 59 2D 22 00 | -PRESS A KEY-".|
00001A20: 3B 22 3B 04 97 31 39 38 2C 30 3A 92 31 39 38 2C |;";..198,0:.198,|
00001A30: 31 3A A1 41 4A 24 3A 99 22 93 22 00 58 22 4C 04 |1:.AJ$:.".".X"L.|
00001A40: 99 22 48 45 52 45 20 49 54 20 49 53 20 41 47 41 |."HERE IT IS AGA|
00001A50: 49 4E 2E 2E 2E 22 3A 99 00 77 22 4E 04 99 22 4C |IN...":..w"N.."L|
00001A60: 44 58 20 23 30 20 20 20 20 20 20 20 20 20 20 20 |DX #0 |
00001A70: 20 31 36 32 20 30 22 00 96 22 50 04 99 22 4C 44 | 162 0".."P.."LD|
00001A80: 41 20 23 31 20 20 20 20 20 20 20 20 20 20 20 20 |A #1 |
00001A90: 31 36 39 20 31 22 00 B7 22 52 04 99 22 58 58 58 |169 1".."R.."XXX|
00001AA0: 58 20 53 54 41 2C 58 20 31 30 32 34 20 20 20 31 |X STA,X 1024 1|
00001AB0: 35 37 20 30 20 34 22 00 D4 22 54 04 99 22 49 4E |57 0 4".."T.."IN|
00001AC0: 58 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |X |
00001AD0: 32 33 32 22 00 F5 22 56 04 99 22 43 50 58 20 23 |232".."V.."CPX #|
00001AE0: 32 34 31 20 20 20 20 20 20 20 20 20 20 32 32 34 |241 224|
00001AF0: 20 32 34 31 22 00 16 23 58 04 99 22 42 4E 45 20 | 241"..#X.."BNE |
00001B00: 58 58 58 58 20 20 20 20 20 20 20 20 20 20 32 30 |XXXX 20|
00001B10: 38 20 32 34 38 22 00 32 23 5A 04 99 22 52 54 53 |8 248".2#Z.."RTS|
00001B20: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 39 | 9|
00001B30: 36 22 00 61 23 60 04 99 3A 99 22 58 58 58 58 20 |6".a#`..:."XXXX |
00001B40: 49 53 20 41 20 27 4C 41 42 45 4C 27 20 57 48 49 |IS A 'LABEL' WHI|
00001B50: 43 48 20 49 53 20 55 53 45 44 20 42 59 20 41 4E |CH IS USED BY AN|
00001B60: 22 00 90 23 62 04 99 22 41 53 53 45 4D 42 4C 45 |"..#b.."ASSEMBLE|
00001B70: 52 20 54 4F 20 44 45 46 49 4E 45 20 42 52 41 4E |R TO DEFINE BRAN|
00001B80: 43 48 45 53 20 41 4E 44 20 4A 55 4D 50 53 2E 22 |CHES AND JUMPS."|
00001B90: 00 CE 23 64 04 99 3A 97 36 34 36 2C 33 3A 99 22 |..#d..:.646,3:."|
00001BA0: 49 4E 58 20 22 3B 3A 97 36 34 36 2C 30 3A 99 22 |INX ";:.646,0:."|
00001BB0: 49 4E 43 52 45 41 53 45 53 20 54 48 45 20 56 41 |INCREASES THE VA|
00001BC0: 4C 55 45 20 4F 46 20 54 48 45 20 58 20 22 00 E3 |LUE OF THE X "..|
00001BD0: 23 66 04 99 22 52 45 47 49 53 54 45 52 20 42 59 |#f.."REGISTER BY|
00001BE0: 20 31 22 00 1E 24 68 04 97 36 34 36 2C 33 3A 99 | 1"..$h..646,3:.|
00001BF0: 22 43 50 58 20 23 32 34 31 20 22 3B 3A 97 36 34 |"CPX #241 ";:.64|
00001C00: 36 2C 30 3A 99 22 43 4F 4D 50 41 52 45 20 54 48 |6,0:."COMPARE TH|
00001C10: 45 20 56 41 4C 55 45 20 49 4E 20 54 48 45 00 37 |E VALUE IN THE.7|
00001C20: 24 6A 04 99 22 52 45 47 49 53 54 45 52 20 54 4F |$j.."REGISTER TO|
00001C30: 20 23 32 34 31 2E 22 00 72 24 6C 04 97 36 34 36 | #241.".r$l..646|
00001C40: 2C 33 3A 99 22 42 4E 45 20 58 58 58 58 22 3B 3A |,3:."BNE XXXX";:|
00001C50: 97 36 34 36 2C 30 3A 99 22 49 46 20 58 20 44 4F |.646,0:."IF X DO|
00001C60: 45 53 20 4E 4F 54 20 3D 20 32 34 31 20 54 48 45 |ES NOT = 241 THE|
00001C70: 4E 22 00 A0 24 6E 04 99 22 42 52 41 4E 43 48 20 |N"..$n.."BRANCH |
00001C80: 54 4F 20 4C 41 42 45 4C 20 58 58 58 58 2E 28 49 |TO LABEL XXXX.(I|
00001C90: 45 20 42 52 41 4E 43 48 20 49 46 20 4E 4F 54 22 |E BRANCH IF NOT"|
00001CA0: 00 AF 24 70 04 99 22 45 51 55 41 4C 2E 29 22 00 |..$p.."EQUAL.)".|
00001CB0: DF 24 72 04 97 36 34 36 2C 33 3A 99 22 52 54 53 |.$r..646,3:."RTS|
00001CC0: 20 22 3B 3A 97 36 34 36 2C 30 3A 99 22 4F 54 48 | ";:.646,0:."OTH|
00001CD0: 45 52 57 49 53 45 20 46 49 4E 49 53 48 2E 22 00 |ERWISE FINISH.".|
00001CE0: 0C 25 76 04 99 22 20 20 20 20 20 20 20 20 20 20 |.%v.." |
00001CF0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2D 50 | -P|
00001D00: 52 45 53 53 20 41 20 4B 45 59 2D 22 00 28 25 78 |RESS A KEY-".(%x|
00001D10: 04 97 31 39 38 2C 30 3A 92 31 39 38 2C 31 3A A1 |..198,0:.198,1:.|
00001D20: 41 4A 24 3A 99 22 93 22 00 41 25 B0 04 99 22 54 |AJ$:.".".A%..."T|
00001D30: 4F 20 53 55 4D 4D 41 52 49 53 45 2E 2E 2E 22 3A |O SUMMARISE...":|
00001D40: 99 00 60 25 B2 04 99 22 4C 44 58 20 23 30 20 20 |..`%..."LDX #0 |
00001D50: 20 20 20 20 20 20 20 20 20 20 31 36 32 20 30 22 | 162 0"|
00001D60: 00 7F 25 B4 04 99 22 4C 44 41 20 23 31 20 20 20 |..%..."LDA #1 |
00001D70: 20 20 20 20 20 20 20 20 20 31 36 39 20 31 22 00 | 169 1".|
00001D80: A0 25 B6 04 99 22 58 58 58 58 20 53 54 41 2C 58 |.%..."XXXX STA,X|
00001D90: 20 31 30 32 34 20 20 20 31 35 37 20 30 20 34 22 | 1024 157 0 4"|
00001DA0: 00 BD 25 B8 04 99 22 49 4E 58 20 20 20 20 20 20 |..%..."INX |
00001DB0: 20 20 20 20 20 20 20 20 20 32 33 32 22 00 DE 25 | 232"..%|
00001DC0: BA 04 99 22 43 50 58 20 23 32 34 31 20 20 20 20 |..."CPX #241 |
00001DD0: 20 20 20 20 20 20 32 32 34 20 32 34 31 22 00 FF | 224 241"..|
00001DE0: 25 BC 04 99 22 42 4E 45 20 58 58 58 58 20 20 20 |%..."BNE XXXX |
00001DF0: 20 20 20 20 20 20 20 32 30 38 20 32 34 38 22 00 | 208 248".|
00001E00: 1B 26 BE 04 99 22 52 54 53 20 20 20 20 20 20 20 |.&..."RTS |
00001E10: 20 20 20 20 20 20 20 20 39 36 22 00 32 26 C0 04 | 96".2&..|
00001E20: 99 3A 99 22 4C 4F 41 44 20 58 20 57 49 54 48 20 |.:."LOAD X WITH |
00001E30: 30 22 00 51 26 C2 04 99 22 4C 4F 41 44 20 41 43 |0".Q&..."LOAD AC|
00001E40: 43 55 4D 55 4C 41 54 4F 52 20 57 49 54 48 20 31 |CUMULATOR WITH 1|
00001E50: 22 00 80 26 C4 04 99 22 53 54 4F 52 45 20 43 4F |"..&..."STORE CO|
00001E60: 4E 54 45 4E 54 53 20 4F 46 20 41 43 43 55 4D 55 |NTENTS OF ACCUMU|
00001E70: 4C 41 54 4F 52 20 41 54 20 4D 45 4D 4F 52 59 22 |LATOR AT MEMORY"|
00001E80: 00 A1 26 C6 04 99 22 31 30 32 34 20 50 4C 55 53 |..&..."1024 PLUS|
00001E90: 20 54 48 45 20 56 41 4C 55 45 20 4F 46 20 58 2E | THE VALUE OF X.|
00001EA0: 22 00 C5 26 C8 04 99 22 49 4E 43 52 45 41 53 45 |"..&..."INCREASE|
00001EB0: 20 54 48 45 20 56 41 4C 55 45 20 4F 46 20 58 20 | THE VALUE OF X |
00001EC0: 42 59 20 31 22 00 ED 26 CA 04 99 22 49 53 20 58 |BY 1"..&..."IS X|
00001ED0: 20 3D 20 32 34 31 20 3F 20 28 49 45 20 32 34 30 | = 241 ? (IE 240|
00001EE0: 20 41 27 53 20 50 4F 4B 45 44 2E 29 22 00 18 27 | A'S POKED.)"..'|
00001EF0: CC 04 99 22 49 46 20 4E 4F 54 20 42 52 41 4E 43 |..."IF NOT BRANC|
00001F00: 48 20 42 41 43 4B 20 54 4F 20 4D 41 49 4E 20 52 |H BACK TO MAIN R|
00001F10: 4F 55 54 49 4E 45 2E 22 00 32 27 CE 04 99 22 49 |OUTINE.".2'..."I|
00001F20: 46 20 53 4F 20 54 48 45 4E 20 46 49 4E 49 53 48 |F SO THEN FINISH|
00001F30: 2E 22 00 5F 27 D0 04 99 3A 99 22 41 53 20 59 4F |."._'...:."AS YO|
00001F40: 55 20 43 41 4E 20 53 45 45 20 54 48 45 20 50 52 |U CAN SEE THE PR|
00001F50: 47 20 46 4C 4F 57 20 49 53 20 56 45 52 59 22 00 |G FLOW IS VERY".|
00001F60: 8C 27 D2 04 99 22 53 49 4D 49 4C 41 52 20 54 4F |.'..."SIMILAR TO|
00001F70: 20 54 48 41 54 20 4F 46 20 41 4E 20 45 41 53 59 | THAT OF AN EASY|
00001F80: 20 42 41 53 49 43 20 50 52 47 2E 22 00 96 27 D8 | BASIC PRG."..'.|
00001F90: 04 8D 39 30 30 30 00 C4 27 14 05 99 22 4C 45 54 |..9000..'..."LET|
00001FA0: 27 53 20 4C 4F 4F 4B 20 41 54 20 54 48 41 54 20 |'S LOOK AT THAT |
00001FB0: 42 52 41 4E 43 48 20 49 4E 53 54 52 55 43 54 49 |BRANCH INSTRUCTI|
00001FC0: 4F 4E 2E 22 00 EF 27 16 05 99 22 28 42 4E 45 20 |ON."..'..."(BNE |
00001FD0: 58 58 58 58 20 20 4F 52 20 4E 55 4D 45 52 49 43 |XXXX OR NUMERIC|
00001FE0: 41 4C 4C 59 20 32 30 38 20 32 34 38 2E 29 22 00 |ALLY 208 248.)".|
00001FF0: 1D 28 18 05 99 3A 99 22 57 48 45 4E 20 4E 4F 54 |.(...:."WHEN NOT|
00002000: 20 55 53 49 4E 47 20 41 4E 20 41 53 53 45 4D 42 | USING AN ASSEMB|
00002010: 4C 45 52 20 59 4F 55 20 4D 55 53 54 22 00 48 28 |LER YOU MUST".H(|
00002020: 1A 05 99 22 57 4F 52 4B 20 4F 55 54 20 54 48 45 |..."WORK OUT THE|
00002030: 20 42 52 41 4E 43 48 45 53 20 59 4F 55 52 53 45 | BRANCHES YOURSE|
00002040: 4C 46 2E 20 54 48 45 22 00 77 28 1C 05 99 22 4D |LF. THE".w(..."M|
00002050: 41 58 2E 20 44 49 53 54 41 4E 43 45 20 4F 46 20 |AX. DISTANCE OF |
00002060: 41 20 42 52 41 4E 43 48 20 49 53 20 31 32 38 20 |A BRANCH IS 128 |
00002070: 42 59 54 45 53 2E 22 00 A8 28 1E 05 99 3A 99 22 |BYTES."..(...:."|
00002080: 57 48 45 4E 20 42 52 41 4E 43 48 49 4E 47 20 42 |WHEN BRANCHING B|
00002090: 41 43 4B 20 43 4F 55 4E 54 20 44 4F 57 4E 20 46 |ACK COUNT DOWN F|
000020A0: 52 4F 4D 20 32 35 35 22 00 CF 28 20 05 99 22 28 |ROM 255"..( .."(|
000020B0: 49 4E 43 4C 55 53 49 56 45 29 2E 20 53 4F 20 43 |INCLUSIVE). SO C|
000020C0: 48 45 43 4B 20 54 48 49 53 20 4F 55 54 2D 22 00 |HECK THIS OUT-".|
000020D0: F2 28 22 05 99 3A 99 22 58 58 58 58 20 53 54 41 |.("..:."XXXX STA|
000020E0: 20 58 2C 31 30 32 34 20 20 20 31 35 37 20 30 20 | X,1024 157 0 |
000020F0: 34 22 00 0F 29 24 05 99 22 49 4E 58 20 20 20 20 |4"..)$.."INX |
00002100: 20 20 20 20 20 20 20 20 20 20 20 32 33 32 22 00 | 232".|
00002110: 30 29 26 05 99 22 43 50 58 20 23 32 34 31 20 20 |0)&.."CPX #241 |
00002120: 20 20 20 20 20 20 20 20 32 32 34 20 32 34 31 22 | 224 241"|
00002130: 00 51 29 28 05 99 22 42 4E 45 20 32 34 38 20 20 |.Q)(.."BNE 248 |
00002140: 20 20 20 20 20 20 20 20 20 32 30 38 20 32 34 38 | 208 248|
00002150: 22 00 80 29 29 05 99 3A 99 22 43 4F 55 4E 54 49 |"..))..:."COUNTI|
00002160: 4E 47 20 54 48 45 20 42 59 54 45 53 20 42 41 43 |NG THE BYTES BAC|
00002170: 4B 57 41 52 44 53 20 46 52 4F 4D 20 32 34 38 22 |KWARDS FROM 248"|
00002180: 00 AF 29 2A 05 99 22 54 4F 20 31 35 37 20 47 4F |..)*.."TO 157 GO|
00002190: 45 53 20 32 35 35 2C 32 35 34 2C 32 35 33 2C 32 |ES 255,254,253,2|
000021A0: 35 32 2C 32 35 31 2C 32 35 30 2C 32 34 39 22 00 |52,251,250,249".|
000021B0: DE 29 2C 05 99 22 54 48 45 4E 20 32 34 38 2E 53 |.),.."THEN 248.S|
000021C0: 4F 20 32 34 38 20 49 53 20 4F 55 52 20 42 52 41 |O 248 IS OUR BRA|
000021D0: 4E 43 48 20 44 49 53 54 41 4E 43 45 2E 22 00 E8 |NCH DISTANCE."..|
000021E0: 29 2E 05 8D 39 30 30 30 00 13 2A 46 05 99 22 46 |)...9000..*F.."F|
000021F0: 4F 52 57 41 52 44 20 42 52 41 4E 43 48 45 53 20 |ORWARD BRANCHES |
00002200: 41 52 45 20 4E 4F 4E 2D 49 4E 43 4C 55 53 49 56 |ARE NON-INCLUSIV|
00002210: 45 2E 22 00 27 2A 52 05 99 22 46 4F 52 20 45 58 |E.".'*R.."FOR EX|
00002220: 41 4D 50 4C 45 3A 22 00 46 2A 54 05 99 3A 99 22 |AMPLE:".F*T..:."|
00002230: 42 45 51 20 59 59 59 59 20 20 20 20 20 20 20 20 |BEQ YYYY |
00002240: 32 34 30 20 32 22 00 65 2A 56 05 99 22 42 4E 45 |240 2".e*V.."BNE|
00002250: 20 32 34 39 20 20 20 20 20 20 20 20 20 32 30 38 | 249 208|
00002260: 20 32 34 39 22 00 7F 2A 58 05 99 22 59 59 59 59 | 249"..*X.."YYYY|
00002270: 20 52 54 53 20 20 20 20 20 20 20 20 39 36 22 00 | RTS 96".|
00002280: A6 2A 5A 05 99 3A 99 22 46 4F 52 57 41 52 44 20 |.*Z..:."FORWARD |
00002290: 42 52 41 4E 43 48 45 53 20 43 41 4E 20 42 45 20 |BRANCHES CAN BE |
000022A0: 30 2D 31 32 37 22 00 CE 2A 5C 05 99 22 42 41 43 |0-127"..*\.."BAC|
000022B0: 4B 57 41 52 44 20 42 52 41 4E 43 48 45 53 20 43 |KWARD BRANCHES C|
000022C0: 41 4E 20 42 45 20 32 35 35 2D 31 32 38 22 00 FD |AN BE 255-128"..|
000022D0: 2A 64 05 99 3A 99 22 54 48 45 20 41 44 56 41 4E |*d..:."THE ADVAN|
000022E0: 54 41 47 45 53 20 4F 46 20 41 4E 20 41 53 53 45 |TAGES OF AN ASSE|
000022F0: 4D 42 4C 45 52 20 42 45 43 4F 4D 45 22 00 2C 2B |MBLER BECOME".,+|
00002300: 66 05 99 22 49 4D 4D 45 44 49 41 54 45 4C 59 20 |f.."IMMEDIATELY |
00002310: 4F 42 56 49 4F 55 53 2E 20 4C 41 42 45 4C 53 20 |OBVIOUS. LABELS |
00002320: 43 41 4E 20 42 45 20 55 53 45 44 22 00 5B 2B 68 |CAN BE USED".[+h|
00002330: 05 99 22 46 4F 52 20 42 52 41 4E 43 48 45 53 20 |.."FOR BRANCHES |
00002340: 41 4E 44 20 4E 55 4D 42 45 52 53 20 44 4F 20 4E |AND NUMBERS DO N|
00002350: 4F 54 20 4E 45 45 44 20 54 4F 22 00 84 2B 6A 05 |OT NEED TO"..+j.|
00002360: 99 22 42 45 20 43 4F 4E 56 45 52 54 45 44 20 54 |."BE CONVERTED T|
00002370: 4F 20 4C 4F 57 42 59 54 45 2F 48 49 47 48 42 59 |O LOWBYTE/HIGHBY|
00002380: 54 45 2E 22 00 B3 2B 6C 05 99 3A 99 22 48 4F 57 |TE."..+l..:."HOW|
00002390: 45 56 45 52 20 53 54 41 52 54 49 4E 47 20 4F 46 |EVER STARTING OF|
000023A0: 46 20 42 59 20 57 52 49 54 49 4E 47 20 53 48 4F |F BY WRITING SHO|
000023B0: 52 54 22 00 E1 2B 6E 05 99 22 52 4F 55 54 49 4E |RT"..+n.."ROUTIN|
000023C0: 45 53 20 57 49 54 48 20 41 20 42 41 53 49 43 20 |ES WITH A BASIC |
000023D0: 4C 4F 41 44 45 52 20 41 4E 44 20 44 4F 49 4E 47 |LOADER AND DOING|
000023E0: 22 00 0F 2C 70 05 99 22 59 4F 55 52 20 4F 57 4E |"..,p.."YOUR OWN|
000023F0: 20 43 41 4C 43 55 4C 41 54 49 4F 4E 53 20 49 53 | CALCULATIONS IS|
00002400: 20 41 20 47 4F 4F 44 20 57 41 59 20 54 4F 22 00 | A GOOD WAY TO".|
00002410: 37 2C 72 05 99 22 47 45 54 20 41 4E 20 49 4E 53 |7,r.."GET AN INS|
00002420: 49 47 48 54 20 4F 46 20 48 4F 57 20 4D 2F 43 20 |IGHT OF HOW M/C |
00002430: 57 4F 52 4B 53 2E 22 00 41 2C 74 05 8D 39 30 30 |WORKS.".A,t..900|
00002440: 30 00 6B 2C 78 05 99 22 54 4F 20 54 52 59 20 4F |0.k,x.."TO TRY O|
00002450: 55 54 20 54 48 45 20 50 52 45 43 45 45 44 49 4E |UT THE PRECEEDIN|
00002460: 47 20 52 4F 55 54 49 4E 45 20 22 00 92 2C 82 05 |G ROUTINE "..,..|
00002470: 99 22 57 52 49 54 45 20 41 20 42 41 53 49 43 20 |."WRITE A BASIC |
00002480: 4C 4F 41 44 45 52 20 4C 49 4B 45 20 54 48 49 53 |LOADER LIKE THIS|
00002490: 2D 22 00 C3 2C 84 05 99 3A 99 22 31 30 20 46 4F |-"..,...:."10 FO|
000024A0: 52 50 3D 34 39 31 35 32 54 4F 34 39 31 36 34 3A |RP=49152TO49164:|
000024B0: 52 45 41 44 41 3A 50 4F 4B 45 50 2C 41 3A 4E 45 |READA:POKEP,A:NE|
000024C0: 58 54 22 00 F4 2C 86 05 99 3A 99 22 32 30 20 44 |XT"..,...:."20 D|
000024D0: 41 54 41 20 31 36 32 2C 30 2C 31 36 39 2C 31 2C |ATA 162,0,169,1,|
000024E0: 31 35 37 2C 30 2C 34 2C 32 33 32 2C 32 32 34 2C |157,0,4,232,224,|
000024F0: 32 34 31 22 00 10 2D 88 05 99 3A 99 22 33 30 20 |241"..-...:."30 |
00002500: 44 41 54 41 20 32 30 38 2C 32 34 38 2C 39 36 22 |DATA 208,248,96"|
00002510: 00 3F 2D 8C 05 99 3A 99 22 52 55 4E 20 54 48 45 |.?-...:."RUN THE|
00002520: 20 50 52 4F 47 52 41 4D 4D 45 20 54 48 45 4E 20 | PROGRAMME THEN |
00002530: 54 59 50 45 20 53 59 53 34 39 31 35 32 20 22 00 |TYPE SYS49152 ".|
00002540: 67 2D 8E 05 99 22 28 52 45 54 55 52 4E 29 2E 20 |g-..."(RETURN). |
00002550: 49 46 20 59 4F 55 20 48 41 56 45 20 45 4E 54 45 |IF YOU HAVE ENTE|
00002560: 52 45 44 20 49 54 22 00 96 2D 90 05 99 22 43 4F |RED IT"..-..."CO|
00002570: 52 52 45 43 54 4C 59 20 59 4F 55 20 53 48 4F 55 |RRECTLY YOU SHOU|
00002580: 4C 44 20 47 45 54 20 36 20 4C 49 4E 45 53 20 4F |LD GET 6 LINES O|
00002590: 46 20 41 27 53 22 00 A7 2D 96 05 99 22 4F 4E 20 |F A'S"..-..."ON |
000025A0: 53 43 52 45 45 4E 22 00 B1 2D A0 05 8D 39 30 30 |SCREEN"..-...900|
000025B0: 30 00 C5 2D AA 05 99 22 46 55 52 54 48 45 52 20 |0..-..."FURTHER |
000025C0: 49 4E 46 4F 22 00 D9 2D AC 05 99 22 B8 B8 B8 B8 |INFO"..-..."....|
000025D0: B8 B8 B8 B8 B8 B8 B8 B8 22 00 06 2E B4 05 99 3A |........"......:|
000025E0: 99 22 4D 41 43 48 49 4E 45 20 43 4F 44 45 20 50 |."MACHINE CODE P|
000025F0: 52 47 53 20 43 41 4E 20 42 45 20 4C 4F 41 44 45 |RGS CAN BE LOADE|
00002600: 44 20 20 49 4E 22 00 31 2E B6 05 99 22 41 4E 59 |D IN".1...."ANY|
00002610: 57 48 45 52 45 20 57 48 45 52 45 20 54 48 45 52 |WHERE WHERE THER|
00002620: 45 20 49 53 20 46 52 45 45 20 4D 45 4D 4F 52 59 |E IS FREE MEMORY|
00002630: 22 00 62 2E BE 05 99 3A 99 22 41 20 43 4F 4D 4D |".b....:."A COMM|
00002640: 4F 4E 20 50 4C 41 43 45 20 49 53 20 4D 45 4D 20 |ON PLACE IS MEM |
00002650: 34 39 31 35 32 2D 35 33 32 34 37 20 57 48 49 43 |49152-53247 WHIC|
00002660: 48 22 00 8D 2E C0 05 99 22 49 53 20 53 45 54 20 |H"......"IS SET |
00002670: 41 53 49 44 45 20 46 4F 52 20 55 53 45 52 53 20 |ASIDE FOR USERS |
00002680: 4D 41 43 48 49 4E 45 20 43 4F 44 45 22 00 A0 2E |MACHINE CODE"...|
00002690: C2 05 99 22 50 52 4F 47 52 41 4D 4D 45 53 2E 22 |..."PROGRAMMES."|
000026A0: 00 CE 2E C8 05 99 3A 99 3A 99 22 41 4C 4C 20 4F |......:.:."ALL O|
000026B0: 55 52 20 45 58 41 4D 50 4C 45 53 20 48 41 56 45 |UR EXAMPLES HAVE|
000026C0: 20 55 53 45 44 20 44 45 43 49 4D 41 4C 22 00 FD | USED DECIMAL"..|
000026D0: 2E CA 05 99 22 4E 4F 54 41 54 49 4F 4E 2E 20 4D |...."NOTATION. M|
000026E0: 41 4E 59 20 4D 41 43 48 49 4E 45 20 43 4F 44 45 |ANY MACHINE CODE|
000026F0: 20 50 52 4F 47 52 41 4D 4D 45 52 53 22 00 2C 2F | PROGRAMMERS".,/|
00002700: CC 05 99 22 57 49 4C 4C 20 57 52 49 54 45 20 49 |..."WILL WRITE I|
00002710: 4E 20 48 45 58 41 44 45 43 49 4D 41 4C 20 28 43 |N HEXADECIMAL (C|
00002720: 30 30 30 20 3D 34 39 31 35 32 29 22 00 5D 2F CE |000 =49152)".]/.|
00002730: 05 99 3A 99 22 4D 4F 53 54 20 42 4F 4F 4B 53 20 |..:."MOST BOOKS |
00002740: 4F 4E 20 4D 41 43 48 49 4E 45 20 43 4F 44 45 20 |ON MACHINE CODE |
00002750: 57 49 4C 4C 20 45 58 50 4C 41 49 4E 22 00 8B 2F |WILL EXPLAIN"../|
00002760: D0 05 99 22 48 45 58 49 44 45 43 49 4D 41 4C 20 |..."HEXIDECIMAL |
00002770: 49 46 20 59 4F 55 20 57 49 53 48 20 54 4F 20 53 |IF YOU WISH TO S|
00002780: 54 55 44 59 20 55 50 20 4F 4E 22 00 9A 2F D2 05 |TUDY UP ON"../..|
00002790: 99 22 4F 4E 20 54 48 49 53 22 00 AA 2F D4 05 8D |."ON THIS"../...|
000027A0: 39 30 30 30 3A 89 32 30 30 30 00 BD 2F DC 05 99 |9000:.2000../...|
000027B0: 22 57 48 41 54 20 4E 45 58 54 20 3F 22 00 D0 2F |"WHAT NEXT ?"../|
000027C0: DE 05 99 22 B8 B8 B8 B8 B8 B8 B8 B8 B8 B8 B8 22 |..."..........."|
000027D0: 00 FC 2F E6 05 99 22 4F 4E 43 45 20 59 4F 55 20 |../..."ONCE YOU |
000027E0: 55 4E 44 45 52 53 54 41 4E 44 20 54 48 45 20 52 |UNDERSTAND THE R|
000027F0: 4F 55 54 49 4E 45 53 20 49 4E 20 22 00 27 30 E8 |OUTINES IN ".'0.|
00002800: 05 99 22 54 48 49 53 20 54 55 54 4F 52 49 41 4C |.."THIS TUTORIAL|
00002810: 20 59 4F 55 20 43 41 4E 20 45 58 50 45 52 49 4D | YOU CAN EXPERIM|
00002820: 45 4E 54 20 42 59 22 00 51 30 EA 05 99 22 4D 41 |ENT BY".Q0..."MA|
00002830: 4B 49 4E 47 20 53 4C 49 47 48 54 20 41 44 4A 55 |KING SLIGHT ADJU|
00002840: 53 54 4D 45 4E 54 53 20 49 4E 20 54 48 45 4D 2E |STMENTS IN THEM.|
00002850: 22 00 81 30 EC 05 99 3A 99 22 54 52 59 20 55 53 |"..0...:."TRY US|
00002860: 49 4E 47 20 53 4F 4D 45 20 4F 46 20 54 48 45 20 |ING SOME OF THE |
00002870: 52 4F 55 54 49 4E 45 53 20 49 4E 20 41 20 20 20 |ROUTINES IN A |
00002880: 22 00 AB 30 EE 05 99 22 42 41 53 49 43 20 50 52 |"..0..."BASIC PR|
00002890: 47 20 28 4A 55 53 54 20 4D 41 4B 45 20 41 20 53 |G (JUST MAKE A S|
000028A0: 59 53 20 43 41 4C 4C 20 49 4E 22 00 D7 30 F0 05 |YS CALL IN"..0..|
000028B0: 99 22 42 41 53 49 43 2C 20 4A 55 53 54 20 4C 49 |."BASIC, JUST LI|
000028C0: 4B 45 20 41 4E 59 20 4F 54 48 45 52 20 43 4F 4D |KE ANY OTHER COM|
000028D0: 4D 41 4E 44 2E 29 22 00 01 31 F2 05 99 22 4D 49 |MAND.)"..1..."MI|
000028E0: 58 54 55 52 45 53 20 4F 46 20 42 41 53 49 43 20 |XTURES OF BASIC |
000028F0: 26 20 4D 43 20 41 52 45 20 43 41 4C 4C 45 44 20 |& MC ARE CALLED |
00002900: 22 00 29 31 F4 05 99 22 48 59 42 52 49 44 20 50 |".)1..."HYBRID P|
00002910: 52 47 53 20 41 4E 44 20 41 52 45 20 56 45 52 59 |RGS AND ARE VERY|
00002920: 20 43 4F 4D 4D 4F 4E 2E 22 00 59 31 F6 05 99 3A | COMMON.".Y1...:|
00002930: 99 22 49 20 41 4D 20 4E 4F 54 20 47 4F 49 4E 47 |."I AM NOT GOING|
00002940: 20 54 4F 20 4C 49 53 54 20 41 4C 4C 20 54 48 45 | TO LIST ALL THE|
00002950: 20 4F 50 43 4F 44 45 53 22 00 88 31 F8 05 99 22 | OPCODES"..1..."|
00002960: 48 45 52 45 20 28 54 48 45 52 45 20 41 52 45 20 |HERE (THERE ARE |
00002970: 32 30 30 20 4F 52 20 53 4F 29 2E 20 59 4F 55 20 |200 OR SO). YOU |
00002980: 57 49 4C 4C 20 20 20 22 00 B4 31 FA 05 99 22 45 |WILL "..1..."E|
00002990: 56 45 4E 54 55 41 4C 4C 59 20 48 41 56 45 20 54 |VENTUALLY HAVE T|
000029A0: 4F 20 47 45 54 20 41 20 42 4F 4F 4B 20 4F 4E 20 |O GET A BOOK ON |
000029B0: 4D 2F 43 22 00 D3 31 FB 05 99 22 49 46 20 59 4F |M/C"..1..."IF YO|
000029C0: 55 20 41 52 45 20 54 4F 20 50 52 4F 47 52 45 53 |U ARE TO PROGRES|
000029D0: 53 2E 22 00 FD 31 FC 05 99 22 54 48 49 53 20 54 |S."..1..."THIS T|
000029E0: 55 54 4F 52 49 41 4C 20 57 49 4C 4C 20 48 45 4C |UTORIAL WILL HEL|
000029F0: 50 20 59 4F 55 20 54 4F 20 47 45 54 22 00 2B 32 |P YOU TO GET".+2|
00002A00: FE 05 99 22 53 54 41 52 54 45 44 2C 20 54 4F 20 |..."STARTED, TO |
00002A10: 43 4F 4E 54 49 4E 55 45 20 59 4F 55 20 57 49 4C |CONTINUE YOU WIL|
00002A20: 4C 20 48 41 56 45 20 54 4F 20 22 00 4B 32 00 06 |L HAVE TO ".K2..|
00002A30: 99 22 48 55 4E 54 20 44 4F 57 4E 20 54 45 58 54 |."HUNT DOWN TEXT|
00002A40: 20 42 4F 4F 4B 53 20 45 54 43 22 00 55 32 02 06 | BOOKS ETC".U2..|
00002A50: 8D 39 30 30 30 00 7E 32 04 06 99 22 54 48 45 52 |.9000.~2..."THER|
00002A60: 45 20 41 52 45 20 41 20 4C 4F 54 20 4F 46 20 47 |E ARE A LOT OF G|
00002A70: 4F 4F 44 20 43 36 34 20 42 4F 4F 4B 53 22 00 AA |OOD C64 BOOKS"..|
00002A80: 32 06 06 99 22 41 52 4F 55 4E 44 2E 20 54 52 59 |2..."AROUND. TRY|
00002A90: 20 59 4F 55 52 20 4C 4F 43 41 4C 20 4C 49 42 52 | YOUR LOCAL LIBR|
00002AA0: 41 52 59 2C 20 54 48 45 59 22 00 D8 32 08 06 99 |ARY, THEY"..2...|
00002AB0: 22 43 41 4E 20 4F 52 44 45 52 20 54 48 45 4D 20 |"CAN ORDER THEM |
00002AC0: 49 4E 20 46 52 4F 4D 20 4F 54 48 45 52 20 4C 49 |IN FROM OTHER LI|
00002AD0: 42 52 41 52 49 45 53 22 00 05 33 0A 06 99 22 49 |BRARIES"..3..."I|
00002AE0: 46 20 4E 45 43 45 53 53 41 52 59 2E 20 41 4C 53 |F NECESSARY. ALS|
00002AF0: 4F 20 54 52 59 20 45 4C 4C 49 53 4F 4E 20 48 41 |O TRY ELLISON HA|
00002B00: 57 4B 45 52 22 00 30 33 0C 06 99 22 42 4F 4F 4B |WKER".03..."BOOK|
00002B10: 53 48 4F 50 20 36 4F 20 4C 49 56 45 52 50 4F 4F |SHOP 6O LIVERPOO|
00002B20: 4C 20 53 54 20 48 4F 42 41 52 54 20 57 48 4F 22 |L ST HOBART WHO"|
00002B30: 00 5B 33 0E 06 99 22 57 49 4C 4C 20 53 45 4E 44 |.[3..."WILL SEND|
00002B40: 20 41 20 43 41 54 41 4C 4F 47 55 45 20 4F 46 20 | A CATALOGUE OF |
00002B50: 43 36 34 20 42 4F 4F 4B 53 2E 22 00 8D 33 10 06 |C64 BOOKS."..3..|
00002B60: 99 3A 99 3A 99 22 50 45 54 45 52 20 42 4F 4F 54 |.:.:."PETER BOOT|
00002B70: 48 4D 41 4E 20 20 20 53 59 44 4E 45 59 20 4E 53 |HMAN SYDNEY NS|
00002B80: 57 20 20 41 55 53 54 52 41 4C 49 41 22 00 BF 33 |W AUSTRALIA"..3|
00002B90: 40 06 8F 4E 54 3A 50 52 49 4E 54 22 41 4C 53 4F |@..NT:PRINT"ALSO|
00002BA0: 20 50 45 53 54 45 52 20 41 4C 4C 20 4F 46 20 54 | PESTER ALL OF T|
00002BB0: 48 45 20 41 42 4F 56 45 20 46 4F 52 20 41 22 00 |HE ABOVE FOR A".|
00002BC0: D8 33 4A 06 8F 4E 54 22 47 4F 4F 44 20 41 53 53 |.3J..NT"GOOD ASS|
00002BD0: 45 4D 42 4C 45 52 2E 22 00 F9 33 54 06 99 3A 99 |EMBLER."..3T..:.|
00002BE0: 3A 99 22 50 52 45 53 53 20 52 20 54 4F 20 52 45 |:."PRESS R TO RE|
00002BF0: 41 44 20 41 47 41 49 4E 22 00 12 34 56 06 99 3A |AD AGAIN"..4V..:|
00002C00: 99 22 50 52 45 53 53 20 51 20 54 4F 20 51 55 49 |."PRESS Q TO QUI|
00002C10: 54 22 00 28 34 58 06 97 31 39 38 2C 30 3A 92 31 |T".(4X..198,0:.1|
00002C20: 39 38 2C 31 3A A1 41 24 00 37 34 5A 06 8B 41 24 |98,1:.A$.74Z..A$|
00002C30: B2 22 52 22 A7 31 30 00 45 34 5C 06 8B 41 24 B2 |."R".10.E4\..A$.|
00002C40: 22 51 22 A7 80 00 4F 34 5E 06 89 31 36 32 34 00 |"Q"...O4^..1624.|
00002C50: 6E 34 60 06 99 22 49 44 45 41 20 4F 46 20 27 48 |n4`.."IDEA OF 'H|
00002C60: 4F 57 20 49 54 20 57 4F 52 4B 53 27 2E 22 00 9B |OW IT WORKS'."..|
00002C70: 34 68 06 99 3A 99 22 4D 41 4E 59 20 45 58 43 45 |4h..:."MANY EXCE|
00002C80: 4C 4C 45 4E 54 20 50 52 4F 47 52 41 4D 4D 45 53 |LLENT PROGRAMMES|
00002C90: 20 48 41 56 45 20 42 45 45 4E 22 00 C7 34 6A 06 | HAVE BEEN"..4j.|
00002CA0: 99 22 57 52 49 54 54 45 4E 20 49 4E 20 42 41 53 |."WRITTEN IN BAS|
00002CB0: 49 43 2C 20 48 4F 57 45 56 45 52 20 41 20 4D 41 |IC, HOWEVER A MA|
00002CC0: 43 48 49 4E 45 20 22 00 F1 34 6C 06 99 22 43 4F |CHINE "..4l.."CO|
00002CD0: 44 45 20 50 52 4F 47 52 41 4D 4D 45 52 20 48 41 |DE PROGRAMMER HA|
00002CE0: 53 20 41 20 4D 55 43 48 20 47 52 45 41 54 45 52 |S A MUCH GREATER|
00002CF0: 22 00 1A 35 6E 06 99 22 43 4F 4D 4D 41 4E 44 20 |"..5n.."COMMAND |
00002D00: 4F 46 20 54 48 45 20 43 4F 4D 50 55 54 45 52 20 |OF THE COMPUTER |
00002D10: 41 4E 44 20 57 49 4C 4C 20 22 00 48 35 70 06 99 |AND WILL ".H5p..|
00002D20: 22 47 45 4E 45 52 41 4C 4C 59 20 50 52 4F 44 55 |"GENERALLY PRODU|
00002D30: 43 45 20 42 45 54 54 45 52 20 51 55 41 4C 49 54 |CE BETTER QUALIT|
00002D40: 59 20 50 52 47 53 2E 22 00 79 35 71 06 99 3A 99 |Y PRGS.".y5q..:.|
00002D50: 22 B7 B7 B7 B7 B7 B7 B7 B7 B7 B7 B7 B7 B7 B7 B7 |"...............|
00002D60: B7 B7 B7 B7 B7 B7 B7 B7 B7 B7 B7 B7 B7 B7 B7 B7 |................|
00002D70: B7 B7 B7 B7 B7 B7 B7 B7 22 00 A0 35 72 06 99 3A |........"..5r..:|
00002D80: 99 3A 99 22 20 52 20 54 4F 20 52 45 41 44 20 41 |.:." R TO READ A|
00002D90: 47 41 49 4E 20 20 51 20 54 4F 20 51 55 49 54 22 |GAIN Q TO QUIT"|
00002DA0: 00 B6 35 74 06 97 31 39 38 2C 30 3A 92 31 39 38 |..5t..198,0:.198|
00002DB0: 2C 31 3A A1 41 24 00 C4 35 76 06 8B 41 24 B2 22 |,1:.A$..5v..A$."|
00002DC0: 51 22 A7 80 00 D4 35 82 06 8B 20 41 24 B2 22 52 |Q"....5... A$."R|
00002DD0: 22 A7 31 30 00 DE 35 84 06 89 31 36 35 32 00 E4 |".10..5...1652..|
00002DE0: 35 CF 07 80 00 0E 36 D0 07 99 22 54 48 45 20 4E |5.....6..."THE N|
00002DF0: 45 58 54 20 32 20 52 4F 55 54 49 4E 45 53 20 41 |EXT 2 ROUTINES A|
00002E00: 52 45 20 41 20 42 49 54 20 4D 4F 52 45 22 00 37 |RE A BIT MORE".7|
00002E10: 36 DA 07 99 22 43 4F 4D 50 4C 45 58 20 28 26 20 |6..."COMPLEX (& |
00002E20: 50 52 4F 42 41 42 4C 59 20 4D 4F 52 45 20 55 53 |PROBABLY MORE US|
00002E30: 45 46 55 4C 29 2E 22 00 67 36 E4 07 99 3A 99 22 |EFUL).".g6...:."|
00002E40: 49 20 57 49 4C 4C 20 47 49 56 45 20 4C 49 54 54 |I WILL GIVE LITT|
00002E50: 4C 45 20 45 58 50 4C 41 4E 41 54 49 4F 4E 2C 20 |LE EXPLANATION, |
00002E60: 49 46 20 59 4F 55 22 00 95 36 E6 07 99 22 48 41 |IF YOU"..6..."HA|
00002E70: 56 45 20 47 4F 54 20 54 48 49 53 20 46 41 52 20 |VE GOT THIS FAR |
00002E80: 54 48 45 4E 20 59 4F 55 20 41 52 45 20 43 41 50 |THEN YOU ARE CAP|
00002E90: 41 42 4C 45 22 00 C0 36 E8 07 99 22 4F 46 20 41 |ABLE"..6..."OF A|
00002EA0: 4E 41 4C 59 53 49 4E 47 20 54 48 45 20 4C 49 53 |NALYSING THE LIS|
00002EB0: 54 49 4E 47 53 20 59 4F 55 52 53 45 4C 46 2E 22 |TINGS YOURSELF."|
00002EC0: 00 EA 36 EA 07 99 3A 99 22 42 4F 54 48 20 54 48 |..6...:."BOTH TH|
00002ED0: 45 53 45 20 52 4F 55 54 49 4E 45 53 20 55 53 45 |ESE ROUTINES USE|
00002EE0: 20 49 4E 44 49 52 45 43 54 22 00 16 37 EC 07 99 | INDIRECT"..7...|
00002EF0: 22 49 4E 44 45 58 45 44 20 41 44 44 52 45 53 53 |"INDEXED ADDRESS|
00002F00: 49 4E 47 2E 20 54 48 49 53 20 45 4E 54 41 49 4C |ING. THIS ENTAIL|
00002F10: 53 20 54 48 45 22 00 43 37 EE 07 99 22 53 54 4F |S THE".C7..."STO|
00002F20: 52 49 4E 47 20 4F 46 20 32 20 42 59 54 45 20 41 |RING OF 2 BYTE A|
00002F30: 44 44 52 45 53 53 45 53 20 41 54 20 41 20 5A 45 |DDRESSES AT A ZE|
00002F40: 52 4F 22 00 6E 37 F0 07 99 22 50 41 47 45 20 4C |RO".n7..."PAGE L|
00002F50: 4F 43 41 54 49 4F 4E 2E 28 5A 45 52 4F 20 50 41 |OCATION.(ZERO PA|
00002F60: 47 45 3D 41 4E 59 20 4D 45 4D 4F 52 59 22 00 8C |GE=ANY MEMORY"..|
00002F70: 37 F2 07 99 22 41 44 44 52 45 53 53 20 4C 45 53 |7..."ADDRESS LES|
00002F80: 53 20 54 48 41 4E 20 32 35 36 29 22 00 B9 37 F4 |S THAN 256)"..7.|
00002F90: 07 99 22 55 53 55 41 4C 4C 59 20 41 44 44 52 45 |.."USUALLY ADDRE|
00002FA0: 53 53 45 53 20 32 35 31 2F 32 35 32 20 41 4E 44 |SSES 251/252 AND|
00002FB0: 20 32 35 33 2F 32 35 34 22 00 D3 37 F6 07 99 22 | 253/254"..7..."|
00002FC0: 41 52 45 20 55 53 45 44 20 46 4F 52 20 54 48 49 |ARE USED FOR THI|
00002FD0: 53 2E 22 00 02 38 F8 07 99 3A 99 22 44 49 46 46 |S."..8...:."DIFF|
00002FE0: 45 52 45 4E 54 20 4D 4F 44 45 53 20 4F 46 20 4C |ERENT MODES OF L|
00002FF0: 44 41 20 26 20 53 54 41 20 41 52 45 20 55 53 45 |DA & STA ARE USE|
00003000: 44 22 00 2C 38 FA 07 99 22 57 48 45 4E 20 41 44 |D".,8..."WHEN AD|
00003010: 44 52 45 53 53 49 4E 47 20 5A 45 52 4F 20 50 41 |DRESSING ZERO PA|
00003020: 47 45 20 41 4E 44 20 57 48 45 4E 22 00 56 38 FC |GE AND WHEN".V8.|
00003030: 07 99 22 55 53 49 4E 47 20 49 4E 44 49 52 45 43 |.."USING INDIREC|
00003040: 54 20 49 4E 44 45 58 45 44 20 41 44 44 52 45 53 |T INDEXED ADDRES|
00003050: 53 49 4E 47 2E 22 00 60 38 FE 07 8D 39 30 30 30 |SING.".`8...9000|
00003060: 00 8F 38 02 08 99 22 54 48 49 53 20 52 4F 55 54 |..8..."THIS ROUT|
00003070: 49 4E 45 20 43 48 41 4E 47 45 53 20 53 43 52 45 |INE CHANGES SCRE|
00003080: 45 4E 20 54 45 58 54 20 43 4F 4C 4F 55 52 22 00 |EN TEXT COLOUR".|
00003090: BA 38 04 08 99 22 42 59 20 50 4F 4B 49 4E 47 20 |.8..."BY POKING |
000030A0: 38 28 4F 52 41 4E 47 45 29 20 54 4F 20 35 35 32 |8(ORANGE) TO 552|
000030B0: 39 36 2D 35 36 32 39 33 2E 22 00 DB 38 06 08 99 |96-56293."..8...|
000030C0: 3A 99 22 4C 44 41 20 23 32 31 36 20 20 20 20 20 |:."LDA #216 |
000030D0: 20 20 20 31 36 39 20 32 31 36 22 00 FA 38 08 08 | 169 216"..8..|
000030E0: 99 22 53 54 41 20 32 35 32 20 20 20 20 20 20 20 |."STA 252 |
000030F0: 20 20 31 33 33 20 32 35 32 22 00 17 39 0A 08 99 | 133 252"..9...|
00003100: 22 4C 44 41 20 23 30 20 20 20 20 20 20 20 20 20 |"LDA #0 |
00003110: 20 31 36 39 20 30 22 00 36 39 0C 08 99 22 53 54 | 169 0".69..."ST|
00003120: 41 20 32 35 31 20 20 20 20 20 20 20 20 20 31 33 |A 251 13|
00003130: 33 20 32 35 31 22 00 51 39 0E 08 99 22 54 41 59 |3 251".Q9..."TAY|
00003140: 20 20 20 20 20 20 20 20 20 20 20 20 20 31 36 38 | 168|
00003150: 22 00 6E 39 10 08 99 22 4C 44 41 20 23 38 20 20 |".n9..."LDA #8 |
00003160: 20 20 20 20 20 20 20 20 31 36 39 20 38 22 00 8E | 169 8"..|
00003170: 39 12 08 99 22 5A 5A 5A 5A 20 53 54 41 20 28 32 |9..."ZZZZ STA (2|
00003180: 35 31 29 2C 59 20 31 34 35 20 32 35 31 22 00 A9 |51),Y 145 251"..|
00003190: 39 14 08 99 22 49 4E 59 20 20 20 20 20 20 20 20 |9..."INY |
000031A0: 20 20 20 20 20 32 30 30 22 00 C8 39 16 08 99 22 | 200"..9..."|
000031B0: 42 4E 45 20 5A 5A 5A 5A 20 20 20 20 20 20 20 20 |BNE ZZZZ |
000031C0: 32 30 38 20 32 35 31 22 00 E7 39 18 08 99 22 49 |208 251"..9..."I|
000031D0: 4E 43 20 32 35 32 20 20 20 20 20 20 20 20 20 32 |NC 252 2|
000031E0: 33 30 20 32 35 32 22 00 06 3A 1A 08 99 22 4C 44 |30 252"..:..."LD|
000031F0: 58 20 32 35 32 20 20 20 20 20 20 20 20 20 31 36 |X 252 16|
00003200: 36 20 32 35 32 22 00 25 3A 1C 08 99 22 43 50 58 |6 252".%:..."CPX|
00003210: 20 23 32 31 39 20 20 20 20 20 20 20 20 32 32 34 | #219 224|
00003220: 20 32 31 39 22 00 44 3A 1E 08 99 22 42 4E 45 20 | 219".D:..."BNE |
00003230: 5A 5A 5A 5A 20 20 20 20 20 20 20 20 32 30 38 20 |ZZZZ 208 |
00003240: 32 34 33 22 00 64 3A 20 08 99 22 58 58 58 58 20 |243".d: .."XXXX |
00003250: 53 54 41 20 28 32 35 31 29 2C 59 20 31 34 35 20 |STA (251),Y 145 |
00003260: 32 35 31 22 00 7F 3A 22 08 99 22 49 4E 59 20 20 |251"..:".."INY |
00003270: 20 20 20 20 20 20 20 20 20 20 20 32 30 30 22 00 | 200".|
00003280: 9E 3A 24 08 99 22 43 50 59 20 23 32 33 32 20 20 |.:$.."CPY #232 |
00003290: 20 20 20 20 20 20 31 39 32 20 32 33 32 22 00 BD | 192 232"..|
000032A0: 3A 26 08 99 22 42 4E 45 20 58 58 58 58 20 20 20 |:&.."BNE XXXX |
000032B0: 20 20 20 20 20 32 30 38 20 32 34 39 22 00 D7 3A | 208 249"..:|
000032C0: 28 08 99 22 52 54 53 20 20 20 20 20 20 20 20 20 |(.."RTS |
000032D0: 20 20 20 20 39 36 22 00 02 3B 2B 08 99 3A 99 22 | 96"..;+..:."|
000032E0: 43 4F 50 59 20 54 48 49 53 20 44 4F 57 4E 20 28 |COPY THIS DOWN (|
000032F0: 4F 52 20 44 55 4D 50 20 53 43 52 45 45 4E 20 54 |OR DUMP SCREEN T|
00003300: 4F 22 00 31 3B 2C 08 99 22 50 52 49 4E 54 45 52 |O".1;,.."PRINTER|
00003310: 29 20 26 20 41 4E 41 4C 59 53 45 20 49 54 2E 20 |) & ANALYSE IT. |
00003320: 20 20 20 2D 50 52 45 53 53 20 41 20 4B 45 59 2D | -PRESS A KEY-|
00003330: 22 00 4C 3B 2E 08 97 31 39 38 2C 30 3A 92 31 39 |".L;...198,0:.19|
00003340: 38 2C 31 3A A1 41 24 3A 99 22 93 22 00 78 3B 2F |8,1:.A$:.".".x;/|
00003350: 08 99 22 4E 4F 54 45 20 54 48 41 54 20 49 4E 20 |.."NOTE THAT IN |
00003360: 54 48 45 20 50 52 45 43 45 45 44 49 4E 47 20 52 |THE PRECEEDING R|
00003370: 4F 55 54 49 4E 45 2D 22 00 A7 3B 30 08 99 3A 99 |OUTINE-"..;0..:.|
00003380: 22 42 4E 45 20 4D 45 41 4E 53 20 42 52 41 4E 43 |"BNE MEANS BRANC|
00003390: 48 20 49 46 20 4E 4F 54 20 45 51 55 41 4C 20 54 |H IF NOT EQUAL T|
000033A0: 4F 20 5A 45 52 4F 22 00 D5 3B 31 08 99 3A 99 22 |O ZERO"..;1..:."|
000033B0: 49 4E 44 49 52 45 43 54 20 49 4E 44 45 58 45 44 |INDIRECT INDEXED|
000033C0: 20 41 44 44 52 45 53 53 49 4E 47 20 55 53 45 53 | ADDRESSING USES|
000033D0: 20 54 48 45 22 00 02 3C 32 08 99 22 59 20 52 45 | THE"..<2.."Y RE|
000033E0: 47 49 53 54 45 52 2E 28 41 4E 4F 54 48 45 52 20 |GISTER.(ANOTHER |
000033F0: 27 49 4E 44 45 58 27 20 52 45 47 49 53 54 45 52 |'INDEX' REGISTER|
00003400: 29 22 00 2F 3C 33 08 99 3A 99 22 54 48 45 20 58 |)"./<3..:."THE X|
00003410: 20 52 45 47 49 53 54 45 52 20 49 53 20 55 53 45 | REGISTER IS USE|
00003420: 44 20 54 4F 20 43 48 45 43 4B 20 54 48 45 22 00 |D TO CHECK THE".|
00003430: 57 3C 34 08 99 22 48 49 47 48 20 42 59 54 45 20 |W<4.."HIGH BYTE |
00003440: 41 54 20 32 35 32 20 57 48 45 4E 20 52 4F 55 54 |AT 252 WHEN ROUT|
00003450: 49 4E 45 20 49 53 22 00 72 3C 36 08 99 22 4E 45 |INE IS".r<6.."NE|
00003460: 41 52 49 4E 47 20 43 4F 4D 50 4C 45 54 49 4F 4E |ARING COMPLETION|
00003470: 2E 22 00 A0 3C 38 08 99 3A 99 22 49 46 20 59 4F |."..<8..:."IF YO|
00003480: 55 20 53 50 45 4E 44 20 53 4F 4D 45 20 54 49 4D |U SPEND SOME TIM|
00003490: 45 20 41 4E 41 4C 59 53 49 4E 47 20 54 48 45 22 |E ANALYSING THE"|
000034A0: 00 CD 3C 3A 08 99 22 46 4C 4F 57 20 4F 46 20 54 |..<:.."FLOW OF T|
000034B0: 48 45 20 43 4F 44 45 20 54 48 45 4E 20 41 4C 4C |HE CODE THEN ALL|
000034C0: 20 57 49 4C 4C 20 42 45 43 4F 4D 45 22 00 F9 3C | WILL BECOME"..<|
000034D0: 3C 08 99 22 43 4C 45 41 52 2E 20 54 48 45 4E 20 |<.."CLEAR. THEN |
000034E0: 59 4F 55 20 43 41 4E 20 54 52 59 20 57 52 49 54 |YOU CAN TRY WRIT|
000034F0: 49 4E 47 20 53 4F 4D 45 22 00 24 3D 3E 08 99 22 |ING SOME".$=>.."|
00003500: 56 41 52 49 41 54 49 4F 4E 53 2E 20 49 2E 45 2E |VARIATIONS. I.E.|
00003510: 20 46 49 4C 4C 20 53 43 52 45 45 4E 20 4D 45 4D | FILL SCREEN MEM|
00003520: 4F 52 59 22 00 51 3D 40 08 99 22 31 30 32 34 2D |ORY".Q=@.."1024-|
00003530: 32 30 32 33 20 57 49 54 48 20 41 20 53 50 45 43 |2023 WITH A SPEC|
00003540: 49 46 49 43 20 43 48 41 52 41 41 43 54 45 52 2E |IFIC CHARAACTER.|
00003550: 22 00 7F 3D 42 08 99 3A 99 22 4E 4F 54 45 20 54 |"..=B..:."NOTE T|
00003560: 48 41 54 20 54 4F 20 44 4F 20 54 48 45 20 53 41 |HAT TO DO THE SA|
00003570: 4D 45 20 54 48 49 4E 47 20 55 53 49 4E 47 22 00 |ME THING USING".|
00003580: A3 3D 44 08 99 22 42 41 53 49 43 20 57 4F 55 4C |.=D.."BASIC WOUL|
00003590: 44 20 42 45 20 41 20 4C 4F 54 20 53 4C 4F 57 45 |D BE A LOT SLOWE|
000035A0: 52 2E 22 00 AD 3D 48 08 8D 39 30 30 30 00 DA 3D |R."..=H..9000..=|
000035B0: 52 08 99 22 48 45 52 45 20 49 53 20 54 48 45 20 |R.."HERE IS THE |
000035C0: 42 41 53 49 43 20 4C 4F 41 44 45 52 20 46 4F 52 |BASIC LOADER FOR|
000035D0: 20 54 48 45 20 4C 41 53 54 22 00 04 3E 54 08 99 | THE LAST"..>T..|
000035E0: 22 52 4F 55 54 49 4E 45 2E 20 54 4F 20 53 41 56 |"ROUTINE. TO SAV|
000035F0: 45 20 54 59 50 49 4E 47 20 59 4F 55 20 43 4F 55 |E TYPING YOU COU|
00003600: 4C 44 20 22 00 2F 3E 56 08 99 22 50 52 45 53 53 |LD "./>V.."PRESS|
00003610: 20 52 55 4E 2F 53 54 4F 50 2C 20 54 59 50 45 20 | RUN/STOP, TYPE |
00003620: 4E 45 57 20 28 52 54 4E 29 20 54 48 45 4E 22 00 |NEW (RTN) THEN".|
00003630: 5A 3E 58 08 99 22 43 55 52 53 4F 52 20 55 50 20 |Z>X.."CURSOR UP |
00003640: 26 20 50 52 45 53 53 20 52 45 54 55 52 4E 20 4F |& PRESS RETURN O|
00003650: 4E 20 54 48 45 20 50 52 47 22 00 85 3E 5A 08 99 |N THE PRG"..>Z..|
00003660: 22 4C 49 4E 45 53 2E 20 28 4F 48 2C 20 59 4F 55 |"LINES. (OH, YOU|
00003670: 20 41 4C 52 45 41 44 59 20 54 48 4F 55 47 48 54 | ALREADY THOUGHT|
00003680: 20 4F 46 20 22 00 99 3E 5C 08 99 22 54 48 41 54 | OF "..>\.."THAT|
00003690: 2C 20 4F 4B 41 59 2E 29 22 00 CA 3E 5E 08 99 3A |, OKAY.)"..>^..:|
000036A0: 99 22 31 30 20 46 4F 52 50 3D 34 39 31 35 32 54 |."10 FORP=49152T|
000036B0: 4F 34 39 31 38 33 3A 52 45 41 44 41 3A 50 4F 4B |O49183:READA:POK|
000036C0: 45 50 2C 41 3A 4E 45 58 54 22 00 17 3F 60 08 99 |EP,A:NEXT"..?`..|
000036D0: 3A 99 22 32 30 20 44 41 54 41 20 31 36 39 2C 32 |:."20 DATA 169,2|
000036E0: 31 36 2C 31 33 33 2C 32 35 32 2C 31 36 39 2C 30 |16,133,252,169,0|
000036F0: 2C 31 33 33 2C 32 35 31 2C 31 36 38 2C 31 36 39 |,133,251,168,169|
00003700: 2C 38 2C 31 34 35 2C 32 35 31 2C 32 30 30 2C 32 |,8,145,251,200,2|
00003710: 30 38 2C 32 35 31 22 00 67 3F 62 08 99 3A 99 22 |08,251".g?b..:."|
00003720: 33 30 20 44 41 54 41 20 32 33 30 2C 32 35 32 2C |30 DATA 230,252,|
00003730: 31 36 36 2C 32 35 32 2C 32 32 34 2C 32 31 39 2C |166,252,224,219,|
00003740: 32 30 38 2C 32 34 33 2C 31 34 35 2C 32 35 31 2C |208,243,145,251,|
00003750: 32 30 30 2C 31 39 32 2C 32 33 32 2C 32 30 38 2C |200,192,232,208,|
00003760: 32 34 39 2C 39 36 22 00 96 3F 66 08 99 3A 99 22 |249,96"..?f..:."|
00003770: 41 53 20 55 53 55 41 4C 2C 52 55 4E 20 54 48 45 |AS USUAL,RUN THE|
00003780: 20 50 52 47 20 54 4F 20 50 4F 4B 45 20 54 48 45 | PRG TO POKE THE|
00003790: 20 44 41 54 41 22 00 C3 3F 68 08 99 22 49 4E 54 | DATA"..?h.."INT|
000037A0: 4F 20 4D 45 4D 4F 52 59 20 54 48 45 4E 20 54 59 |O MEMORY THEN TY|
000037B0: 50 45 20 53 59 53 34 39 31 35 32 20 28 52 54 4E |PE SYS49152 (RTN|
000037C0: 29 2E 22 00 F2 3F 6A 08 99 22 41 4C 4C 20 43 48 |)."..?j.."ALL CH|
000037D0: 41 52 41 43 54 45 52 53 20 4F 4E 20 53 43 52 45 |ARACTERS ON SCRE|
000037E0: 45 4E 20 57 49 4C 4C 20 43 48 41 4E 47 45 20 54 |EN WILL CHANGE T|
000037F0: 4F 22 00 01 40 6C 08 99 22 4F 52 41 4E 47 45 2E |O"..@l.."ORANGE.|
00003800: 22 00 0B 40 6E 08 8D 39 30 30 30 00 3A 40 70 08 |"..@n..9000.:@p.|
00003810: 99 22 54 48 45 20 4E 45 58 54 20 28 41 4E 44 20 |."THE NEXT (AND |
00003820: 46 49 4E 41 4C 29 20 4C 49 53 54 49 4E 47 20 49 |FINAL) LISTING I|
00003830: 53 20 41 4E 4F 54 48 45 52 22 00 50 40 72 08 99 |S ANOTHER".P@r..|
00003840: 22 48 41 4E 44 59 20 52 4F 55 54 49 4E 45 2E 22 |"HANDY ROUTINE."|
00003850: 00 80 40 74 08 99 3A 99 22 54 48 49 53 20 43 4F |..@t..:."THIS CO|
00003860: 44 45 20 57 49 4C 4C 20 54 52 41 4E 53 46 45 52 |DE WILL TRANSFER|
00003870: 20 38 31 39 32 20 50 49 45 43 45 53 20 4F 46 22 | 8192 PIECES OF"|
00003880: 00 AC 40 76 08 99 22 44 41 54 41 20 46 52 4F 4D |..@v.."DATA FROM|
00003890: 20 4D 45 4D 20 38 31 39 32 20 54 4F 20 4D 45 4D | MEM 8192 TO MEM|
000038A0: 20 31 36 33 38 34 20 49 4E 20 41 22 00 DB 40 78 | 16384 IN A"..@x|
000038B0: 08 99 22 46 52 41 43 54 49 4F 4E 20 4F 46 20 41 |.."FRACTION OF A|
000038C0: 20 53 45 43 4F 4E 44 2E 20 28 42 41 53 49 43 20 | SECOND. (BASIC |
000038D0: 57 4F 55 4C 44 20 54 41 4B 45 22 00 03 41 7A 08 |WOULD TAKE"..Az.|
000038E0: 99 22 4D 4F 52 45 20 54 48 41 4E 20 35 20 4D 49 |."MORE THAN 5 MI|
000038F0: 4E 55 54 45 53 20 54 4F 20 44 4F 20 54 48 49 53 |NUTES TO DO THIS|
00003900: 21 29 22 00 2C 41 84 08 99 3A 99 22 54 48 49 53 |!)".,A...:."THIS|
00003910: 20 41 4C 53 4F 20 55 53 45 53 20 49 4E 44 49 52 | ALSO USES INDIR|
00003920: 45 43 54 20 49 4E 44 45 58 45 44 22 00 57 41 86 |ECT INDEXED".WA.|
00003930: 08 99 22 41 44 44 52 45 53 53 49 4E 47 2E 20 41 |.."ADDRESSING. A|
00003940: 53 20 59 4F 55 20 57 49 4C 4C 20 53 45 45 20 54 |S YOU WILL SEE T|
00003950: 48 45 20 54 57 4F 22 00 81 41 88 08 99 22 41 44 |HE TWO"..A..."AD|
00003960: 44 52 45 53 53 45 53 20 28 38 31 39 32 20 26 20 |DRESSES (8192 & |
00003970: 31 36 33 38 34 29 20 41 52 45 20 46 49 52 53 54 |16384) ARE FIRST|
00003980: 22 00 B0 41 94 08 99 22 4C 4F 41 44 45 44 20 49 |"..A..."LOADED I|
00003990: 4E 54 4F 20 5A 45 52 4F 20 50 41 47 45 20 32 35 |NTO ZERO PAGE 25|
000039A0: 31 2F 32 35 32 20 26 20 32 35 33 2F 32 35 34 22 |1/252 & 253/254"|
000039B0: 00 D3 41 95 08 99 22 49 4E 20 4C 4F 57 42 59 54 |..A..."IN LOWBYT|
000039C0: 45 20 48 49 47 48 42 59 54 45 20 46 4F 52 4D 41 |E HIGHBYTE FORMA|
000039D0: 54 2E 22 00 00 42 96 08 99 3A 99 22 54 41 59 20 |T."..B...:."TAY |
000039E0: 4D 45 41 4E 53 20 54 52 41 4E 53 46 45 52 20 41 |MEANS TRANSFER A|
000039F0: 43 43 55 4D 55 4C 41 54 4F 52 20 54 4F 20 59 22 |CCUMULATOR TO Y"|
00003A00: 00 2E 42 97 08 99 22 57 48 49 43 48 20 49 53 20 |..B..."WHICH IS |
00003A10: 41 4E 20 45 41 53 59 20 57 41 59 20 4F 46 20 50 |AN EASY WAY OF P|
00003A20: 55 54 54 49 4E 47 20 41 20 5A 45 52 4F 22 00 4A |UTTING A ZERO".J|
00003A30: 42 98 08 99 22 49 4E 54 4F 20 54 48 45 20 59 20 |B..."INTO THE Y |
00003A40: 52 45 47 49 53 54 45 52 2E 22 00 78 42 A2 08 99 |REGISTER.".xB...|
00003A50: 3A 99 22 49 46 20 59 4F 55 20 4C 45 41 52 4E 20 |:."IF YOU LEARN |
00003A60: 48 4F 57 20 54 4F 20 55 53 45 20 54 48 49 53 20 |HOW TO USE THIS |
00003A70: 52 4F 55 54 49 4E 45 22 00 A5 42 A4 08 99 22 54 |ROUTINE"..B..."T|
00003A80: 48 45 4E 20 59 4F 55 20 43 41 4E 20 41 44 4A 55 |HEN YOU CAN ADJU|
00003A90: 53 54 20 54 48 45 20 50 41 52 41 4D 45 54 45 52 |ST THE PARAMETER|
00003AA0: 53 20 54 4F 22 00 D4 42 A6 08 99 22 54 52 41 4E |S TO"..B..."TRAN|
00003AB0: 53 46 45 52 20 4C 41 52 47 45 20 48 55 4E 4B 53 |SFER LARGE HUNKS|
00003AC0: 20 4F 46 20 4D 45 4D 4F 52 59 20 41 4E 59 57 48 | OF MEMORY ANYWH|
00003AD0: 45 52 45 22 00 EA 42 A8 08 99 22 41 54 20 48 49 |ERE"..B..."AT HI|
00003AE0: 47 48 20 53 50 45 45 44 2E 22 00 F4 42 AA 08 8D |GH SPEED."..B...|
00003AF0: 39 30 30 30 00 1E 43 AB 08 99 22 54 52 41 4E 53 |9000..C..."TRANS|
00003B00: 46 45 52 20 38 31 39 32 20 50 49 45 43 45 53 20 |FER 8192 PIECES |
00003B10: 4F 46 20 44 41 54 41 20 46 52 4F 4D 20 22 00 3D |OF DATA FROM ".=|
00003B20: 43 AC 08 99 22 4D 45 4D 4F 52 59 20 38 31 39 32 |C..."MEMORY 8192|
00003B30: 20 54 4F 20 31 36 33 38 34 2E 22 3A 99 00 5B 43 | TO 16384.":..[C|
00003B40: AD 08 99 22 4C 44 41 20 23 30 20 20 20 20 20 20 |..."LDA #0 |
00003B50: 20 20 20 20 20 31 36 39 20 30 22 00 7B 43 AE 08 | 169 0".{C..|
00003B60: 99 22 53 54 41 20 32 35 31 20 20 20 20 20 20 20 |."STA 251 |
00003B70: 20 20 20 31 33 33 20 32 35 31 22 00 97 43 B0 08 | 133 251"..C..|
00003B80: 99 22 54 41 59 20 20 20 20 20 20 20 20 20 20 20 |."TAY |
00003B90: 20 20 20 31 36 38 22 00 B6 43 B2 08 99 22 4C 44 | 168"..C..."LD|
00003BA0: 41 20 23 33 32 20 20 20 20 20 20 20 20 20 20 31 |A #32 1|
00003BB0: 36 39 20 33 32 22 00 D6 43 B4 08 99 22 53 54 41 |69 32"..C..."STA|
00003BC0: 20 32 35 32 20 20 20 20 20 20 20 20 20 20 31 33 | 252 13|
00003BD0: 33 20 32 35 32 22 00 F4 43 B6 08 99 22 4C 44 41 |3 252"..C..."LDA|
00003BE0: 20 23 30 20 20 20 20 20 20 20 20 20 20 20 31 36 | #0 16|
00003BF0: 39 20 30 22 00 14 44 B8 08 99 22 53 54 41 20 32 |9 0"..D..."STA 2|
00003C00: 35 33 20 20 20 20 20 20 20 20 20 20 31 33 33 20 |53 133 |
00003C10: 32 35 33 22 00 33 44 BA 08 99 22 4C 44 41 20 23 |253".3D..."LDA #|
00003C20: 36 34 20 20 20 20 20 20 20 20 20 20 31 36 39 20 |64 169 |
00003C30: 36 34 22 00 53 44 BC 08 99 22 53 54 41 20 32 35 |64".SD..."STA 25|
00003C40: 34 20 20 20 20 20 20 20 20 20 20 31 33 33 20 32 |4 133 2|
00003C50: 35 34 22 00 74 44 BE 08 99 22 5A 5A 5A 5A 20 4C |54".tD..."ZZZZ L|
00003C60: 44 41 20 28 32 35 31 29 2C 59 20 20 31 37 37 20 |DA (251),Y 177 |
00003C70: 32 35 31 22 00 95 44 C0 08 99 22 53 54 41 20 28 |251"..D..."STA (|
00003C80: 32 35 33 29 2C 59 20 20 20 20 20 20 20 31 34 35 |253),Y 145|
00003C90: 20 32 35 33 22 00 B1 44 C2 08 99 22 49 4E 59 20 | 253"..D..."INY |
00003CA0: 20 20 20 20 20 20 20 20 20 20 20 20 20 32 30 30 | 200|
00003CB0: 22 00 D1 44 C4 08 99 22 42 4E 45 20 5A 5A 5A 5A |"..D..."BNE ZZZZ|
00003CC0: 20 20 20 20 20 20 20 20 20 32 30 38 20 32 34 39 | 208 249|
00003CD0: 22 00 F1 44 C6 08 99 22 49 4E 43 20 32 35 32 20 |"..D..."INC 252 |
00003CE0: 20 20 20 20 20 20 20 20 20 32 33 30 20 32 35 32 | 230 252|
00003CF0: 22 00 11 45 C8 08 99 22 49 4E 43 20 32 35 34 20 |"..E..."INC 254 |
00003D00: 20 20 20 20 20 20 20 20 20 32 33 30 20 32 35 34 | 230 254|
00003D10: 22 00 31 45 CA 08 99 22 4C 44 58 20 32 35 32 20 |".1E..."LDX 252 |
00003D20: 20 20 20 20 20 20 20 20 20 31 36 36 20 32 35 32 | 166 252|
00003D30: 22 00 50 45 CC 08 99 22 43 50 58 20 23 36 34 20 |".PE..."CPX #64 |
00003D40: 20 20 20 20 20 20 20 20 20 32 32 34 20 36 33 22 | 224 63"|
00003D50: 00 70 45 CE 08 99 22 42 4E 45 20 5A 5A 5A 5A 20 |.pE..."BNE ZZZZ |
00003D60: 20 20 20 20 20 20 20 20 32 30 38 20 32 33 39 22 | 208 239"|
00003D70: 00 8B 45 D0 08 99 22 52 54 53 20 20 20 20 20 20 |..E..."RTS |
00003D80: 20 20 20 20 20 20 20 20 39 36 22 00 A2 45 E3 08 | 96"..E..|
00003D90: 99 3A 99 22 2D 50 52 45 53 53 20 41 20 4B 45 59 |.:."-PRESS A KEY|
00003DA0: 2D 22 00 BD 45 E4 08 97 31 39 38 2C 30 3A 92 31 |-"..E...198,0:.1|
00003DB0: 39 38 2C 31 3A A1 41 24 3A 99 22 93 22 00 E0 45 |98,1:.A$:."."..E|
00003DC0: FC 08 99 22 48 45 52 45 20 49 53 20 54 48 45 20 |..."HERE IS THE |
00003DD0: 42 41 53 49 43 20 4C 4F 41 44 45 52 2E 22 3A 99 |BASIC LOADER.":.|
00003DE0: 00 0F 46 06 09 99 22 31 30 20 46 4F 52 50 3D 34 |..F..."10 FORP=4|
00003DF0: 39 31 35 32 54 4F 34 39 31 38 36 3A 52 45 41 44 |9152TO49186:READ|
00003E00: 41 3A 50 4F 4B 45 50 2C 41 3A 4E 45 58 54 22 00 |A:POKEP,A:NEXT".|
00003E10: 3F 46 10 09 99 3A 99 22 32 30 44 41 54 41 31 36 |?F...:."20DATA16|
00003E20: 39 2C 30 2C 31 33 33 2C 32 35 31 2C 31 36 38 2C |9,0,133,251,168,|
00003E30: 31 36 39 2C 33 32 2C 31 33 33 2C 32 35 32 22 00 |169,32,133,252".|
00003E40: 6F 46 1A 09 99 3A 99 22 33 30 44 41 54 41 31 36 |oF...:."30DATA16|
00003E50: 39 2C 30 2C 31 33 33 2C 32 35 33 2C 31 36 39 2C |9,0,133,253,169,|
00003E60: 36 34 2C 31 33 33 2C 32 35 34 2C 31 37 37 22 00 |64,133,254,177".|
00003E70: 9E 46 24 09 99 3A 99 22 34 30 44 41 54 41 32 35 |.F$..:."40DATA25|
00003E80: 31 2C 31 34 35 2C 32 35 33 2C 32 30 30 2C 32 30 |1,145,253,200,20|
00003E90: 38 2C 32 34 39 2C 32 33 30 2C 32 35 32 22 00 CF |8,249,230,252"..|
00003EA0: 46 2E 09 99 3A 99 22 35 30 44 41 54 41 32 33 30 |F...:."50DATA230|
00003EB0: 2C 32 35 34 2C 31 36 36 2C 32 35 32 2C 32 32 34 |,254,166,252,224|
00003EC0: 2C 36 34 2C 32 30 38 2C 32 33 39 2C 39 36 22 00 |,64,208,239,96".|
00003ED0: FE 46 30 09 99 3A 99 22 59 4F 55 20 43 41 4E 20 |.F0..:."YOU CAN |
00003EE0: 54 45 53 54 20 54 48 49 53 20 42 59 20 50 4F 4B |TEST THIS BY POK|
00003EF0: 49 4E 47 20 53 4F 4D 45 20 44 41 54 41 22 00 2A |ING SOME DATA".*|
00003F00: 47 32 09 99 22 54 4F 20 38 31 39 32 2D 31 36 33 |G2.."TO 8192-163|
00003F10: 38 33 20 28 44 4F 20 49 54 20 49 4E 20 42 41 53 |83 (DO IT IN BAS|
00003F20: 49 43 20 54 4F 20 53 45 45 22 00 54 47 34 09 99 |IC TO SEE".TG4..|
00003F30: 22 48 4F 57 20 4C 4F 4E 47 20 49 54 20 54 41 4B |"HOW LONG IT TAK|
00003F40: 45 53 21 29 2C 20 54 48 45 4E 20 52 55 4E 20 54 |ES!), THEN RUN T|
00003F50: 48 45 20 22 00 7A 47 36 09 99 22 4C 4F 41 44 45 |HE ".zG6.."LOADE|
00003F60: 52 2C 20 53 59 53 34 39 31 35 32 20 26 20 50 45 |R, SYS49152 & PE|
00003F70: 45 4B 20 4D 45 4D 4F 52 59 22 00 9B 47 38 09 99 |EK MEMORY"..G8..|
00003F80: 22 4C 4F 43 41 54 49 4F 4E 53 20 41 54 20 31 36 |"LOCATIONS AT 16|
00003F90: 33 38 34 2D 32 34 35 37 36 2E 22 00 A5 47 39 09 |384-24576."..G9.|
00003FA0: 8D 39 30 30 30 00 D4 47 3A 09 99 22 54 48 45 20 |.9000..G:.."THE |
00003FB0: 4C 41 53 54 20 4C 49 53 54 49 4E 47 20 49 53 20 |LAST LISTING IS |
00003FC0: 54 48 45 20 53 4F 52 54 20 4F 46 20 52 4F 55 54 |THE SORT OF ROUT|
00003FD0: 49 4E 45 22 00 FF 47 3B 09 99 22 54 48 41 54 20 |INE"..G;.."THAT |
00003FE0: 49 53 20 55 53 45 44 20 49 4E 20 43 4F 4D 4D 45 |IS USED IN COMME|
00003FF0: 52 43 49 41 4C 20 50 52 47 53 20 54 4F 20 22 00 |RCIAL PRGS TO ".|
00004000: 2E 48 3C 09 99 22 54 52 41 4E 53 46 45 52 20 4D |.H<.."TRANSFER M|
00004010: 45 4D 4F 52 59 20 54 4F 20 41 20 42 49 54 4D 41 |EMORY TO A BITMA|
00004020: 50 20 53 43 52 45 45 4E 2C 20 54 46 52 22 00 5D |P SCREEN, TFR".]|
00004030: 48 3E 09 99 22 53 50 52 49 54 45 20 44 41 54 41 |H>.."SPRITE DATA|
00004040: 20 46 4F 52 20 46 41 53 54 20 41 4E 49 4D 41 54 | FOR FAST ANIMAT|
00004050: 49 4F 4E 53 2C 20 43 48 41 4E 47 45 22 00 8C 48 |IONS, CHANGE"..H|
00004060: 40 09 99 22 43 48 41 52 41 43 54 45 52 20 53 45 |@.."CHARACTER SE|
00004070: 54 53 20 4D 49 44 2D 53 54 52 45 41 4D 2C 20 41 |TS MID-STREAM, A|
00004080: 4E 44 20 41 4E 59 54 48 49 4E 47 22 00 BB 48 42 |ND ANYTHING"..HB|
00004090: 09 99 22 45 4C 53 45 20 54 48 41 54 20 4E 45 45 |.."ELSE THAT NEE|
000040A0: 44 53 20 46 41 53 54 20 44 41 54 41 20 54 52 41 |DS FAST DATA TRA|
000040B0: 4E 53 46 45 52 45 4E 43 45 2E 22 00 EC 48 44 09 |NSFERENCE."..HD.|
000040C0: 99 3A 99 22 B7 B7 B7 B7 B7 B7 B7 B7 B7 B7 B7 B7 |.:."............|
000040D0: B7 B7 B7 B7 B7 B7 B7 B7 B7 B7 B7 B7 B7 B7 B7 B7 |................|
000040E0: B7 B7 B7 B7 B7 B7 B7 B7 B7 B7 B7 22 00 1B 49 46 |..........."..IF|
000040F0: 09 99 3A 99 22 4F 4B 20 54 48 41 54 27 53 20 49 |..:."OK THAT'S I|
00004100: 54 2E 20 41 53 20 59 4F 55 20 43 41 4E 20 53 45 |T. AS YOU CAN SE|
00004110: 45 20 54 48 45 52 45 20 49 53 22 00 49 49 48 09 |E THERE IS".IIH.|
00004120: 99 22 41 20 4C 4F 54 20 54 4F 20 41 42 53 4F 52 |."A LOT TO ABSOR|
00004130: 42 20 42 55 54 20 49 46 20 59 4F 55 20 53 54 49 |B BUT IF YOU STI|
00004140: 43 4B 20 41 54 20 49 54 22 00 71 49 4A 09 99 22 |CK AT IT".qIJ.."|
00004150: 59 4F 55 20 57 49 4C 4C 20 46 49 4E 44 20 49 54 |YOU WILL FIND IT|
00004160: 20 49 53 20 41 4C 4C 20 4C 4F 47 49 43 41 4C 2E | IS ALL LOGICAL.|
00004170: 22 00 A1 49 4C 09 99 3A 99 22 52 45 4D 45 4D 42 |"..IL..:."REMEMB|
00004180: 45 52 2C 20 46 4F 52 20 45 56 45 52 59 20 43 4F |ER, FOR EVERY CO|
00004190: 4D 4D 45 52 43 49 41 4C 20 50 52 47 20 59 4F 55 |MMERCIAL PRG YOU|
000041A0: 22 00 CD 49 4E 09 99 22 53 45 45 20 4F 4E 20 54 |"..IN.."SEE ON T|
000041B0: 48 45 20 53 48 45 4C 56 45 53 20 54 48 45 52 45 |HE SHELVES THERE|
000041C0: 20 49 53 20 41 54 20 4C 45 41 53 54 22 00 FC 49 | IS AT LEAST"..I|
000041D0: 50 09 99 22 4F 4E 45 20 4D 41 43 48 49 4E 45 20 |P.."ONE MACHINE |
000041E0: 43 4F 44 45 20 50 52 4F 47 52 41 4D 4D 45 52 20 |CODE PROGRAMMER |
000041F0: 49 4E 56 4F 4C 56 45 44 20 53 4F 22 00 2A 4A 52 |INVOLVED SO".*JR|
00004200: 09 99 22 49 54 27 53 20 4F 4E 4C 59 20 41 20 4D |.."IT'S ONLY A M|
00004210: 41 54 54 45 52 20 4F 46 20 53 54 55 44 59 2C 50 |ATTER OF STUDY,P|
00004220: 52 41 43 54 49 43 45 20 26 22 00 3B 4A 54 09 99 |RACTICE &".;JT..|
00004230: 22 50 41 54 49 45 4E 43 45 2E 22 00 4B 4A 56 09 |"PATIENCE.".KJV.|
00004240: 8D 39 30 30 30 3A 89 31 35 30 30 00 51 4A 27 23 |.9000:.1500.QJ'#|
00004250: 80 00 76 4A 28 23 99 3A 20 99 22 20 20 20 20 20 |..vJ(#.: ." |
00004260: 20 20 20 20 20 20 2D 50 52 45 53 53 20 41 4E 59 | -PRESS ANY|
00004270: 20 4B 45 59 2D 22 00 8C 4A 32 23 97 31 39 38 2C | KEY-"..J2#.198,|
00004280: 30 3A 92 31 39 38 2C 31 3A A1 41 24 00 97 4A 3C |0:.198,1:.A$..J<|
00004290: 23 99 22 93 22 3A 8E 00 00 00 |#.".":.... |
..%....".":.53280,11:.53281,11:.646,0.N.
..." INTRODUCTION TO MACHINE CODE".W
...." ............................".
.....:."THIS TUTORIAL IS NOT MEANT TO BE
A".K.(.."COMPLETE COURSE IN MACHINE COD
E "...*.."PROGRAMMING."...2..:."RATHER,
IT IS MEANT TO BE A SHORT".6.<.."INTRODU
CTION TO THE METHODS USED, TO".C.>.."POS
SIBLY HELP 'DEMYSTIFY' THE SUBJECT"...@.
."FOR THOSE WHO WISH TO STUDY FURTHER.".
..B..:."YOU PROBABLY WILL NOT UNDERSTAND
ALL"...C.."THE CONCEPTS AT FIRST. READ
IT THROUGH"...D.."A FEW TIMES AND TAKE N
OTES."...H..9000.>.D.."WHY PROGRAMME IN
MACHINE CODE?".D.E.."...................
..........."...F..:."BASIC AND OTHER LAN
GUAGES ARE EASILY"...H.."ACCESSIBLE AND
GENERALLY USE COMMANDS"...J.."THAT ARE I
N 'PLAIN ENGLISH'"...L..:."HOWEVER WHEN
THE COMPUTER RUNS A BASIC".6.N.."PRG IT
SPENDS A LOT OF TIME ".A.P.."INTERPRETIN
G THE COMMANDS BEFORE IT".W.R.."OPERATES
THEM."...T..:."MACHINE CODE BYPASSES TH
IS NEED AND".P.V.."'SPEAKS' TO THE COMPU
TER IN IT'S OWN"...X.."LANGUAGE."......:
."THIS MEANS THAT THINGS GET DONE MUCH "
......"FASTER.".)....9000.R...."FOR INST
ANCE EVEN THE SIMPLEST OF"....."COMMERC
IAL GAMES HAVE A LOT GOING ON,". ...."AN
D ALL AT THE SAME TIME.".P....:."FOR EXA
MPLE THERE MAY BE A MUSIC TRACK"......"S
OUND EFFECTS, SPRITES ZAPPING AROUND,".+
...."BACKGROUND GRAPHICS CHANGING ETC ET
C.".Z....:."IF THIS WERE TO BE DONE IN B
ASIC THEN"......"THE RESULT WOULD BE VER
Y SLOW INDEED."... ..:."ALSO MACHINE COD
E PRGS TAKE UP A LOT".Y...."LESS MEMORY
THAN BASIC PRGS."......9000...H.."HOW DO
PROGRAMMERS WRITE MACHINE CODE ?".A.J..
".......................................
".Q.L..:."GENERALLY MACHINE CODE PROGRAM
MERS USE"...N.."AN 'ASSEMBLER'."...P..:.
"AN ASSEMBLER IS A UTILITY THAT ALLOWS".
..R.."THE PROGRAMMER TO ENTER IN HIS COD
E IN"...T.."THE EASIEST POSSIBLE MANNER
BY DOING".0.V.."A LOT OF THE HARD WORK."
.Z....:."THERE HAVE BEEN A FEW ASSEMBLER
S"......"WRITTEN FOR THE 64. THE 6510+ A
SSEMBLER"......"ON THIS DISK IS VERY GOO
D. READ THE DOC"......"FILE FOR INSTRUCT
IONS & LOAD SOME OF "......"THE SAMPLE S
OURCE FILES TO ANALYSE THEM.";.6....NT"H
AS FULL INSTRUCTIONS.".@....9000.K...."S
IMPLE ROUTINES CAN ALSO BE WRITTEN".....
."WITHOUT AN ASSEMBLER AND POKED INTO"..
...."MEMORY USING A 'BASIC LOADER'".....
.:."WE WILL NOW INVESTIGATE THIS METHOD"
......"SO AS TO GIVE YOU AN IDEA OF".-..
.."MACHINE CODE PROGRAMMING.".7....9000.
_.,.."LET'S TAKE A SIMPLE COMMAND I.E.".
....."CHANGING THE BORDER COLOUR TO GREE
N"...2..:."IN BASIC YOU WOULD DO THIS BY
ENTERING".N.4.."POKE 53280,5"...6..:."I
N ASSEMBLY LANGUAGE THIS WOULD BE-"...8.
.:."LDA #5"...:.."STA 53280".'.<.."RTS".
O.@..:."LDA,STA, AND RTS ARE 'OPCODES'".
..B..:."THEY ARE LIKE THE COMMANDS THAT
YOU USE"...D.."IN BASIC."...J..9000.A...
."LDA MEANS LOAD THE ACCUMULATOR"......:
."STA MEANS STORE THE ACCUMULATOR"......
:."RTS MEANS RETURN FROM SUBROUTINE".4..
..:."SO OUR SHORT PRG SAYS-".A....:."LOA
D THE ACCUMULATOR WITH NUMBER 5,"......"
STORE THE VALUE IN THE ACCUMULATOR AT"..
...."MEM 53280, THEN RETURN FROM THE ROU
TINE"......:."IN FACT THERE ARE MANY OPC
ODES THAT"......"CAN BE USED, THESE ARE
JUST 3 SIMPLE".'...."EXAMPLES.".U....:."
NOW WE WILL SEE HOW TO CONVERT THESE".X.
..."COMMANDS INTO DATA NUMBERS."......90
00......"EACH OPCODE IS REPRESENTED BY A
".B...."SPECIFIC NUMBER."......:."FOR I
NSTANCE LDA IS REPRESENTED, IN"......"TH
IS CASE BY THE NUMBER 169".A....:."(IN F
ACT THE NUMBER FOR LDA WILL VARY".P...."
ACCORDING TO THE FUNCTION. IN THIS CASE"
......"THE FUNCTION IS TO LOAD A SPECIFI
C".H...."NUMBER.THIS IS CALLED 'THE 'IMM
EDIATE'"......"MODE AND IS 169)......:."
THE NUMBER FOR STA IN THIS CASE IS 141".
:...."AND THE NUMBER FOR RTS IS ALWAYS 9
6".D....:."SO OUR CODE NOW LOOKS LIKE TH
IS-".S....:."169 5"......"141 53280"....
.."96"......9000.B.X.."NOW THE ONLY DIFF
ICULTY IS THAT IN"...B.."MACHINE CODE YO
U CANNOT USE ANY NUMBER"...D.."HIGHER TH
AN 255.".5.F.."SO 53280 MUST BE CONVERTE
D TO WHAT IS".\.L.."CALLED HIGHBYTE/LOWB
YTE FORMAT."...V..:."TO DO THIS FIRST DI
VIDE THE NUMBER "...X.."BY 256- 53280/
256=208".J.Z..:."208 IS THEN OUR HIGHBYT
E"...|..:."THE REMAINDER IS 32 (53280-20
8*256=32"...~..:."32 IS OUR LOWBYTE".D..
..:."THIS IS ENTERED LIKE THIS(LOWBYTE 1
ST)".X....:."141 32 208".}....:."THE COM
PUTER READS THIS AS-"......"'STORE AT 53
280'"......9000......"OUR ORIGINAL PRG W
AS-".L....:."LDA #5"......"STA 53280"...
B.."RTS"...D..:."NOW, CONVERTED TO MACHI
NE CODE DATA WE".).F.."NOW HAVE-".8.H..:
."169 5".J.J.."141 32 208".T.L.."96"...P
..:."ALL WE HAVE TO DO IS POKE THIS DATA
TO"...R.."MEMORY.THIS BASIC LOADER WILL
DO IT-"...Z..:."10 FORP=49152TO49157:RE
AD A:POKEP,A:NEXT"......"20 DATA 169,5,1
41,32,208,96"......:."(COPY THIS DOWN &
TRY IT LATER)".8....9000.G. .."ONCE THIS
BASIC LOADER IS ENTERED & RUN"...".."AL
L YOU DO IS TYPE IN SYS49152 (RTN)"...$.
.:."THIS TELLS THE COMPUTER TO EXECUTE".
..&.."THE ROUTINE AT MEM 49152."...(..:.
"IF YOU HAVE DONE EVERYTHING CORRECTLY".
>.*.."THEN THE BORDER SHOULD CHANGE TO G
REEN.".O.4..:.".........................
.............."...>..:."OF COURSE,IN A S
HORT ROUTINE LIKE THIS".L.@.."THE DIFFER
ENCE IN SPEED IS NOT REALLY"...B.."NOTIC
EABLE, BUT IN LONGER PRGS THERE IS"...D.
."NO COMPARISON.".!.H..9000:.1000.O...."
THE FOLLOWING EXAMPLE IS ANOTHER SHORT".
X...."ROUTINE THAT SHOWS THE USE OF THE"
......"X REGISTER AS A 'COUNTER' AND ALS
O".N...."INTRODUCES THE 'BRANCH' INSTRUC
TION."......:."THE NUMERICAL DATA CAN BE
LOADED INTO".,...."MEMORY WITH A BASIC
LOADER IF YOU WISH.".[....:."THE CODE AS
IT WOULD BE WRITTEN BY AN"......"ASSEMB
LER IS ON THE LEFT AND THE"......"RESULT
ING NUMERICAL CODE ON THE RIGHT."......:
."NOTE THAT AN ASSEMBLER ALLOWS 'LABELS'
"......"FOR JUMPS AND ALSO ALLEVIATES TH
E NEED".>...."TO CONVERT NUMBERS TO LOWB
YTE/HIGHBYTE.".O....:."YOU CAN USE LABEL
S LIKE 'LOOP' ETC THAT"......"DEFINE THE
FUNCTION OR AS I HAVE DONE".A...."USE X
XXX OR YYYY OR WHATEVER.".K....9000.....
."THIS ROUTINE POKES LETTER 'A' (1) INTO
".*...."SCREEN MEMORY 1024-1263(6 LINES
OF 'A')":..I...."LDX #0 162 0
".H...."LDA #1 169 1"......"X
XXX STA,X 1024 157 0 4"......"INX
232".G...."CPX #241 2
24 241"... .."BNE XXXX 208 248"
.. ".."RTS 96":..D (..646,
3:."LDX #0 ";:.646,0:."LOADS THE X REGIS
TER WITH #0".R *.."THE X REGISTER IS USE
D AS AN INDEX (IE".. ..."A COUNTER) AS W
E WILL SOON SEE.":... 0..646,3:."LDA #1
";:.646,0:."LOADS THE ACCUMULATOR WITH #
1,"..!1.."(THE SCREEN CODE NUMBER FOR LE
TTER 'A'":..G!2..646,3:."STA,X 1024 ";:.
646,0:."THIS IS THE ABSOLUTE,X".V!4.."VE
RSION OF STA. THE ACCUMULATOR WILL "..
!6.."STORE ITS #1 AT MEMORY 1024(THE SCR
EEN)".S!8.."PLUS THE VALUE OF X (IE 1024
,1025,1026"..!9.."ETC TO 1263 (WHEN X=24
1)..":.." -PRESS
A KEY-".;";..198,0:.198,1:.AJ$:.".".X"L.
."HERE IT IS AGAIN...":..W"N.."LDX #0
162 0".."P.."LDA #1
169 1".."R.."XXXX STA,X 1024 157 0 4".
T"T.."INX 232".."V.."CPX #
241 224 241"..#X.."BNE XXXX
208 248".2#Z.."RTS 9
6".A#`..:."XXXX IS A 'LABEL' WHICH IS US
ED BY AN"..#B.."ASSEMBLER TO DEFINE BRAN
CHES AND JUMPS.".N#D..:.646,3:."INX ";:.
646,0:."INCREASES THE VALUE OF THE X "..
#F.."REGISTER BY 1"..$H..646,3:."CPX #24
1 ";:.646,0:."COMPARE THE VALUE IN THE.7
$J.."REGISTER TO #241.".R$L..646,3:."BNE
XXXX";:.646,0:."IF X DOES NOT = 241 THE
N". $N.."BRANCH TO LABEL XXXX.(IE BRANCH
IF NOT"..$P.."EQUAL.)"..$R..646,3:."RTS
";:.646,0:."OTHERWISE FINISH."..%V.."
-PRESS A KEY-".(%X
..198,0:.198,1:.AJ$:.".".A%..."TO SUMMAR
ISE...":..`%..."LDX #0 162 0"
.%..."LDA #1 169 1". %..."XX
XX STA,X 1024 157 0 4"..%..."INX
232"..%..."CPX #241 22
4 241"..%..."BNE XXXX 208 248".
.&..."RTS 96".2&...:."LOAD
X WITH 0".Q&B.."LOAD ACCUMULATOR WITH 1
"..&D.."STORE CONTENTS OF ACCUMULATOR AT
MEMORY"..&F.."1024 PLUS THE VALUE OF X.
".E&H.."INCREASE THE VALUE OF X BY 1"..&
J.."IS X = 241 ? (IE 240 A'S POKED.)"..'
L.."IF NOT BRANCH BACK TO MAIN ROUTINE."
.2'N.."IF SO THEN FINISH."._'P..:."AS YO
U CAN SEE THE PRG FLOW IS VERY"..'R.."SI
MILAR TO THAT OF AN EASY BASIC PRG."..'X
..9000.D'..."LET'S LOOK AT THAT BRANCH I
NSTRUCTION."..'..."(BNE XXXX OR NUMERIC
ALLY 208 248.)"..(...:."WHEN NOT USING A
N ASSEMBLER YOU MUST".H(..."WORK OUT THE
BRANCHES YOURSELF. THE".W(..."MAX. DIST
ANCE OF A BRANCH IS 128 BYTES."..(...:."
WHEN BRANCHING BACK COUNT DOWN FROM 255"
.O( .."(INCLUSIVE). SO CHECK THIS OUT-".
.("..:."XXXX STA X,1024 157 0 4"..)$..
"INX 232".0)&.."CPX #241
224 241".Q)(.."BNE 248
208 248"..))..:."COUNTING THE BYTES BAC
KWARDS FROM 248"..)*.."TO 157 GOES 255,2
54,253,252,251,250,249"..),.."THEN 248.S
O 248 IS OUR BRANCH DISTANCE."..)...9000
..*F.."FORWARD BRANCHES ARE NON-INCLUSIV
E.".'*R.."FOR EXAMPLE:".F*T..:."BEQ YYYY
240 2".E*V.."BNE 249 208
249".*X.."YYYY RTS 96"..*Z..:."
FORWARD BRANCHES CAN BE 0-127".N*\.."BAC
KWARD BRANCHES CAN BE 255-128"..*D..:."T
HE ADVANTAGES OF AN ASSEMBLER BECOME".,+
F.."IMMEDIATELY OBVIOUS. LABELS CAN BE U
SED".[+H.."FOR BRANCHES AND NUMBERS DO N
OT NEED TO"..+J.."BE CONVERTED TO LOWBYT
E/HIGHBYTE."..+L..:."HOWEVER STARTING OF
F BY WRITING SHORT"..+N.."ROUTINES WITH
A BASIC LOADER AND DOING"..,P.."YOUR OWN
CALCULATIONS IS A GOOD WAY TO".7,R.."GE
T AN INSIGHT OF HOW M/C WORKS.".A,T..900
0.K,X.."TO TRY OUT THE PRECEEDING ROUTIN
E "..,..."WRITE A BASIC LOADER LIKE THIS
-".C,...:."10 FORP=49152TO49164:READA:PO
KEP,A:NEXT"..,...:."20 DATA 162,0,169,1,
157,0,4,232,224,241"..-...:."30 DATA 208
,248,96".?-...:."RUN THE PROGRAMME THEN
TYPE SYS49152 ".G-..."(RETURN). IF YOU H
AVE ENTERED IT"..-..."CORRECTLY YOU SHOU
LD GET 6 LINES OF A'S"..-..."ON SCREEN".
.- ..9000.E-..."FURTHER INFO".Y-..."....
........"......:."MACHINE CODE PRGS CAN
BE LOADED IN".1...."ANYWHERE WHERE THER
E IS FREE MEMORY".B....:."A COMMON PLACE
IS MEM 49152-53247 WHICH"......"IS SET
ASIDE FOR USERS MACHINE CODE". .B.."PROG
RAMMES.".N.H..:.:."ALL OUR EXAMPLES HAVE
USED DECIMAL"...J.."NOTATION. MANY MACH
INE CODE PROGRAMMERS".,/L.."WILL WRITE I
N HEXADECIMAL (C000 =49152)".]/N..:."MOS
T BOOKS ON MACHINE CODE WILL EXPLAIN"../
P.."HEXIDECIMAL IF YOU WISH TO STUDY UP
ON"../R.."ON THIS"../T..9000:.2000../...
"WHAT NEXT ?".P/..."..........."../..."O
NCE YOU UNDERSTAND THE ROUTINES IN ".'0.
.."THIS TUTORIAL YOU CAN EXPERIMENT BY".
Q0..."MAKING SLIGHT ADJUSTMENTS IN THEM.
"..0...:."TRY USING SOME OF THE ROUTINES
IN A "..0..."BASIC PRG (JUST MAKE A S
YS CALL IN".W0..."BASIC, JUST LIKE ANY O
THER COMMAND.)"..1..."MIXTURES OF BASIC
& MC ARE CALLED ".)1..."HYBRID PRGS AND
ARE VERY COMMON.".Y1...:."I AM NOT GOING
TO LIST ALL THE OPCODES"..1..."HERE (TH
ERE ARE 200 OR SO). YOU WILL "..1..."E
VENTUALLY HAVE TO GET A BOOK ON M/C".S1.
.."IF YOU ARE TO PROGRESS."..1..."THIS T
UTORIAL WILL HELP YOU TO GET".+2..."STAR
TED, TO CONTINUE YOU WILL HAVE TO ".K2..
."HUNT DOWN TEXT BOOKS ETC".U2...9000.~2
..."THERE ARE A LOT OF GOOD C64 BOOKS"..
2..."AROUND. TRY YOUR LOCAL LIBRARY, THE
Y".X2..."CAN ORDER THEM IN FROM OTHER LI
BRARIES"..3..."IF NECESSARY. ALSO TRY EL
LISON HAWKER".03..."BOOKSHOP 6O LIVERPOO
L ST HOBART WHO".[3..."WILL SEND A CATAL
OGUE OF C64 BOOKS."..3...:.:."PETER BOOT
HMAN SYDNEY NSW AUSTRALIA"..3@..NT:PR
INT"ALSO PESTER ALL OF THE ABOVE FOR A".
X3J..NT"GOOD ASSEMBLER."..3T..:.:."PRESS
R TO READ AGAIN"..4V..:."PRESS Q TO QUI
T".(4X..198,0:.198,1:.A$.74Z..A$."R".10.
E4\..A$."Q"...O4^..1624.N4`.."IDEA OF 'H
OW IT WORKS'."..4H..:."MANY EXCELLENT PR
OGRAMMES HAVE BEEN".G4J.."WRITTEN IN BAS
IC, HOWEVER A MACHINE "..4L.."CODE PROGR
AMMER HAS A MUCH GREATER"..5N.."COMMAND
OF THE COMPUTER AND WILL ".H5P.."GENERAL
LY PRODUCE BETTER QUALITY PRGS.".Y5Q..:.
".......................................
". 5R..:.:." R TO READ AGAIN Q TO QUIT"
..5T..198,0:.198,1:.A$.D5V..A$."Q"...T5.
.. A$."R".10..5...1652..5O....6P.."THE N
EXT 2 ROUTINES ARE A BIT MORE".76Z.."COM
PLEX (& PROBABLY MORE USEFUL).".G6...:."
I WILL GIVE LITTLE EXPLANATION, IF YOU".
.6..."HAVE GOT THIS FAR THEN YOU ARE CAP
ABLE"..6..."OF ANALYSING THE LISTINGS YO
URSELF."..6...:."BOTH THESE ROUTINES USE
INDIRECT"..7..."INDEXED ADDRESSING. THI
S ENTAILS THE".C7..."STORING OF 2 BYTE A
DDRESSES AT A ZERO".N7..."PAGE LOCATION.
(ZERO PAGE=ANY MEMORY"..7..."ADDRESS LES
S THAN 256)"..7..."USUALLY ADDRESSES 251
/252 AND 253/254".S7..."ARE USED FOR THI
S."..8...:."DIFFERENT MODES OF LDA & STA
ARE USED".,8..."WHEN ADDRESSING ZERO PA
GE AND WHEN".V8..."USING INDIRECT INDEXE
D ADDRESSING.".`8...9000..8..."THIS ROUT
INE CHANGES SCREEN TEXT COLOUR"..8..."BY
POKING 8(ORANGE) TO 55296-56293."..8...
:."LDA #216 169 216"..8..."STA 25
2 133 252"..9..."LDA #0
169 0".69..."STA 251 133 251".Q
9..."TAY 168".N9..."LDA #8
169 8"..9..."ZZZZ STA (251),Y 14
5 251"..9..."INY 200".H9..."
BNE ZZZZ 208 251"..9..."INC 252
230 252"..:..."LDX 252 16
6 252".%:..."CPX #219 224 219".D:
..."BNE ZZZZ 208 243".D: .."XXXX
STA (251),Y 145 251".:".."INY
200"..:$.."CPY #232 192 232"..
:&.."BNE XXXX 208 249".W:(.."RTS
96"..;+..:."COPY THIS DOWN (
OR DUMP SCREEN TO".1;,.."PRINTER) & ANAL
YSE IT. -PRESS A KEY-".L;...198,0:.19
8,1:.A$:.".".X;/.."NOTE THAT IN THE PREC
EEDING ROUTINE-"..;0..:."BNE MEANS BRANC
H IF NOT EQUAL TO ZERO".U;1..:."INDIRECT
INDEXED ADDRESSING USES THE"..<2.."Y RE
GISTER.(ANOTHER 'INDEX' REGISTER)"./<3..
:."THE X REGISTER IS USED TO CHECK THE".
W<4.."HIGH BYTE AT 252 WHEN ROUTINE IS".
R<6.."NEARING COMPLETION.". <8..:."IF YO
U SPEND SOME TIME ANALYSING THE".M<:.."F
LOW OF THE CODE THEN ALL WILL BECOME"..<
<.."CLEAR. THEN YOU CAN TRY WRITING SOME
".$=>.."VARIATIONS. I.E. FILL SCREEN MEM
ORY".Q=@.."1024-2023 WITH A SPECIFIC CHA
RAACTER.".=B..:."NOTE THAT TO DO THE SA
ME THING USING"..=D.."BASIC WOULD BE A L
OT SLOWER."..=H..9000.Z=R.."HERE IS THE
BASIC LOADER FOR THE LAST"..>T.."ROUTINE
. TO SAVE TYPING YOU COULD "./>V.."PRESS
RUN/STOP, TYPE NEW (RTN) THEN".Z>X.."CU
RSOR UP & PRESS RETURN ON THE PRG"..>Z..
"LINES. (OH, YOU ALREADY THOUGHT OF "..>
\.."THAT, OKAY.)".J>^..:."10 FORP=49152T
O49183:READA:POKEP,A:NEXT"..?`..:."20 DA
TA 169,216,133,252,169,0,133,251,168,169
,8,145,251,200,208,251".G?B..:."30 DATA
230,252,166,252,224,219,208,243,145,251,
200,192,232,208,249,96"..?F..:."AS USUAL
,RUN THE PRG TO POKE THE DATA".C?H.."INT
O MEMORY THEN TYPE SYS49152 (RTN)."..?J.
."ALL CHARACTERS ON SCREEN WILL CHANGE T
O"..@L.."ORANGE."..@N..9000.:@P.."THE NE
XT (AND FINAL) LISTING IS ANOTHER".P@R..
"HANDY ROUTINE."..@T..:."THIS CODE WILL
TRANSFER 8192 PIECES OF"..@V.."DATA FROM
MEM 8192 TO MEM 16384 IN A"..@X.."FRACT
ION OF A SECOND. (BASIC WOULD TAKE"..AZ.
."MORE THAN 5 MINUTES TO DO THIS!)".,A..
.:."THIS ALSO USES INDIRECT INDEXED".WA.
.."ADDRESSING. AS YOU WILL SEE THE TWO".
.A..."ADDRESSES (8192 & 16384) ARE FIRST
"..A..."LOADED INTO ZERO PAGE 251/252 &
253/254".SA..."IN LOWBYTE HIGHBYTE FORMA
T."..B...:."TAY MEANS TRANSFER ACCUMULAT
OR TO Y"..B..."WHICH IS AN EASY WAY OF P
UTTING A ZERO".JB..."INTO THE Y REGISTER
.".XB...:."IF YOU LEARN HOW TO USE THIS
ROUTINE"..B..."THEN YOU CAN ADJUST THE P
ARAMETERS TO".TB..."TRANSFER LARGE HUNKS
OF MEMORY ANYWHERE"..B..."AT HIGH SPEED
."..B...9000..C..."TRANSFER 8192 PIECES
OF DATA FROM ".=C..."MEMORY 8192 TO 1638
4.":..[C..."LDA #0 169 0".{C..
."STA 251 133 251"..C..."TAY
168"..C..."LDA #32 1
69 32".VC..."STA 252 133 252"..
C..."LDA #0 169 0"..D..."STA 2
53 133 253".3D..."LDA #64
169 64".SD..."STA 254 133 2
54".TD..."ZZZZ LDA (251),Y 177 251"..D.
.."STA (253),Y 145 253"..DB.."INY
200".QDD.."BNE ZZZZ
208 249"..DF.."INC 252 230 252
"..EH.."INC 254 230 254".1EJ.."
LDX 252 166 252".PEL.."CPX #64
224 63".PEN.."BNE ZZZZ
208 239"..EP.."RTS 96"..E..
.:."-PRESS A KEY-"..E...198,0:.198,1:.A$
:."."..E..."HERE IS THE BASIC LOADER.":.
..F..."10 FORP=49152TO49186:READA:POKEP,
A:NEXT".?F...:."20DATA169,0,133,251,168,
169,32,133,252".OF...:."30DATA169,0,133,
253,169,64,133,254,177"..F$..:."40DATA25
1,145,253,200,208,249,230,252".OF...:."5
0DATA230,254,166,252,224,64,208,239,96".
.F0..:."YOU CAN TEST THIS BY POKING SOME
DATA".*G2.."TO 8192-16383 (DO IT IN BAS
IC TO SEE".TG4.."HOW LONG IT TAKES!), TH
EN RUN THE ".ZG6.."LOADER, SYS49152 & PE
EK MEMORY"..G8.."LOCATIONS AT 16384-2457
6."..G9..9000.TG:.."THE LAST LISTING IS
THE SORT OF ROUTINE"..G;.."THAT IS USED
IN COMMERCIAL PRGS TO "..H<.."TRANSFER M
EMORY TO A BITMAP SCREEN, TFR".]H>.."SPR
ITE DATA FOR FAST ANIMATIONS, CHANGE"..H
@.."CHARACTER SETS MID-STREAM, AND ANYTH
ING"..HB.."ELSE THAT NEEDS FAST DATA TRA
NSFERENCE."..HD..:."....................
..................."..IF..:."OK THAT'S I
T. AS YOU CAN SEE THERE IS".IIH.."A LOT
TO ABSORB BUT IF YOU STICK AT IT".QIJ.."
YOU WILL FIND IT IS ALL LOGICAL."..IL..:
."REMEMBER, FOR EVERY COMMERCIAL PRG YOU
".MIN.."SEE ON THE SHELVES THERE IS AT L
EAST"..IP.."ONE MACHINE CODE PROGRAMMER
INVOLVED SO".*JR.."IT'S ONLY A MATTER OF
STUDY,PRACTICE &".;JT.."PATIENCE.".KJV.
.9000:.1500.QJ'#..VJ(#.: ." -P
RESS ANY KEY-"..J2#.198,0:.198,1:.A$..J<
#.".":....
×
C64 Image
> CLICK IMAGE PREVIEW FOR FULL MODAL