main soggy/cotton / docs / cotton.1
COTTON(1) General Commands Manual COTTON(1)

cottona tiny stack machine for the cot programming language

cotton file.cot

cotton is a small stack machine for the cot(5) programming language (inspired by Lua, Forth and Uxntal) written in C99

cotton's internals consist of 7 files (as of cotton 0.1) which are:

main.c
This file reads each .cot file line by line and then hands each read line to the loom, then, it returns the results
This file handles the core operations of cotton: initializing state, and, pushing and popping the stack
This file has the Cotton struct, contains the cog types, opcode definitions and the specs for Cotton
This file has the cogs, so, the builtin and runtime keycogs
This file declares the keycogs so they can be used elsewhere inside of Cotton
This file is for the compiler and the runtime for Cotton
This file is where cotton_compile and cotton_run are declared to be used in loom.c

as of now it only compiles cot programs, but, i do intend to add the option to compile cot programs to uxntal in the future :P

cot(5)

September 2026 cotton 0.1