Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Ansi Terminal Width Switching

12 views
Skip to first unread message

Vince Rogers

unread,
Sep 30, 1999, 3:00:00 AM9/30/99
to
can anybody please help
would like to send escape codes to switch ansi between 80 and 132 and back
again
does anybody know how

thanks

Ben Harris

unread,
Sep 30, 1999, 3:00:00 AM9/30/99
to
In article <alII3.240$t5.2...@newsr2.u-net.net>,

There isn't one. There's a DEC private mode which does this, though.

-------------------------------------------------------------------------------
Mode: ?3
Mnemonic: DECCOLM
Description: Column mode

This is a private parameter to the SM and RM control sequences. The
reset state causes an 80 column screen to be used. The set state
causes a 132 column screen to be used.

Source: <URL: http://www.cs.utk.edu/~shuford/terminal/vt100_codes_news.txt>
Status: DEC private; VT100
-------------------------------------------------------------------------------

Thus, you can switch into 132-column mode with CSI ? 3 h, and back to
80-column with CSI ? 3 l.

[ CSI can also be represented as ESC [ ]

--
Ben Harris
<URL:ftp://ftp.chiark.greenend.org.uk/
users/bjharris/all-escapes/all-escapes.txt>

Jeffrey Altman

unread,
Sep 30, 1999, 3:00:00 AM9/30/99
to
In article <7svl72$ekq$1...@pegasus.csx.cam.ac.uk>,
Ben Harris <bj...@cus.cam.ac.uk> wrote:
: In article <alII3.240$t5.2...@newsr2.u-net.net>,

: Vince Rogers <vi...@ktl.co.uk> wrote:
: >can anybody please help
: >would like to send escape codes to switch ansi between 80 and 132 and back
: >again
: >does anybody know how
:
: There isn't one. There's a DEC private mode which does this, though.
:

The newer VT Terminals also support DECSCPP (Set columns per page).

The Siemens 97801-5xx terminals use

CSI 53 h - 132 cols
CSI 53 l - 80 cols

(note: they are not private)

Jeffrey Altman * Sr.Software Designer * Kermit-95 for Win32 and OS/2
The Kermit Project * Columbia University
612 West 115th St #716 * New York, NY * 10025
http://www.kermit-project.org/k95.html * kermit-...@kermit-project.org

T.E.Dickey

unread,
Sep 30, 1999, 3:00:00 AM9/30/99
to
Jeffrey Altman <jal...@watsun.cc.columbia.edu> wrote:

> The newer VT Terminals also support DECSCPP (Set columns per page).
> The Siemens 97801-5xx terminals use
> CSI 53 h - 132 cols
> CSI 53 l - 80 cols
> (note: they are not private)

I had noticed that (last week Walter Briscoe was asking about DECSCPP).

Since they're not private, and not iirc in ISO-6429, then why (as in my
vt300 manual) was DEC advising people to use them?

--
Thomas E. Dickey
dic...@clark.net
http://www.clark.net/pub/dickey

Paul Williams

unread,
Sep 30, 1999, 3:00:00 AM9/30/99
to
In article <5TMI3.413$SS2....@dfw-read.news.verio.net>,

"T.E.Dickey" <dic...@shell.clark.net> wrote:
> Jeffrey Altman <jal...@watsun.cc.columbia.edu> wrote:
>
> > The newer VT Terminals also support DECSCPP (Set columns per page).
> > The Siemens 97801-5xx terminals use
> > CSI 53 h - 132 cols
> > CSI 53 l - 80 cols
> > (note: they are not private)
>
> I had noticed that (last week Walter Briscoe was asking about
DECSCPP).
>
> Since they're not private, and not iirc in ISO-6429, then why (as in
my
> vt300 manual) was DEC advising people to use them?

The DEC sequence DECSCPP is private, Tom. It is the Siemens parameters
to SM which aren't.


Sent via Deja.com http://www.deja.com/
Before you buy.

T.E.Dickey

unread,
Oct 1, 1999, 3:00:00 AM10/1/99
to
Paul Williams <cel...@celigne.co.uk> wrote:

