---
title: The breakpoints
description: The marks a reader sets on the memory, and the machine that stops itself on reaching one.
order: 14
---

Watching a machine run is one half of debugging; the other is arranging to be there when something happens. `<colophon-breakpoints>` holds the reader's marks, and the ones [stepping](#marks-that-serve-once) lays on the reader's behalf: addresses at which the running machine stops itself and hands the page back, with every panel already showing the moment of interest.

```html
<colophon-breakpoints lines="8"></colophon-breakpoints>
```

| Attribute | Default | Read                                                                         |
| --------- | ------- | ---------------------------------------------------------------------------- |
| `lines`   | `8`     | How many marks stand in view at once. The list keeps this height regardless. |

The three dots at the heading's right hold `lines`, and the panel is built again at the height asked for.

## The three kinds

`execute` stops the machine as the program counter arrives at the address, before the instruction there has run, so what the panels show is the moment just ahead of it.

`read` and `write` watch the address as data: the machine stops after the instruction that touched it, because stopping in the middle of one would leave a program counter belonging to no instruction anyone can name. The instruction is allowed to finish, and the stop lands on the boundary after it.

A read here means read as data — a byte copied, compared or summed. The fetch of an instruction is the machine's own step and never fires a read mark, so watching a routine for reads answers the question actually being asked: who takes this code as bytes.

## Setting one

The `+` in the panel's heading opens a small form, and the platform carries it: Escape or Cancel abandons it, Add commits it. [A byte in the memory](memory.en.md#what-can-be-done-with-a-byte) opens the same form with its address already filled in, and does so whether or not this panel is anywhere on the page — the form belongs to the debugger rather than to this panel, and the marks belong to the machine, which this panel only lists.

The pencil beside a mark opens it again for changing, every field of it, and what is saved takes the old one's place. The cross beside that takes it away.

`At` takes a name or an address: a bare word is looked up among [the symbols](symbols.en.md) first — with or without the underscore a compiler prefixes — and read as hex if no name matches, while the `&` sigil forces an address outright. `Kind` chooses what the mark watches for.

`To` stretches the mark over a span, so one mark from `&BFE2` to `&BFE9` watches every byte of a buffer at once; the stop still names the exact byte that was touched. A span that ends before it begins is refused, as is a name no symbol file gave.

`Label` is the reader's own word for the mark, and stands in the list in place of the name the symbols would offer.

Each mark in the list carries its armed dot, its addresses, its name, its kind, and a cross that removes it. The dot is a control: unchecking it holds the mark without watching for it, which is how a trap is kept for later without firing today.

## When one fires

The machine stops itself, and every panel reads the stopped machine as after any other stop: a disassembly that follows the processor shows the instruction it stopped on, the registers hold the moment. The mark that fired is shown in red in this panel until the machine runs again.

Stopping and resuming keep their ordinary meanings. A resumed machine steps off an execute mark before watching for it again, so Run after a trap continues the program rather than standing still on the same address forever.

## Marks that serve once

[Stepping over a call or a repeating instruction, or out of a call](disassembly.en.md#stepping), lays a mark of its own: an execute mark on the instruction the machine is to stop at, labelled `after` and the address of the instruction it waits after — `after &4000`. It is listed, armed and removed like any other, and differs in one thing: the stop it makes is its last, and it goes the moment it has made it.

One still in the list was not reached: the call went elsewhere, something else stopped the machine first, or the reader disarmed it. It waits to be reached or removed like the rest, and changing it with the pencil makes it the reader's own, which stays.

## The mark this panel does not hold

A program may carry a mark of its own: `BRK`, the two bytes an author writes into the source at the place the machine should stop. Nothing about that one belongs to the reader, so nothing about it is here — it cannot be set from this panel, armed or disarmed from it, or listed in it, and taking it away is an edit to the program rather than to this list. Whether the machine honours one at all is [the controls'](controls.en.md#the-mark-the-program-carries) to say.

## What it costs

Nothing, until one is armed. The checks live in the player's own run loop, not in any chip, and with nothing armed and no [break instruction](controls.en.md#the-mark-the-program-carries) honoured the loop skips them entirely: a machine nobody is trapping runs at the hardware's own speed, and the emulator underneath carries no apparatus at all.
