From dc7f7407e08f54e4a2a3c1d1723b2a7d6959532d Mon Sep 17 00:00:00 2001 From: Moon Flower Date: Wed, 14 Oct 2026 09:09:21 +0330 Subject: docs: archive the frozen stage code as one compressed tarball docs/history kept six stages with a full copy of the project under code/, 3.8 mb of sources duplicated from stage to stage and already superseded. store them as docs/history/code-snapshots.tar.gz, 0.66 mb, and extract one in place to read it. every stage's notes.md stays browsable, and the index says where the code went and how to get it back. the top-level README points at the archive too. its other two links into docs/history, 21-micro and 35-bench, were notes that were never kept and do not resolve; the index now records that. --- docs/history/13-gap-fixes/code/examples/wiring.zc | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 docs/history/13-gap-fixes/code/examples/wiring.zc (limited to 'docs/history/13-gap-fixes/code/examples/wiring.zc') diff --git a/docs/history/13-gap-fixes/code/examples/wiring.zc b/docs/history/13-gap-fixes/code/examples/wiring.zc deleted file mode 100644 index ed30935..0000000 --- a/docs/history/13-gap-fixes/code/examples/wiring.zc +++ /dev/null @@ -1,19 +0,0 @@ -// virtual enhancements: custom opcodes wired into the cpu while compiling. -// the recipes run through the core's optimizer; the jit inlines the result. -enhance popcount(x) micro - "r1 = shr x 1; r1 = and r1 0x55555555; x = sub x r1" - "; r1 = shr x 2; r1 = and r1 0x33333333; x = and x 0x33333333; x = add x r1" - "; r1 = shr x 4; x = add x r1; x = and x 0x0f0f0f0f; x = mul x 0x01010101; x = shr x 24"; -enhance div10(x) micro "x = udiv x 10"; // becomes a multiply-high, no divide -enhance hypot2(a, b) vm { 0 $ * ~ 0 $ * + }; // lifted from vm code -enhance minmax(a, b) -> 2 micro "r2 = min a b; r1 = max a b; r0 = r2"; -let lo, hi; -fn main() -{ - putn(popcount(0xff00ff)); putc(' '); - putn(div10(12345)); putc(' '); - putn(hypot2(3, 4)); putc(' '); - asm { 9 4 minmax hi ! lo ! } - putn(lo); putc('/'); putn(hi); putc(10); - return 0; -} -- cgit v1.2.3