commit 8de854258970183eae63c3fe14bacf727a9e89c2
parent 32430e753f8f18cf95533d8cfc6057d2b3a213a1
Author: Ryan Sepassi <rsepassi@gmail.com>
Date: Mon, 4 May 2026 08:35:24 -0700
README: align pseudocode with bootN.sh stages
Group the chain by boot{0,1,2,3}.sh, surface hex2pp (built in boot1
alongside m1pp and used downstream), and link to docs/HEX2pp.md.
Diffstat:
1 file changed, 17 insertions(+), 12 deletions(-)
diff --git a/README.md b/README.md
@@ -1,32 +1,36 @@
# boot2, another bootstrap path
```
-;; Bootstrap from seed
+;; ── boot0.sh ── Bootstrap from seed ──────────────────────────────────
(define hex0 (hex0-seed hex0.hex0))
(define hex1 (hex0 hex1.hex0))
(define hex2 (hex1 hex2.hex1))
(define catm (hex2 catm.hex2))
(define M0 (hex2 (catm ELF.hex2 M0.hex2)))
-;; Compile+Link for arch-specific M1 source
+;; ── boot1.sh ── Self-host m1pp + hex2pp ──────────────────────────────
+;; Compile+Link for arch-specific M1 source.
(defn exe (M1-src) (hex2 (catm ELF.hex2 (M0 M1-src))))
;; P1 — portable pseudo-ISA at the M1 level.
-;; P1A.M1 is the arch-specific backend
-;; m1pp is itself a P1 program.
-(define m1pp (exe (catm P1A.M1 m1pp.P1)))
+;; P1A.M1 is the arch-specific backend.
+;; m1pp and hex2pp are themselves P1 programs; after this stage they
+;; replace M0 + hex2 for everything downstream.
+(define m1pp (exe (catm P1A.M1 m1pp.P1)))
+(define hex2pp (exe (catm P1A.M1 hex2pp.P1)))
+;; ── boot2.sh ── Scheme ───────────────────────────────────────────────
;; P1pp — P1 rewritten with m1pp macros. Assemble any P1pp source via m1pp.
-;; P1A.M1pp is the arch-specific backend, now rewritten to use M1pp
-;; P1.M1pp is the arch-agnostic interface
-;; P1pp.P1pp is "libp1pp", P1pp's standard library, niceties and utilities for
-;; programming in P1pp
-(defn ppexe (src) (exe (m1pp (catm P1A.M1pp P1.M1pp P1pp.P1pp src))))
+;; P1A.M1pp is the arch-specific backend, rewritten to use M1pp.
+;; P1.M1pp is the arch-agnostic interface.
+;; P1pp.P1pp is "libp1pp", P1pp's standard library, niceties and utilities
+;; for programming in P1pp.
+(defn ppexe (src)
+ (hex2pp (catm ELF.hex2 (m1pp (catm P1A.M1pp P1.M1pp P1pp.P1pp src)))))
-;; To Scheme!
(define scheme (ppexe scheme1.P1pp))
-;; And finally C
+;; ── boot3.sh ── C ────────────────────────────────────────────────────
(defn scc (C-src) (ppexe (scheme cc.scm C-src)))
(define tcc0 (scc tcc.c)) ;; compiler: scheme cc.scm
(define tcc1 (tcc0 tcc.c)) ;; compiler: scheme-compiled tcc
@@ -35,6 +39,7 @@
* P1: [docs/P1.md](docs/P1.md.html)
* M1pp: [docs/M1PP.md](docs/M1PP.md.html)
+* hex2pp: [docs/HEX2pp.md](docs/HEX2pp.md.html)
* P1PP: [docs/LIBP1PP.md](docs/LIBP1PP.md.html), [P1/P1.M1pp](P1/P1.M1pp.html), [P1/P1pp.P1pp](P1/P1pp.P1pp.html)
* Scheme: [docs/SCHEME1.md](docs/SCHEME1.md.html), [scheme1/scheme1.P1pp](scheme1/scheme1.P1pp.html)
* C: [docs/CC.md](docs/CC.md.html), [cc/cc.scm](cc/cc.scm.html)