all repos — xyw @ 66dc8e0b4f3b24282e2f7769f0d3ce18516bdbe2

A minimal virtual machine and assembler for terminals.

examples/d6.xyw

 1
 2
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
.include "devices.xyw"

; Get random number and calculate modulo 6
system.random LDB $6 DIV POP

; Print result+1 and new line
$31 ADD terminal.output STB
$0A terminal.output STB

; Terminate
$0 system.state STB