all repos — xyw @ 79672637f5164782bdacb12a66370fe1a211ff58

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 "lib/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 PUTC
    ; Print new line
    NL
    BRK

.label end