A minimal modal text editor for the COR24 ISA — gap buffer, 3-line display, edit/command modes, UART I/O. Written in C, built with the tc24r cross-compiler, and run on the cor24-run emulator. A dogfooding project for the full COR24 toolchain stack.
just build # Compile src/swye.c -> build/swye.s
just run # Interactive terminal mode
just test # Run reg-rs test suite (7 tests)- Edit mode — type to insert, Enter for newline, Backspace to delete, Esc for command mode
- Command mode — type commands (
right,left,del,insert foo,goto 42), with optional repeat count (8 right), Enter to execute, Ctrl-] to cancel
| Layer | File | Purpose |
|---|---|---|
| Editor | src/swye.c |
Main loop, mode dispatch, rendering |
| Buffer | src/buffer.c |
Gap buffer: insert, delete, cursor movement |
| Command | src/command.c |
Parse and execute [count] command [args] |
| Render | src/render.c |
3-line display: TEXT, MODE, CMD lines |
| Platform | src/platform_uart.c |
COR24 UART MMIO (0xFF0100/0xFF0101) |
| Tool | Purpose |
|---|---|
| tc24r | C cross-compiler (C -> COR24 assembly) |
| cor24-run | COR24 assembler + emulator |
| reg-rs | Regression test runner (golden output baselines) |
Build pipeline: src/*.c --tc24r--> build/swye.s --cor24-run--> emulate on COR24
| Doc | Description |
|---|---|
| PRD | Product requirements and goals |
| Design | Detailed design: commands, keybindings, display model |
| Architecture | Component structure and data flow |
| Process | Build and development workflow |
| Tools | Toolchain setup and usage |
| Results | Test results and validation |
All COR24 repos live under sw-embed.
- sw-cor24-x-tinyc — tc24r C cross-compiler (Rust)
- sw-cor24-emulator — COR24 assembler and emulator (Rust)
- sw-cor24-macrolisp — Tiny Macro Lisp (reference C project)
- sw-cor24-plsw — PL/SW compiler (reference C project)
- sw-cor24-forth, sw-cor24-apl, sw-cor24-basic, sw-cor24-pascal
Copyright (C) 2026 Michael A. Wright