sourcelibs/Hex1000/demos/serial.xtl

1⍝!/usr/bin/env xetal 2⍝ HEX1000 on a board, in X_eTaL: the machine and the board's glue typed 3⍝ at over the serial line, each frame the glue sends as a line of text, 4⍝ as a terminal attached to the board shows it. Run with 5⍝ "just demo-lib Hex1000 serial". 6ʰˣ⁼u̲se< "Hex1000" 7ᵘs̲how ← { (label, text, n) → 8 p̲rint! "typed: " c̲at label 9 ʰˣs̲creen ʰˣCalcRom ʰˣs̲erial (text, n) 10} 11ᵘs̲how ("12+34=", "12+34=", 2000) 12ᵘs̲how ("C0DE+BEEF=", "C0DE+BEEF=", 6000) 13ᵘs̲how ("a*b then Enter", "a*b" c̲at ⎕U̲CHAR 13, 3000)