Skip to content

Latest commit

 

History

History
99 lines (77 loc) · 6.89 KB

File metadata and controls

99 lines (77 loc) · 6.89 KB

MinZ Report & Documentation Guide

94 reports, 21 docs, 6 READMEs. Here are the ones worth reading.


Architecture & Deep Dives

Report What you'll learn
Round-Trip Deep Dive (EN) How Nanz code becomes Z80 opcodes — full pipeline walkthrough with hex output verification
MIR2 Architecture SSA-based IR design: block params, Cranelift-style, why not LLVM
Pipeline All Stages Source → Parse → HIR → MIR2 → Alloc → Z80 — every transformation explained
Register Allocator Revolution PBQP + contract optimization: how 7 Z80 registers get allocated
Multi-Pass Contracts Bottom-up ABI inference: functions tell callers which registers they want

Showcases & Comparisons

Report What you'll learn
MinZ C89 vs SDCC Same C source, MinZ 81B vs SDCC 179B (−55%). Function-by-function analysis
Nanz Z80 Showcase v2 12 verified examples: abs_diff 6B, swap 1B (bare RET), popcount LUT, SMC sprites
Nanz Real ASM Showcase First showcase with T-state analysis and hand-optimized comparisons
FAT12 MIR2 Comparison Nanz vs C89 at MIR2 level — same functions, instruction-by-instruction

Frontends & Languages

Report What you'll learn
Eight Frontends How 8 languages share one pipeline. Universal assert syntax
PL/M-80 to Z80 Intel's 1970s language compiling through a 2026 IR
ABAP + SQLite + Zork ABAP on Z80, SQLite in MIR2 VM, Zork I running in mze
Lizp Frontend S-expression frontend, cross-language imports between Nanz/Lanz/Lizp/PL-M
ABAP Wasm Parser Embedding a TypeScript parser as Wasm — zero Node.js dependency

Features & Milestones

Report What you'll learn
Tetris + Language Features ZX Spectrum Tetris in 853 LOC Nanz. ptr(), value pipes, inline asm
SMC Parameters Self-modifying code: runtime values baked into instruction immediates
Iterator Chain Fusion .map().filter().forEach() → single DJNZ loop, zero allocation
Arena Allocator Bump allocator with ^Arena pointer receiver, compile-time sizeof
6502 Backend MOS 6502 alive: 35 tests, dual-VM oracle, Apple II/C64/BBC Micro
Nanz Language Sprint Enums, type aliases, module imports, three string types, pipe fusion

Toolchain

Report What you'll learn
MZA Assembler Table-driven Z80 assembler — every opcode from a data table
MZD Disassembler IDA-like analysis with register tracking and ABI inference
MZE Emulator 1335/1335 FUSE tests — 100% Z80 instruction coverage
MZX Spectrum T-state accurate ZX Spectrum emulator with AY sound
ObjC Canvas + Demoscene Cross-language canvas, plasma/diamond/XOR effects, native QBE compilation
VSCode Extension LSP, diagnostics, compile-on-save, DeZog debugging

Filesystem & Applications

Report What you'll learn
FAT12/16 Library 5-channel cross-verification: Nanz writes, gcc/C89/raw verify
FAT16 Support FAT12/16 auto-detection, 16MB volumes, multi-cluster files
TUI Framework Three-level TUI: flat API → OOP UFCS → compile-time metafunctions
Week In Review 253 commits in one week — the complete summary

Bug Analysis & Fixes

Report What you'll learn
Overnight Marathon 12-hour session: C99/C11 features, nested structs, function pointers
Codegen Hardening div/mod, caller-save liveness (−63% PUSH), C89 17/18 OK
BUG-003 Fix ptr[i] in while loop — root cause analysis and fix
DJNZ + Deprecation elimJrToRet eating DJNZ exit RETs, old backends archived

READMEs

Location What it covers
examples/abap/README.md ABAP on Z80 — setup, examples, architecture, why
examples/objc/README.md ObjC plasma/shapes/dynamic — function-by-function explanation
stdlib/tui/README.md TUI framework — three levels, all examples
stdlib/fs/fat12.minz FAT12/16 library source (inline docs)
docs/TUI_Framework_Guide.md Complete TUI guide with metafunctions
docs/Nanz_Language_Book_v5.md 21 chapters + 8 appendices

ADRs (Architecture Decision Records)

ADR Decision
ADR-0006 Register allocator constraints (blocking NC on CP/M)
ADR-0029 Function pointer ABI design
ADR-0030 LIR + WFC + PBQP constraint framework
ADR-0033 LIR pipeline integration
ADR-0034 Unified constraint framework (ISLE+WFC+PBQP)