> The DEC sequence DECSCPP is private, Tom. It is the Siemens parameters
> to SM which aren't.

oops - you're right (my memory was warped by the example). DECSCPP is

CSI 0 $ |
CSI 8 0 $ |
for 80 columns
CSI 1 3 2 $ |
for 132 columns

and though the manual doesn't state that, I thought at first that it would
be an interesting extension if I made XFree86 xterm accept any width (but
since it's already got the dtterm-style controls, that would be redundant).

hmm (maybe I'm still wrong, but iirc, the private modes are those with
'<', '=', '>' and '?' characters embedded - not a '$' - but I'll read til
I find a better reference).

Jeffrey Altman

unread,
Oct 1, 1999, 3:00:00 AM10/1/99
to
In article <ijVI3.531$SS2....@dfw-read.news.verio.net>,
T.E.Dickey <dic...@shell.clark.net> wrote:
:

DECSCPP is not private.

Paul Williams

unread,
Oct 1, 1999, 3:00:00 AM10/1/99
to
In article <7t1e0u$3np$1...@newsmaster.cc.columbia.edu>,

Jeff, are you being picky about the exact wording?
DECSCPP is, as Tom noted, the sequence with final character '|' and
intermediate character '$'. Sequences with final characters 'p' to '~'
(07/00 to 07/14) are reserved for private extensions to ISO 6429
(= ECMA 48). So, DECSCPP uses the private extension mechanism.

I've listed the other DEC extensions that I know about at
http://vt100.net/ctrlseq_dec.html. I'd love to hear of additions to
the list.

Tom, regarding '<', '=', '>' and '?', this is another extension
mechanism, different from the "private final character" style above.
ECMA 48 explains that parameter strings which START with these
characters are for private or experimental use. In other words, the
first extension style ('p' to '~') is for new types of control
function, and this one is for overloading existing control functions,
like the Set Mode and Reset Mode sequences. Note that you cannot embed
'<', '=', '>' and '?' whereever you like in the sequence; they must
appear at the beginning.

Paul

T.E.Dickey

unread,
Oct 1, 1999, 3:00:00 AM10/1/99
to
Paul Williams <cel...@celigne.co.uk> wrote:
>> DECSCPP is not private.

> Jeff, are you being picky about the exact wording?
> DECSCPP is, as Tom noted, the sequence with final character '|' and
> intermediate character '$'. Sequences with final characters 'p' to '~'
> (07/00 to 07/14) are reserved for private extensions to ISO 6429
> (= ECMA 48). So, DECSCPP uses the private extension mechanism.

ah (thanks - I wasn't thinking about the final character - very long day).

> I've listed the other DEC extensions that I know about at
> http://vt100.net/ctrlseq_dec.html. I'd love to hear of additions to
> the list.

> Tom, regarding '<', '=', '>' and '?', this is another extension
> mechanism, different from the "private final character" style above.
> ECMA 48 explains that parameter strings which START with these
> characters are for private or experimental use. In other words, the
> first extension style ('p' to '~') is for new types of control
> function, and this one is for overloading existing control functions,
> like the Set Mode and Reset Mode sequences. Note that you cannot embed
> '<', '=', '>' and '?' whereever you like in the sequence; they must
> appear at the beginning.

yes (I recall some discussion a few years about whether those could
appear in positions other than the beginning of the string). But being
told again doesn't hurt. (Terminology was never my strong point ;-)

> Paul

Jeffrey Altman

unread,
Oct 1, 1999, 3:00:00 AM10/1/99
to
In article <7t1q3a$h17$1...@nnrp1.deja.com>,

Paul Williams <cel...@celigne.co.uk> wrote:
: > DECSCPP is not private.
:
: Jeff, are you being picky about the exact wording?

Like Tom I have had a long month.

: I've listed the other DEC extensions that I know about at


: http://vt100.net/ctrlseq_dec.html. I'd love to hear of additions to
: the list.

All of the DEC extensions and most of the SCO extensions are documented
in the VT5xx Programmer's Reference Manual which I will not post to
the web as it is still being actively sold by the current copyright
holder (Boundless Technologies.)

: Tom, regarding '<', '=', '>' and '?', this is another extension


: mechanism, different from the "private final character" style above.
: ECMA 48 explains that parameter strings which START with these
: characters are for private or experimental use. In other words, the
: first extension style ('p' to '~') is for new types of control
: function, and this one is for overloading existing control functions,
: like the Set Mode and Reset Mode sequences. Note that you cannot embed
: '<', '=', '>' and '?' whereever you like in the sequence; they must
: appear at the beginning.

While these bytes are supposed to appear only at the beginning of a
parameter sequence that is not how they have been implemented in many
terminals including (I believe) the VT series. I am pretty sure that
the VT series treats

CSI 4 ; ? 7 h
CSI ? 4 ; ? 7 h

as valid 'private' sequences. (I'm not in front of a terminal
at the moment so I can't check this. I am going by memory on this one.)

The BA80 terminal used combinations of '?' and '=' to specify
special operations:

CSI = ? I - Screen Saver Off
CSI ? = J - Screen Saver On

and I can't find my notes but there are also other sequences that
I have seen:

CSI ? = m - Delete Line Up
CSI = ? l - Insert Line Up

Of course, once one of the extension characters is encountered all
of the formatting rules for the rest of the sequence no longer
has to obey the standards, so anything goes.

Paul Williams

unread,
Oct 3, 1999, 3:00:00 AM10/3/99
to
In article <7t2fe1$gj0$1...@newsmaster.cc.columbia.edu>,

jal...@watsun.cc.columbia.edu (Jeffrey Altman) wrote:
> In article <7t1q3a$h17$1...@nnrp1.deja.com>,
> Paul Williams <cel...@celigne.co.uk> wrote:
> : I've listed the other DEC extensions that I know about at
> : http://vt100.net/ctrlseq_dec.html. I'd love to hear of additions to
> : the list.
>
> All of the DEC extensions and most of the SCO extensions are
documented
> in the VT5xx Programmer's Reference Manual

I'm surprised that the DEC printer extensions are in there.

> : Note that you cannot embed


> : '<', '=', '>' and '?' whereever you like in the sequence; they must
> : appear at the beginning.
>
> While these bytes are supposed to appear only at the beginning of a
> parameter sequence that is not how they have been implemented in many
> terminals including (I believe) the VT series. I am pretty sure that
> the VT series treats
>
> CSI 4 ; ? 7 h
> CSI ? 4 ; ? 7 h
>
> as valid 'private' sequences. (I'm not in front of a terminal
> at the moment so I can't check this. I am going by memory on this
one.)

I am in front of a VT320 and VT420. Neither of the above sequences
will do anything at all. For the following experiments, I set ANSI mode
4 (KAM) and DEC mode 4 (DECSCLM), checked that they were set, sent the
sequences below and then read the results back out with DECRQM (Request
Mode). The final character in the sequences below is lowercase L.

CSI ? 4 l -- resets DEC mode 4
CSI 4 ? l -- does nothing
CSI 4 ; ? 4 l -- does nothing to either ANSI or DEC modes
CSI ? 4 ; 4 l -- resets DEC mode 4 only (twice!)
CSI ? 4 ; ? 7 l -- does nothing

I then did some more experiments with DECRQM. Below are the sequences
sent to the VT320 and those received back:

CSI 4 $ p --> CSI 4 ; 1 $ y
CSI 4 ? $ p --> (nothing)
CSI ; 4 $ p --> CSI 0 ; 0 $y (only reports one mode at a time)
CSI ; ? 4 $ p --> (nothing)

> Of course, once one of the extension characters is encountered all
> of the formatting rules for the rest of the sequence no longer
> has to obey the standards, so anything goes.

Yes. Taking CSI 2; ? 4 h as meaning "set ANSI mode 2 and private mode
4" or "set private modes 2 and 4" would be a reasonable error recovery.
However, I haven't seen a DEC VT that treats either of these sequences
as anything other than "do nothing".

0 new messages