home *** CD-ROM | disk | FTP | other *** search
/ The AGA Experience 2 / agavol2.iso / software / diskmags / theword / theword9 / files_1 / 02-ansi.txt / 02-ansi.txt
Text File  |  1996-01-17  |  8KB  |  172 lines

  1. |1-Ansi console control sequences
  2.  
  3.  
  4.  
  5. Console Command                                   |Sequence of Character
  6.                                                   |(in Hexadecimal Form)
  7. --------------------------------------------------+---------------------
  8. BELL                                              | 07
  9. (Flash the display - do an Intuition              |
  10.  DisplayBeep())                                   |
  11.                                                   |
  12. BACKSPACE                                         | 08
  13. (move left one column)                            |
  14.                                                   |
  15. HORIZONTAL TAB                                    | 09
  16. (move right one tab stop)                         |
  17.                                                   |
  18. LINEFEED                                          | 0A
  19. (move down one text line as specified by the mode |
  20.  function)                                        |
  21.                                                   |
  22. VERTICAL TAB                                      | 0B
  23. (move up one text line)                           |
  24.                                                   |
  25. FORMFEED                                          | 0C
  26. (clear the console's window)                      |
  27.                                                   |
  28. CARRIAGE RETURN                                   | 0D
  29. (move to first column)                            |
  30.                                                   |
  31. SHIFT IN                                          | 0E
  32. (undo SHIFT OUT)                                  |
  33.                                                   |
  34. SHIFT OUT                                         | 0F
  35. (set MSB of each character before displaying)     |
  36.                                                   |
  37. ESC                                               | 1B
  38. (escape; can be part of the control sequence      |
  39.  introducer)                                      |
  40.                                                   |
  41. INDEX                                             | 84
  42. (move the active position down one line)          |
  43.                                                   |
  44. NEXT LINE                                         | 85
  45. (go to the beginng of the next line)              |
  46.                                                   |
  47. HORIZONTAL TABULATION SET                         | 88
  48. (set a tab at the active cursor position)         |
  49.                                                   |
  50. REVERSE INDEX                                     | 8D
  51. (move the active position up one line)            |
  52.                                                   |
  53. CSI                                               | 9B
  54. (control sequence introducer)                     |
  55.                                                   |
  56. RESET TO INITIAL STATE                            | 1B 63
  57.                                                   |
  58. INSERT [N] CHARACTERS                             | 9B [N] 40
  59. (insert one or more spaces, shifting the          |
  60.  remainder of the line to the right)              |
  61.                                                   |
  62. CURSOR UP [N] CHARACTER POSITIONS                 | 9B [N] 41
  63. (default = 1)                                     |
  64.                                                   |
  65. CURSOR DOWN [N] CHARACTER POSITIONS               | 9B [N] 42
  66. (default = 1)                                     |
  67.                                                   |
  68. CURSOR FORWARD [N] CHARACTER POSITIONS            | 9B [N] 43
  69. (default = 1)                                     |
  70.                                                   |
  71. CURSOR BACKWARD [N] CHARACTER POSITIONS           | 9B [N] 44
  72. (default = 1)                                     |
  73.                                                   |
  74. CURSOR NEXT LINE [N]                              | 9B [N] 45
  75. (to column 1)                                     |
  76.                                                   |
  77. CURSOR PRECEDING LINE [N]                         | 9B [N] 46
  78. (to column 1)                                     |
  79.                                                   |
  80. CURSOR POSITION                                   | 9B [N] [3B M] 48
  81. (when N is roe, M is column, and semicolon ($3B)  |
  82.  must be present as a separator, or if row is     |
  83.  left out, so the console device can tell that    |
  84.  number after the semicolon actually represents   |
  85.  the column number)                               |
  86.                                                   |
  87. CURSOR HORIZONTAL TABULATION                      | 9B [N] 49
  88. (move cursor forward to Nth tab position)         |
  89.                                                   |
  90. ERASE IN DISPLAY                                  | 9B 4A
  91. (erase from cursor position to end of display)    |
  92.                                                   |
  93. ERASE IN LINE                                     | 9B 4B
  94. (erase from cursor position to end of line)       |
  95.                                                   |
  96. INSERT LINE                                       | 9B 4C
  97. (above the line containing the cursor)            |
  98.                                                   |
  99. DELETE LINE                                       | 9B 4D
  100. (remove current line, move all lines up one       |
  101.  position to fill gap, blank bottom line)         |
  102.                                                   |
  103. DELETE CHARACTER [N]                              | 9B [N] 50
  104. (that cursor is sitting on and to the right if    |
  105.  [N] is specified)                                |
  106.                                                   |
  107. SCROLL UP [N] LINES                               | 9B [N] 53
  108. (Remove line(s) from top of window, move all      |
  109.  other lines up, blanks [N] bottom lines)         |
  110.                                                   |
  111. SCROLL DOWN [N] LINES                             | 9B [N] 54
  112. (Remove line(s) from bottom of window, move all   |
  113.  other lines down, blanks [N] top lines)          |
  114.                                                   |
  115. CURSOR TABULATOR CONTROL                          | 9B [N] 57
  116. (where N = 0 set tab, 2 = clear tab, 5 = clear    |
  117.  all tabs.)                                       |
  118.                                                   |
  119. CURSOR BACKWARD TABULATION                        | 9B [N] 5A
  120. (move cursor backward to Nth tab position)        |
  121.                                                   |
  122. SET LINEFEED MODE                                 | 9B 32 30 68
  123. (cause LINEFEED to respond as RETURN-LINEFEED)    |
  124.                                                   |
  125. RESET NEWLINE MODE                                | 9B 32 30 6C
  126. (cause LINEFEED to respond only LINEFEED)         |
  127.                                                   |
  128. SELECT GRAPHIC RENDITION                          | 9B N 3B 3N 3B 4N 6D
  129. (select text style, character color, character    |
  130.  cell color)                                      |
  131.                                                   |
  132.  
  133. Any  number  of  parameters,  in any order, are valid for SELECT GRAPHIC
  134. RENDITION.  They are separated by semicolons.
  135.  
  136. There are the following parameters for SELECT GRAPHIC RENDITION:
  137.  
  138. <text style>
  139.  
  140.      0   Plain text
  141.      1   Boldface
  142.      2   faint (secondary colors)
  143.      3   Italic
  144.      4   Underscore
  145.      7   Reversed character / cell colors
  146.      8   Concealed mode
  147.  
  148. <character color>
  149.  
  150.      30-37   System colors 0-7 for character color.
  151.      39      Reset to default character color
  152.      Transmitted as two ASCII characters.
  153.  
  154. <character cell color>
  155.  
  156.      40-47   System colors 0-7 for character cell color.
  157.      39      Reset to default character color
  158.      Transmitted as two ASCII characters.
  159.  
  160. Here  an example, how to select bold face, with color 3 as the character
  161. color, and color 0 as the character cell color, send the hex sequence:
  162.  
  163.      9B 31 3B 33 33 3B 34 30 6D
  164.  
  165. representing the ASCII sequnce:
  166.  
  167.      <CSI>1;33;40m
  168.  
  169. For the CSI Code ($9B) you can also use the Code $1B $5B (<ESC>[).
  170.  
  171. End
  172.