Original Usenet thread from alt.ascii-art, started 28 Mar 1994.
Commands for cat
alt.ascii-art
· 1 message · 28 Mar 1994
On Saturday, March 26, 1994 at 14:00:38 GMT (9:00 am EST ?)
leg...@eng.umd.edu (Michael Casinghino) writes:
MC> This is usually followed by some sort of code like " #6 " or " [2j " or
MC> " [6;17f ". I could easily write a program to interpret these codes if I
MC> knew what they meant, but none of my newbie (baby?) Unix books hold the
MC> answers. Does anyone have the key? (Or even better, the program I'm
MC> trying to write.)
The reason you will find no answer in a UNIX book is because...
This is --NOT-- a UNIX problem.
This is a --TERMINAL-- problem.
...specifically, the Digital Equipment Corp. (a.k.a. DEC) VT100 ANSI.
To quote from my handy-dandy DEC VT52 / DEC VT100 manual:
Change this line to double-width, single height ESC # 6
Erase entire screen ESC [ 2 J
HVP Horizontal and Vertical Position ESC [ <number> ; <number> f
Moves the active position to the position specified by the
parameters (i.e. the two numbers used). This sequence has two parameter
values, the first specifying the line position (i.e. relative row) and the
second specifying the column. A parameter value of either zero or one
causes the active position to move to the first line or column in the
display, respectively (i.e. 0,0 and 1,1 are both the top left corner).
The default condition with no parameters present moves the active position
to the home position (i.e. using NO numbers also means the top left corner
usually, or the top of the active scrolling region). In the VT100, this
control behaves identically with its editor function counterpart, CUP. The
numbering of lines and columns depends on the reset or set state of the
origin mode (DECOM) format effector.
For reference:
CUP Cursor Position ESC [ <number> ; <number> H
DECOM Origin Mode (DEC Private) Initiated via RESET.
All this mess o' text means is that " ESC [ # ; # f " is
identical to " ESC [ # ; # H " for the VT100 unless a scrolling region has
been declared and changed the top margin space. (Usually the scrolling
region is the --ENTIRE-- screen).
The fact that your system uses UNIX is irrelevant. The problem
would be the same had your system used VAX VMS/DCL or VM CMS/REXX. The
system is writing DEC VT100 terminal codes (i.e. the reason for the ".VT"
file suffix). You need VT100 emulation such as is provided on an IBM clone
via a VT100.SYS device driver or a program that emulates a VT100, such as
PROCOMM. Try to find a VT100 manual or a DEC terminal reference to refer
to, or an ANSI reference that includes the native DEC codes as well as the
more general ANSI codes. Good luck.
About this thread.
These messages were posted publicly to the newsgroup
alt.ascii-art
in 1994 and are 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 one of the authors? Contact us to get your posts attributed, connected to your artist profile, or removed.