Implementation of the UM-32 "Universal Machine" as described by the Cult of the Bound Variable

UM-32 "Universal Machine"#

An implementation of the UM-32 "Universal Machine" as described by the Cult of the Bound Variable.

Usage#

Run the benchmark:

; cargo run --release -- files/sandmark.umz

um also features a rudimentary assembler, with an assembly language loosely modelled on ARM assembly.

files/hello-world.asm:

;
; hello-world.asm
;
; Prints "Hello, world!" to the stdout.
;
message:
    .wstr "Hello, world!\n"

    adr r1, message
    adr r4, loop
    mov r3, 1
loop:
    ldr r2, [r0, r1]
    adr r6, next
    adr r7, end
    mov r7, r6, r2
    jmp [r0, r7]
next:
    out r2
    add r1, r3
    jmp [r0, r4]

end:
    halt

To assemble and run, enable the asm feature with cargo:

; cargo run --features asm -- files/hello-world.asm