The cell width is cell_size everywhere else now -- cell_size in the AST, in
ROT-8-viz's rot8_config, and the docs -- but the default in geometry.hh was
still kDefaultCellBits, and the four VMs spelled it that way too.
* include/r8forge/geometry.hh: kDefaultCellBits -> kDefaultCellSize.
kDefaultCellMask keeps its name: it is a mask, not a size.
* src/derive.cc, tests/asm_test.cc, tests/synth_test.cc, tests/tape_run.cc,
tests/byte_op_test.cc: same rename, and the local shorthand kBits in
byte_op_test.cc is now kCellSize so the test file does not put the old
word back.
* AGENTS.md and README.md follow. The cross check bullet now describes the
workspace ROT-8-viz as it actually is (fork dsh/ROT-8-viz, branch main,
runtime --cell / --mem over cell_size / mem_size), instead of the feature
branch it used to point at, which no longer exists.
No behaviour change. All six self checks re-run green: 28729 character hash
tape, synth_test 8/8, both verify_ tapes, byte_op_test (clb_mul 3977 chars,
65536/65536, "byte level library ok") and the macro docs test. The hash tape
still gives 1322 1786 1600 5 94 127 from r8forge_derive, r8forge_tape_run and
ROT-8-viz's rot8_test -- three implementations, one answer.
13 lines
536 B
C++
13 lines
536 B
C++
#pragma once
|
|
|
|
#include <cstddef>
|
|
#include <cstdint>
|
|
|
|
// Machine geometry the tools use unless something says otherwise: how wide a
|
|
// cell is in bits, and how many cells the tape holds. The instruction set does
|
|
// not fix either (ROR just rotates inside a cell and the tape is a ring), so
|
|
// these are the only places the old 8 bit / 256 cell assumptions live.
|
|
inline constexpr size_t kDefaultCellSize = 11;
|
|
inline constexpr size_t kDefaultMemoryCells = 259;
|
|
inline constexpr uint32_t kDefaultCellMask = (1u << kDefaultCellSize) - 1u;
|