Implementation of the UM-32 "Universal Machine" as described by the Cult of the Bound Variable
at main 24 lines 313 B view raw
1; 2; hello-world.asm 3; 4; Prints "Hello, world!" to the stdout. 5; 6message: 7 .wstr "Hello, world!\n" 8 9 adr r1, message 10 adr r4, loop 11 mov r3, 1 12loop: 13 ldr r2, [r0, r1] 14 adr r6, next 15 adr r7, end 16 mov r7, r6, r2 17 jmp [r0, r7] 18next: 19 out r2 20 add r1, r3 21 jmp [r0, r4] 22 23end: 24 halt