← Back to News

See Where Your Program Lives: A Memory Map for the Assembly Lab

The Assembly Lab now draws the Einstein's main memory, video memory and disc as bars that fill as you type and change as you step through your program.
Last Updated
November 29, 2026
See Where Your Program Lives: A Memory Map for the Assembly Lab

One of the hardest things about learning assembly language is picturing memory. Where does your program actually sit? How much room is left? Where does the video chip keep its tables, and what did that loop just write? The Assembly Lab now draws it for you. Press Memory Map under the Einstein's screen.

The Memory Map panel: three tall bars for main memory, video memory and the disc, each part labelled with its address, name and size
Main memory, video memory and the disc, each drawn to scale with address 0000h at the top.

Three Bars, Drawn to Scale

Each of the Einstein's three stores gets one tall bar. Every part is named beside the point where it starts, with its address and its size, and every bar is to scale, so big things look big and small things look small.

  • Main memory, the Z80's 64K. Your program is loaded at 0100h and the green block grows as you type. A short program starts as a thin sliver; write a few K and you can watch it thicken. Below it, the label marks the end of your program and how much free RAM is left before MOS's own area at FB00h. The top of memory is labelled too: MOS's scratch pad, MOS's own code, the stack and the disc sector buffer.
  • Video memory, the video chip's own 16K. The pattern table, colour table, name table, sprite table and sprite patterns are placed where the chip's registers say they are, so if your program moves them, the map follows.
  • The disc, exactly as Download DSK writes it: XtalDOS, the directory, your program and source files, and the space left over.

Watch It Change as You Step

Press Run in Steps and step through your program, and the map updates every time it stops. Memory your program writes turns orange at its real address. Memory it sets to zero turns blue, so you can watch a buffer fill up and then clear. The stack gets its own label showing how deep it is, which goes up with every PUSH and CALL and down with every POP and RET.

Main memory at two moments: on the left, 200 bytes at 8000h written while running and the stack 60 bytes deep; on the right, the first 92 bytes cleared to zero and the stack empty
A small test program at two moments. Left: it has filled 200 bytes at 8000h and pushed 60 bytes onto the stack. Right: it has popped them again and is clearing the buffer.

The stack label also shows how much room is left. On the TC-01, MOS keeps code of its own in memory just below the stack, and the label turns red when the stack gets close to it. Push into that code and the machine restarts, so it is worth keeping an eye on.

Set Aside, or In Use

Video memory works differently from main memory. Each of the chip's tables owns its whole block, whether or not anything has been drawn in it yet, because the chip reads the whole table every frame to draw the screen. So the map shows each table pale for the space it owns, with a solid part for what it actually holds. The Show Set Aside Space switch turns that off, so only what the tables hold is coloured in.

It also shows something easy to miss. On a blank MOS screen, 214 of the 256 sprite patterns already hold characters, because MOS keeps its font in the same 2K as the sprite shapes: sprite pattern n is character n. Define a sprite shape under MOS and you are overwriting a letter.

What It Does Not Show Yet

  • On the Einstein 256, the map shows your program, but the 256's memory and its video chip are not mapped yet.
  • Memory your program writes while running at full speed shows up the next time it stops.
  • The layout of main memory was measured on the Lab's emulated TC-01, not yet on a real Einstein.

Open the Assembly Lab, press Memory Map, and write something that fills it up.

Gavin Watson
Gavin Watson