How To: the ESC codes [Beginners Level]
From Susan Loggiodice <sst...@nyx10.cs.du.edu>
· alt.ascii-art.animation
· 8 Apr 1994 19:42 · View full thread
· report
Question: How do I change the text on the screen to be reversed,
flashing, etc?
This is done with [7mescape[m sequences! An [7mescape[m sequence is a
sequence of characters, beginning with chr(27), the [7mescape[m character,
which is interpreted by the terminal to manipulate the output in
varius ways.
How does one create an [7mescape[m sequence? The easiest way to create
these [7mescape[m sequences is through EDT. To generate the <esc>
character in EDT, simply hit the [7mescape[m key "<esc>" twice. This will
put a "<esc>" on the screen. "<esc>" is EDT's way of representing the
[7mescape[m character.
EMACS is slightly different than EDT. To generate the <esc>
character in EMACS, hit control-shift-|-esc followed by an [7mescape[m
sequence.
Some of the basic [7mescape[m sequences on the vt's and the ibm vt
emulator (kermit) are:
DESCRIPTION [7mESCAPE[m SEQUENCE
normal text (resets text) <esc>[0m
[1m Highlighted text[0m <esc>[1m
[4m Underlined text[0m <esc>[4m
[5m Flashing text [0m <esc>[5m
[7m Reversed text [0m <esc>[7m
#3 double size text
#4 double size text
<esc>#3 and <esc>#4- both must be written
#6 double width text <esc>#6
Fill screen with E's <esc>#8
Screen Blank <esc>[2J
erases from cursor to
end of line <esc>[K
sets for 80 column mode <esc>[?3h
sets for 132 column mode <esc>[?3L
turns smooth scroll on <esc>[?4h
turns smooth scroll off <esc>[?4l
turns reverse video on <esc>[?5h
turns reverse video off <esc>[?5l
cursor home <esc>[?6h
move cursor up x lines <esc>[xA x defaults to 1
move cursor down x lines <esc>[xB x defaults to 1
move cursor right y spaces <esc>[yC y defaults to 1
move cursor left y spaces <esc>[yD y defaults to 1
cursor position <esc>[y;xf 1<=y<=24 1<=x<=80
cursor position <esc>[y;xH 1<=y<=24 1<=x<=80
sets scrolling between
A and B <esc>[A,Br
toggle to graphics mode <esc>(0
toggle from graphics mode <esc>(B
Susan
--
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% % Susan Loggiodice sst...@nox.cs.du.edu olo...@dino.conicit.ve % %
% % * VRAINN * finger slo...@santafe.edu | TEAM OS/2 % %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Original message headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fd588,82e2cdbf9da8e5aa,start X-Google-Attributes: gidfd588,public X-Google-ArrivalTime: 1994-04-08 12:42:21 PST Newsgroups: alt.ascii-art.animation Path: gmd.de!xlink.net!sol.ctr.columbia.edu!news.msfc.nasa.gov!elroy.jpl.nasa.gov!wp-sp.nba.trw.com!acsc.com!pravda.sdsc.edu!news.cerf.net!usc!cs.utexas.edu!uunet!mnemosyne.cs.du.edu!nyx10!sstaetz From: sst...@nyx10.cs.du.edu (Susan Loggiodice) Subject: How To: the ESC codes [Beginners Level] Message-ID: <199...@mnemosyne.cs.du.edu> X-Disclaimer: Nyx is a public access Unix system run by the University of Denver for the Denver community. The University has neither control over nor responsibility for the opinions of users. Sender: use...@mnemosyne.cs.du.edu (netnews admin account) Organization: Nyx, Public Access Unix at U. of Denver Math/CS dept. Date: Fri, 8 Apr 94 19:42:21 GMT Lines: 70
Related ASCII art in the Gallery
Explore these categories from our collection of 11,000+ artworks:
_______ /` _____ `\;, /__(^===^)__\';, / ::: \ ,; | ::: | ,;' '._______.'`jgs
_ _ (o)(o)--. \../ ( )hjw m\/m--m'`--.
_ _
/` \/ `\_ _
\ /` \/ `\
'. .\ /
\/ '. .'
\/jgs __ . . __ (o.\ \/ /.o) \__\/\/__/ /O /==\ O\ (;O/ \/ \O;)
_______ |.-----.| || jgs || ||_ _|| `--)-(--` __[=== o]___ |:::::::::::|\ `-=========-`()
,sSSs ,SSSS_/ ,_ sS/`))\// sS//|_(_/ _, SS\\\ `""-.-'` / sSS` jgs-==-'`'-._\
Make your own ASCII art
Turn images, text or 3D into ASCII, or draw your own – right in your browser.
About this message.
This message was posted publicly to the newsgroup
alt.ascii-art.animation
in 1994 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.