Table of Contents| Note to Readers | vi |
| Preface | vii |
| Introduction | ix |
| |
| 1 First Concepts | 1 |
| The Inner Workings of Microcomputers | |
| Computer Notation: Binary and Hexadecimal | |
| The 650x's Inner Architecture | |
| Beginning Use of a Machine Language Monitor | |
| A Computer's "Memory Layout" | |
| First Machine Language Commands | |
| Writing and Entering a Simple Program | |
| |
| 2 Controlling Output | 23 |
| Calling Machine Language Subroutines | |
| The PRINT Subroutine | |
| Immediate Addressing | |
| Calling Machine Language from BASIC | |
| Tiny Assembler Programs | |
| Indexed Addressing | |
| Simple Loops | |
| Disassembly | |
| |
| 3 Flags, Logic, and Input | 39 |
| Flags that hold Status Information | |
| Testable Flags: Z, C, N, and V | |
| Signed Numbers | |
| The Status Register | |
| First Concepts of Interrupt | |
| Logical Operators: OR, AND, EOR | |
| The GETIN Subroutine for Input | |
| The STOP Subroutine | |
| |
| 4 Numbers, Arithmetic, and Subroutines | 57
|
| Numbers: Signed and Unsigned | |
| Big Numbers: Multiple Bytes | |
| Arithmetic: Add and Subtract | |
| Rotate and Shift Instructions | |
| Multiplication | |
| Home-Grown Subroutines | |
| |
| 5 Address Modes | 71
|
| Non-addresses: Implied, Immediate, Register | |
| Absolute and Zero Page | |
| Indexing | |
| The Relative Address for Branches | |
| Indirect Addressing | |
| Indirect, Indexed | |
| |
| 6 Linking BASIC and Machine Language | 91
|
| Where To Put a Machine Language Program | |
| Basic Memory Layout | |
| Loading and the SOV Pointer | |
| Basic Variables: Fixed, Floating, and String | |
| Exchanging Data with BASIC | |
| |
| 7 Stack, USR, Interrupt, and Wedge | 111
|
| The Stack for Temporary Storage | |
| USR: An Alternative to SYS | |
| Interrupts: IRQ, NMI, and BRK | |
| The IA Chips: PIA and VIA | |
| Infiltrating BASIC: The Wedge | |
| |
| 8 Timing, Input/Output, and Conclusion | 131 |
| How To Estimate the Speed of Your Program | |
| Input and Output from Tape, Disk, Printer | |
| Review of Instructions | |
| Debugging | |
| Symbolic Assemblers | |
| Where To Go from Here | |
| |
| Appendix A The 6502/6510/6509/7501 Instruction Set | 147 |
| |
| Appendix B Some Characteristics of Commodore Machines | 155 |
| |
| Appendix C Memory Maps | 161 |
| |
| Appendix D Character Sets | 215 |
| |
| Appendix E Exercises for Alternative Commodore Machines | 225
|
| |
| Appendix F Floating Point Formats | 231 |
| |
| Appendix G Uncrashing | 233 |
| |
| Appendix H A Do-It-Yourself Supermon | 237 |
| |
| Appendix I IA Chip Information | 245 |
| |
| Appendix J Disk User's Guide | 309 |
| |
| Glossary | 317 |
| |
| Index | 322 |