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