Settings

The page will reload to apply your changes.
Theme

ASCII Art Font

ASCII Art Menu

Original Usenet message from alt.ascii-art, 15 May 1996.
INFO: ANSI CODES

INFO: ANSI CODES


Here are the colour and the cursor movement codes.
If you need the key-redefinition ones as well, just mail me...

GrtnX,

Erwin Wessels

 __    __    __    __    __    __    __    __    __    __    __    __    __
|  |__|  |__|  |__|  |__|  |__|  |__|  |__|  |__|  |__|  |__|  |__|  |__|  |
|__                                                                      __|  
   | Well. That's it. I've just made a fancy border, and now i'm out of |
 __| inspiration. Ideas go to  w...@cal012042.student.utwente.nl     |__
|   __    __    __    __    __    __    __    __    __    __    __    __   |
|__|  |__|  |__|  |__|  |__|  |__|  |__|  |__|  |__|  |__|  |__|  |__|  |__|

--
Parameters that can be uses in ANSI escape-sequences.
=====================================================
Pn	Numeric parameter. Specifies a decimal number.
Ps	Selective parameter. Specifies a decimal number, with which you
	select a function. You can give more function by separating the
	parameters with a semi-colon.
PL	Line-parameter. Specifies a decimal number corresponding with one
	of the lines on the screen or another device.
Pc	Column-parameter. Is used for a decimal number corresponding with
	one of the columns on the screen or another device.

ANSI escape-sequences for cursormovement and screen display
===========================================================
In the next section of ANSI escape sequences the abbreviaton ESC is used for
the ASCII escape-character 27 (1Bh) that is used at the beginning of every
escape-sequence.

ESC[PL;PcH	Cursorposition. Moves the cursor to the indicated position
		(coordinates). If no position is specified, the cursor is
		moved to the upper-left corner of the screen (row 0, column
		0). This sequensec has the same effect as the next one.

ESC[PL;Pcf	Cursorposition. This sequence has the same effect as the
		previous one.

ESC[PnA		Cursor up. Moves the cursor the indicated number of lines up
		in the same column. If the cursor is already situated on the
		first line of the screen, this sequence is ignored.

ESC[PnB		Cursor down. Moves the cursor the indicated number of lines
		down in the same column. If the cursor is already situated on
		the last line of the screen, this sequence is ignored.

ESC[PnC		Cursor forwards. Moves the cursor the indicated number of
		columns forwards on the same line. If the cursor is already
		situated on the right-most column, this sequence is ignored.

ESC[PnD		Cursor backwards. Moves the cursor the indicated number of
		columns backwards on the same line. If the cursor is already
		situated on the left-most column, this sequence is ignored.

ESC[s		Save cursorposition. Saves the current cursorposition.
		You can move the cursor to the saved cursorposition with the
		sequence 'restore cursorposition'.

ESC[u		Restore cursorposition. Moves the cursor back to the
		position saved by the sequence 'save cursorposition'.

ESC[2J		Delete reproduction. Clears the screen and moves the cursor
		to the upper-left corner (line 0, column 0).

ESC[K		Clear line. Removes all characters from the cursor until the
		end of the line (the character under the cursor included).

ESC[Ps;...;Psm	Select graphical mode. Calls graphical functions, which are 
		given the following values. These functions remain active
		untill this sequence is re-issued.

		Textattributes
		--------------
		0	All out.
		1	Bold
		4	Underline (monochrome screens only)
		5	Blink
		7	Negative
		8	Hidden
		Foreground colours
		------------------
		30	Black
		31	Red
		32	Green
		33	Yellow
		34	Blue
		35	Magenta
		36	Cyan
		37	White
		Background colours
		------------------
		40	Black
		41	Red
		42	Green
		43	Yellow
		44	Blue
		45	Magenta
		46	Cyan
		47	White
		The parameters 30 / 47 correspond to the ISO-norm 6429.

--
Well, that's it!

Original message headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fd588,75a85b71e519e543
X-Google-Attributes: gidfd588,public
X-Google-Thread: f996b,75a85b71e519e543
X-Google-Attributes: gidf996b,public
X-Google-Thread: fbb9d,75a85b71e519e543
X-Google-Attributes: gidfbb9d,public
From: Erwin <wes...@cal012042.student.utwente.nl>
Subject: INFO: ANSI CODES
Date: 1996/05/15
Message-ID: <4nco94$2k...@miso.wwa.com>#1/1
X-Deja-AN: 154941291
sender: bob...@sashimi.wwa.com
references: <4m1oqb$ae...@miso.wwa.com> <4m9j08$p0...@miso.wwa.com>
organization: University of Twente, Enschede, The Netherlands
newsgroups: alt.ascii-art,rec.arts.ascii,alt.ascii-art.animation
About this message. This message was posted publicly to the newsgroup alt.ascii-art in 1996 and is mirrored here unchanged as part of the Historic Archives – only email addresses are masked. The artwork and text belong to their original authors: if you copy a piece, keep the artist's initials or signature intact and credit them where you can. Are you the author? Contact us to get your posts attributed, connected to your artist profile, or removed.

Report this message

Help us keep the archive clean and accurate. Reports are reviewed by a person – nothing is changed automatically.

Help classify this post