← Manual LibraryVCC Plus 3.7.1 · Reading on the web

Try the exercises in VCC Plus. Example links download files here; open them in the app to work beside the emulator.

The complete book · PDF editionBook 7: Your First 6809 Programs

19 pages · VCC Plus 3.7.1 · Keep a copy to read or print.

Download PDF
Contents

Appendix A

At the assembly workbench

Five small files can tell you a surprising amount about a computer. Choose one by the question you want to answer. Each link gives you editable text in the same form the bundled LWASM assembler reads.

Save a program of your own

I want to see… Take this source Where to stop
One byte change byte.asm Stop at entry, then follow A through two instructions.
One byte appear as a letter letter.asm Stop just before CHROUT, then compare the byte with the character.
A key choose a path choice.asm Stop on the first load in either planet branch.
A subroutine remember its caller return.asm Step into nextletter, then read the return address at S.
The whole 40-column planet game planet.asm Stop before the palette write and predict the greeting from B and X.

In Help → Manual Library…, select a source link and choose a location in Save Assembly Example. In the standalone browser edition, use the download or take the file from the book’s examples folder. From Develop → Assembly Development… choose File → Open Source…. Opening a document gives you a copy to study. Assemble translates it. Run or Debug from Entry loads the resulting machine code into the guest. Before a load, save any guest work you want to keep.

Use the workspace’s document picker to go back to an earlier source. If you change an instruction and want to observe the change, save and run the new build. A breakpoint applies to the instructions from the matching build. Paper notes about an address can grow stale when a program changes size.

Read a stopped machine

What the debugger shows How to use it in this book
PC · program counter Find this address in Build details → Listing. The source highlight and PC identify the instruction about to execute. Record changes after Step.
A, B · 8-bit accumulators Each holds one byte. The program decides what a byte means. In the planet example A can carry a key, while B can carry a color.
X · 16-bit index register Look up its value under Symbols. A message label gives you a name for the address. In the printing loop X advances a byte at a time.
CC.Z · zero flag inside CC Immediately after CMPA, equality sets Z. BEQ follows its branch when Z is set. Later instructions can change it.
S · system stack pointer Note S before JSR and again inside the routine. Read two bytes in Inspector → Memory → Mapped CPU and put the high byte first. After the matching RTS, check both S and PC.

The assembly window’s Quick Reference can look up the instruction at the caret. Open Develop → Assembly Quick Reference… for the full offline index. Try Immediate for the # sign, CC.Z for a branch decision, Indexed for ,X+, and BSR to compare a relative subroutine call with JSR. BSR and JSR both arrange for RTS to return to the following instruction.

Get back to the experiment

  • The program finished before you saw a register. Choose Debug from Entry, then Step. Run is fast enough to finish the smallest examples before you can click Pause.
  • A key went into the editor. Click the emulator display or choose Input → Focus CoCo Display. The planet choices take one key. A command at the BASIC prompt takes Return.
  • Step left the source file. A JSR through CHROUT or POLCAT enters the ROM. Give the processor an instruction in your own file to stop on, then Continue. If you simply want the program to finish, clear the stops and continue.
  • A label has a value, but Set Stop cannot use it. Use a line that assembles to an instruction, such as greet STB BG6. EQU assigns a name a value. FCC and FCB can lay down message bytes. These have different jobs from executable instructions.
  • You want to carry a finished program on disk. The handbook’s Assembly workspace tour covers Export Binary, Export Disk Image and optional DOS boot. Direct Run is enough for all five experiments here.

Ready to follow a message through several routines? Catch a three-byte packet in memory, or follow a saved sum onto the stack in the advanced assembly volume.

Books behind the workbench

  • Motorola, Inc. MC6809–MC6809E 8-Bit Microprocessor Programming Manual. M6809PM (AD), March 1981, reprinted May 1983. Chapters 1–2 and Appendix A. For the registers, flag effects, addressing and instruction definitions used in the debugger experiments.
  • Barden, William, Jr. TRS-80 Color Computer Assembly Language Programming. Radio Shack, 1983. For assembly practice on the Color Computer, including addressing and subroutines.
  • Tepolt, Laurence A. Assembly Language Programming for the CoCo 3. TEPCO, 1987. Pages 20 and 23, figures 3-4 and 4-1. For further reading on the memory a program addresses and the memory the CoCo 3 uses for its display.
  • Astle, William, and LWTools contributors. LW Tool Chain. Manual accompanying LWTools 4.25, chapter 3, “LWASM.” For assembler source syntax, symbols and directives.

The Color Computer Archive preserves historical documentation that informed this book. The lessons and programs here were written for VCC Plus.

Original VCC Plus prose and instructional images © 2026 Brian K. Holman. The cover shows the app’s Motorola processor badge. The processor mark belongs to its owner. The app’s Licenses & Notices identifies the emulator, assembler and firmware notices. Artwork credits.

Original VCC Plus manuals © 2026 Brian K. Holman. Third-party references retain their authors’ copyrights and licenses. Artwork notices. Edition 3.7.1; source and export identity. Printable edition: PDF source and export identity.

A closer look

Open original