Aldos manual

The machine on one page

ortfero

What the machine is made of, how it comes up, how loom lays out its windows, and the commands that operate it, which help prints at the prompt too. The keys are in the keys codex, the hardware in the aldan codex and the instruction set in the riscv codex.

Architecture

The machine is built in layers, lowest first.

LayerWhat it is
MachineA 64-bit RISC-V computer with 16 MB of memory: a screen, a keyboard, a disk, sound, a network and a host directory
FirmwareThe boot ROM. It owns every driver and publishes one call table
AlmacThe resident binary, and the only one: the language, its compiler and the emergency prompt
AldosThe task, memory, volume, file and service managers, written in almac
CoreThe library every program draws on
ProgramsThe applications, loom among them

Drives

PathWhat it is
/aThe boot disk, read-only
/bThe directory aldan in the host's home directory
PathWhat it holds
/a/almac.binThe resident binary
/a/rc.almThe start-up script
/a/rcThe module the commands come from
/a/coreThe core library
/a/aldosThe operating-system modules
/a/modulesThe applications
/a/codexThe documents, this one among them
/a/samplesPictures, tunes and recordings

Drive /a is the system as it was built, one pack archive on the disk. It is read-only: an update replaces it whole, and a write to it is refused. Keep your own files on /b.

A path that does not begin with a slash is relative to the working directory. A dot is the working directory, two dots its parent.

Boot

A fault in rc.alm is reported as a module, a line and a reason, and leaves the machine at the emergency prompt; loom typed there goes back to the environment.

Loom

Loom is the environment, and the only prompt a working machine shows.

The windows

Every app is a window of its own, with a fiber of its own, so a slow one never holds up another. The display shows one window or two: two halves side by side when it is wide, one when it is narrow (a phone held upright).

The apps

WindowWhat it holds, and the line that opens it
ReplWhat the prompt has said, and the input line; always there
FilesA listing of a directory, up to four: files
EditorA document: edit 'path
ViewerA text file, read only, up to four: view 'path
ReaderA markoff document, up to four: read 'path
PictureOne picture, half or whole: look 'path
DrawingOne plot drawing, half or whole: plot 'path
MusicA tune or a recording: play 'path
JournalWhat the services write: journal
DebuggerA session of the debugger: launch "line"
KeysThe keys codex, at the window's section: f1

Of the picture, the drawing, the music, the journal and the debugger there is one window each: opening another thing in it brings that window up holding it. A codex opens in a reader with help 'name: keys, aldos, aldan, almac, snippets or markoff. The viewer shows any text file as written, a markoff document among them; the reader takes a markoff document and nothing else, and renders it: paragraphs flow to the reading column, tables are drawn with box pieces.

Commands

Whatever is typed at the prompt is almac. A command is a function, called by its name.

> cd '/a/codex
> cp 'aldos_keys.moff, '/b
> edit "/b/my notes"

Files

CommandWhat it does
lsList the working directory
lsd 'pathList a directory
cd 'pathChange the working directory
cd '.Say the working directory
cat 'pathPrint a short text file
touch 'pathCreate an empty file
mkdir 'pathCreate a directory
rmdir 'pathRemove an empty directory
rm 'pathRemove a file or a tree, for good
cp 'a, 'bCopy a file or a tree
mv 'a, 'bMove or rename a file or a tree

Documents

CommandWhat it does
edit 'pathOpen a document in an editor
view 'pathOpen a text file in a viewer
read 'pathOpen a markoff document in a reader
saveWrite the last editor's document
compileCompile the last editor's document
import 'pathCompile a module and bind its names

The machine

CommandWhat it does
helpList these commands
help 'keysThe keys of every pane
help 'aldosThe system and its commands
help 'aldanThe hardware and its registers
help 'riscvThe instruction set
help 'almacThe almac language report
help 'snippetsAlmac by example
memoryWhat the memory pool is doing
servicesList the running services
stop 'nameStop a service
resetRebuild the image from rc.alm
rebootStart the machine again
haltPower the machine off