Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sw-cor24-yocto-ed

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.

Quick Start

just build          # Compile src/swye.c -> build/swye.s
just run            # Interactive terminal mode
just test           # Run reg-rs test suite (7 tests)

Editor Modes

  • 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

Architecture

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)

Toolchain

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

Documentation

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

Related Projects

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

License

Copyright (C) 2026 Michael A. Wright

About

C-based line editor to run on COR24 ISA HW and emulator via UART to edit in-memory buffers

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages