aboutsummaryrefslogtreecommitdiff
path: root/amforth-6.5/common/lib/hardware/xonxoff.frt
blob: d6a59d982dbfa69ae734b37a76e87f6aa5b21a23 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
\
\ enrich the serial IO with XON/XOFF
\  this is not a complete and fool-proof 
\

\ #requires is.frt

$11 constant XON
$13 constant XOFF

\ original refill
variable xt-refill

: refill-xon
  XON emit
  xt-refill @ execute
  XOFF emit
;

: +xonxoff
  ['] refill defer@ xt-refill !
  ['] refill-xon is refill 
;

: -xonxoff
  xt-refill @ is refill
;