🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.ibm.pc
Article #42195

IBM-PC escape sequences

#42195
From: Ken Johnson
Date: Mon, 12 Feb 1990 11:44
57 lines
2171 bytes
This is a summary of the information I've had; it is meant to be
helpful, but it is probably disappointing.

If your system has on it the file ANSI.SYS and CONFIG.SYS, and if
CONFIG.SYS contains the line

  DEVICE=ANSI.SYS

then the escape sequences available are the ANSI ones.  There are other
devices (NANSI.SYS and NNANSI.SYS) around, but I don't have copies of
either. The escape sequences available are those listed in the IBM DOS
manual:

esc[#;#H	Cursor position
esc[#A		Cursor up
esc[#B		Cursor down
esc[#C		Cursor forward
esc[#D		Cursor backward
esc[#;#f	Same as esc[#;#H (Cursor position)
esc[6n		Put device status report on stdin
esc[#;#R	Cursor position: written ONTO stdin by esc[6n
esc[s		Save cursor
esc[u		Restore cursor
esc[2j		Erase screen, cursor home
esc[K		Erase to end of line
esc[#;#..;#m	Set graphics rendition. Paramatrers are
			0	normal
			1	bold
			4	underscore
			5	blink
			7	reverse video
			8	invisible
			30...37	foreground colour
			40...47	background colour

esc[=#h		Set mode. Parameters are
			0	40x25 b&w
			1	40x25 colour
			2	80x25 b&w
			3	80x25 colour
			4	320x200 colour
			5	320x200 b&w
			6	640x200 b&w
			7	Wrap at end of line
esc[=#l		Reset mode. Pramaters as above except 7 clears wrap at
		end of line instead of setting it
esc[#;#;...#p	Key reassign. First parameter is the code being mapped;
		others are the new output from that key.

# throughout is a decimal number, possibly of more than one digit; if
  omitted, defaults to 1. 

-- 
Ken Johnson, AI Applications Institute, 80 South Bridge, Edinburgh EH1 1HN
E-mail ken@aiai.ed.ac.uk, phone 031-225 4464 extension 212
`I have read your article, Mr Johnson, and I am no wiser now than when I
started'.  -- `Possibly not, sir, but far better informed.'
Technical Details
Message-ID: <1732@skye.ed.ac.uk>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!mcsun!ukc!edcastle!aiai!ken

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!mcsun!ukc!edcastle!aiai!ken
From: ken@aiai.ed.ac.uk (Ken Johnson)
Newsgroups: comp.sys.ibm.pc
Subject: IBM-PC escape sequences
Message-ID: <1732@skye.ed.ac.uk>
Date: 12 Feb 90 11:44:02 GMT
Reply-To: ken@aiai.UUCP (Ken Johnson)
Followup-To: comp.sys.ibm.pc
Organization: AIAI, University of Edinburgh, Scotland
Lines: 57