commit 06640e69e30580006566fbf6b008456df0857fbb
parent 4f257aaba799025e6f84cccd9311991e67c65681
Author: Ryan Sepassi <rsepassi@gmail.com>
Date: Tue, 21 Apr 2026 05:22:10 -0700
lisp.M1 steps 3-4: interning + reader/display with line:col diagnostics
Step 3: strings + symbol interning — heap strings with 64-bit
[type|gc|length] headers, 4096-slot open-addressing intern table, DJB
hash, make_symbol/make_string allocators. Test exits 42 after
confirming (intern "foo")==(intern "foo") and (intern "foo")!=(intern "bar").
Step 4: reader + display — recursive-descent over an in-memory source
buffer with line/col tracking; supports lists, positive decimal
fixnums, interned symbols, `;` comments, whitespace. Minimal display
round-trips the parse tree; err_reader_bad reports `line:col` to stderr.
Bugs fixed along the way:
- display_pair owned its own PROLOGUE_N2 but was entered via BEQ (not
CALL), stacking frames without matched unwind — recursive calls
drifted sp and corrupted the saved-r6/r7 slots. Moved frame
ownership to display so sub-handlers share one prologue.
- display_uint gained an fd parameter (r2) so err_reader_bad can
render line:col to stderr. fd spills into slot 3 of a new
PROLOGUE_N3 frame; load it before computing len so the len write
to r3 doesn't clobber sp.
- AArch64 REM encoded as MADD (o0=0) instead of MSUB (o0=1), so
`value % 10` returned `value + (value/10)*10`, corrupting display
digits. Fixed to 0x9B008000.
Tranches 9 and 10 add the ops needed for steps 3 and 4.
Diffstat:
| M | lisp.M1 | | | 2243 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------ |
| M | p1_aarch64.M1 | | | 100 | ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- |
| M | p1_amd64.M1 | | | 98 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| M | p1_gen.py | | | 188 | ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- |
| M | p1_riscv64.M1 | | | 98 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
5 files changed, 2554 insertions(+), 173 deletions(-)
diff --git a/lisp.M1 b/lisp.M1
@@ -1,32 +1,36 @@
## lisp.M1 — Seed Lisp interpreter (portable across aarch64/amd64/riscv64)
##
-## Step 2: tagged values. Implements LISP.md §"Staged implementation plan"
-## item 2 — fixnum/pair/singleton encoding with cons/car/cdr on top of
-## the step-1 heap. Demo hand-builds cons(fixnum(42), nil), verifies the
-## pair tag, verifies cdr==nil, extracts car, verifies the fixnum tag,
-## and exits with the decoded value (42) as the process status.
+## Steps 1-3 of LISP.md §"Staged implementation plan". Builds on the
+## step-2 tagged-value layer (fixnum/pair/singleton + cons/car/cdr)
+## with strings + symbol interning:
##
-## Tag table (LISP.md §"Tagged cells"):
-## 001 = fixnum (value = n<<3 | 1; decode via arithmetic >> 3)
-## 010 = pair (ptr | 2, 16-byte [car][cdr] block on the heap)
-## 111 = singleton (nil=0x07, #t=0x0F, #f=0x17, eof=0x1F, unspec=0x27)
+## Step 3: symbol interning via open-addressing 4096-slot symbol
+## table. `intern(name_ptr, name_len)` returns the same
+## tagged symbol pointer for equal names. `make_symbol` /
+## `make_string` allocate headered heap objects.
##
-## Observable success: `echo $?` prints 42. Tag-check failures fall
-## through to the `error` path (writes to fd 2, exits 1). Step 1's
-## file-I/O plumbing (`run_file`, open/read/close wrappers, usage/
-## open/read/internal error pads) is removed — it will come back with
-## the Reader in step 4.
+## Observable test (`make PROG=lisp run-all`): exit 42 on pass. The
+## driver interns "foo" twice and checks pointer eq, then interns
+## "bar" and checks pointer-distinct. Any failure runs `error` which
+## writes a diagnostic to fd 2 and exits 1.
+##
+## Tag table (low 3 bits, LISP.md §"Value representation"):
+## 001 fixnum / 010 pair / 011 vector / 100 string / 101 symbol /
+## 110 closure|prim / 111 singleton (nil=0x07)
+##
+## Headered objects carry a 64-bit header before payload:
+## [ 8-bit type | 8-bit gc-flags | 48-bit length-or-arity ]
+## Little-endian: byte 0 is the low byte of length, byte 7 is the type.
+## make_symbol writes the length with a 64-bit store (high 16 bits = 0)
+## and then overwrites byte 7 with type=2 via SB. Type codes: 1=string,
+## 2=symbol, 3=vector, 4=closure, 5=primitive.
+
## ---- heap-state --------------------------------------------------------
-## Placed at the very start of ELF_text so file-offset alignment is
-## predictable. ELF header (64 B) + 1 program header (56 B) = 120 B, so
-## :heap_next lands at offset 120 from ELF_base — 8-byte aligned, which
-## keeps aarch64's LDR-X64 happy. Both heap cells are 4-byte hex2
-## addresses zero-padded to 8 bytes (ELF base < 4 GiB).
-##
-## The zero pad is spelled as a quoted hex literal rather than bare
-## `00 00 00 00` tokens: stage0-posix M0 on riscv64 rejects bare
-## hex-byte tokens whose first nibble is '0'–'9' (rc=1, no diagnostic).
+## Step-2 layout preserved: two 8-byte cells whose upper 4 bytes are
+## zero (ELF_base < 4 GiB, so `&label` fits in 32 bits). Quoted hex
+## literals rather than bare `00 00 00 00` tokens: riscv64 M0 rejects
+## bare hex-byte tokens whose first nibble is 0-9.
:heap_next
&heap_start
'00000000'
@@ -36,182 +40,412 @@
## ---- _start ----------------------------------------------------------
-## Linux process entry. Builds the demo pair and exits with the decoded
-## fixnum car as status. Not P1-callable (no PROLOGUE, no RET) — every
-## exit path goes through SYS_EXIT (success) or `error` (failure).
+## Runs the step-3 intern battery and exits 42 on success. Skips argv
+## entirely for now — step 4 will restore the file-mode entry.
:_start
- ## Align heap_next up to the next 8-byte boundary. heap_start's
- ## offset from ELF_base is code-size-dependent and not aligned on
- ## every arch (amd64/riscv64 fall on non-8-aligned offsets). Pair
- ## pointers need low-3-bits = 000 so that ORing in PAIR_TAG (010)
- ## produces a clean tag. `(x | 7) + 1` rounds any pointer up to 8.
+ ## Align heap_next up to 8 (same reason as step 2 — pair tags
+ ## require an 8-aligned raw pointer).
P1_LI_R4
&heap_next
P1_LD_R0_R4_0
P1_ORI_R0_R0_7
P1_ADDI_R0_R0_1
- P1_MOV_R2_R0
- P1_ST_R2_R4_0
+ P1_ST_R0_R4_0
- ## Build fixnum(42) in r1: (42 << 3) | 1 = 0x151.
+ ## t1: intern "foo" → sym_a.
P1_LI_R1
- '2A000000' ## r1 = 42
+ &str_foo
P1_LI_R2
- '03000000' ## r2 = 3 (shift amount for fixnum tag)
- P1_SHL_R1_R1_R2 ## r1 = 42 << 3
- P1_ORI_R1_R1_1 ## r1 |= 1 (fixnum tag)
+ '03000000'
+ P1_LI_BR
+ &intern
+ P1_CALL
+ P1_MOV_R6_R0 ## r6 = sym_a (callee-saved keeps it alive)
- ## cons(r1=fixnum(42), r2=nil=0x07).
+ ## t2: intern "foo" again → sym_b. Must pointer-eq sym_a.
+ P1_LI_R1
+ &str_foo
P1_LI_R2
- '07000000' ## r2 = nil
+ '03000000'
P1_LI_BR
- &cons
- P1_CALL ## r0 = pair pointer|2
- P1_MOV_R6_R0 ## r6 = pair (callee-saved across calls)
+ &intern
+ P1_CALL ## r0 = sym_b
+ P1_LI_BR
+ &err_intern_not_eq
+ P1_BNE_R0_R6
- ## Check (pair & 7) == 2.
- P1_MOV_R1_R6
- P1_ANDI_R1_R1_7
+ ## t3: intern "bar" → must be pointer-distinct from "foo".
+ P1_LI_R1
+ &str_bar
+ P1_LI_R2
+ '03000000'
+ P1_LI_BR
+ &intern
+ P1_CALL ## r0 = sym_bar
+ P1_LI_BR
+ &err_intern_collision
+ P1_BEQ_R0_R6
+
+ ## ---- Step 4 self-test: parse + display -------------------------
+ ## Seed the reader globals to point at src_text. src_cursor/line/col
+ ## are already initialized to 0/1/1 in BSS.
+ P1_LI_R1
+ &src_base
+ P1_LI_R2
+ &src_text
+ P1_ST_R2_R1_0
+ P1_LI_R1
+ &src_len
+ P1_LI_R2
+ '1B000000' ## strlen("(defn (foo 42) ( bar 7 ))") = 27
+ P1_ST_R2_R1_0
+
+ ## Parse one expression.
+ P1_LI_BR
+ &read_expr
+ P1_CALL ## r0 = tagged value
+
+ ## Display it.
+ P1_MOV_R1_R0
+ P1_LI_BR
+ &display
+ P1_CALL
+
+ ## Write a trailing newline.
+ P1_LI_R0
+ SYS_WRITE
+ P1_LI_R1
+ '01000000'
P1_LI_R2
+ &msg_newline
+ P1_LI_R3
+ '01000000'
+ P1_SYSCALL
+
+ ## Success: exit(42).
+ P1_LI_R0
+ SYS_EXIT
+ P1_LI_R1
+ '2A000000'
+ P1_SYSCALL
+
+
+## ---- hash(r1=ptr, r2=len) -> r0 = u64 hash --------------------------
+## DJB-style: h' = 31*h + b. Implemented as (h<<5) - h + b to avoid
+## stashing 31 in a register. Uses r6 (zero constant) across the loop;
+## saves/restores it via a PROLOGUE_N1 slot.
+:hash
+ P1_PROLOGUE
+ P1_MOV_R3_SP
+ P1_ST_R6_R3_8
+
+ P1_LI_R6
+ '00000000' ## zero const
+ P1_LI_R0
+ '00000000' ## h = 0
+
+:hash_loop
+ P1_LI_BR
+ &hash_done
+ P1_BEQ_R2_R6 ## len == 0 → done
+
+ P1_SHLI_R3_R0_5 ## r3 = h << 5
+ P1_SUB_R3_R3_R0 ## r3 = h*32 - h = h*31
+ P1_LB_R0_R1_0 ## r0 = *ptr (zero-extended byte)
+ P1_ADD_R0_R0_R3 ## r0 = h*31 + b
+ P1_ADDI_R1_R1_1
+ P1_ADDI_R2_R2_NEG1
+ P1_LI_BR
+ &hash_loop
+ P1_B
+
+:hash_done
+ P1_MOV_R3_SP
+ P1_LD_R6_R3_8
+ P1_EPILOGUE
+ P1_RET
+
+
+## ---- sym_name_equal(r1=tagged_sym, r2=cmp_ptr, r3=cmp_len) -> r0 ---
+## Returns 1 if the symbol's stored name equals `cmp_len` bytes at
+## `cmp_ptr`, else 0. Uses r6 as zero const + r7 as the cmp-byte
+## scratch; both are callee-saved, so PROLOGUE_N2 stashes them.
+:sym_name_equal
+ P1_PROLOGUE_N2
+ P1_MOV_R0_SP
+ P1_ST_R6_R0_8
+ P1_ST_R7_R0_16
+
+ P1_ADDI_R1_R1_NEG5 ## r1 = raw sym ptr
+ P1_LD_R6_R1_0 ## r6 = header word
+ ## Mask low 32 bits: our names fit in 32 bits of the 48-bit length.
+ P1_SHLI_R6_R6_32
+ P1_SHRI_R6_R6_32 ## r6 = sym_len
+
+ P1_LI_BR
+ &sym_name_equal_neq
+ P1_BNE_R6_R3 ## lengths differ → not equal
+
+ P1_ADDI_R1_R1_8 ## r1 = name bytes ptr
+ P1_LI_R6
+ '00000000' ## zero const
+
+:sym_name_equal_loop
+ P1_LI_BR
+ &sym_name_equal_eq
+ P1_BEQ_R3_R6 ## len == 0 → match
+
+ P1_LB_R0_R1_0 ## r0 = sym byte
+ P1_LB_R7_R2_0 ## r7 = cmp byte
+ P1_LI_BR
+ &sym_name_equal_neq
+ P1_BNE_R0_R7
+
+ P1_ADDI_R1_R1_1
+ P1_ADDI_R2_R2_1
+ P1_ADDI_R3_R3_NEG1
+ P1_LI_BR
+ &sym_name_equal_loop
+ P1_B
+
+:sym_name_equal_eq
+ P1_LI_R0
+ '01000000'
+ P1_LI_BR
+ &sym_name_equal_done
+ P1_B
+
+:sym_name_equal_neq
+ P1_LI_R0
+ '00000000'
+
+:sym_name_equal_done
+ P1_MOV_R3_SP
+ P1_LD_R6_R3_8
+ P1_LD_R7_R3_16
+ P1_EPILOGUE_N2
+ P1_RET
+
+
+## ---- make_symbol(r1=src, r2=len) -> r0 = tagged symbol --------------
+## Lays out header + name bytes inline, returning (raw | SYMBOL_TAG=5).
+## Allocation size = 8 (header) + round_up_8(len).
+##
+## Frame layout:
+## [sp + 8] saved r6 (caller's copy)
+## [sp + 16] saved r7
+## [sp + 24] raw_ptr across the copy loop
+:make_symbol
+ P1_PROLOGUE_N3
+ P1_MOV_R3_SP
+ P1_ST_R6_R3_8
+ P1_ST_R7_R3_16
+
+ P1_MOV_R6_R1 ## r6 = src (mutated during byte copy)
+ P1_MOV_R7_R2 ## r7 = len (mutated during byte copy)
+
+ ## alloc_size = 8 + ((len + 7) >> 3 << 3)
+ P1_ADDI_R1_R7_7
+ P1_SHRI_R1_R1_3
+ P1_SHLI_R1_R1_3
+ P1_ADDI_R1_R1_8
+ P1_LI_BR
+ &alloc
+ P1_CALL ## r0 = raw ptr
+
+ P1_MOV_R3_SP
+ P1_ST_R0_R3_24 ## stash raw ptr
+
+ ## Header: store len in low 48 bits, then stamp type=2 in byte 7.
+ P1_ST_R7_R0_0
+ P1_LI_R1
'02000000'
+ P1_SB_R1_R0_7
+
+ ## Byte copy: dst = r3 (= raw+8), src = r6, len = r7.
+ P1_ADDI_R3_R0_8
+ P1_LI_R1
+ '00000000' ## zero const for loop test
+
+:make_symbol_copy
P1_LI_BR
- ¬_pair_err
- P1_BNE_R1_R2
+ &make_symbol_done
+ P1_BEQ_R7_R1
- ## Check cdr(pair) == nil.
- P1_MOV_R1_R6
+ P1_LB_R2_R6_0
+ P1_SB_R2_R3_0
+ P1_ADDI_R6_R6_1
+ P1_ADDI_R3_R3_1
+ P1_ADDI_R7_R7_NEG1
P1_LI_BR
- &cdr
- P1_CALL ## r0 = cdr
+ &make_symbol_copy
+ P1_B
+
+:make_symbol_done
+ P1_MOV_R3_SP
+ P1_LD_R0_R3_24
+ P1_ORI_R0_R0_4 ## set bit 2 (aarch64 bitmask-imm can't do 0b101 directly)
+ P1_ORI_R0_R0_1 ## set bit 0 → tag = 101 (SYMBOL)
+ P1_LD_R6_R3_8
+ P1_LD_R7_R3_16
+ P1_EPILOGUE_N3
+ P1_RET
+
+
+## ---- intern(r1=name_ptr, r2=name_len) -> r0 = tagged sym -----------
+## Open-addressing linear probe over a 4096-slot table. Empty slot =
+## 0 word (nil is 0x07, never 0, so this sentinel is unambiguous).
+## Frame layout: slot 1 = saved r6, slot 2 = saved r7, slot 3 = current
+## probe index h.
+:intern
+ P1_PROLOGUE_N3
+ P1_MOV_R3_SP
+ P1_ST_R6_R3_8
+ P1_ST_R7_R3_16
+
+ P1_MOV_R6_R1 ## r6 = name_ptr (callee-saved copy)
+ P1_MOV_R7_R2 ## r7 = name_len
+
+ P1_LI_BR
+ &hash
+ P1_CALL ## r0 = 64-bit hash
+ P1_SHLI_R0_R0_52
+ P1_SHRI_R0_R0_52 ## r0 = h & 4095
+
+ P1_MOV_R3_SP
+ P1_ST_R0_R3_24 ## slot 3 = h
+
+:intern_probe
+ P1_MOV_R3_SP
+ P1_LD_R0_R3_24
+ P1_SHLI_R0_R0_3 ## r0 = h * 8
P1_LI_R2
- '07000000'
+ &symbol_table
+ P1_ADD_R2_R2_R0 ## r2 = &symbol_table[h]
+ P1_LD_R3_R2_0 ## r3 = slot value
+
+ P1_LI_R1
+ '00000000'
P1_LI_BR
- ¬_nil_err
- P1_BNE_R0_R2
+ &intern_empty
+ P1_BEQ_R3_R1 ## slot == 0 → allocate
- ## x = car(pair); expect tag == fixnum.
- P1_MOV_R1_R6
+ ## Compare existing symbol to (r6, r7).
+ P1_MOV_R1_R3 ## r1 = tagged sym
+ P1_MOV_R2_R6 ## r2 = cmp_ptr
+ P1_MOV_R3_R7 ## r3 = cmp_len
P1_LI_BR
- &car
- P1_CALL ## r0 = car
- P1_MOV_R6_R0 ## r6 = car (callee-saved)
+ &sym_name_equal
+ P1_CALL ## r0 = 0 or 1
+
+ P1_LI_R1
+ '00000000'
+ P1_LI_BR
+ &intern_hit
+ P1_BNE_R0_R1
+ ## Advance h = (h+1) & 4095.
+ P1_MOV_R3_SP
+ P1_LD_R0_R3_24
+ P1_ADDI_R0_R0_1
+ P1_SHLI_R0_R0_52
+ P1_SHRI_R0_R0_52
+ P1_ST_R0_R3_24
+ P1_LI_BR
+ &intern_probe
+ P1_B
+
+:intern_empty
+ ## Allocate a fresh symbol and plant it in the slot.
P1_MOV_R1_R6
- P1_ANDI_R1_R1_7
+ P1_MOV_R2_R7
+ P1_LI_BR
+ &make_symbol
+ P1_CALL ## r0 = tagged sym
+
+ P1_MOV_R3_SP
+ P1_LD_R1_R3_24
+ P1_SHLI_R1_R1_3
P1_LI_R2
- '01000000'
+ &symbol_table
+ P1_ADD_R2_R2_R1
+ P1_ST_R0_R2_0 ## write into slot
+
P1_LI_BR
- ¬_fixnum_err
- P1_BNE_R1_R2
+ &intern_done
+ P1_B
- ## exit(car >> 3) — yields 42.
- P1_MOV_R1_R6
+:intern_hit
+ P1_MOV_R3_SP
+ P1_LD_R0_R3_24
+ P1_SHLI_R0_R0_3
P1_LI_R2
- '03000000'
- P1_SHR_R1_R1_R2 ## r1 = fixnum value
- P1_LI_R0
- SYS_EXIT
- P1_SYSCALL
- ## No return.
+ &symbol_table
+ P1_ADD_R2_R2_R0
+ P1_LD_R0_R2_0 ## r0 = existing tagged sym
+
+:intern_done
+ P1_MOV_R3_SP
+ P1_LD_R6_R3_8
+ P1_LD_R7_R3_16
+ P1_EPILOGUE_N3
+ P1_RET
-## ---- cons(car, cdr) -> pair -----------------------------------------
-## r1 = car, r2 = cdr. Allocates 16 bytes, writes the two cells, returns
-## (ptr | PAIR_TAG). Uses the N=2 prologue — car lives in frame slot 1
-## at [sp+8], cdr in slot 2 at [sp+16] — to shepherd both args across
-## alloc(). Both roots stay on the walkable stack, which is the
-## discipline the step-9 mark-sweep GC will depend on.
+## ---- cons / car / cdr (preserved from step 2) -----------------------
:cons
P1_PROLOGUE_N2
-
- ## Spill car to slot 1 [sp+8], cdr to slot 2 [sp+16]. r3 is caller-
- ## saved so we can clobber it freely as an sp-temp for the ST/LD
- ## displacements.
P1_MOV_R3_SP
P1_ST_R1_R3_8
P1_ST_R2_R3_16
-
- ## alloc(16). 16 is already 8-byte aligned.
P1_LI_R1
'10000000'
P1_LI_BR
&alloc
- P1_CALL ## r0 = raw (untagged) pair ptr
-
- ## [ptr+0] = car ; [ptr+8] = cdr.
+ P1_CALL
P1_MOV_R3_SP
- P1_LD_R1_R3_8 ## r1 = car
+ P1_LD_R1_R3_8
P1_ST_R1_R0_0
- P1_LD_R2_R3_16 ## r2 = cdr
+ P1_LD_R2_R3_16
P1_ST_R2_R0_8
-
- ## Tag as a pair and return.
P1_ORI_R0_R0_2
-
P1_EPILOGUE_N2
P1_RET
-
-## ---- car(pair) -> value ---------------------------------------------
-## Leaf function — no PROLOGUE/EPILOGUE (makes no nested calls). Strips
-## the pair tag by subtracting 2, then loads [ptr+0].
:car
P1_ADDI_R1_R1_NEG2
P1_LD_R0_R1_0
P1_RET
-
-## ---- cdr(pair) -> value ---------------------------------------------
:cdr
P1_ADDI_R1_R1_NEG2
P1_LD_R0_R1_8
P1_RET
-## ---- alloc(size) -> ptr ---------------------------------------------
-## Bump allocator over [heap_start, heap_end). Caller must pass an
-## 8-byte-aligned size (caller-rounds for now). On overflow branches to
-## :alloc_oom, which funnels through `error`.
-##
-## Uses only r0-r3 (caller-saved) so it needn't preserve any callee-
-## saved regs across its own body. Keeps the PROLOGUE/EPILOGUE just for
-## the lr save — the N=0 frame has no slots.
+## ---- alloc(size) -> raw_ptr (preserved from step 2) -----------------
:alloc
P1_PROLOGUE
-
P1_LI_R3
&heap_next
- P1_LD_R0_R3_0 ## r0 = *heap_next (old bump ptr; also return value)
-
- P1_ADD_R2_R0_R1 ## r2 = new_next = old + size
-
+ P1_LD_R0_R3_0
+ P1_ADD_R2_R0_R1
P1_LI_R1
&heap_end
- P1_LD_R1_R1_0 ## r1 = *heap_end
-
- ## heap_end < new_next -> OOM
+ P1_LD_R1_R1_0
P1_LI_BR
&alloc_oom
P1_BLT_R1_R2
-
- P1_ST_R2_R3_0 ## *heap_next = new_next
-
+ P1_ST_R2_R3_0
P1_EPILOGUE
P1_RET
## ---- error(msg_ptr, msg_len) ----------------------------------------
-## Writes "error: " + msg + "\n" to fd 2, then exit(1). Never returns.
-## Callers reach this via LI_BR &error ; P1_B (branch, not call) and
-## arrange r1 = msg_ptr, r2 = msg_len beforehand.
:error
- ## Spill msg_ptr/msg_len into callee-saved regs across the write
- ## calls (which clobber r0..r3). No need to preserve r6/r7 — we
- ## never return.
P1_MOV_R6_R1
P1_MOV_R7_R2
- ## write(2, "error: ", 7)
P1_LI_R0
SYS_WRITE
P1_LI_R1
@@ -222,7 +456,6 @@
'07000000'
P1_SYSCALL
- ## write(2, msg_ptr, msg_len)
P1_LI_R0
SYS_WRITE
P1_LI_R1
@@ -231,7 +464,6 @@
P1_MOV_R3_R7
P1_SYSCALL
- ## write(2, "\n", 1)
P1_LI_R0
SYS_WRITE
P1_LI_R1
@@ -242,7 +474,6 @@
'01000000'
P1_SYSCALL
- ## exit(1)
P1_LI_R0
SYS_EXIT
P1_LI_R1
@@ -251,76 +482,1746 @@
## ---- Error landing pads ---------------------------------------------
-## Plain branch targets (no PROLOGUE, no return). Load (msg_ptr, msg_len)
-## into r1/r2, then LI_BR-indirect branch into `error`. Keep message-
-## length imm32s in sync with the strings below.
:alloc_oom
P1_LI_R1
&msg_oom
P1_LI_R2
- '0E000000' ## strlen("heap exhausted") = 14
+ '0E000000'
P1_LI_BR
&error
P1_B
-:not_pair_err
+:err_intern_not_eq
P1_LI_R1
- &msg_not_pair
+ &msg_intern_not_eq
P1_LI_R2
- '0D000000' ## strlen("expected pair") = 13
+ '22000000' ## strlen == 34
P1_LI_BR
&error
P1_B
-:not_nil_err
+:err_intern_collision
P1_LI_R1
- &msg_not_nil
+ &msg_intern_collision
P1_LI_R2
- '0C000000' ## strlen("expected nil") = 12
+ '2C000000' ## strlen == 44
P1_LI_BR
&error
P1_B
-:not_fixnum_err
+## err_reader_bad: "error: reader: malformed input at LINE:COL\n" → stderr.
+## Doesn't go through :error because we want line:col tacked on; easier to
+## inline the syscalls than thread a format through error().
+:err_reader_bad
+ ## "error: "
+ P1_LI_R0
+ SYS_WRITE
+ P1_LI_R1
+ '02000000'
+ P1_LI_R2
+ &msg_error_prefix
+ P1_LI_R3
+ '07000000'
+ P1_SYSCALL
+
+ ## "reader: malformed input"
+ P1_LI_R0
+ SYS_WRITE
+ P1_LI_R1
+ '02000000'
+ P1_LI_R2
+ &msg_reader_bad
+ P1_LI_R3
+ '17000000' ## strlen("reader: malformed input") == 23
+ P1_SYSCALL
+
+ ## " at "
+ P1_LI_R0
+ SYS_WRITE
+ P1_LI_R1
+ '02000000'
+ P1_LI_R2
+ &msg_at
+ P1_LI_R3
+ '04000000'
+ P1_SYSCALL
+
+ ## LINE (via display_uint to stderr)
P1_LI_R1
- &msg_not_fixnum
+ &src_line
+ P1_LD_R1_R1_0
P1_LI_R2
- '0F000000' ## strlen("expected fixnum") = 15
+ '02000000'
P1_LI_BR
- &error
- P1_B
+ &display_uint
+ P1_CALL
+
+ ## ":"
+ P1_LI_R0
+ SYS_WRITE
+ P1_LI_R1
+ '02000000'
+ P1_LI_R2
+ &msg_colon
+ P1_LI_R3
+ '01000000'
+ P1_SYSCALL
+ ## COL
+ P1_LI_R1
+ &src_col
+ P1_LD_R1_R1_0
+ P1_LI_R2
+ '02000000'
+ P1_LI_BR
+ &display_uint
+ P1_CALL
-## ---- Static strings -------------------------------------------------
-:msg_error_prefix
-"error: "
-:msg_newline
-"
-"
-:msg_oom
-"heap exhausted"
-:msg_not_pair
-"expected pair"
-:msg_not_nil
-"expected nil"
-:msg_not_fixnum
-"expected fixnum"
-
-
-## ---- Heap arena -----------------------------------------------------
-## 1 KiB for step 2 — a single 16-byte pair plus headroom. Step 9
-## (LISP.md §"Mark-sweep GC") grows this to 20 MiB via an ELF header
-## change (memsz > filesz) so the arena stops inflating the on-disk
-## binary.
+ ## "\n"
+ P1_LI_R0
+ SYS_WRITE
+ P1_LI_R1
+ '02000000'
+ P1_LI_R2
+ &msg_newline
+ P1_LI_R3
+ '01000000'
+ P1_SYSCALL
+
+ P1_LI_R0
+ SYS_EXIT
+ P1_LI_R1
+ '01000000'
+ P1_SYSCALL
+
+
+## ================ Step 4: reader + minimal display ==================
+## Recursive-descent over an in-memory source string at src_base with
+## length src_len. Read one expression. Supports: lists, positive
+## decimal fixnums, symbols (interned). Skips whitespace and `;` line
+## comments. No quote, strings, source-locations, or improper lists
+## in this round — those land in later steps.
+
+
+## ---- Reader state (globals) -----------------------------------------
+## src_base/src_len are set by _start to point at src_text. src_cursor
+## starts at 0; src_line/src_col start at 1.
+:src_base
+'00000000'
+'00000000'
+:src_len
+'00000000'
+'00000000'
+:src_cursor
+'00000000'
+'00000000'
+:src_line
+'01000000'
+'00000000'
+:src_col
+'01000000'
+'00000000'
+
+
+## ---- peek_char() -> r0 = char (0..255) or -1 on EOF ----------------
+:peek_char
+ P1_LI_R1
+ &src_cursor
+ P1_LD_R1_R1_0 ## r1 = cursor
+ P1_LI_R2
+ &src_len
+ P1_LD_R2_R2_0 ## r2 = len
+ P1_LI_BR
+ &peek_char_inb
+ P1_BLT_R1_R2 ## cursor < len → in-bounds
+ P1_LI_R0
+ '00000000'
+ P1_ADDI_R0_R0_NEG1 ## r0 = -1
+ P1_RET
+:peek_char_inb
+ P1_LI_R2
+ &src_base
+ P1_LD_R2_R2_0 ## r2 = base
+ P1_ADD_R2_R2_R1 ## r2 = base + cursor
+ P1_LB_R0_R2_0 ## r0 = *ptr (0-ext byte)
+ P1_RET
+
+
+## ---- advance_char() — consume current char, track line/col --------
+:advance_char
+ P1_PROLOGUE
+ P1_LI_BR
+ &peek_char
+ P1_CALL ## r0 = current char (possibly -1 if EOF)
+
+ ## cursor++
+ P1_LI_R1
+ &src_cursor
+ P1_LD_R2_R1_0
+ P1_ADDI_R2_R2_1
+ P1_ST_R2_R1_0
+
+ ## if char == '\n', bump line and reset col; else col++.
+ P1_LI_R1
+ '0A000000' ## '\n' = 10
+ P1_LI_BR
+ &advance_newline
+ P1_BEQ_R0_R1
+
+ P1_LI_R1
+ &src_col
+ P1_LD_R2_R1_0
+ P1_ADDI_R2_R2_1
+ P1_ST_R2_R1_0
+ P1_EPILOGUE
+ P1_RET
+
+:advance_newline
+ P1_LI_R1
+ &src_line
+ P1_LD_R2_R1_0
+ P1_ADDI_R2_R2_1
+ P1_ST_R2_R1_0
+ P1_LI_R1
+ &src_col
+ P1_LI_R2
+ '01000000'
+ P1_ST_R2_R1_0
+ P1_EPILOGUE
+ P1_RET
+
+
+## ---- skip_ws() — eat whitespace and ; line comments ----------------
+:skip_ws
+ P1_PROLOGUE
+:skip_ws_loop
+ P1_LI_BR
+ &peek_char
+ P1_CALL ## r0 = next char (or -1)
+
+ ## EOF → done
+ P1_LI_R1
+ '00000000'
+ P1_ADDI_R1_R1_NEG1
+ P1_LI_BR
+ &skip_ws_done
+ P1_BEQ_R0_R1
+
+ ## ' ' (0x20)
+ P1_LI_R1
+ '20000000'
+ P1_LI_BR
+ &skip_ws_eat
+ P1_BEQ_R0_R1
+ ## '\t' (0x09)
+ P1_LI_R1
+ '09000000'
+ P1_LI_BR
+ &skip_ws_eat
+ P1_BEQ_R0_R1
+ ## '\n' (0x0A)
+ P1_LI_R1
+ '0A000000'
+ P1_LI_BR
+ &skip_ws_eat
+ P1_BEQ_R0_R1
+ ## '\r' (0x0D)
+ P1_LI_R1
+ '0D000000'
+ P1_LI_BR
+ &skip_ws_eat
+ P1_BEQ_R0_R1
+ ## ';' (0x3B)
+ P1_LI_R1
+ '3B000000'
+ P1_LI_BR
+ &skip_ws_comment
+ P1_BEQ_R0_R1
+
+ P1_LI_BR
+ &skip_ws_done
+ P1_B
+
+:skip_ws_eat
+ P1_LI_BR
+ &advance_char
+ P1_CALL
+ P1_LI_BR
+ &skip_ws_loop
+ P1_B
+
+:skip_ws_comment
+ P1_LI_BR
+ &advance_char
+ P1_CALL ## eat ';'
+:skip_ws_comment_loop
+ P1_LI_BR
+ &peek_char
+ P1_CALL
+ ## EOF → outer loop (will see -1 and exit)
+ P1_LI_R1
+ '00000000'
+ P1_ADDI_R1_R1_NEG1
+ P1_LI_BR
+ &skip_ws_loop
+ P1_BEQ_R0_R1
+ ## '\n' → eat and outer loop
+ P1_LI_R1
+ '0A000000'
+ P1_LI_BR
+ &skip_ws_eat
+ P1_BEQ_R0_R1
+ ## else eat and keep going
+ P1_LI_BR
+ &advance_char
+ P1_CALL
+ P1_LI_BR
+ &skip_ws_comment_loop
+ P1_B
+
+:skip_ws_done
+ P1_EPILOGUE
+ P1_RET
+
+
+## ---- is_digit(c) -> r0 = 0 or 1 ------------------------------------
+## Character already in r1.
+:is_digit
+ P1_LI_R2
+ '30000000' ## '0' = 48
+ P1_LI_R0
+ '00000000' ## default: not digit
+ P1_LI_BR
+ &is_digit_done
+ P1_BLT_R1_R2 ## c < '0' → not digit
+ P1_LI_R2
+ '3A000000' ## '9' + 1 = 58 (:)
+ P1_LI_BR
+ &is_digit_yes
+ P1_BLT_R1_R2 ## c < ':' → in range
+ P1_LI_BR
+ &is_digit_done
+ P1_B
+:is_digit_yes
+ P1_LI_R0
+ '01000000'
+:is_digit_done
+ P1_RET
+
+
+## ---- read_number() -> r0 = tagged fixnum ----------------------------
+## Reads a non-negative decimal integer. Digits are consumed while
+## peek_char is in [0-9]. Uses r6 = accumulator across iterations
+## (saved via PROLOGUE_N1 slot 1).
+:read_number
+ P1_PROLOGUE
+ P1_MOV_R3_SP
+ P1_ST_R6_R3_8
+
+ P1_LI_R6
+ '00000000' ## r6 = 0 (accumulator)
+
+:read_number_loop
+ P1_LI_BR
+ &peek_char
+ P1_CALL ## r0 = char (or -1)
+
+ ## If char not a digit, stop.
+ P1_MOV_R1_R0
+ P1_LI_BR
+ &is_digit
+ P1_CALL ## r0 = 0 or 1
+ P1_LI_R1
+ '00000000'
+ P1_LI_BR
+ &read_number_done
+ P1_BEQ_R0_R1
+
+ ## digit = peek - '0'. Re-peek (simpler than stashing).
+ P1_LI_BR
+ &peek_char
+ P1_CALL
+ P1_ADDI_R0_R0_NEG48 ## r0 = digit (0..9)
+
+ ## r6 = r6 * 10 + digit. Do via (r6 << 3) + (r6 << 1).
+ P1_MOV_R1_R6
+ P1_SHLI_R1_R6_3 ## r1 = r6 << 3 = r6*8
+ P1_MOV_R2_R6
+ P1_SHLI_R2_R6_1 ## r2 = r6 << 1 = r6*2
+ P1_ADD_R6_R1_R2 ## r6 = r6*10
+ P1_ADD_R6_R6_R0 ## r6 = r6*10 + digit
+
+ P1_LI_BR
+ &advance_char
+ P1_CALL
+ P1_LI_BR
+ &read_number_loop
+ P1_B
+
+:read_number_done
+ ## Tag as fixnum (low 3 bits = 001 = shift-left-3 + OR 1).
+ P1_SHLI_R0_R6_3
+ P1_ORI_R0_R0_1
+ P1_MOV_R3_SP
+ P1_LD_R6_R3_8
+ P1_EPILOGUE
+ P1_RET
+
+
+## ---- is_delim(c) -> r0 = 0 or 1 ------------------------------------
+## Returns 1 if c is a token delimiter: whitespace, '(', ')', ';', or EOF.
+:is_delim
+ P1_LI_R0
+ '01000000' ## optimistic: delim
+ P1_LI_R2
+ '00000000'
+ P1_ADDI_R2_R2_NEG1
+ P1_LI_BR
+ &is_delim_done
+ P1_BEQ_R1_R2 ## EOF
+ P1_LI_R2
+ '20000000'
+ P1_LI_BR
+ &is_delim_done
+ P1_BEQ_R1_R2
+ P1_LI_R2
+ '09000000'
+ P1_LI_BR
+ &is_delim_done
+ P1_BEQ_R1_R2
+ P1_LI_R2
+ '0A000000'
+ P1_LI_BR
+ &is_delim_done
+ P1_BEQ_R1_R2
+ P1_LI_R2
+ '0D000000'
+ P1_LI_BR
+ &is_delim_done
+ P1_BEQ_R1_R2
+ P1_LI_R2
+ '28000000' ## '('
+ P1_LI_BR
+ &is_delim_done
+ P1_BEQ_R1_R2
+ P1_LI_R2
+ '29000000' ## ')'
+ P1_LI_BR
+ &is_delim_done
+ P1_BEQ_R1_R2
+ P1_LI_R2
+ '3B000000' ## ';'
+ P1_LI_BR
+ &is_delim_done
+ P1_BEQ_R1_R2
+ P1_LI_R0
+ '00000000'
+:is_delim_done
+ P1_RET
+
+
+## ---- read_symbol() -> r0 = tagged symbol --------------------------
+## Reads until the next delimiter, then calls intern on the byte range.
+## Uses r6 = start cursor, r7 = start pointer (both saved across loop).
+:read_symbol
+ P1_PROLOGUE_N2
+ P1_MOV_R3_SP
+ P1_ST_R6_R3_8
+ P1_ST_R7_R3_16
+
+ ## r7 = &src[cursor] (stored start)
+ P1_LI_R1
+ &src_cursor
+ P1_LD_R1_R1_0
+ P1_LI_R2
+ &src_base
+ P1_LD_R2_R2_0
+ P1_ADD_R7_R1_R2 ## r7 = base + cursor
+ P1_MOV_R6_R1 ## r6 = start cursor
+
+:read_symbol_loop
+ P1_LI_BR
+ &peek_char
+ P1_CALL
+ P1_MOV_R1_R0
+ P1_LI_BR
+ &is_delim
+ P1_CALL
+ P1_LI_R1
+ '01000000'
+ P1_LI_BR
+ &read_symbol_done
+ P1_BEQ_R0_R1 ## delim → stop
+
+ P1_LI_BR
+ &advance_char
+ P1_CALL
+ P1_LI_BR
+ &read_symbol_loop
+ P1_B
+
+:read_symbol_done
+ ## Length = current cursor - r6.
+ P1_LI_R1
+ &src_cursor
+ P1_LD_R1_R1_0
+ P1_SUB_R2_R1_R6 ## r2 = cur - start = len
+
+ ## If length 0, malformed (shouldn't happen — caller peeks before).
+ P1_LI_R1
+ '00000000'
+ P1_LI_BR
+ &err_reader_bad
+ P1_BEQ_R2_R1
+
+ P1_MOV_R1_R7 ## r1 = ptr to first byte
+ ## r2 = len (already set)
+ P1_LI_BR
+ &intern
+ P1_CALL
+
+ P1_MOV_R3_SP
+ P1_LD_R6_R3_8
+ P1_LD_R7_R3_16
+ P1_EPILOGUE_N2
+ P1_RET
+
+
+## ---- read_list() -> r0 = tagged list --------------------------------
+## Assumes the '(' has already been consumed. Reads expressions until ')'.
+## Builds a list in order using a reversed cons chain, then reverses.
+## Simpler approach here: recursive — read one expr, then cons onto the
+## read_list tail. Stack-bounded but OK for shallow depths.
+##
+## Frame: PROLOGUE_N1 with slot 1 = saved r6 (first element tagged value).
+:read_list
+ P1_PROLOGUE
+
+ P1_LI_BR
+ &skip_ws
+ P1_CALL
+
+ ## If next char is ')', return nil (end of list).
+ P1_LI_BR
+ &peek_char
+ P1_CALL
+ P1_LI_R1
+ '29000000' ## ')'
+ P1_LI_BR
+ &read_list_close
+ P1_BEQ_R0_R1
+
+ ## EOF mid-list → error.
+ P1_LI_R1
+ '00000000'
+ P1_ADDI_R1_R1_NEG1
+ P1_LI_BR
+ &err_reader_bad
+ P1_BEQ_R0_R1
+
+ ## Read head element, then tail, then cons them.
+ P1_MOV_R3_SP
+ P1_ST_R6_R3_8 ## save outer r6 (if any)
+
+ P1_LI_BR
+ &read_expr
+ P1_CALL ## r0 = head
+
+ P1_MOV_R3_SP
+ P1_ST_R0_R3_8 ## slot 1 = head (spill across next call)
+
+ P1_LI_BR
+ &read_list
+ P1_CALL ## r0 = tail (recursive)
+
+ ## cons(head, tail)
+ P1_MOV_R3_SP
+ P1_LD_R1_R3_8
+ P1_MOV_R2_R0
+ P1_LI_BR
+ &cons
+ P1_CALL
+
+ ## Restore r6 (we clobbered the slot when storing head; outer r6 is gone.
+ ## In this test we never rely on r6 across read_list invocations, so
+ ## leave it; slot is scratch).
+ P1_EPILOGUE
+ P1_RET
+
+:read_list_close
+ P1_LI_BR
+ &advance_char
+ P1_CALL ## eat ')'
+ P1_LI_R0
+ '07000000' ## nil = 0x07
+ P1_EPILOGUE
+ P1_RET
+
+
+## ---- read_expr() -> r0 = tagged value -------------------------------
+## Dispatches on the first non-whitespace char.
+:read_expr
+ P1_PROLOGUE
+
+ P1_LI_BR
+ &skip_ws
+ P1_CALL
+
+ P1_LI_BR
+ &peek_char
+ P1_CALL ## r0 = char
+
+ ## EOF → error.
+ P1_LI_R1
+ '00000000'
+ P1_ADDI_R1_R1_NEG1
+ P1_LI_BR
+ &err_reader_bad
+ P1_BEQ_R0_R1
+
+ ## '(' → list.
+ P1_LI_R1
+ '28000000'
+ P1_LI_BR
+ &read_expr_list
+ P1_BEQ_R0_R1
+
+ ## digit → number.
+ P1_MOV_R1_R0
+ P1_LI_BR
+ &is_digit
+ P1_CALL
+ P1_LI_R1
+ '01000000'
+ P1_LI_BR
+ &read_expr_number
+ P1_BEQ_R0_R1
+
+ ## else → symbol.
+ P1_LI_BR
+ &read_symbol
+ P1_CALL
+ P1_EPILOGUE
+ P1_RET
+
+:read_expr_list
+ P1_LI_BR
+ &advance_char
+ P1_CALL ## eat '('
+ P1_LI_BR
+ &read_list
+ P1_CALL
+ P1_EPILOGUE
+ P1_RET
+
+:read_expr_number
+ P1_LI_BR
+ &read_number
+ P1_CALL
+ P1_EPILOGUE
+ P1_RET
+
+
+## ---- Display --------------------------------------------------------
+
+## ---- putc(r1=char) — write one byte to fd 1 ------------------------
+:putc_buf
+'00000000'
+'00000000'
+
+:putc
+ P1_PROLOGUE
+ P1_LI_R2
+ &putc_buf
+ P1_SB_R1_R2_0 ## *putc_buf = low byte of r1
+ P1_LI_R0
+ SYS_WRITE
+ P1_LI_R1
+ '01000000'
+ ## r2 = &putc_buf already
+ P1_LI_R3
+ '01000000'
+ P1_SYSCALL
+ P1_EPILOGUE
+ P1_RET
+
+
+## ---- display_uint(r1=u64, r2=fd) — decimal, no sign --------------
+## Writes digits to `digit_buf` right-to-left, then SYS_WRITEs the
+## filled range to fd. 24-byte buffer covers any 61-bit value.
+## fd is spilled into slot 3 because the digit loop reuses r2 as the
+## divisor '10' constant — keeping fd in a reg would require saving
+## another callee-saved, which costs the same.
+:digit_buf
+'000000000000000000000000000000000000000000000000'
+:digit_buf_end
+'00000000'
+
+:display_uint
+ P1_PROLOGUE_N3
+ P1_MOV_R3_SP
+ P1_ST_R6_R3_8
+ P1_ST_R7_R3_16
+ P1_ST_R2_R3_24 ## save fd
+
+ P1_LI_R6
+ &digit_buf_end ## r6 = end-of-buffer cursor (moves left)
+ P1_MOV_R7_R1 ## r7 = value (mutated)
+
+ ## Special-case zero.
+ P1_LI_R1
+ '00000000'
+ P1_LI_BR
+ &du_loop
+ P1_BNE_R7_R1 ## if value != 0, loop; else write '0'
+ P1_ADDI_R6_R6_NEG1
+ P1_LI_R1
+ '30000000' ## '0'
+ P1_SB_R1_R6_0
+ P1_LI_BR
+ &du_write
+ P1_B
+
+:du_loop
+ P1_LI_R1
+ '00000000'
+ P1_LI_BR
+ &du_write
+ P1_BEQ_R7_R1 ## value == 0 → done digit gen
+
+ ## digit = value % 10.
+ P1_MOV_R1_R7
+ P1_LI_R2
+ '0A000000'
+ P1_REM_R1_R1_R2 ## r1 = value % 10
+ P1_ADDI_R1_R1_48 ## r1 += '0'
+ P1_ADDI_R6_R6_NEG1
+ P1_SB_R1_R6_0 ## *--r6 = digit
+
+ ## value = value / 10.
+ P1_MOV_R1_R7
+ P1_LI_R2
+ '0A000000'
+ P1_DIV_R1_R1_R2
+ P1_MOV_R7_R1
+
+ P1_LI_BR
+ &du_loop
+ P1_B
+
+:du_write
+ ## Stash fd into r0 first — computing len clobbers r3 (we need it
+ ## as SP for the slot-3 load), so grab fd before that step.
+ P1_MOV_R3_SP
+ P1_LD_R0_R3_24 ## r0 = fd (temp; SYS_WRITE will overwrite r0)
+ P1_LI_R1
+ &digit_buf_end
+ P1_SUB_R3_R1_R6 ## r3 = len = digit_buf_end - r6
+ P1_MOV_R1_R0 ## r1 = fd
+ P1_MOV_R2_R6 ## r2 = buf
+ P1_LI_R0
+ SYS_WRITE
+ P1_SYSCALL
+
+ P1_MOV_R3_SP
+ P1_LD_R6_R3_8
+ P1_LD_R7_R3_16
+ P1_EPILOGUE_N3
+ P1_RET
+
+
+## ---- display(r1=tagged) — dispatch on tag -------------------------
+## display owns a PROLOGUE_N2 frame even though its own body only needs
+## retaddr — display_pair dispatches into this frame (via BEQ, not CALL)
+## and uses slots 1/2 to save caller's r6/r7. Giving display_pair its own
+## prologue would leak display's frame on return: the stacked PROLOGUE +
+## PROLOGUE_N2 sum doesn't match display_pair's single EPILOGUE_N2, so
+## recursive calls drift sp and the saved r6/r7 slots point off-frame.
+:display
+ P1_PROLOGUE_N2
+
+ ## nil = 0x07
+ P1_LI_R2
+ '07000000'
+ P1_LI_BR
+ &display_nil
+ P1_BEQ_R1_R2
+
+ ## Low-3-bit tag.
+ P1_MOV_R2_R1
+ P1_ANDI_R1_R1_7 ## r1 = tag
+ P1_LI_R3
+ '01000000'
+ P1_LI_BR
+ &display_fixnum
+ P1_BEQ_R1_R3
+ P1_LI_R3
+ '02000000'
+ P1_LI_BR
+ &display_pair
+ P1_BEQ_R1_R3
+ P1_LI_R3
+ '05000000'
+ P1_LI_BR
+ &display_symbol
+ P1_BEQ_R1_R3
+
+ ## Unknown — treat as "?"
+ P1_LI_R1
+ '3F000000' ## '?'
+ P1_LI_BR
+ &putc
+ P1_CALL
+ P1_EPILOGUE_N2
+ P1_RET
+
+:display_nil
+ P1_LI_R1
+ '28000000' ## '('
+ P1_LI_BR
+ &putc
+ P1_CALL
+ P1_LI_R1
+ '29000000' ## ')'
+ P1_LI_BR
+ &putc
+ P1_CALL
+ P1_EPILOGUE_N2
+ P1_RET
+
+:display_fixnum
+ P1_MOV_R1_R2
+ P1_SARI_R1_R1_3 ## signed shift; value (assume non-negative here)
+ P1_LI_R2
+ '01000000' ## fd = stdout
+ P1_LI_BR
+ &display_uint
+ P1_CALL
+ P1_EPILOGUE_N2
+ P1_RET
+
+:display_symbol
+ ## r2 = tagged symbol. Strip tag, read header, then write bytes.
+ P1_ADDI_R2_R2_NEG5 ## r2 = raw header ptr (tag=0b101 → -5)
+ P1_LD_R3_R2_0 ## r3 = header
+ ## Low 48 bits = length. Mask by SHL/SHR 16.
+ P1_SHLI_R3_R3_16 ## clear top 16
+ P1_SHRI_R3_R3_16 ## r3 = length (0..2^48)
+ P1_ADDI_R2_R2_8 ## r2 = name ptr
+ P1_LI_R0
+ SYS_WRITE
+ P1_LI_R1
+ '01000000'
+ P1_SYSCALL
+ P1_EPILOGUE_N2
+ P1_RET
+
+:display_pair
+ ## r2 = tagged pair. Shares display's PROLOGUE_N2 frame.
+ P1_MOV_R3_SP
+ P1_ST_R6_R3_8 ## save r6 into display's slot 1
+ P1_ST_R7_R3_16 ## save r7 into display's slot 2
+
+ P1_MOV_R6_R2 ## r6 = tagged pair (we'll walk cdr chain)
+
+ P1_LI_R1
+ '28000000' ## '('
+ P1_LI_BR
+ &putc
+ P1_CALL
+
+:display_pair_loop
+ ## car(r6)
+ P1_MOV_R1_R6
+ P1_LI_BR
+ &car
+ P1_CALL
+ P1_MOV_R1_R0
+ P1_LI_BR
+ &display
+ P1_CALL
+
+ ## cdr(r6)
+ P1_MOV_R1_R6
+ P1_LI_BR
+ &cdr
+ P1_CALL
+ P1_MOV_R6_R0
+
+ ## If cdr == nil, done.
+ P1_LI_R1
+ '07000000'
+ P1_LI_BR
+ &display_pair_close
+ P1_BEQ_R6_R1
+
+ ## If cdr is a pair, space + loop.
+ P1_MOV_R1_R6
+ P1_ANDI_R1_R1_7
+ P1_LI_R2
+ '02000000'
+ P1_LI_BR
+ &display_pair_continue
+ P1_BEQ_R1_R2
+
+ ## Otherwise, improper: " . x)".
+ P1_LI_R1
+ '20000000' ## ' '
+ P1_LI_BR
+ &putc
+ P1_CALL
+ P1_LI_R1
+ '2E000000' ## '.'
+ P1_LI_BR
+ &putc
+ P1_CALL
+ P1_LI_R1
+ '20000000'
+ P1_LI_BR
+ &putc
+ P1_CALL
+ P1_MOV_R1_R6
+ P1_LI_BR
+ &display
+ P1_CALL
+ P1_LI_BR
+ &display_pair_close
+ P1_B
+
+:display_pair_continue
+ P1_LI_R1
+ '20000000' ## ' '
+ P1_LI_BR
+ &putc
+ P1_CALL
+ P1_LI_BR
+ &display_pair_loop
+ P1_B
+
+:display_pair_close
+ P1_LI_R1
+ '29000000' ## ')'
+ P1_LI_BR
+ &putc
+ P1_CALL
+
+ P1_MOV_R3_SP
+ P1_LD_R6_R3_8
+ P1_LD_R7_R3_16
+ P1_EPILOGUE_N2
+ P1_RET
+
+
+## ---- Static strings -------------------------------------------------
+:msg_error_prefix
+"error: "
+:msg_newline
+"
+"
+:msg_oom
+"heap exhausted"
+:msg_intern_not_eq
+"intern: foo a != foo b (same name)"
+:msg_intern_collision
+"intern: foo == bar (distinct names collided)"
+:msg_reader_bad
+"reader: malformed input"
+:msg_at
+" at "
+:msg_colon
+":"
+
+## Interned name samples used by the self-test.
+:str_foo
+"foo"
+:str_bar
+"bar"
+
+## Step-4 test source. Exercises nested lists, multi-digit numbers,
+## multi-char symbols, extra whitespace, and a nested empty list.
+:src_text
+"(defn (foo 42) ( bar 7 ))"
+
+
+## ---- Symbol table (4096 slots × 8 bytes = 32 KiB) -------------------
+## Open-addressing hash table. Empty slot = 0 (no valid tagged value
+## is 0). LISP.md §GC §Roots makes this a named BSS root.
+:symbol_table
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+:symbol_table_end
+
+
+## ---- Heap arena (16 KiB — bump region for step-3 allocations) -------
+## Step 9 will grow this to 20 MiB via ELF memsz > filesz; for now a
+## file-inlined block is fine (makes the binary ~50 KiB).
:heap_start
-'00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
-'00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
-'00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
-'00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
-'00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
-'00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
-'00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
-'00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
+'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+'0000000000000000000000000000000000000000000000000000000000000000'
:heap_tail
:ELF_end
diff --git a/p1_aarch64.M1 b/p1_aarch64.M1
@@ -38,7 +38,7 @@ DEFINE P1_OR_R1_R1_R2 210002AA
DEFINE P1_XOR_R1_R1_R2 210002CA
DEFINE P1_MUL_R1_R1_R2 217C029B
DEFINE P1_DIV_R1_R1_R2 210CC29A
-DEFINE P1_REM_R1_R1_R5 300CDB9A01061B9B
+DEFINE P1_REM_R1_R1_R5 300CDB9A01861B9B
DEFINE P1_SHL_R1_R1_R2 2120C29A
DEFINE P1_SHR_R1_R1_R2 2124C29A
DEFINE P1_SAR_R4_R4_R2 5A2BC29A
@@ -138,3 +138,101 @@ DEFINE P1_BLT_R0_R2 1F0002EB4A00005420021FD6
DEFINE P1_BLT_R1_R2 3F0002EB4A00005420021FD6
DEFINE P1_BNE_R1_R2 3F0002EB4000005420021FD6
DEFINE P1_BNE_R0_R2 1F0002EB4000005420021FD6
+
+## ---- Seed-Lisp step 3 extensions (tranche 9): strings + interning
+DEFINE P1_MOV_R0_SP E0030091
+DEFINE P1_MOV_R1_R3 E10303AA
+DEFINE P1_ADDI_R1_R7_7 811E0091
+DEFINE P1_ADDI_R1_R1_8 21200091
+DEFINE P1_ADDI_R1_R1_NEG5 211400D1
+DEFINE P1_ADDI_R2_R2_1 42040091
+DEFINE P1_ADDI_R2_R2_NEG1 420400D1
+DEFINE P1_ADDI_R3_R0_8 03200091
+DEFINE P1_ADDI_R3_R3_1 63040091
+DEFINE P1_ADDI_R3_R3_NEG1 630400D1
+DEFINE P1_ADDI_R6_R6_1 73060091
+DEFINE P1_ADDI_R7_R7_NEG1 940600D1
+DEFINE P1_SHLI_R0_R0_3 00F07DD3
+DEFINE P1_SHLI_R0_R0_52 002C4CD3
+DEFINE P1_SHLI_R1_R1_3 21F07DD3
+DEFINE P1_SHLI_R3_R0_5 03E87BD3
+DEFINE P1_SHLI_R6_R6_32 737E60D3
+DEFINE P1_SHRI_R0_R0_52 00FC74D3
+DEFINE P1_SHRI_R1_R1_3 21FC43D3
+DEFINE P1_SHRI_R6_R6_32 73FE60D3
+DEFINE P1_ORI_R0_R0_4 00007EB2
+DEFINE P1_ORI_R0_R0_1 000040B2
+DEFINE P1_ADD_R0_R0_R3 0000038B
+DEFINE P1_ADD_R2_R2_R0 4200008B
+DEFINE P1_ADD_R2_R2_R1 4200018B
+DEFINE P1_SUB_R3_R3_R0 630000CB
+DEFINE P1_BEQ_R0_R6 1F0013EB4100005420021FD6
+DEFINE P1_BEQ_R2_R6 5F0013EB4100005420021FD6
+DEFINE P1_BEQ_R3_R1 7F0001EB4100005420021FD6
+DEFINE P1_BEQ_R3_R6 7F0013EB4100005420021FD6
+DEFINE P1_BEQ_R7_R1 9F0201EB4100005420021FD6
+DEFINE P1_BNE_R0_R1 1F0001EB4000005420021FD6
+DEFINE P1_BNE_R0_R6 1F0013EB4000005420021FD6
+DEFINE P1_BNE_R0_R7 1F0014EB4000005420021FD6
+DEFINE P1_BNE_R6_R3 7F0203EB4000005420021FD6
+DEFINE P1_LB_R0_R1_0 20004039
+DEFINE P1_LB_R2_R6_0 62024039
+DEFINE P1_LB_R7_R2_0 54004039
+DEFINE P1_LD_R0_R2_0 400040F9
+DEFINE P1_LD_R0_R3_24 600C40F9
+DEFINE P1_LD_R1_R3_24 610C40F9
+DEFINE P1_LD_R3_R2_0 430040F9
+DEFINE P1_LD_R6_R1_0 330040F9
+DEFINE P1_LD_R6_R3_8 730440F9
+DEFINE P1_LD_R7_R3_16 740840F9
+DEFINE P1_SB_R1_R0_7 011C0039
+DEFINE P1_SB_R2_R3_0 62000039
+DEFINE P1_ST_R0_R2_0 400000F9
+DEFINE P1_ST_R0_R3_24 600C00F9
+DEFINE P1_ST_R0_R4_0 400300F9
+DEFINE P1_ST_R6_R0_8 130400F9
+DEFINE P1_ST_R6_R3_8 730400F9
+DEFINE P1_ST_R7_R0_0 140000F9
+DEFINE P1_ST_R7_R0_16 140800F9
+DEFINE P1_ST_R7_R3_16 740800F9
+
+## ---- Seed-Lisp step 4 extensions (tranche 10): reader + display --
+DEFINE P1_MOV_R1_R0 E10300AA
+DEFINE P1_MOV_R1_R2 E10302AA
+DEFINE P1_MOV_R1_R7 E10314AA
+DEFINE P1_MOV_R2_R1 E20301AA
+DEFINE P1_MOV_R6_R2 F30302AA
+DEFINE P1_MOV_R7_R1 F40301AA
+DEFINE P1_ADDI_R0_R0_NEG1 000400D1
+DEFINE P1_ADDI_R0_R0_NEG48 00C000D1
+DEFINE P1_ADDI_R1_R1_48 21C00091
+DEFINE P1_ADDI_R1_R1_NEG1 210400D1
+DEFINE P1_ADDI_R2_R2_8 42200091
+DEFINE P1_ADDI_R2_R2_NEG5 421400D1
+DEFINE P1_ADDI_R6_R6_NEG1 730600D1
+DEFINE P1_SARI_R1_R1_3 21FC4393
+DEFINE P1_SHLI_R0_R6_3 60F27DD3
+DEFINE P1_SHLI_R1_R6_3 61F27DD3
+DEFINE P1_SHLI_R2_R6_1 62FA7FD3
+DEFINE P1_SHLI_R3_R3_16 63BC70D3
+DEFINE P1_SHRI_R3_R3_16 63FC50D3
+DEFINE P1_ADD_R6_R1_R2 3300028B
+DEFINE P1_ADD_R6_R6_R0 7302008B
+DEFINE P1_ADD_R7_R1_R2 3400028B
+DEFINE P1_SUB_R2_R1_R6 220013CB
+DEFINE P1_SUB_R3_R1_R6 230013CB
+DEFINE P1_REM_R1_R1_R2 300CC29A0186029B
+DEFINE P1_BEQ_R0_R1 1F0001EB4100005420021FD6
+DEFINE P1_BEQ_R1_R2 3F0002EB4100005420021FD6
+DEFINE P1_BEQ_R1_R3 3F0003EB4100005420021FD6
+DEFINE P1_BEQ_R2_R1 5F0001EB4100005420021FD6
+DEFINE P1_BEQ_R6_R1 7F0201EB4100005420021FD6
+DEFINE P1_BNE_R7_R1 9F0201EB4000005420021FD6
+DEFINE P1_LB_R0_R2_0 40004039
+DEFINE P1_LD_R2_R1_0 220040F9
+DEFINE P1_LD_R2_R2_0 420040F9
+DEFINE P1_SB_R1_R2_0 41000039
+DEFINE P1_SB_R1_R6_0 61020039
+DEFINE P1_ST_R0_R3_8 600400F9
+DEFINE P1_ST_R2_R1_0 220000F9
+DEFINE P1_ST_R2_R3_24 620C00F9
diff --git a/p1_amd64.M1 b/p1_amd64.M1
@@ -138,3 +138,101 @@ DEFINE P1_BLT_R0_R2 4839F07D0341FFE3
DEFINE P1_BLT_R1_R2 4839F77D0341FFE3
DEFINE P1_BNE_R1_R2 4839F7740341FFE3
DEFINE P1_BNE_R0_R2 4839F0740341FFE3
+
+## ---- Seed-Lisp step 3 extensions (tranche 9): strings + interning
+DEFINE P1_MOV_R0_SP 4889E0
+DEFINE P1_MOV_R1_R3 4889D7
+DEFINE P1_ADDI_R1_R7_7 4C89E74883C707
+DEFINE P1_ADDI_R1_R1_8 4889FF4883C708
+DEFINE P1_ADDI_R1_R1_NEG5 4889FF4883C7FB
+DEFINE P1_ADDI_R2_R2_1 4889F64883C601
+DEFINE P1_ADDI_R2_R2_NEG1 4889F64883C6FF
+DEFINE P1_ADDI_R3_R0_8 4889C24883C208
+DEFINE P1_ADDI_R3_R3_1 4889D24883C201
+DEFINE P1_ADDI_R3_R3_NEG1 4889D24883C2FF
+DEFINE P1_ADDI_R6_R6_1 4889DB4883C301
+DEFINE P1_ADDI_R7_R7_NEG1 4D89E44983C4FF
+DEFINE P1_SHLI_R0_R0_3 4889C048C1E003
+DEFINE P1_SHLI_R0_R0_52 4889C048C1E034
+DEFINE P1_SHLI_R1_R1_3 4889FF48C1E703
+DEFINE P1_SHLI_R3_R0_5 4889C248C1E205
+DEFINE P1_SHLI_R6_R6_32 4889DB48C1E320
+DEFINE P1_SHRI_R0_R0_52 4889C048C1E834
+DEFINE P1_SHRI_R1_R1_3 4889FF48C1EF03
+DEFINE P1_SHRI_R6_R6_32 4889DB48C1EB20
+DEFINE P1_ORI_R0_R0_4 4889C04883C804
+DEFINE P1_ORI_R0_R0_1 4889C04883C801
+DEFINE P1_ADD_R0_R0_R3 4889C04801D0
+DEFINE P1_ADD_R2_R2_R0 4889F64801C6
+DEFINE P1_ADD_R2_R2_R1 4889F64801FE
+DEFINE P1_SUB_R3_R3_R0 4889D24829C2
+DEFINE P1_BEQ_R0_R6 4839D8750341FFE3
+DEFINE P1_BEQ_R2_R6 4839DE750341FFE3
+DEFINE P1_BEQ_R3_R1 4839FA750341FFE3
+DEFINE P1_BEQ_R3_R6 4839DA750341FFE3
+DEFINE P1_BEQ_R7_R1 4939FC750341FFE3
+DEFINE P1_BNE_R0_R1 4839F8740341FFE3
+DEFINE P1_BNE_R0_R6 4839D8740341FFE3
+DEFINE P1_BNE_R0_R7 4C39E0740341FFE3
+DEFINE P1_BNE_R6_R3 4839D3740341FFE3
+DEFINE P1_LB_R0_R1_0 480FB64700
+DEFINE P1_LB_R2_R6_0 480FB67300
+DEFINE P1_LB_R7_R2_0 4C0FB66600
+DEFINE P1_LD_R0_R2_0 488B4600
+DEFINE P1_LD_R0_R3_24 488B4218
+DEFINE P1_LD_R1_R3_24 488B7A18
+DEFINE P1_LD_R3_R2_0 488B5600
+DEFINE P1_LD_R6_R1_0 488B5F00
+DEFINE P1_LD_R6_R3_8 488B5A08
+DEFINE P1_LD_R7_R3_16 4C8B6210
+DEFINE P1_SB_R1_R0_7 48887807
+DEFINE P1_SB_R2_R3_0 48887200
+DEFINE P1_ST_R0_R2_0 48894600
+DEFINE P1_ST_R0_R3_24 48894218
+DEFINE P1_ST_R0_R4_0 49894500
+DEFINE P1_ST_R6_R0_8 48895808
+DEFINE P1_ST_R6_R3_8 48895A08
+DEFINE P1_ST_R7_R0_0 4C896000
+DEFINE P1_ST_R7_R0_16 4C896010
+DEFINE P1_ST_R7_R3_16 4C896210
+
+## ---- Seed-Lisp step 4 extensions (tranche 10): reader + display --
+DEFINE P1_MOV_R1_R0 4889C7
+DEFINE P1_MOV_R1_R2 4889F7
+DEFINE P1_MOV_R1_R7 4C89E7
+DEFINE P1_MOV_R2_R1 4889FE
+DEFINE P1_MOV_R6_R2 4889F3
+DEFINE P1_MOV_R7_R1 4989FC
+DEFINE P1_ADDI_R0_R0_NEG1 4889C04883C0FF
+DEFINE P1_ADDI_R0_R0_NEG48 4889C04883C0D0
+DEFINE P1_ADDI_R1_R1_48 4889FF4883C730
+DEFINE P1_ADDI_R1_R1_NEG1 4889FF4883C7FF
+DEFINE P1_ADDI_R2_R2_8 4889F64883C608
+DEFINE P1_ADDI_R2_R2_NEG5 4889F64883C6FB
+DEFINE P1_ADDI_R6_R6_NEG1 4889DB4883C3FF
+DEFINE P1_SARI_R1_R1_3 4889FF48C1FF03
+DEFINE P1_SHLI_R0_R6_3 4889D848C1E003
+DEFINE P1_SHLI_R1_R6_3 4889DF48C1E703
+DEFINE P1_SHLI_R2_R6_1 4889DE48C1E601
+DEFINE P1_SHLI_R3_R3_16 4889D248C1E210
+DEFINE P1_SHRI_R3_R3_16 4889D248C1EA10
+DEFINE P1_ADD_R6_R1_R2 4889FB4801F3
+DEFINE P1_ADD_R6_R6_R0 4889DB4801C3
+DEFINE P1_ADD_R7_R1_R2 4989FC4901F4
+DEFINE P1_SUB_R2_R1_R6 4889FE4829DE
+DEFINE P1_SUB_R3_R1_R6 4889FA4829DA
+DEFINE P1_REM_R1_R1_R2 4989C34889D14889F8489948F7FE4889D74889CA4C89D8
+DEFINE P1_BEQ_R0_R1 4839F8750341FFE3
+DEFINE P1_BEQ_R1_R2 4839F7750341FFE3
+DEFINE P1_BEQ_R1_R3 4839D7750341FFE3
+DEFINE P1_BEQ_R2_R1 4839FE750341FFE3
+DEFINE P1_BEQ_R6_R1 4839FB750341FFE3
+DEFINE P1_BNE_R7_R1 4939FC740341FFE3
+DEFINE P1_LB_R0_R2_0 480FB64600
+DEFINE P1_LD_R2_R1_0 488B7700
+DEFINE P1_LD_R2_R2_0 488B7600
+DEFINE P1_SB_R1_R2_0 48887E00
+DEFINE P1_SB_R1_R6_0 48887B00
+DEFINE P1_ST_R0_R3_8 48894208
+DEFINE P1_ST_R2_R1_0 48897700
+DEFINE P1_ST_R2_R3_24 48897218
diff --git a/p1_gen.py b/p1_gen.py
@@ -309,10 +309,12 @@ class RRR(Op):
# SDIV x16, xA, xB ; MSUB xD, x16, xB, xA.
# x16 (ARM IP0, caller-saved, not a P1 reg) is scratch so
# REM does not hidden-clobber P1 r4 — the op modifies rD only.
+ # MSUB encoding needs bit 15 set (o0=1); without it the
+ # instruction decodes as MADD and REM returns A + (A/B)*B.
d = NAT_AA64[self.rD]; a = NAT_AA64[self.rA]; b = NAT_AA64[self.rB]
SC = 16
sdiv = 0x9AC00C00 | (b << 16) | (a << 5) | SC
- msub = 0x9B000000 | (b << 16) | (a << 10) | (SC << 5) | d
+ msub = 0x9B008000 | (b << 16) | (a << 10) | (SC << 5) | d
return le32(sdiv) + le32(msub)
base = AA64_RRR_BASE[self.op]
return aa_rrr(base, self.rD, self.rA, self.rB)
@@ -913,6 +915,190 @@ def rows():
R.append(CondB(name='BNE_R1_R2', op='BNE', rA='r1', rB='r2'))
R.append(CondB(name='BNE_R0_R2', op='BNE', rA='r0', rB='r2'))
+ # --- Tranche 9: seed-Lisp step-3 extensions (strings + interning) ---
+ R.append(Banner('Seed-Lisp step 3 extensions (tranche 9): strings + interning'))
+
+ # Extra MOVs
+ R.append(Mov(name='MOV_R0_SP', rD='r0', rA='sp'))
+ R.append(Mov(name='MOV_R1_R3', rD='r1', rA='r3'))
+
+ # ADDI with new (d, a, imm) tuples. NEG5 is for stripping the SYMBOL
+ # tag; NEG1 flavors are loop counters; 7/8 form round_up_8 in
+ # make_symbol/make_string.
+ for d, a, imm in [
+ ('r1','r7',7),
+ ('r1','r1',8),
+ ('r1','r1',-5),
+ ('r2','r2',1),
+ ('r2','r2',-1),
+ ('r3','r0',8),
+ ('r3','r3',1),
+ ('r3','r3',-1),
+ ('r6','r6',1),
+ ('r7','r7',-1),
+ ]:
+ suf = f'NEG{-imm}' if imm < 0 else f'{imm}'
+ R.append(AddI(name=f'ADDI_{d.upper()}_{a.upper()}_{suf}',
+ rD=d, rA=a, imm=imm))
+
+ # Shifts at new immediates. SHLI/SHRI by 52 implement the low-12-bit
+ # mask (= index into the 4096-slot symbol table). SHLI/SHRI by 32
+ # mask low 32 bits (length extraction from the 48-bit header
+ # field). SHLI_R0_R0_3 / SHLI_R1_R1_3 scale an index to byte offset
+ # (h * 8). SHLI_R3_R0_5 / SHRI by 3 implement 31*h via (h<<5)-h
+ # and round_up_8 via ((x+7)>>3)<<3.
+ for op, d, a, imm in [
+ ('SHLI','r0','r0',3),
+ ('SHLI','r0','r0',52),
+ ('SHLI','r1','r1',3),
+ ('SHLI','r3','r0',5),
+ ('SHLI','r6','r6',32),
+ ('SHRI','r0','r0',52),
+ ('SHRI','r1','r1',3),
+ ('SHRI','r6','r6',32),
+ ]:
+ R.append(ShiftI(name=f'{op}_{d.upper()}_{a.upper()}_{imm}',
+ op=op, rD=d, rA=a, imm=imm))
+
+ # ORI_R0_R0_4: sets bit 2 (SYMBOL tag = 0b101 needs bits 0 and 2;
+ # 0b101 is not a valid aarch64 bitmask-immediate, so callers do
+ # ORI_R0_R0_4 then ORI_R0_R0_1). Single-bit pattern at bit 2:
+ # N=1, immr=62 (rotate 1 right by 62 = left by 2), imms=0.
+ R.append(LogI(name='ORI_R0_R0_4', op='ORI', rD='r0', rA='r0', imm=4,
+ aa_N=1, aa_immr=62, aa_imms=0))
+ # ORI_R0_R0_1: sets bit 0 (paired with ORI_R0_R0_4 for SYMBOL tag 0b101).
+ R.append(LogI(name='ORI_R0_R0_1', op='ORI', rD='r0', rA='r0', imm=1,
+ aa_N=1, aa_immr=0, aa_imms=0))
+
+ # Reg-reg-reg arith for hash + intern address computation.
+ R.append(RRR(name='ADD_R0_R0_R3', op='ADD', rD='r0', rA='r0', rB='r3'))
+ R.append(RRR(name='ADD_R2_R2_R0', op='ADD', rD='r2', rA='r2', rB='r0'))
+ R.append(RRR(name='ADD_R2_R2_R1', op='ADD', rD='r2', rA='r2', rB='r1'))
+ R.append(RRR(name='SUB_R3_R3_R0', op='SUB', rD='r3', rA='r3', rB='r0'))
+
+ # Branches. Zero-comparison variants (rX vs a reg holding 0);
+ # length-comparison variants (rlen vs zero/symbol-len); pointer-
+ # identity variants (sym_a vs sym_b).
+ for op, a, b in [
+ ('BEQ','r0','r6'),
+ ('BEQ','r2','r6'),
+ ('BEQ','r3','r1'),
+ ('BEQ','r3','r6'),
+ ('BEQ','r7','r1'),
+ ('BNE','r0','r1'),
+ ('BNE','r0','r6'),
+ ('BNE','r0','r7'),
+ ('BNE','r6','r3'),
+ ]:
+ R.append(CondB(name=f'{op}_{a.upper()}_{b.upper()}',
+ op=op, rA=a, rB=b))
+
+ # Memory extras. Offsets 0, 7, 8, 16, 24 for symbol/string/intern
+ # machinery.
+ for op, rt, rn, off in [
+ ('LB','r0','r1',0),
+ ('LB','r2','r6',0),
+ ('LB','r7','r2',0),
+ ('LD','r0','r2',0),
+ ('LD','r0','r3',24),
+ ('LD','r1','r3',24),
+ ('LD','r3','r2',0),
+ ('LD','r6','r1',0),
+ ('LD','r6','r3',8),
+ ('LD','r7','r3',16),
+ ('SB','r1','r0',7),
+ ('SB','r2','r3',0),
+ ('ST','r0','r2',0),
+ ('ST','r0','r3',24),
+ ('ST','r0','r4',0),
+ ('ST','r6','r0',8),
+ ('ST','r6','r3',8),
+ ('ST','r7','r0',0),
+ ('ST','r7','r0',16),
+ ('ST','r7','r3',16),
+ ]:
+ suf = f'NEG{-off}' if off < 0 else f'{off}'
+ R.append(Mem(name=f'{op}_{rt.upper()}_{rn.upper()}_{suf}',
+ op=op, rT=rt, rN=rn, off=off))
+
+ # --- Tranche 10: seed-Lisp step-4 extensions (reader + display) ---
+ R.append(Banner('Seed-Lisp step 4 extensions (tranche 10): reader + display'))
+
+ # Moves pairing up registers unused in earlier tranches.
+ for d, a in [('r1','r0'), ('r1','r2'), ('r1','r7'),
+ ('r2','r1'), ('r6','r2'), ('r7','r1')]:
+ R.append(Mov(name=f'MOV_{d.upper()}_{a.upper()}', rD=d, rA=a))
+
+ # ADDI: character-class arithmetic and cursor/len book-keeping.
+ # NEG48 peels the '0' bias off an ASCII digit. 48 replays the bias
+ # for display_uint. 8 advances past a symbol/string header. NEG5
+ # strips the SYMBOL tag (0b101) from a tagged-symbol pointer.
+ for d, a, imm in [
+ ('r0','r0',-1),
+ ('r0','r0',-48),
+ ('r1','r1',48),
+ ('r1','r1',-1),
+ ('r2','r2',8),
+ ('r2','r2',-5),
+ ('r6','r6',-1),
+ ]:
+ suf = f'NEG{-imm}' if imm < 0 else f'{imm}'
+ R.append(AddI(name=f'ADDI_{d.upper()}_{a.upper()}_{suf}',
+ rD=d, rA=a, imm=imm))
+
+ # Shifts. Pair-tag strip (SHLI/SHRI 16 masks low 48). Fixnum
+ # encode/decode at shift-3. SHLI_R0_R6_3 / R1_R6_3 / R2_R6_1
+ # realize value*8 + value*2 in read_number's *10 expansion.
+ for op, d, a, imm in [
+ ('SARI','r1','r1',3),
+ ('SHLI','r0','r6',3),
+ ('SHLI','r1','r6',3),
+ ('SHLI','r2','r6',1),
+ ('SHLI','r3','r3',16),
+ ('SHRI','r3','r3',16),
+ ]:
+ R.append(ShiftI(name=f'{op}_{d.upper()}_{a.upper()}_{imm}',
+ op=op, rD=d, rA=a, imm=imm))
+
+ # RRR: add/sub combinations for pointer arithmetic and list cons.
+ R.append(RRR(name='ADD_R6_R1_R2', op='ADD', rD='r6', rA='r1', rB='r2'))
+ R.append(RRR(name='ADD_R6_R6_R0', op='ADD', rD='r6', rA='r6', rB='r0'))
+ R.append(RRR(name='ADD_R7_R1_R2', op='ADD', rD='r7', rA='r1', rB='r2'))
+ R.append(RRR(name='SUB_R2_R1_R6', op='SUB', rD='r2', rA='r1', rB='r6'))
+ R.append(RRR(name='SUB_R3_R1_R6', op='SUB', rD='r3', rA='r1', rB='r6'))
+ R.append(RRR(name='REM_R1_R1_R2', op='REM', rD='r1', rA='r1', rB='r2'))
+
+ # Branches. BEQ/BNE variants for EOF sentinels (rX == -1),
+ # tagged-value comparisons, and list-terminator checks.
+ for op, a, b in [
+ ('BEQ','r0','r1'),
+ ('BEQ','r1','r2'),
+ ('BEQ','r1','r3'),
+ ('BEQ','r2','r1'),
+ ('BEQ','r6','r1'),
+ ('BNE','r7','r1'),
+ ]:
+ R.append(CondB(name=f'{op}_{a.upper()}_{b.upper()}',
+ op=op, rA=a, rB=b))
+
+ # Memory extras. LB/SB at new (reg, off) combinations; LD_R2_R1_0
+ # and LD_R2_R2_0 for reading reader state words. ST_R0_R3_8 / _R2_R1_0
+ # push heap-list head into a spill slot. ST_R2_R3_24 spills fd
+ # inside display_uint's PROLOGUE_N3 so it survives the digit loop.
+ for op, rt, rn, off in [
+ ('LB','r0','r2',0),
+ ('LD','r2','r1',0),
+ ('LD','r2','r2',0),
+ ('SB','r1','r2',0),
+ ('SB','r1','r6',0),
+ ('ST','r0','r3',8),
+ ('ST','r2','r1',0),
+ ('ST','r2','r3',24),
+ ]:
+ suf = f'NEG{-off}' if off < 0 else f'{off}'
+ R.append(Mem(name=f'{op}_{rt.upper()}_{rn.upper()}_{suf}',
+ op=op, rT=rt, rN=rn, off=off))
+
return R
diff --git a/p1_riscv64.M1 b/p1_riscv64.M1
@@ -138,3 +138,101 @@ DEFINE P1_BLT_R0_R2 6354C50067000F00
DEFINE P1_BLT_R1_R2 63D4C50067000F00
DEFINE P1_BNE_R1_R2 6384C50067000F00
DEFINE P1_BNE_R0_R2 6304C50067000F00
+
+## ---- Seed-Lisp step 3 extensions (tranche 9): strings + interning
+DEFINE P1_MOV_R0_SP 13050100
+DEFINE P1_MOV_R1_R3 93850600
+DEFINE P1_ADDI_R1_R7_7 93057900
+DEFINE P1_ADDI_R1_R1_8 93858500
+DEFINE P1_ADDI_R1_R1_NEG5 9385B5FF
+DEFINE P1_ADDI_R2_R2_1 13061600
+DEFINE P1_ADDI_R2_R2_NEG1 1306F6FF
+DEFINE P1_ADDI_R3_R0_8 93068500
+DEFINE P1_ADDI_R3_R3_1 93861600
+DEFINE P1_ADDI_R3_R3_NEG1 9386F6FF
+DEFINE P1_ADDI_R6_R6_1 93841400
+DEFINE P1_ADDI_R7_R7_NEG1 1309F9FF
+DEFINE P1_SHLI_R0_R0_3 13153500
+DEFINE P1_SHLI_R0_R0_52 13154503
+DEFINE P1_SHLI_R1_R1_3 93953500
+DEFINE P1_SHLI_R3_R0_5 93165500
+DEFINE P1_SHLI_R6_R6_32 93940402
+DEFINE P1_SHRI_R0_R0_52 13554503
+DEFINE P1_SHRI_R1_R1_3 93D53500
+DEFINE P1_SHRI_R6_R6_32 93D40402
+DEFINE P1_ORI_R0_R0_4 13654500
+DEFINE P1_ORI_R0_R0_1 13651500
+DEFINE P1_ADD_R0_R0_R3 3305D500
+DEFINE P1_ADD_R2_R2_R0 3306A600
+DEFINE P1_ADD_R2_R2_R1 3306B600
+DEFINE P1_SUB_R3_R3_R0 B386A640
+DEFINE P1_BEQ_R0_R6 6314950067000F00
+DEFINE P1_BEQ_R2_R6 6314960067000F00
+DEFINE P1_BEQ_R3_R1 6394B60067000F00
+DEFINE P1_BEQ_R3_R6 6394960067000F00
+DEFINE P1_BEQ_R7_R1 6314B90067000F00
+DEFINE P1_BNE_R0_R1 6304B50067000F00
+DEFINE P1_BNE_R0_R6 6304950067000F00
+DEFINE P1_BNE_R0_R7 6304250167000F00
+DEFINE P1_BNE_R6_R3 6384D40067000F00
+DEFINE P1_LB_R0_R1_0 03C50500
+DEFINE P1_LB_R2_R6_0 03C60400
+DEFINE P1_LB_R7_R2_0 03490600
+DEFINE P1_LD_R0_R2_0 03350600
+DEFINE P1_LD_R0_R3_24 03B58601
+DEFINE P1_LD_R1_R3_24 83B58601
+DEFINE P1_LD_R3_R2_0 83360600
+DEFINE P1_LD_R6_R1_0 83B40500
+DEFINE P1_LD_R6_R3_8 83B48600
+DEFINE P1_LD_R7_R3_16 03B90601
+DEFINE P1_SB_R1_R0_7 A303B500
+DEFINE P1_SB_R2_R3_0 2380C600
+DEFINE P1_ST_R0_R2_0 2330A600
+DEFINE P1_ST_R0_R3_24 23BCA600
+DEFINE P1_ST_R0_R4_0 2330AA00
+DEFINE P1_ST_R6_R0_8 23349500
+DEFINE P1_ST_R6_R3_8 23B49600
+DEFINE P1_ST_R7_R0_0 23302501
+DEFINE P1_ST_R7_R0_16 23382501
+DEFINE P1_ST_R7_R3_16 23B82601
+
+## ---- Seed-Lisp step 4 extensions (tranche 10): reader + display --
+DEFINE P1_MOV_R1_R0 93050500
+DEFINE P1_MOV_R1_R2 93050600
+DEFINE P1_MOV_R1_R7 93050900
+DEFINE P1_MOV_R2_R1 13860500
+DEFINE P1_MOV_R6_R2 93040600
+DEFINE P1_MOV_R7_R1 13890500
+DEFINE P1_ADDI_R0_R0_NEG1 1305F5FF
+DEFINE P1_ADDI_R0_R0_NEG48 130505FD
+DEFINE P1_ADDI_R1_R1_48 93850503
+DEFINE P1_ADDI_R1_R1_NEG1 9385F5FF
+DEFINE P1_ADDI_R2_R2_8 13068600
+DEFINE P1_ADDI_R2_R2_NEG5 1306B6FF
+DEFINE P1_ADDI_R6_R6_NEG1 9384F4FF
+DEFINE P1_SARI_R1_R1_3 93D53540
+DEFINE P1_SHLI_R0_R6_3 13953400
+DEFINE P1_SHLI_R1_R6_3 93953400
+DEFINE P1_SHLI_R2_R6_1 13961400
+DEFINE P1_SHLI_R3_R3_16 93960601
+DEFINE P1_SHRI_R3_R3_16 93D60601
+DEFINE P1_ADD_R6_R1_R2 B384C500
+DEFINE P1_ADD_R6_R6_R0 B384A400
+DEFINE P1_ADD_R7_R1_R2 3389C500
+DEFINE P1_SUB_R2_R1_R6 33869540
+DEFINE P1_SUB_R3_R1_R6 B3869540
+DEFINE P1_REM_R1_R1_R2 B3E5C502
+DEFINE P1_BEQ_R0_R1 6314B50067000F00
+DEFINE P1_BEQ_R1_R2 6394C50067000F00
+DEFINE P1_BEQ_R1_R3 6394D50067000F00
+DEFINE P1_BEQ_R2_R1 6314B60067000F00
+DEFINE P1_BEQ_R6_R1 6394B40067000F00
+DEFINE P1_BNE_R7_R1 6304B90067000F00
+DEFINE P1_LB_R0_R2_0 03450600
+DEFINE P1_LD_R2_R1_0 03B60500
+DEFINE P1_LD_R2_R2_0 03360600
+DEFINE P1_SB_R1_R2_0 2300B600
+DEFINE P1_SB_R1_R6_0 2380B400
+DEFINE P1_ST_R0_R3_8 23B4A600
+DEFINE P1_ST_R2_R1_0 23B0C500
+DEFINE P1_ST_R2_R3_24 23BCC600