Prompt for the nd100x LLM — read RT + segment listings from memory (glass web)¶
Copy everything below the line to the Claude working on the nd100x emulator
(/home/ronny/repos/nd100x). Goal: the glass WASM web UI should show the SINTRAN
RT-program list and segment table by reading them live from emulated memory,
version-aware, instead of relying on hardcoded/AI-derived JSON name data.
You are working in /home/ronny/repos/nd100x (ND-100/CX emulator, C→WASM, with a
browser "glass" frontend under template-glass/). Make the SINTRAN inspectors
source their data from emulated memory, not from static JSON/JS name tables.
Read these first (full paths)¶
SINTRAN/OS/22-READING-RT-AND-SEGMENT-TABLES-FROM-MEMORY.md— the complete, verified memory-read recipe (version detection, root pointers, entry layouts, DPIT translation). This is the authority; follow it.SINTRAN/OS/23-MON-CALL-DISPATCH-DEVELOPER-GUIDE.md— context on how kernel structures are reached (levels, DPIT vs physical).- Per-version SINTRAN symbol tables (the ONLY source of human-readable names):
SINTRAN/NPL-SOURCE/SYMBOLS/K03/SINTRAN/NPL-SOURCE/SYMBOLS/L07/SINTRAN/NPL-SOURCE/SYMBOLS/M06/(SYMBOL-1-LIST.SYMB.TXT,SYMBOL-2-LIST.SYMB.TXT— linesNAME=octaladdr.)
Core principle¶
Everything structural/numeric is in memory and must be read from there: segment table (numbers, LOGAD, SEGLE, MADR, FLAG, SGSTA, BPAGL), RT descriptions (priority, status, assigned/active segment), and the running version. The only thing not in memory is human-readable names — SINTRAN RT descriptions carry no name field, and segment names are not in the segment table. Names come from the matching version's symbol table, keyed by the version detected in memory.
Facts to implement (all VERIFIED in doc 22 — cite it, don't re-derive)¶
-
Version detection from memory.
SINVER0at logical004055₈(0x82D): low byte& 0x7F= version letter (K/L/M...), bits 8-10 = OS type. Generation date inGENDAT0..4(004060₈-004064₈). Use the letter to pick K03/L07/M06. The boot banner is just the printed form of these cells — read the cells. -
Root pointers are byte-identical across K03/L07/M06 (verified by grep of all three
SYMBOL-1-LIST), so hardcode ONE set (no per-version pointer lookup):RTSTA=004020,RTEND=004323,SGMAX=004015,SEGTB=004320,SEGST=004321,CORMB=004322,SINVER=004055,5RTSI=000026(RT stride). -
Segment table read.
SGMAXis a direct max-segment-number value.physBase = (SEGTB<<16) + SEGSTis a physical word address (L07: bank 3,0o124000→0x3A800). WalkSGMAX+1entries of 8 words; field offsets:SEGLI=0, PRESE=1, LOGAD=2, SEGLE=3, MADR=4, FLAG=5, SGSTA=6, BPAGL=7. Load address (words) =LOGAD × 1024(LOGAD is a page/VPN, not a word addr). SEGFIL number =(FLAG >> 13) & 7. -
RT-program list read.
RTSTA/RTENDare pointer cells; entry count =(RTEND - RTSTA) / 22, stride5RTSI = 26₈ = 22words. Field offsets in each RT description:STATU=1(bitUSED=1selects live entries),PRITY=3(priority),SEGM1=011/SEGM2=012(assigned segment numbers),ACT1S=014/ ACT2S=015(active segment numbers),STADR=010, P-register viaRTDLG=025. There is no name field — get the name from the symbol table (below). -
DPIT access (portable). The root cells are logical addresses mapped through DPIT = PIT #7. Translate live:
vpn = logical>>10; ppn = getPageTableMap(7)[vpn]; phys = ppn*1024 + (logical & 1777₈). Do NOT hardcode a physical page — derive it from the live page table so it works on any image/version.
What every 8-word segment entry gives you (all live from memory, no name)¶
Per segment (join to the UI row by segment number = entry index):
| word | field | meaning for the UI |
|------|-------|--------------------|
| 0 | SEGLI | segment-link (chain), rarely shown |
| 1 | PRESE | present/reserve flag |
| 2 | LOGAD | load page; load word address = LOGAD × 1024 |
| 3 | SEGLE | length in pages (1 page = 1024 words = 2048 bytes; size = SEGLE × 1024 words) |
| 4 | MADR | page offset in SEGFIL0 (byte offset = MADR × 2048); 0 = memory-resident, no disk image |
| 5 | FLAG | SEGFIL number = (FLAG>>13)&7; low bits = attribute flags (5OK/5INHB/5SREE/5FIXC per SYMBOL-2-LIST) |
| 6 | SGSTA | status word (in-core / on-disk / in-transfer …) |
| 7 | BPAGL | base physical page when resident |
So the inspector can show number, load address, size, disk location, SEGFIL, attribute flags, status, and residency entirely from memory. Only the name is absent from this table.
Names — the two kinds have DIFFERENT sources (VERIFIED, important)¶
- RT-program names ARE in the symbol table. The symbol's value equals the
RT-description address:
DUMMY=012071,STSIN=012117,RWRT1=012501,ACCRT=012377… So for each RT slot atRTSTA + n*26₈, look up the symbol whose value equals that address. Parse the detected version'sSYMBOL-1-LIST+SYMBOL-2-LISTinto{octalAddr → NAME}and resolve. This is a live memory-address → name join; keep it, drop the hardcoded RT name array. - System-segment names are NOT in the symbol table.
S3FS/S3CP/S3IMAGEdo not appear in anySYMBOL-*-LIST. At runtime they exist only in the RT-loader's packedPSGNAtable (6-word records keyed by segment number, mapped only while the RT-loader runs). So do not try to get segment names from the symbol table. Instead ship a small per-version segment number→name map captured from@RT-LOADER LIST-SEGMENT(names are fixed per SINTRAN version); an example L07 map istools/sintran-segment-carver/versions/L-VSX-500/inputs/list-segment.txt. (Optional advanced path: decode the livePSGNApacked-name table for fully-dynamic names — needs RE of the ND name packing.) - Select the right symbol set / segment-name map by the memory-detected version letter (§ version detection). This replaces the AI-derived JSON.
Files to change (glass frontend)¶
template-glass/js/sintran-symbols.js— already defines the FIXED root pointers (SGMAX 0x80D,SEGTB 0x8D0,SEGST 0x8D1,RTSTA,RTEND) and DPIT read helpers. Extend it withSINVERand the symbol-table name maps per version.template-glass/js/sintran-segments.js— already walks the segment table from memory; make sure it usesLOGAD×1024for load address and takes names from the symbol map, not fromsintran-seg-names.js.template-glass/js/sintran-rt-names.js— replace the hardcoded RT name/desc arrays with symbol-map lookups keyed by RT-description address.template-glass/js/sintran-seg-names.js— replace the hardcoded segment-name array with the symbol map (or LIST-SEGMENT parse), version-keyed.- version detection (
template-glass/js/sintran.jsor whereverversionLetterlives) — readSINVER0from memory instead of inferring from the banner.
Acceptance¶
- With no JSON/hardcoded name arrays, the RT and segment inspectors still show correct names + all structural fields, driven by live memory + the version's symbol table.
- Switching the booted image between SINTRAN versions (K/L/M) auto-selects the right symbol set from the memory-detected version letter.
logical-device-numbers.jsonmay remain (it is a genuine LDN label lookup, not structural SINTRAN data) — leave it.