all repos — xyw @ 79f1e633e660d676ed207bf5b80e2377db82b144

A minimal virtual machine and assembler for terminals.

examples/print-stdin.xyw

 1
 2
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
.include "devices.xyw" 

; Set on_keypress event handler
print-key terminal.on_keypress STW
; End program
end JMPw

; on_keypress event handler
.label print-key
    ; Print typed character
    terminal.input LDB terminal.output STB
    ; Print new line
    $0A terminal.output STB
    BRK

.label end