home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / STARLET / GENIENEC / VT100ESC.TXT < prev    next >
Text File  |  2000-06-30  |  6KB  |  133 lines

  1. Selected ANSI (VT100) ESCape codes
  2. ----------------------------------
  3. by Rob Elliott
  4.    Illini Data Fido 115/100
  5.  
  6. These are ESCape codes that will be of most use to people designing VT100
  7. graphics displays.  Not all of the codes are listed, just the most useful
  8. ones.  
  9.  
  10.  
  11. What it does                                             The code
  12. ------------                              ESC = 27d      --------
  13. Cursor up Pn lines                            `--------> ESC[PnA
  14. Cursor down Pn lines                                     ESC[PnB
  15. Cursor forward (right) Pn lines                          ESC[PnC
  16. Cursor backward (left) Pn lines                          ESC[PnD
  17. Cursor sent to line Pl and column Pc                     ESC[Pl;PcH or 
  18.                                                          ESC[Pl;Pcf
  19. Cursor position saved                                    ESC7
  20. Cursor position restored                                 ESC8
  21.  
  22. Change current line to double-height Top half            ESC#3
  23. Change current line to double-height Bottom half         ESC#4
  24. Change current line to normal size                       ESC#5
  25. Change current line to double-width                      ESC#6
  26.  
  27. Character Attributes                             ESC[Ps;Ps;Ps;...Psm
  28.  
  29.                   Ps =  0 or none    All attributes off
  30.                         1            Bold on
  31.                         2            Underscore on
  32.                         5            Blink on
  33.                         7            Reverse video on
  34.  
  35. Erase from cursor to end of line                         ESC[K
  36. Erase from cursor to end of screen                       ESC[J
  37. Erase from beginning of line to cursor                   ESC[1K
  38. Erase from beginning of screen to cursor                 ESC[1J
  39. Erase entire line containing cursor                      ESC[2K
  40. Erase entire screen                                      ESC[2J
  41.  
  42. United Kingdom Character Set                             ESC(A 
  43. United States (ASCII) Character Set                      ESC(B
  44. Special graphics set (line drawing set)                  ESC(0
  45.  
  46. Set scrolling from top Pt to bottom Pb                   ESC[Pt;Pb
  47. Set VT52 mode                                            ESC[?2l
  48. Set 132 column mode                                      ESC[?3h
  49. Set 80 column mode                                       ESC[?3l
  50. Set smooth scroll                                        ESC[?4h
  51. Set jump scroll                                          ESC[?4l
  52. Set reverse screen (light background)                    ESC[?5h
  53. Set normal screen (dark background)                      ESC[?5l
  54.  
  55.  
  56. Line Drawing Character Set
  57. --------------------------
  58. When the line drawing set is entered, via ESC(0, 
  59.  
  60. -This-               -will show-
  61.   \                 Diamond
  62.   a                 Checkerboard
  63.   e                 Degree sign
  64.   g                 Plus/minus sign
  65.   j                 Lower-right box corner
  66.   k                 Upper-right box corner
  67.   l                 Upper-left box corner
  68.   m                 Lower-left box corner
  69.   n                 Intersecting lines
  70.   o                 Horizontal line - Scan 1 (bottommost)
  71.   p                 Horizontal line - Scan 3
  72.   q                 Horizontal line - Scan 5 (use this to match box corners)
  73.   r                 Horizontal line - Scan 7
  74.   s                 Horizontal line - Scan 9 (topmost)
  75.   t                 Left "T"
  76.   u                 Right "T"
  77.   v                 Top "T" (looks normal)
  78.   w                 Bottom "T" (upside down)
  79.   x                 Vertical bar
  80.   y                 Less than or equal to sign
  81.   z                 Greater than or equal to sign
  82.   |                 Not equal to
  83.   (                 Pi sign
  84.   )                 UK pound sign
  85.   ~                 Centered dot
  86.  
  87.         Window:        Line Sloping up:       A normal box:
  88.          lqwql                                        
  89.          x x x                                 lqqqqqqqqk
  90.          tqnqu              opqrs              x        x
  91.          x x x                                 mqqqqqqqqj
  92.          mqvqj
  93.  
  94.  
  95. Notes
  96. -----
  97. I highly recommend including the following sequence at the beginning of each
  98. ANSI file:
  99.  
  100.                ESC[?2lESC<  
  101.  
  102. This makes the computer jump in and out of VT52 mode.  This resets all the
  103. character sets to G0 designator (especially important) and everything else.
  104. Using this will make sure the character sets show up only when they are
  105. supposed to (no graphics characters when it's a text screen and vice versa).
  106.  
  107.  
  108. On IBMs
  109. -------
  110. There are several ways to view these on an IBM PC.  To have ANSI codes work
  111. locally (just TYPE the files and the displays appear) you can do several
  112. things.
  113.  
  114. 1.  Assign ANSI.SYS (free with PC-DOS) as a device driver.  Do this by putting
  115.     this line in CONFIG.SYS:
  116.  
  117.         DEVICE=ANSI.SYS
  118.  
  119. 2.  Download Fansi-Console (FCONSOLE) from any BBS that has it available,
  120.     and install that as specified in the instructions.
  121.  
  122. To view the codes remotely, it's best to get a VT100 emulating terminal
  123. program.  Many commercial programs have this option.  PC-VT, in the public
  124. domain, was written explicitly for this emulation.  CrossTalk XVI, SmartCom II,
  125. and PTel are some commercial programs with this support.
  126.  
  127.  
  128. So...
  129. -----
  130. Send any questions or comments to Illini Data Fido 115/110.
  131. If you call direct, make sure you're using a VT100 emulator!
  132.  
  133.