LIB2 / FILE VIEW

USER_MANUAL.md

DOWNLOAD ORIGINAL ↓

# MENU / generation 1 — User manual

**Library:** `src/lib2/menu/1/`  
**Edition:** 2026-11-18, source/document review (documentation only)  
**Qualification:** CLARITAS Wave 4 source/native parity accepted; independent menu, key and display behavior remains consumer-specific.

## What this member does

Validate, render and dispatch 4-function-key menu groups stored as fixed 68-byte ROM records.

## Public interfaces

| Entry point or group | Inputs, outputs and behavior |
|---|---|
| `MNU_INIT` | `$10/$11` ROM table base, `$12` group count; validates aliases/collisions and records active group; `$0` error/success. |
| `MNU_SHOW` | Render current title, captions and cursor state; returns status. |
| `MNU_NEXT` | Advance group cyclically and draw it. |
| `MNU_WAIT` | Block on key and return a menu dispatch/exit code (caller should inspect exact source). |

## How to integrate

Prepare a contiguous ROM table with valid aliases; supply table pointer in `$10/$11` and nonzero count in `$12`; `CAL MNU_INIT`; if accepted, `CAL MNU_SHOW`; loop over `MNU_WAIT`, dispatch FK/exit events, and `MNU_NEXT` for other groups.

**Composition sketch (not an independently assembled client):**

```asm
        LDW     $10,MY_MENU_TABLE
        LD      $12,1
        CAL     MNU_INIT           ; inspect $0 before display
        CAL     MNU_SHOW
        CAL     MNU_WAIT
```

## Environment, dependencies and memory

Each record is 32-byte title + 32-byte captions + 4 alias bytes. Requires `LCD_CLEAR`, `LCD_ROM32`, `CUR_OFF`, `KEY_WAIT`, `RAW_READY`, key constants and caller-allocated UA14 `MNU_*` state from platform defs. Non-reentrant.

## Limits and evidence

Invalid/colliding aliases reject initialization. Public `MNU_*` here are not independent of display/keyboard scaffold; test event mapping in the client.

**This documentation does not introduce a new build or runtime PASS.** Source equivalence, native assembler parity, emulator execution and physical-machine evidence remain distinct.

## Actual source and further reference

- [This exact member folder in Google Drive](https://drive.google.com/drive/folders/1W8uV_kL136We_eVZm6LHdgcDHi9ShiLC)
- Source modules: `menu.s`.
- Further contracts/source notes: menu.s. These may include dated donor paths or older acceptance statements.
- For a new consumer, pin exact source files and hashes, verify full include closure, inspect register/bank/resource conflicts and test the resulting application on each claimed target.

*Praeteritum ad futurum servamus.*