all repos — xyw @ 09909160cf03d85143caee8059e5d650b24658ac

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