File:  [gforth] / gforth / vt100key.fs
Revision 1.1: download - view: text, annotated - select for diffs
Thu Oct 27 16:32:25 1994 UTC (25 years ago) by pazsan
Branches: MAIN
CVS tags: HEAD
Added f.s
Speeded up history backward search
Fixed Bug in >float (1e is a float, "   <float>   " is, too)
Added vt100 cursor key support (vt100key.fs)

\ MS-DOS key interpreter                               17oct94py

Create translate $100 allot
translate $100 erase

: trans:  char translate + c! ;

: vt100-decode ( max span addr pos1 -- max span addr pos2 flag )
  key '[ = IF    key translate + c@ dup IF  decode  THEN
           ELSE  0  THEN ;

ctrl B trans: D
ctrl F trans: C
ctrl P trans: A
ctrl N trans: B

' vt100-decode  ctrlkeys $1B cells + !

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>