all repos — xyw @ 9f4ba1cb0a2a468ccc1f1af4ed7a54cbb10c87c5

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 "_macros.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