← board

Terminal ANSI library

Goal

A small Terminal / AnsiTerm unit for console rendering primitives: foreground/background colors, truecolor escape sequences, text attributes, cursor movement, clear-screen, and optional terminal-size query.

The demo apps should call library helpers, not concatenate raw escape strings in their own engines.

Surface sketch

Acceptance

Notes

RESOLVED 2026-06-21 (Track B)

Implemented lib/rtl/ansiterm.pas defining truecolor and standard ANSI sequence formatting functions. Added test/lib_ansiterm.pas unit test to verify exact escape sequences, avoiding compile-time constant-folding compiler bugs via runtime variable checks. Added lib_ansiterm execution to the Makefile lib-test suite.

Resolved-in: 2d7e65c (finalizing commit)