# VT library — version 24 (lib2)

Status: **MIGRATED SOURCE CANDIDATE — NOT YET NATIVE PARITY ACCEPTED**  
Date: 2026-11-05  
Target: HD61700 / HD61 Rev. 0.45

## Identity and provenance

- Family: `vt` (Virtual Terminal)
- Version: `24`; source selection is explicit: `lib2/vt/24/vt.inc`
- Donor: frozen `lib-set-01/src/lib/vt24/vt24.inc` (original, unchanged)
- Donor SHA-256: `683fa3df2fb73b04fffd59859aec04ccd445127bf2104df439fb07b4d87161dc` (24,170 bytes)
- Migrated SHA-256: `b9dd3796215c6b3d4e8fd22aef2f6a840a65b70d73a0158b247c2c762189d70d` (24,153 bytes)
- Complete symbol translation: `SYMBOL_MAP.json`; 103 original definitions map bijectively to 103 migrated definitions, all <= 15 characters.
- Rename-only inverse comparison: PASS. After reversing the 103 symbol names, the migrated source exactly recovers the donor bytes. No assembly directives, instructions, operands, data strings, ROM placements, RAM addresses, comments, or include directives were otherwise edited.
- Drive readback of `vt.inc`: PASS, identical SHA-256 to the generated source file above.

## Public API: versionless

`VT_INIT`, `VT_CONFIG`, `VT_BIND_RAM`, `VT_BIND_RO`, `VT_BIND_ROM`,
`VT_BIND_RSEL`, `VT_CLEAR`, `VT_WRITE`, `VT_VIEW`, `VT_OPEN`, `VT_OPEN_AT`.

Two previously visible symbols also remain public under versionless names:
`VT_SELECTED` (selected virtual row, UA14 address `2F68h`) and
`VT_GET_CHAR` (bound-source character-fetch primitive).

All other implementation labels and storage EQUs use the private `_VT_*` prefix.
The host may include **one VT family version per ROM**. The version is selected
by include path, not baked into the API labels. VT20–VT23 source is preserved in `lib/`;
`lib2/vt/23/` also remains unchanged by this migration.

## Behavior carried from the donor

A single self-contained 24-row by 80-byte RAM/ROM viewer with scrolling,
optional immutable ROM row selection (`VT_BIND_RSEL`), semantic EXE and `:c`
selection events, and built-in `:t` serial page transmission via the independent
RS232C operations service. Fixed transmit size: 24*(80+CRLF)=1,968 bytes, no EOF.
Default RS232C initialization: 4800, 8N1, no flow control. This version contains
no communications-setup menu and no source dependency on VT22 or VT23.

## Composition

The host must supply the established platform keyboard, LCD, cursor, SYS540,
stack and memory environment. It must explicitly compose the RS232C operational
includes and the PB-2000C OM52C backend when using serial transport, e.g.
`lib2/rs232c/1/{rs232c.inc,rs232c_code.inc,om52c.inc}` in the host's required
order. `rs232c_cfg.inc` is **optional** and must not be imported automatically.

No extra wrapper or compatibility alias code is emitted by this package.
Non-reentrant; viewer UA14 RAM at `2F68..2F6F`, `2FA0..2FA2`, transport scratch
`27F9..27FB`, RS232C scratch `27F0..27F8`. Exact firmware and register constraints
are inherited from the donor and operational dependencies.

## Qualification boundary and future gate

The original VT24 has owner-reported emulator-functional acceptance (including
selectable ROM, event return and byte-exact `:t` framing), but that is not new
execution evidence for this renamed lib2 copy. No HD61 binary build, emulator
regression, or physical PB-2000C test has been run specifically against lib2/vt/24.

Next gate: build a pinned accepted VT24 consumer twice, once with frozen `lib/vt24`
and once with `lib2/vt/24`, changing the host's includes and all public label
references only, without altering composition, code or ROM placement. Compare the
complete 65,536-byte output byte-for-byte and SHA-256. The Chapter 09 MREVAL
emulator checkpoint (ROM SHA-256 `4e2948174c4ba3590dd86f1846da607a784ea60c826545f9bbe7aa618f609e8c`)
is a candidate reference host, subject to pinning its exact source closure and HD61
assembler build settings. Source-only checks are not a native assembly PASS.

Catalog promotion to `latest_stable` is deferred until native parity evidence and
owner acceptance. No existing host, frozen `lib/` source, or math library was changed.

*Praeteritum ad futurum servamus.*
