A 32-bit RISC of my own design: emulators, toolchain, COBOL 85, Fortran 77, Forth. amd64 and arm64.
4.4K
SLOW-32 is a 32-bit RISC instruction set of my own design, with everything that goes around one: an assembler, linker and librarian, an LLVM backend, a C compiler that was bootstrapped from Forth and now compiles itself, five emulators, and compilers for COBOL 85, Fortran 77 and Forth. Source: https://github.com/brazilofmux/slow32-public
Every tag is built for amd64 and arm64. The images form a chain; each one contains everything below it.
| tag | what it adds | size |
|---|---|---|
emulator | the four engines (slow32, slow32-fast, slow32-dbt, qemu-system-slow32) and s32run | 14 MB |
base | slow32asm, s32-ld, s32-ar, slow32dump, slow32dis, the runtime library and headers | 14 MB |
toolchain | clang and llc with the SLOW-32 backend, Free Pascal ppcs32, s32cc, s32c++, s32pc | 1.2 GB |
cobol | s32cob, the COBOL 85 compiler and its runtime | 14 MB |
fortran | s32f77, the Fortran 77 compiler and its runtime | 14 MB |
forth | s32forth, the Forth kernel, and s32forthc, the native Forth compiler | 14 MB |
kit | s32kcc, the self-hosted C toolchain running on the emulator, plus built programs (Lua, SQLite, a dBase, a Lisp, a Prolog, a BASIC, ...) | 20 MB |
Sizes are compressed, per architecture.
Compile and run C:
docker run --rm -v "$PWD":/data hurriedreformist/slow32:toolchain s32cc hello.c hello.s32x
docker run --rm -v "$PWD":/data hurriedreformist/slow32:emulator s32run hello.s32x
A Forth session:
docker run --rm -i hurriedreformist/slow32:forth s32forth
COBOL and Fortran, then run the result:
docker run --rm -v "$PWD":/data hurriedreformist/slow32:cobol s32cob -free prog.cbl -o prog.s32x
docker run --rm -v "$PWD":/data hurriedreformist/slow32:fortran s32f77 prog.f -o prog.s32x
docker run --rm -v "$PWD":/data hurriedreformist/slow32:emulator s32run prog.s32x
C through the self-hosted compiler, and Lua on the emulator:
docker run --rm -v "$PWD":/data hurriedreformist/slow32:kit s32kcc hello.c -o hello.s32x
docker run --rm -i hurriedreformist/slow32:kit s32run /opt/slow32/kit/lua.s32x < script.lua
s32run takes --fast, --dbt, --interp or --qemu to pick an engine;
-t traces every instruction on the C++ engines. Programs read and write
/data, so mount your working directory there.
The guest can open a real socket. IPv4 TCP only -- no DNS, no UDP, no Unix
sockets -- through socket, bind, listen, accept, connect, send
and recv, with the host opening the actual socket on the guest's behalf.
Addresses are numeric (127.0.0.1, or htonl(INADDR_LOOPBACK)).
Two SLOW-32 programs talk to each other over loopback rather than through shared memory. The engines agree on it: a socket test runs in the cross-engine differential alongside the rest.
This is a hobby machine, not a product. There is no operating system, and the
C library is the project's own. Networking is IPv4 TCP and nothing else (see
below). The toolchain image is large because it carries a full LLVM build.
MIT, with third-party notices in /opt/slow32/NOTICE inside every image
(Lua, SQLite, David Gay's dtoa). Built from the public repository above.
Content type
Image
Digest
sha256:d8c96ddd5…
Size
16.8 MB
Last updated
about 11 hours ago
docker pull hurriedreformist/slow32:kit