Table of Contents| |
| Section I. General Concepts | |
| Chapter 1: TRS-80 and Z-80 Architecture | 11 |
| |
| What Are All These Ones and Zeros |
| |
| |
| The Z-80: A Chip Off the Old Block |
| |
| Chapter 2: Z-80 Instructions | 24 |
| |
| How Long Is an Instruction |
| |
| |
| |
| |
| Arithmetic, Logical, and Compare |
| |
| Decision Making and Jumps |
| |
| |
| Shifting and Bit Operations |
| |
| |
| A Program of a Thousand Instructions Begin With the First Bit |
| |
| Chapter 3: Z-80 Addressing | 41 |
| Why Not One Addressing Mode |
| |
| Implied Addressing: No Addressing at All |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| Conclusions and Confusion |
| |
| Chapter 4: Assembly Language Programming | 58 |
| |
| |
| |
| |
| |
| |
| |
| A Mark II Version of the Store "1" Program |
| |
| Further Editing and Assembling |
| |
| Chapter 5: T-BUG and Debugging | 75 |
| |
| |
| |
| Standard Format in Following Chapters |
| |
| |
| Section II. Programming Methods | |
| Chapter 6: Moving Data in Bytes, Words, and Blocks | 87 |
| |
| |
| An Unsophisticated Block Move |
| |
| |
| |
| |
| |
| |
| Chapter 7: Arithmetic and Compare Operations | 108 |
| Number Formats: Absolutely and Positevily |
| |
| |
| Adding and Substracting 8-Bit Numbers |
| |
| Adding and Substracting 16-Bit Numbers |
| |
| |
| |
| |
| Chapter 8: Logical Operations, Bit Operations, and Shifts | 131 |
| ANDs, ORs, and Exclusive ORs |
| |
| |
| |
| |
| Some Shifting Is Very Logical |
| |
| |
| Software Multiply and Divide |
| |
| Input and Output Conversions |
| |
| Chapter 9: Strings and Tables | 151 |
| Assembler-Generated Strings |
| |
| Generalized String Output |
| |
| |
| |
| |
| |
| |
| Chapter 10: I/O Operations | 167 |
| |
| |
| |
| Mysteries of the Cassette Revealed |
| |
| |
| |
| Chapter 11: Common Subroutine | 189 |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| SET, RESET and TEST Subroutines |
| |
| |
| Section III. Appendices | |
| Appendix I: Z-80 Instruction Set | 205 |
| Appendix II: Z-80 Operation Code Listings | 209 |
| Index | 221 |