100 REM PURPOSE:  CLS, LOCATE, COLOR FOR ANSI/VT100
110 REM  AUTHOR:  HOWARD WULF, AF5NE
120 REM    DATE:  2015-01-25
130 REM
140 REM ---------------------------------------
150 REM In this example, ESC codes are used to
160 REM control the terminal display.
170 REM
180 OPTION TERMINAL ANSI
300 COLOR 7, 4 ' WHITE ON BLUE
310 CLS
325 REM DRAW A BOX
330 FOR R = 1 TO 20
332   LOCATE R, 5
340   SELECT CASE R
350   CASE 1
360     PRINT "+";STRING$(40,"-");"+"
362   CASE 20
364     PRINT "+";STRING$(40,"-");"+"
370   CASE ELSE
380     PRINT "|";STRING$(40," ");"|"
390   END SELECT
400 NEXT R
410 REM WRITE SOME TEXT
420 LOCATE 5, 10
425 COLOR 1, 3 ' Red on Yellow
430 PRINT "This is RED on YELLOW"
500 REM COLOR MAP
510 FOR F = 30 TO 37
520   FOR B = 40 TO 47
530      LOCATE F - 27, B - 3
540      COLOR F-30,B-40
550      PRINT "X"
560   NEXT B
570 NEXT F
600 REM INPUT WITH DIFFERENT COLOR
610 LOCATE 15, 10
620 COLOR 4, 5 ' Blue on Magenta
630 PRINT "TYPE SOMETHING";
640 COLOR 7, 0 ' White on Black
650 INPUT A$
700 REM RESET TERMINAL
710 COLOR 2, 0 ' Green on Black
720 CLS
999 END
