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
Wrap
Text File
|
1996-01-17
|
8KB
|
172 lines
|1-Ansi console control sequences
Console Command |Sequence of Character
|(in Hexadecimal Form)
--------------------------------------------------+---------------------
BELL | 07
(Flash the display - do an Intuition |
DisplayBeep()) |
|
BACKSPACE | 08
(move left one column) |
|
HORIZONTAL TAB | 09
(move right one tab stop) |
|
LINEFEED | 0A
(move down one text line as specified by the mode |
function) |
|
VERTICAL TAB | 0B
(move up one text line) |
|
FORMFEED | 0C
(clear the console's window) |
|
CARRIAGE RETURN | 0D
(move to first column) |
|
SHIFT IN | 0E
(undo SHIFT OUT) |
|
SHIFT OUT | 0F
(set MSB of each character before displaying) |
|
ESC | 1B
(escape; can be part of the control sequence |
introducer) |
|
INDEX | 84
(move the active position down one line) |
|
NEXT LINE | 85
(go to the beginng of the next line) |
|
HORIZONTAL TABULATION SET | 88
(set a tab at the active cursor position) |
|
REVERSE INDEX | 8D
(move the active position up one line) |
|
CSI | 9B
(control sequence introducer) |
|
RESET TO INITIAL STATE | 1B 63
|
INSERT [N] CHARACTERS | 9B [N] 40
(insert one or more spaces, shifting the |
remainder of the line to the right) |
|
CURSOR UP [N] CHARACTER POSITIONS | 9B [N] 41
(default = 1) |
|
CURSOR DOWN [N] CHARACTER POSITIONS | 9B [N] 42
(default = 1) |
|
CURSOR FORWARD [N] CHARACTER POSITIONS | 9B [N] 43
(default = 1) |
|
CURSOR BACKWARD [N] CHARACTER POSITIONS | 9B [N] 44
(default = 1) |
|
CURSOR NEXT LINE [N] | 9B [N] 45
(to column 1) |
|
CURSOR PRECEDING LINE [N] | 9B [N] 46
(to column 1) |
|
CURSOR POSITION | 9B [N] [3B M] 48
(when N is roe, M is column, and semicolon ($3B) |
must be present as a separator, or if row is |
left out, so the console device can tell that |
number after the semicolon actually represents |
the column number) |
|
CURSOR HORIZONTAL TABULATION | 9B [N] 49
(move cursor forward to Nth tab position) |
|
ERASE IN DISPLAY | 9B 4A
(erase from cursor position to end of display) |
|
ERASE IN LINE | 9B 4B
(erase from cursor position to end of line) |
|
INSERT LINE | 9B 4C
(above the line containing the cursor) |
|
DELETE LINE | 9B 4D
(remove current line, move all lines up one |
position to fill gap, blank bottom line) |
|
DELETE CHARACTER [N] | 9B [N] 50
(that cursor is sitting on and to the right if |
[N] is specified) |
|
SCROLL UP [N] LINES | 9B [N] 53
(Remove line(s) from top of window, move all |
other lines up, blanks [N] bottom lines) |
|
SCROLL DOWN [N] LINES | 9B [N] 54
(Remove line(s) from bottom of window, move all |
other lines down, blanks [N] top lines) |
|
CURSOR TABULATOR CONTROL | 9B [N] 57
(where N = 0 set tab, 2 = clear tab, 5 = clear |
all tabs.) |
|
CURSOR BACKWARD TABULATION | 9B [N] 5A
(move cursor backward to Nth tab position) |
|
SET LINEFEED MODE | 9B 32 30 68
(cause LINEFEED to respond as RETURN-LINEFEED) |
|
RESET NEWLINE MODE | 9B 32 30 6C
(cause LINEFEED to respond only LINEFEED) |
|
SELECT GRAPHIC RENDITION | 9B N 3B 3N 3B 4N 6D
(select text style, character color, character |
cell color) |
|
Any number of parameters, in any order, are valid for SELECT GRAPHIC
RENDITION. They are separated by semicolons.
There are the following parameters for SELECT GRAPHIC RENDITION:
<text style>
0 Plain text
1 Boldface
2 faint (secondary colors)
3 Italic
4 Underscore
7 Reversed character / cell colors
8 Concealed mode
<character color>
30-37 System colors 0-7 for character color.
39 Reset to default character color
Transmitted as two ASCII characters.
<character cell color>
40-47 System colors 0-7 for character cell color.
39 Reset to default character color
Transmitted as two ASCII characters.
Here an example, how to select bold face, with color 3 as the character
color, and color 0 as the character cell color, send the hex sequence:
9B 31 3B 33 33 3B 34 30 6D
representing the ASCII sequnce:
<CSI>1;33;40m
For the CSI Code ($9B) you can also use the Code $1B $5B (<ESC>[).
End