This is a cache of https://vccplus.brianholman.com/manuals/working-with-os9/memory/. It is a snapshot of the page as it appeared on 2026-11-21T00:01:56.976+0000.
One address, two views · Working with OS-9 — A Comprehensive Manual · VCC Plus
← 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 11: Working with OS-9 — A Comprehensive Manual

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

Download PDF
Contents

Chapter 9 of 14

One address, two views

Two Shell processes can have different private data while executing the very same instruction bytes in RAM. The CoCo 3 makes that possible with its memory management unit. NitrOS-9 Level Two keeps the appropriate block assignments for each process and installs the mapping it needs when switching execution.

Read a process map

pmap
mfree

Read pmap across. Each pair in the heading names the leading hexadecimal digits of one 8 KiB logical range. 01 covers $0000–$1FFF. 23 covers $2000–$3FFF. The last column, EF, covers $E000–$FFFF. The numbers in each row are physical block numbers. Dots mark positions without a block assigned to that process by OS-9.

In the example, Shell processes 2 and 5 have different blocks at the left, 07 and 0D, and the same block 0A at the right. They can each have a private stack or data while sharing their code. mfree instead counts available physical memory in system-wide blocks. A 512 KiB CoCo has 64 blocks of 8 KiB. Installing another block somewhere in that machine does not give one 16-bit process a ninth slot in its logical map.

Predict an instruction’s physical address

Use the supplied system and the two-line station procedure you made earlier. In the station directory, inspect Shell's placement and its entry offset.

mdir -e ! grep hell
ident /dd/cmds/shell ! grep 0074
PMap shows multiple Shell processes with top block 0A. The module directory places Shell at offset zero in that block, and Ident reports an entry offset of $0074.

Here Shell starts at offset zero in physical block $0A. The Shell header in the supplied file has execution offset $0074. Since that block occupies the top slot in the process, its entry is $E000 + $0074 = $E074. If the image or Shell edition differs, inspect the header and map for that edition before setting a breakpoint. A file with multiple modules can produce several sets of header information.

Quantity in this run Value
Start of physical block $0A $0A × $2000 = $14000
Offset into the physical block $0074
Predicted physical instruction address $14074

Stop while that map is active

  1. Open the machine Debugger. In Breakpoints, add the logical address E074. Resume if you paused to enter it.
  2. At the CoCo shell, run shell report in the station directory. The child shell reaches its entry instruction and the emulator stops there.
  3. Read PC and the MMU inspector. Our run stopped at E074 with task 1 active. The effective bank for logical $E000 was 0A. A stop inside an interrupt handler or a different process can show a different map.
  4. In Memory, inspect Mapped CPU at E074, then Physical RAM at 14074. Both views began 32 7B 34 36 30 C9 18 15. Checking eight bytes at a predicted address gives you a better fingerprint than one matching byte.
  5. Remove the breakpoint and Continue. The procedure prints beacon online and its working directory, and the parent prompt returns.

A debugger breakpoint is specified in logical CPU space. Context matters if another process also executes at the same address. The GIME’s two hardware task selections do not limit the OS to two processes. OS-9 can reload registers from saved mappings as processes take turns. When a PMap position is unused, a hardware register may still show a value programmed by the OS. Use the process map to interpret ownership and the debugger’s effective mapping to interpret a particular CPU read.

Book 10 shows the same translation with a byte deliberately written by a BASIC-hosted program. For the CoCo 3 MMU under Level Two see The NitrOS-9 Project, NitrOS-9 Technical Reference, revision 0.1 (2004), chapter 2, p. 13.

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