rpi: add "to" words and fix broken lblimmwr
Change CALLSZ to DOESSZ
rpi: local vars and does words
Dusk OS is a 32-bit Forth and big brother to Collapse OS. Its primary purpose is to be maximally useful during the first stage of civilizational collapse, that is, when we can't produce modern computers anymore but that there's still many modern computers still around.
It does so by aggressively prioritizing simplicity at the cost of unorthodox constraints, while also aiming to make power users happy.
Dusk OS innovates by having an ["almost C" compiler][duskcc] allowing it to piggy-back on UNIX C code, through a modest porting effort, to reach its goals and stay true to its design constraints with a minimal effort.
This is Dusk OS' source code and the rest of the README assumes that you want to run it. To read more about why this OS exists, see its website.
Dusk is designed to run on bare metal and to build itself from itself. However,
it's also possible to build Dusk from any POSIX platform using Dusk's C VM from
posix/vm.c. This VM implements a Forth that can interpret the whole of Dusk's
Forth code, but this VM is CPU-agnostic and has its own simplistic bytecode.
That is enough to generate bare metal images for any of its target platforms, so that's why it exists. To build this VM, you need:
make will yield a
./dusk binary which if opened, provides an
Documentation lives in
fs/doc. You can begin with doc/index. Type
bye to quit.
Dusk OS expects a non-canonical raw input. With a regular TTY, your input will be buffered and echoed twice and reads to it will be blocking. We don't want that. To avoid that, you can invoke it like this:
(stty -icanon -echo min 0; ./dusk; stty icanon echo)
make run does this for you.
Running Dusk under the POSIX VM is fine, but severly limited: the filesystem is read-only and there is no Grid (text UI system) or Screen (graphical system).
To see a fully-featured Dusk, it's better to run it on an actual machine or, if
you're in a hurry, under QEMU. You can do the latter with
To deploy Dusk on a real machine, it's a bit more involving and you should read
Dusk OS on the PC has graphical capabilities as well as varvara
bindings for it. If you have QEMU installed, you can try a few little things on
it. First, start the QEMU VM with
make pcrun. Then, enter this:
tests/manual/uxn/sprite.tal(a copy of the official
You now have it running. There is also a mouse cursor that you can move around. Press Escape to return to prompt. You can try the same thing with: