Codex on the framebuffer platform

Each program below is Codex, turned into Roc by rocemit and built for WebAssembly. Its memory and its devices, a GPU and a keyboard controller, live in the platform's host, and the screen is part of that memory, where a UEFI machine keeps its framebuffer. A program that draws once is run again for every frame, with the clock 100 milliseconds further on each time; one that draws in a loop of its own runs once, and each GPU flush is a frame. Pausing a looping program stops it, and Play starts it again from the beginning.

loading…

Screen

Console

Nothing has run yet.

Roc

What rocemit wrote for this program: its own module first, then a module for each Codex chapter it cites. The last, Mem.roc or Machine.roc, is the platform's: every read and write of memory, and every port, goes through it to the host.