all repos — xyw @ f789e941e1f994ca076b6e14f1fafee9273850e2

A minimal virtual machine and assembler for terminals.

examples/factorial.xyw

 1
 2
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
; main program
$5 fact JSRw
$0 system.state STBw

; a8 --
.label fact
  $1 EQU fact.end JCNw
  INC MUL 
  fact JMPw
  .label fact.end
    ; TODO: print
    RTS