\ Requires an ANSI compatible terminal.
\ To get Windows computers to use ANSI mode in their DOS windows,
\ Add this line to "C:\CONFIG.SYS" then reboot.
\ device=c:\windows\command\ansi.sys
\ Copyright 1988 Phil Burk
\ Revised 2001 for pForth
$ 08 constant ASCII_BACKSPACE
$ 7F constant ASCII_DELETE
$ 1B constant ASCII_ESCAPE
$ 01 constant ASCII_CTRL_A
$ 05 constant ASCII_CTRL_E
$ 18 constant ASCII_CTRL_X
: ESC[ ( send ESCAPE and [ )
: CLS ( -- , clear screen )
: TIO.BACKWARDS ( n -- , move cursor backwards )
: TIO.FORWARDS ( n -- , move cursor forwards )
: TIO.ERASE.EOL ( -- , erase to the end of the line )
: BELL ( -- , ring the terminal bell )
: BACKSPACE ( -- , backspace action )
: SHOWKEYS ( -- , show keys pressed in hex )
: AZ ascii z 1+ ascii a DO i emit LOOP ;