Appendix C
Keep a workbench notebook
Keep a record short enough that you will actually use it. For a surprising byte, write down the guest CPU and mode, the source label, the PC of the next instruction, the address space and the byte you expected. If you share only a hexadecimal address, another reader can inspect precisely the wrong thing.
Read the original assembler manual
The complete LWTools 4.25 manual is available offline alongside this book, with its original source, PDF and license notices. Consult it for LWASM syntax and LWLINK scripts; the bundled command-line help also records installed options and VCC Plus extensions. Ask the Manuals and project MCP manual tools search these references together with the teaching books. The complete CMOC manual is useful when linking assembly with C.
Save the examples
| Question to test | File to save | Setup and destination |
|---|---|---|
| Did the message survive? | dispatch.asm | Either CPU, Disk BASIC. Change the last letter in a copy. |
| Which physical block backs this window? | bankwalk.asm | Use the disposable setup in chapter 4. |
| Which page supplied the pixels? | PAGES.bas | Open in BASIC Development and use the two stops in chapter 5. |
| What does W count? | dispatch6309.asm | HD6309 guest and target. Stop before and after TFM. |
| Which mode did the program leave behind? | mode.asm | Fresh HD6309 Disk BASIC, MD=$00 before starting. |
| How does a software interrupt return? | softirq.asm | Follow the setup and restore sequence in chapter 7. |
| Can I rebuild and deliver two modules? | Dispatch project | Expand the ZIP into a writable folder, then open the project folder as described in chapter 8. |
In the app, selecting an assembly file or project archive opens a save panel. Work on the copy you saved. A BASIC example link opens its own BASIC workspace. In the browser edition you can download the files. With an unmodified checkout the whole shelf also opens locally from docs/manuals/index.html.
Choose the right address book
A 6809 address runs from $0000 to $FFFF. It answers “where in the guest CPU’s current view?” For a RAM location, the enabled MMU, active task and block select the backing page. The physical-video base answers a different question about what the video hardware displays. A ROM overlay can change what the CPU reads in part of that space. Addresses near the top can reach device registers and vectors; a read or write performed by guest code may have a hardware side effect.
- To inspect a label in your assembled listing, begin with Mapped CPU. Look up its backing using MMU before comparing it to a physical address.
- To ask why a screen didn’t change, inspect Current Video Page as well as the chosen address. Record the graphics mode, palette set and whether the address is mapped or physical.
- To call a BASIC service, identify its arguments, registers you need afterward and how you will return. The exercises assume the Disk BASIC environment. CHROUT uses a vector at $A002 and accepts the character in A. The planet program also uses keyboard polling. Read the key-to-color walkthrough for a concrete call site.
- To change a mapping or install an interrupt handler, first save any work you care about. Keep the executing code and its stack reachable, save the state you will modify, and plan a path that restores it. Write down a checkpoint after restoration.
Get a known BASIC prompt
If you stepped inside a ROM service, place a stop at the next instruction in your own source and Continue. If you stopped just before the final RTS of a direct-run exercise, continue through the return. At the BASIC prompt type PRINT 2+3. A fresh answer of 5 distinguishes an interactive return from an old OK still on screen.
An example that ends in a deliberate hold loop keeps executing the loop. Save the source; restart the disposable guest to move on. A program stopped partway through an MMU, mode or vector change still has that intermediate state. Follow the documented cleanup path if it is reachable; otherwise restart the practice setup. Avoid changing the PC to a convenient-looking address while the stack still belongs to an interrupt handler.
Books and tools behind the experiments
- Motorola, Inc. MC6809–MC6809E 8-Bit Microprocessor Programming Manual. M6809PM (AD), March 1981, reprinted May 1983. Chapters 1–2 and Appendix A. Registers, addressing, condition codes and the interrupt frame.
- Tepolt, Laurence A. Assembly Language Programming for the CoCo 3. TEPCO, 1987. Figures 3-4 and 4-1, pp. 20 and 23. Historical context for the relationship between processor and video addressing in the CoCo 3.
- Atkinson, Darren. Motorola 6809 and Hitachi 6309 Programmer’s Reference. 2009. Parts I and II. Comparative instruction, addressing and mode descriptions.
- Burke, Chris. The 6309 Book: Inside the 6309 Microprocessor. Second edition. Burke & Burke, 1993. Extended registers and native-mode behavior.
- Barden, William, Jr. TRS-80 Color Computer Assembly Language Programming. Radio Shack, 1983. Subroutines, addressing and machine-language practice on the Color Computer.
- Astle, William, and LWTools contributors. LW Tool Chain. Manual distributed with LWTools 4.25. LWASM and LWLINK chapters. Source syntax, object sections, linking and output formats.
The Color Computer Archive preserves historical documentation that informed this book. The lessons and lab programs here were written for VCC Plus.
Original VCC Plus prose and instructional images © 2026 Brian K. Holman. The Hitachi badge on the cover identifies the processor. See the application’s Licenses & Notices and the library’s artwork credits.