Skip to content

Included programs

The shell floppy comes with these programs in /bin. Their source is in crates/wackasm-oc-programs, and they double as examples for writing your own.

program does
cat FILE... prints files
write FILE [TEXT...] writes TEXT to FILE; without TEXT, saves the lines you type until Ctrl+D
dir [PATH] lists a directory with file sizes
pwd prints the current directory
program does
time PROGRAM ARGS... runs a program, then prints its exit status and how long it took
env [NAME=VALUE...] [PROGRAM ARGS...] prints the environment, or runs a program with variables added
lines PROGRAM ARGS... runs a program and numbers the lines of its output

These nest: time lines cat notes.txt works.

These need an internet card.

program does
curl [OPTIONS] URL an HTTP or HTTPS request
nc [-C] [-w SECS] HOST PORT a TCP connection
fetch URL... downloads several URLs at once, showing each one’s status and size; an example of async programs
program does
flash ... writes, backs up or inspects the EEPROM; see Flashing the EEPROM

The floppy also holds the stock BIOS as /bios.wasm, for restoring it.

program does
echo ARGS... prints its arguments
hello [ARGS...] asks your name and greets you; shows argv and stdin
demo the wackasm-opencomputers crate in action: lists components, draws on the screen and waits for a key
gfx [SCENE] a graphics tour: colour, braille, bars and an animation, drawn with the crate’s draw module