How siraben/zkeme80 works
Key Components to Include:
Core System Architecture
• Create three main layers in a vertical stack:
a. Hardware Layer (TI-84+ Calculator)
b. Low-Level System Layer (Z80 Assembly)
c. Forth Environment Layer
Build System Components
• Build pipeline with these components:
a. Scheme-based Assembler (assembler.scm)
b. OS Source Files
c. Build Process (Makefile/Nix)
d. Output ROM
Main System Components
• Assembler System
• Pattern Matching Engine
• Two-Pass Assembly Process
• Operating System Core
• Boot System (boot.scm, boot.fs)
• Hardware Interface Layer
• (display.scm)
• Keyboard (keyboard.scm)
• Flash Memory (flash.scm)
• Interrupts (interrupt.scm)
• Forth Environment
• Core Forth Words (forth.scm)
• Extended Words (words/*.fs)
• Text Processing (text.scm)
• Build-time flow:
• Scheme source → Assembler → Binary ROM
• Runtime flow:
• Hardware interrupts → OS handlers
• Keyboard input → Forth interpreter
• Forth commands → Display output
Important Relationships to Highlight
• Two-pass assembly process
• Bootstrap sequence (flash1-5)
• Forth word hierarchy
• Hardware abstraction layers
Additional Elements
• Version/build information
• Dependencies (Guile Scheme)
• Extension points for custom Forth words
Special Considerations:
Test components and their interaction
Level of Detail:
• Keep hardware details at a high level
• Interaction between assembly and Forth layers
• Detail the build process components
• Clear separation between core OS and user-extensible parts
Remember to include notes about:
• The ANS Forth standard compliance
• Extension mechanisms
• Test suite integration
• Build system requirements (Guile/Nix)
This will provide a comprehensive view of both the build-time and runtime architecture while maintaining clarity about the system's unique features and design choices.