ANSI/DEC Controls News = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Newsgroups: comp.terminals,comp.std.misc,comp.unix.programmer Subject: ANSI, DEC controls, anonymous FTP (was Re: ANSI x3.64-1979) Summary: cs.utk.edu : pub/shuford/terminal Expires: 31 Dec 1994 22:00:44 GMT References: <39hr0p$m5k@news.delphi.com> Sender: shuford@cs.utk.edu Followup-To: comp.terminals Distribution: world Organization: University of Tennessee, Knoxville--Dept. of Computer Science Keywords: ANSI X3.64, FTP, VT100, DEC In article <39hr0p$m5k@news.delphi.com>, or writes: > > Is there a site that I can download or FTP the complete ANSI 3.64-1979 > Standard? This question has come up a lot; I believe that the answer is still "no". ANSI seems to be registered as a non-profit organization, but it historically has insisted on getting financial return for distributing its standards documents. If this has changed, I'm not aware of it. The complete document describing the standard, "ANSI X3.64-1979: Additional Controls for Use with the American National Standard Code for Information Interchange," [can be ordered for $13.50 (plus $4 postage) from] (but see below!) * Standards Sales Department * American National Standards Institute * 1430 Broadway * New York, NY 10018 * +1 212/354-3300 [July 1995 update: current address for ordering ANSI standards: American National Standards Institute Attn: Customer Service 11 West 42nd Street New York, NY 10036 USA ANSI's fax number for placing publication orders is +1 212/302-1286.] [Further update, from Tim Lasko : "ANSI X3.64 has been withdrawn in favor of the more complete and updated ISO standard 6429. (ECMA-48 is equivalent to ISO 6429, last I checked.) X3.64 has been out of date for some time. At the time when I was on the relevant committee, we couldn't get enough resources to really do a good job of updating the standard. Later, the proposal came up to withdraw it in favor of the ISO standard.] It's best to read the full standard before using it in any complex way. It also helps to have copies of the related standards "X3.4-1977: American National Standard Code for Information Interchange" (the ASCII standard) and "X3.41.1974: Code-Extension Techniques for Use with the 7-Bit Coded Character Set of American National Standard for Information Interchange." By the way, note that the standard is "X3.64", not just "3.64", because "X3" is the name of the committee that sponsored it. I seem to recall that the subcommittee that actually did the work was "X3L2". While we are at it, I'll point out some things about X3.64 and give an Internet source for a subset of the standard's contents. \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/ The control sequences recognized by the Digital Equipment Corporation VT100, VT200, VT300, VT400, and VT500-family character-cell video terminals are an extended variant of the control sequences specified by the ANSI standard, ANSI X3.64. (ISO DP-6429 is the international version.) The generic sequence introducer is a code element called CSI (Control Sequence Introducer). If you are using 8-bit communication, you can use the hexadecimal value 9Bh to represent this (but be sure you understand the side effects thereof). Otherwise, use the 7-bit equivalent: the Escape character (1Bh) followed by [ (the left bracket character). For instance, the canonical form of the "scroll-region" command is CSI xx ; yy r or in 7-bit style Esc [ xx ; yy r (where xx and yy are decimal digits expressed in ASCII/IA5; you do not actually use a space between sequence elements, this is for clarity. Be careful with the notation here--sometimes a space character _is_ a sequence element, as in the SR Scroll Right editing function.) In an X3.64 control sequence, the numeric arguments may default to an arbitrary value specific to the device function being controlled. Do not assume that the default always will be 0 or 1. (Or there may be no default allowed.) For example, the numeric arguments in the GSM (Graphic Size Modify) sequence have the default values 100, 100. As a private extension to X3.64, DEC defines the DECSTBM (Set Top and Bottom Margins) command as follows: CSI Pt ; Pb r Selects top and bottom margins defining the scrolling region. Pt is the line number of the first line in the scrolling region. Pb is the line number of the bottom line. If you do not select either Pt or Pb, they default to the top and bottom respectively. Lines are counted from 1. (See \VT220 Programmer Pocket Guide/, part EK-VT220-HR-002, page 37.) Screen clearing should not depend on scrolling. Erasing parts of the display (EL and ED) in the VT100 is performed thus: Erase from cursor to end of line Esc [ 0 K or Esc [ K Erase from beginning of line to cursor Esc [ 1 K Erase line containing cursor Esc [ 2 K Erase from cursor to end of screen Esc [ 0 J or Esc [ J Erase from beginning of screen to cursor Esc [ 1 J Erase entire screen Esc [ 2 J Some poorly planned terminal/emulators respond to Esc [ J as if it were Esc [ 2 J (here the default is 0), and _some_ versions of Microsoft's MS-DOS ANSI.SYS contain a bug requiring software to send Esc [ k (instead of the uppercase). Of course, you would never make this mistake. The VT200 and later terminals have the ECH control sequence: ECH Erase Character Esc [ Pn X (where Pn is a numeric parameter in ASCII digits). This erases the cursor position and the next (Pn-1) positions, but this is not part of the least common denominator VT100. Another common thing that people want to do it position the cursor: first to some absolute screen position CUP Cursor Position Esc [ Pl ; Pc H where Pl is the line number and Pc is the column (depends on origin mode) and then cursor relative positioning CUB Cursor Backward Esc [ Pn D CUD Cursor Down Esc [ Pn B CUF Cursor Forward Esc [ Pn C CUU Cursor Up Esc [ Pn A CVT Cursor Vertical Tab Esc [ Pn Y The above screen-control codes are NOT what the terminal's arrows keys send; in normal 7-bit mode you'll see the VT100 keys emit arrow-up Esc [ A arrow-down Esc [ B arrow-right Esc [ C arrow-left Esc [ D - - - - - - Now as to what is available online: A file containing a list of defined control sequences called "ansi_x3_64.txt" is available via anonymous FTP from the host CS.UTK.EDU [128.169.94.1] look in the directory pub/shuford/terminal To successfully connect to "cs.utk.edu", your own Internet host must be registered in the Domain Name Service for reverse mapping from IP number to domain name. Other information on various character-cell video terminals is also available from this source. [Almost all the same archived materials are now available through the World Wide Web/HTTP interface.] - - - - - - VT, Flip Chip, BLISS, and Rainbow are trademarks of Digital Equipment Corporation. = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Newsgroups: comp.terminals Path: cs.utk.edu!martha.utk.edu!darwin.sura.net!howland.reston.ans.net!pipex !ibmpcug!ibmpcug!pwarburt From: pwarburt@ibmpcug.co.uk (P Warburton) Subject: Re: ANSI x3.64-1979 Date: Thu, 10 Nov 1994 17:18:08 GMT Message-ID: Keywords: ANSI 3.64 References: <39hr0p$m5k@news.delphi.com> In article <39hr0p$m5k@news.delphi.com>, WIEDNER@DELPHI.COM wrote: >Is there a site that I can download or FTP the complete ANSI 3.64-1979 >Standard? As I understand it, ANSI standards documents are only available for purchase. However, ANSI X3.64 is almost identical to ISO 6429 and ECMA-48. ISO standards cost a packet, but ECMA standards are free for the asking. Mail to: helpdesk@ecma.ch requesting the standard(s) you want (i.e. ECMA-48, "Control Functions for Coded Character Sets"), include your snail-mail address, and you should receive the document in due course. Don't expect an acknowledgement by e-mail. It worked for me, but I live in the UK, so if ECMA have rules about, say, only supplying to European sites, this might not work for you. It wouldn't hurt to try, though. Hope that helps, -- Peter Warburton |"But Lancelot mused a little space | He said, 'She has a lovely face; pwarburt@ibmpcug.co.uk (pref'd)| God in his mercy lend her grace, pwarburton@cix.compulink.co.uk | The Lady of Shalott.'" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Newsgroups: comp.terminals Path: cs.utk.edu!cssun.mathcs.emory.edu!hobbes.cc.uga.edu !news-feed-1.peachnet.edu!gatech!howland.reston.ans.net !math.ohio-state.edu!jussieu.fr!univ-lyon1.fr!swidir.switch.ch !scsing.switch.ch!news.belwue.de!news.belwue.de!news.rhein-neckar.de !birdland.rhein-neckar.de!mips.pfalz.de!not-for-mail From: naddy@mips.pfalz.de (Christian Weisgerber) Subject: Re: Shock & Horror (ANSI x3.64-1979 terminal) Date: 14 Apr 1995 14:19:49 +0200 Lines: 29 Message-ID: <3mlp95$l4s@mips.pfalz.de> References: kerr@netcom.com (Shani) writes: > When I got back from lunch today, there was a message from ANSI, > letting me know that ANSI x3.64 has been withdrawn, and is now longer > available. [...] ECMA-48 is an updated version of ANSI X3.64. From the Standards FAQ: ---------------> All ECMA standards are free and can be ordered at no cost from European Computer Manufacturers Association 114 Rue du Rhone CH-1204 Geneva Switzerland phone +41 22 7353634 fax +41 22 7865231 telex 413237 e-mail helpdesk@ecma.ch X.400 C=ch, A=arcom, P=ecma, O=genevanet, OU1=ecma, S=helpdesk <--------------- -- Christian 'naddy' Weisgerber, Germany naddy@mips.pfalz.de RNInet e.V. -- IP für Rhein-Neckar und Vorderpfalz. = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Newsgroups: comp.terminals Path: cs.utk.edu!stc06.ctd.ornl.gov!fnnews.fnal.gov!uwm.edu!lll-winken.llnl.gov !decwrl!pa.dec.com!nntpd.lkg.dec.com!regent.enet.dec.com!lasko From: lasko@regent.enet.dec.com (Tim Lasko, Digital Equipment Corp/Marlborough) Subject: Re: Shock & Horror (ANSI x3.64-1979 terminal) Date: 18 APR 95 16:40:46 Organization: Digital Equipment Corporation Lines: 21 Message-ID: <3n18ar$iu6@nntpd.lkg.dec.com> References: <3mlp95$l4s@mips.pfalz.de> NNTP-Posting-Host: prince.enet.dec.com In article <3mlp95$l4s@mips.pfalz.de>, naddy@mips.pfalz.de (Christian Weisgerber) writes... > > kerr@netcom.com (Shani) writes: > >> When I got back from lunch today, there was a message from ANSI, >> letting me know that ANSI x3.64 has been withdrawn, and is now longer >> available. [...] > >ECMA-48 is an updated version of ANSI X3.64. Hmm...someone didn't give you the whole story. ANSI X3.64 has been withdrawn in favor of the more complete and updated ISO standard 6429. (ECMA-48 is equivalent to ISO 6429, last I checked.) X3.64 has been out of date for some time. At the time when I was on the relevent committee, we couldn't get enough resources to really do a good job of updating the standard. Later, the proposal came up to withdraw it in favor of the ISO standard. -- Tim Lasko, Digital Equipment Corp., Marlborough MA (lasko@regent.enet.dec.com) Tim Lasko, private citizen (TeemL@aol.com) My opinions are my own; the facts can speak for themselves. I'm on my own time. For Digital printer support: call 1.800.777.4343 or email printers@digital.com = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Path: cs.utk.edu!stc06.CTD.ORNL.GOV!fnnews.fnal.gov!uwm.edu!news.alpha.net !news.mathworks.com!transfer.stratus.com!xylogics.com!Xylogics.COM!carlson From: carlson@Xylogics.COM (James Carlson) Newsgroups: comp.terminals Subject: Re: DEC private modes fot VT series. Date: 15 Feb 1995 12:52:20 GMT Organization: Xylogics Incorporated Lines: 56 Message-ID: <3hste4$jpg@newhub.xylogics.com> References: <3hpc0n$1do@senator-bedfellow.MIT.EDU> Keywords: DEC VT100 VT200 VT240 In article <3hpc0n$1do@senator-bedfellow.MIT.EDU>, igorlord@athena.mit.edu (Igor Lyubashevskiy) writes: |> |> Hi. I am trying to write a VT200 emulator, and my manual does not make |> it clear the exact format of what it calls Ps;Ps;... sequences with DEC |> private modes. |> |> For example, when CSI ? 2 ; 4 h is recieved, is it equivalent to |> CSI ? 2 h and CSI 4 h or |> CSI ? 2 h and CSI ? 4 h ? |> |> Please if you can help me, email to me or followup to this group. "CSI ? 2 ; 4 h" is equivalent to "CSI ? 2 h CSI ? 4 h". The flags (like the '?' character) are global within a single CSI sequence. Since the command isn't actually dispatched until the 'h' is received (flags are saved in a bit vector and the decimal arguments are saved in an array along with a present/omitted flag which is needed on the VT220 because the set-scroll-region command has a default of max-lines for the second argument), the '?' flag can appear anywhere. For example, this is a sequence equivalent to the one above, even if it is a bit strange looking: CSI 2 ; ? 4 h A properly-functioning VT100/VT200 emulator jumps from "character" state to "csi argument gathering" state when CSI is received, and then jumps through a dispatch table when a code in the range 40-7E (hex) is received. This allows ESC, CSI, CAN and SUB to terminate the sequence prematurely without altering any other variables, and it allows LF, VT, FF, CR, TAB and ENQ to be dispatched in the middle of the CSI argument list without changing state. For example, this is a perfectly legal VT command -- it goes down one line and right two characters: CSI 2 LF C When the LF is received, the cursor is moved to the next line (and a scroll happens if necessary), but the CSI state isn't touched. When the 'C' is received, the cursor is moved two characters to the right because the CSI sequence is dispatched at that point. The "correct" implementation is thus a big loop which dispatches all of the incoming data based on a state machine. It is *NOT* correct to build a CSI-argument-parser which calls the (blocking) character-read function directly. This is almost guaranteed to fail, and I've seen this done in too many poorly-implemented PC-based emulators. The dispatch loop must call the parser instead. The vttest program will test for compliance with all of this. You can find it at an FTP site near you. I made heavy use of this when I was designing terminals at Data General. (I wanted to get DG to make a contribution to the author, but I was never able to locate him. Sigh.) --- James Carlson Tel: +1 617 272 8140 Annex Software Support / Xylogics, Inc. +1 800 225 3317 53 Third Avenue / Burlington MA 01803-4491 Fax: +1 617 272 2618 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Newsgroups: comp.terminals,comp.protocols.misc Subject: ANSI X3.64 sequences (was Re: VT100 scrolling region) Summary: Escape code effects Expires: Sun, 31 Jan 1993 22:23:24 GMT References: <18623@mindlink.bc.ca> Sender: shuford@cs.utk.edu Followup-To: comp.terminals Distribution: world Organization: University of Tennessee, Knoxville--Dept. of Computer Science Keywords: VT100, scroll, control code, Escape, ANSI X3.64, terminal In article pdsmith@bbn.com (Peter D. Smith) writes: > In article <18623@mindlink.bc.ca>, Frank@mindlink.bc.ca (Frank I. Reiter) > writes: > > Part of an application I am working on includes a VT100 emulator. > > 1) Does ESC [;22r mean "scroll lines 0 through 22" or does it mean "Set > > the bottom scrolling line to 22, leave the top line as it is set already"? > > It should mean 'scroll lines 1 to 22'. The control sequences recognized by the Digital Equipment Corporation VT100, VT200, VT300, and VT400-family character-cell video terminals are an extended variant of the control sequences specified by an ANSI standard, ANSI X3.64. (ISO DP6429 is the international version.) The generic sequence introducer is a thing called CSI (Control Sequence Introducer). If you are using 8-bit communication, you can use the hexadecimal value 9B to represent this (but be sure you understand the side effects thereof). Otherwise, use the 7-bit equivalent: the Escape character (1Bh) followed by [ (the left bracket character). The canonical form of the given scroll-region command would be CSI xx ; yy r or in 7-bit style Esc [ xx ; yy r (where xx and yy are decimal digits expressed in ASCII/IA5; you do not actually use a space between sequence elements, this is for clarity. Be careful with the notation here--sometimes a space character _is_ a sequence element, as in the SR Scroll Right editing function.) In an X3.64 control sequence, the numeric arguments may default to an arbitrary value specific to the device function being controlled. Do not assume that the default always will be 0 or 1. (Or there may be no default allowed.) For example, the numeric arguments in the GSM (Graphic Size Modify) sequence have the default values 100, 100. As a private extension to X3.64, DEC defines the DECSTBM (Set Top and Bottom Margins) command as follows: CSI Pt ; Pb r Selects top and bottom margins defining the scrolling region. Pt is the line number of the first line in the scrolling region. Pb is the line number of the bottom line. If you do not select either Pt or Pb, they default to the top and bottom respectively. Lines are counted from 1. (See \VT220 Programmer Pocket Guide/, part EK-VT220-HR-002, page 37.) > Remember that these sequences > could be implemented in TTL without a microprocessor of any > kind & therefore use the simplest possible implementation. Peter must be thinking of the much simpler DEC VT52 sequences. As far as I know, terminals implementing X3.64 have ALWAYS used a built-in microprocessor. The VT100 was built around an 8-bit-bus Intel 8085. In fact, when the X3.64 document was published (circa 1978), some vendors, insisting on using discrete logic designs, objected that the standard was so complex it could not be implemented. Most of these vendors are now floating belly-up on the tide of technology. Some credit is due The Heath Company for a pioneering microprocessor- based video terminal that implemented many of the X3.64 functions. > > 2) Should a clear screen code clear the scrolling region only, or the > > entire screen? How about a clear to end of screen? > > I think this is the whole screen regardless of the scrolling region. > Don't bet your company on it, though. Screen clearing should not depend on scrolling. Erasing parts of the display (EL and ED) in the VT100 is performed thus: Erase from cursor to end of line Esc [ 0 K or Esc [ K Erase from beginning of line to cursor Esc [ 1 K Erase line containing cursor Esc [ 2 K Erase from cursor to end of screen Esc [ 0 J or Esc [ J Erase from beginning of screen to cursor Esc [ 1 J Erase entire screen Esc [ 2 J Some brain-damaged terminal/emulators respond to Esc [ J as if it were Esc [ 2 J (here the default is 0), and _some_ versions of Microsoft's MS-DOS ANSI.SYS contain a bug requiring software to send Esc [ k (instead of the uppercase). Of course, you would never make this mistake. The VT200 and later terminals have the ECH control sequence: Esc yy X (where yy is a numeric parameter) This erases the cursor position and the next (yy-1) positions, but this is not part of the least common denominator VT100. - - - - - - VT, Flip Chip, DIBOL, and Rainbow are trademarks of Digital Equipment Corporation. = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Newsgroups: comp.terminals Path: cs.utk.edu!gatech!howland.reston.ans.net!vixen.cso.uiuc.edu!uwm.edu !news.alpha.net!news.mathworks.com!uhog.mit.edu!bloom-beacon.mit.edu !eru.mt.luth.se!news.luth.se!sunic!news.funet.fi!nntp.hut.fi !snakemail.hut.fi!pelle From: pelle@lk-hp-11.hut.fi (timo.pelkonen) Reply-To: timo.pelkonen@hut.fi Subject: Re: Need help with VT100. Date: 16 Feb 95 10:56:13 GMT Organization: Helsinki University of Technology Message-ID: References: <3hk7oa$sui@senator-bedfellow.MIT.EDU> NNTP-Posting-Host: lk-hp-11.hut.fi igorlord@mit.edu (Igor Lyubashevskiy) writes: > >Also, what do CSI ... q CSI Ps " q select character attribute, DECSCA, ps=0, ps=2, erasable; ps=1, not erasable >..and ESC \ sequences do? string terminator, used to terminate control strings started by DCS (esc P), APC (esc _), OSC (esc ]), PM (esc ^) and SOS (no idea). -- timo.pelkonen@hut.fi = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Newsgroups: comp.terminals Path: cs.utk.edu!stc06.CTD.ORNL.GOV!fnnews.fnal.gov!uwm.edu!news.alpha.net !news.mathworks.com!uunet!in1.uu.net!newstf01.news.aol.com !newsbf02.news.aol.com!not-for-mail From: psichel@aol.com (PSichel) Subject: Re: vt510 _almost_ fully vt320 compatible ? Date: 16 Feb 1995 20:06:17 -0500 Organization: America Online, Inc. (1-800-827-6364) Lines: 22 Message-ID: <3i0sq9$oj1@newsbf02.news.aol.com> References: NNTP-Posting-Host: newsbf02.mail.aol.com In article Message-ID: you wrote: > > vt510 gives me (minor) headache. when i set ISO-latin (multinational) > via esc [ ? 42l and then try to assign finnish national (7bit) > characterset to GL (left, 7 bit, whatever) by sending > esc ( 5 ShiftIn the vt510 refuses to do it as does the vt220. I'm not sure if you are comparing to a real VT220 or a VT220 emulator. As far as I know, you need to select "7-bit NRCS characters" or National mode (esc [ ? 42 h) before you can designate and invoke a national (7bit) character set. You may also need to specify that you have a Finnish keyboard for the terminal to recognize the Finnish NRCS. Hope this helps. If you are still experiencing a problem, please send mail. - Peter Video Terminals Business Group Components & Peripherals Digital Equipment Corp = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Newsgroups: comp.terminals Path: cs.utk.edu!gatech!psuvax1!news.ecn.bgu.edu!newspump.wustl.edu !newsreader.wustl.edu!news.starnet.net!wupost!howland.reston.ans.net !news.moneng.mei.com!uwm.edu!news.alpha.net!news.mathworks.com !uhog.mit.edu!bloom-beacon.mit.edu!eru.mt.luth.se!news.luth.se!sunic !news.funet.fi!news.csc.fi!kronos.fmi.fi!dionysos.fmi.fi!hurtta From: hurtta@dionysos.fmi.fi (Kari E. Hurtta) Subject: Re: DEC private modes fot VT series. Date: 16 Feb 1995 17:58:52 GMT Organization: Finnish Meteorological Institute (FMI) Lines: 27 Message-ID: <3i03os$fqv@kronos.fmi.fi> References: <3hpc0n$1do@senator-bedfellow.MIT.EDU> NNTP-Posting-Host: dionysos.fmi.fi Keywords: DEC VT100 VT200 VT240 igorlord@athena.mit.edu (Igor Lyubashevskiy) writes: > > Hi. I am trying to write a VT200 emulator, and my manual does not make > it clear the exact format of what it calls Ps;Ps;... sequences with DEC > private modes. > > For example, when CSI ? 2 ; 4 h is recieved, is it equivalent to > CSI ? 2 h and CSI 4 h or > CSI ? 2 h and CSI ? 4 h ? Later. CSI ? 2 ; 4 h turns ansi mode on (*) and set smooth scrolling That is same as CSI ? 2 h CSI ? 4 h (*) Expect that turning ANSI mode on is stupid command, because if ansi mode is off, then these CSI -commands don't have recognized -- this is: Command CSI ? 2 h don't make sense Ansi mode of: CSI ? 2 l (go to VT52 mode) Ansi mode on: ESC < (go to VT100 mode from VT52 mode) -- - Kari E. Hurtta / Elämä on monimutkaista Kari.Hurtta@Fmi.FI puh. (90) 1929 658 {hurtta,root,Postmaster}@dionysos.fmi.fi = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Path: cs.utk.edu!gatech!swrinde!hookup!relay.tor.hookup.net!tjdarby.tor.hookup. net!malek From: malek@tor.hookup.net (Malek Abdel-Fattah) Newsgroups: comp.terminals Subject: Re: ESC[! code. What is it for??????? Date: Wed, 8 Mar 1995 14:25:10 GMT Organization: Tundra Software, Inc. Lines: 16 Message-ID: NNTP-Posting-Host: tjdarby.tor.hookup.net X-Newsreader: Trumpet for Windows [Version 1.0 Rev A] I won't quote the message cause my newsgroup reader is being annoying at the moment, but you were asking what the ESC[! code was for. The ESC[! is the code that Rip supporting BBS's use to determine whether your terminal has RIP (Remote Imaging Protocol) support. If so, then your terminal returns a string to the remote side in the form "RIPScript version x.xx" or some such thing. This is probably why you have been receiving that code. Ansi detection is done with the ESC[6n code which causes the terminal to return ESC[ %d; %dR (row and column respectively). Hope that helped. = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Newsgroups: comp.terminals Path: cs.utk.edu!gatech!udel!news.mathworks.com!transfer.stratus.com !xylogics.com!Xylogics.COM!carlson From: carlson@Xylogics.COM (James Carlson) Subject: Re: ESC[! code. What is it for??????? Date: 8 Mar 1995 20:24:29 GMT Organization: Xylogics Incorporated Message-ID: <3jl3pt$oab@newhub.xylogics.com> References: In article , malek@tor.hookup.net (Malek Abdel-Fattah) writes: |> |> I won't quote the message cause my newsgroup reader is being annoying at |> the moment, but you were asking what the ESC[! code was for. |> |> |> The ESC[! is the code that Rip supporting BBS's use to determine whether |> your terminal has RIP (Remote Imaging Protocol) support. If so, then your |> terminal returns a string to the remote side in the form "RIPScript version |> x.xx" or some such thing. This is probably why you have been receiving that |> code. Great. Yet another reason to hate PCs with a passion: that's a violation of the ANSI X3.64 guidelines. I can guarantee that it'll confuse the heck out of real ANSI-speaking systems. --- James Carlson Tel: +1 617 272 8140 Annex Software Support / Xylogics, Inc. +1 800 225 3317 53 Third Avenue / Burlington MA 01803-4491 Fax: +1 617 272 2618 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= [From a Mustang Software Release, September 1995] RIP, the "Remote Imaging Protocol" is a graphic-terminal emulation protocol supported by Wildcat! BBS, Major BBS, PC Board, TBBS, and several other popular BBS software platforms. When you dial a RIP-capable BBS you can navigate with your mouse and view graphics. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Article 3711 of comp.terminals: Path: cs.utk.edu!gatech!howland.reston.ans.net!newsjunkie.ans.net!newstf01.news .aol.com!newsbf02.news.aol.com!not-for-mail From: psichel@aol.com (PSichel) Newsgroups: comp.terminals Subject: Re: parsing DCS on VTxxx terminals Date: 8 Mar 1995 19:38:39 -0500 Organization: America Online, Inc. (1-800-827-6364) Lines: 15 Sender: root@newsbf02.news.aol.com Message-ID: <3jlimf$p7v@newsbf02.news.aol.com> References: <3jjj29$dmh@lynx.unm.edu> Reply-To: psichel@aol.com (PSichel) NNTP-Posting-Host: newsbf02.mail.aol.com In article Message-ID: <3jjj29$dmh@lynx.unm.edu> you wrote: > I've been trying to figure out a "generic" parser for device control > string sequences sent to VTxxx terminals. The ANSI defined syntax for DCS control strings is DCS ST. For Digital VTxxx terminals we've extended this as follows: DCS ST The introducer sequence follows exactly the same syntax and symantics as a control sequence except that CSI is replaced by DCS. The is control string specific. - Peter = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Newsgroups: vmsnet.pdp-11 Path: cs.utk.edu!gatech!swrinde!pipex!news.sprintlink.net!news.bluesky.net !solaris.cc.vt.edu!news.mathworks.com!mvb.saic.com!info-pdp11 From: John_Wilson@mts.rpi.edu Subject: CSI vs. ESC, and EAE Message-ID: <4850423@MTS.RPI.EDU> Date: Tue, 21 Mar 95 01:20:56 EST Organization: Info-Pdp11<==>Vmsnet.Pdp-11 Gateway Just my $.02 worth of useless information: as has been noted, the "CSI [ mumble" form is meaningless on a VT220 in 8-bit mode, so it would seem like a pointless sequence to transmit. But, at least on RSTS, this is a cheapskate way to keep the TTY driver's grubby paws off your ESC, since RSTS wants to turn it into a dollar sign even on output. You just set the high bit, RSTS doesn't mess with it because it isn't ESC any more, and your VT52 or VT100 likes it just fine. You could just do things right by writing a plain ESC to the TTY in binary mode, except that one of those annoying "feature patches" from the release notes makes binary mode require privs (this is V7.0-07), so a program that worked fine on a vanilla system wouldn't run on a system with this patch. But setting the high bit always worked... until the VT220 came along. Re EAE adding MUL, DIV, shift -- well sort of, it's a memory mapped device so rather than adding these instructions to the CPU instruction set, it just provides locations where you can write the operands and then read the result later. Like Doug Jones' MOV machine. John = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Newsgroups: comp.terminals Path: cs.utk.edu!cssun.mathcs.emory.edu!emory!swrinde!howland.reston.ans.net !nntp.crl.com!decwrl!pa.dec.com!nntpd.lkg.dec.com!dial20_port2.mro.dec.com!user From: sichel@hannah.enet.dec.com (Peter Sichel) Subject: Re: VT100 documentation troubles Date: Sun, 16 Jul 1995 12:28:30 -0400 Organization: Digital Equipment Corporation Lines: 38 Distribution: world Message-ID: References: <3u4lg2$2om@ill.msilink.com> In article <3u4lg2$2om@ill.msilink.com>, jbn@mystery-train.msilink.com wrote: > > I'm trying to write an accurate termcap and terminfo entry for the VT100 > (the one that ships with my OS is not that accurate), however there is a > discrepancy between what the DEC VT100 manual says a VT100 will do and what > the termcap entry that shipped with my OS will do. > > My termcap entry claims that: > > AL=\E[%dL:DL=\E[%dM > > yet I cannot find any documentation describing "CSI Pn L" or "CSI Pn M" for > adding and deleting multiple lines, respectively. These sequences are OK. Digital added some sequences to later versions of the VT100 family. These are part of the so called "Level 1 Editing Extension." They are required for all subsequent VT100 implementations even though they were not present in the original VT100. It's unlikely many of these original VT100s are still in service. "VT100 mode" in all subsequent Digital terminals actually emulates the VT102, which includes these sequences. > On a related topic (the VT100), would it be okay to use: > > ks=\E=:ke=\E> > > to turn on and off application mode for the keypad? I don't see why not, that's what they are for. Perhaps it's not clear what is meant by turning the keypad on and off. In application mode, the keypad sends unique sequences. In Numeric mode, the keypad sends ASCII numerals (for convenient numeric entry) which cannot be distinguished from the top row of the main key array. In effect, the application keypad is off. -- - Peter Sichel = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Newsgroups: comp.terminals Path: cs.utk.edu!gatech!news.mathworks.com!news.bluesky.net!news.sprintlink.net !cs.utexas.edu!swrinde!sgigate.sgi.com!genmagic!bug.rahul.net!a2i!olivea !charnel.ecst.csuchico.edu!csusac!csus.edu!netcom.com!kientzle From: kientzle@netcom.com Subject: Re: ANSI terminal emulation Message-ID: References: Date: Fri, 4 Aug 1995 01:51:37 GMT X-Original-Newsgroups: comp.terminals,comp.emulators.misc, comp.protocols.ibm,comp.protocols.iso,comp.protocols.misc In article , Kem Mason wrote: > > I am writing a telnet program that uses ANSI terminal emulation. I have > figured out what most of the escape codes do through trial and error -- > I was wondering... > > Where can I find the ANSI specifications? (what all the escape sequences > mean) Depends on what you mean by `ANSI.' Here are three popular definitions: a) ANSI X3.64 (aka ISO 6429??) presents a general scheme for building escape sequences, and lists a lot of specific examples. This is the basis behind the others. X3.64 is _huge_, though, and I can't imagine a reason for even pretending to implement the whole thing. b) DEC VT-series terminals. These implement successively more of X3.64, with a lot of additions and extensions. Best references are DEC's `Programmer's References.' VT100, VT220, and VT320 are probably the best known. c) MSDOS ANSI.SYS. aka ANSI-BBS. Most better PC programming references describe this emulation in some detail. Like all other so-called ``ANSI'' emulations, it implements a core set of functions lifted directly from X3.64, and then adds some new extensions (such as function key programming). A lot of people use the term ``ANSI'' to refer to a `generic' X3.64-style emulation. If you take the intersection of VT102 and MSDOS ANSI.SYS, you'll get about the right thing. There's no uniform definition, though. - Tim Kientzle = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Newsgroups: comp.protocols.misc Path: cs.utk.edu!stc06.ctd.ornl.gov!fnnews.fnal.gov!muir.math.niu.edu !mp.cs.niu.edu!vixen.cso.uiuc.edu!howland.reston.ans.net!ix.netcom.com !netcom.com!kientzle From: kientzle@netcom.com (Tim Kientzle) Subject: Re: ANSI X3.64 alias Message-ID: Organization: NETCOM On-line Communication Services (408 261-4700 guest) References: <48mlt7$5i9@tools.bbnplanet.com> Date: Wed, 29 Nov 1995 21:55:52 GMT Lines: 24 In article , Johnathan Taylor wrote: >barmar@tools.bbnplanet.com (Barry Margolin) writes: > >How is it possible for VT100 to be ANSI compliant when under VT100 emulation >^[[2J only clears the screen but leaves the cursor/print position where it >was but under ANSI emulation it both clears the screen AND homes the >cursor/print position? VT100 is capable of homing the cursor and uses a >seperate ESC sequence to do it. Be very careful with the term `ANSI emulation.' This is often used to refer to an emulation of the MSDOS ANSI.SYS driver, which is not particularly ANSI compliant, despite the name. It's probably better to refer to it as ANSI-BBS or PC-ANSI emulation. There are also many display terminals that support "ANSI" emulations that are completely different from the MSDOS ANSI.SYS emulation. The term `ANSI emulation' has been sufficiently mis-used that it's pretty well meaningless out of context. There are, in fact, many things that ANSI X3.64 fails to define. People who want to properly mimic the VT100 need to be careful to make sure they understand precisely how the VT100 handles those issues. (For example, the VT100 handles cursor wrap at the left margin in an interesting way which is rarely emulated correctly.) = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Newsgroups: comp.terminals,comp.protocols.misc Path: cs.utk.edu!stc06.ctd.ornl.gov!fnnews.fnal.gov!uwm.edu!chi-news.cic.net !newsfeed.internetmci.com!howland.reston.ans.net!EU.net !peer-news.britain.eu.net!warwick!spuddy!johntayl From: johntayl@spuddy.mew.co.uk (Johnathan Taylor) Subject: Re: ANSI X3.64 alias Message-ID: Organization: Spuddy - for free mail/usenet access in the UK! References: <49fr70INN6fp@duncan.cs.utk.edu> Date: Mon, 18 Dec 1995 04:17:15 GMT X-News-Reader: SpudMeister 0.99.6b Lines: 82 shuford@cs.utk.edu (Richard Shuford) writes: >In article , > johntayl@spuddy.mew.co.uk (Johnathan Taylor) writes: >| >| barmar@tools.bbnplanet.com (Barry Margolin) writes: >| > >| >[DEC] VT100's conform to X3.64. X3.64 is a very general standard, defining [snip] >| How is it possible for VT100 to be ANSI compliant when under VT100 emulatio n >| ^[[2J only clears the screen but leaves the cursor/print position where it >| was but under ANSI emulation it both clears the screen AND homes the >| cursor/print position? VT100 is capable of homing the cursor and uses a >| separate ESC sequence to do it. > >The VT100 emulation does what it is supposed to and is ANSI-compliant. >The so-called "ANSI emulation" you are using is not compliant with X3.64. Hmm, that's intresting! >Any kind of standard can be implemented badly. But, alas, there are >probably scores of computer systems in the world that depend on the >non-standard behaviour. There may even be real terminals which also >claim to be compliant but which are actually broken. The ANSI emulation I was using as an example was the MS-DOS on an IBM-PC clone ANSI.SYS and derived third-party drivers like DVANSI.COM etc. >Two emulations that I believe are faithful to the VT100 spec: > > Joe Doupnik's MS-Kermit program (available by FTP from kermit.columbia.edu) > > Attachmate's KEA-420 (commercial product; call +1 206-426-6283) > >Another common problem: the control sequence you mention is the ANSI >"Erase in Display" (or ED) editing function. All control sequences in >X3.64 that take parameters have a specified default parameter value, >and the specified default value for "Erase in Display" is 0. The 0 >value means "clear the display from the current position of the cursor >to the bottom". The value 2 means "clear the entire display". If you >happen to have moved the cursor to the home position before invoking >"Erase in Display" with either 0 or 2, the effect is identical. This >point is often overlooked by emulator writers. I'd have expected Microsloth to abide by standard, maybe they didn't like THE ANSI standard and decided to define their own to kick real ANSI compliant terminals in the gonads. I originally assumed VT-100 was synonymous with ANSI emulation and thought that once I got a VT-100 emulator that conforms to the ANSI spec I'd be able to use it with online ANSI editors etc... FAT CHANCE! ANSI terminal drivers has become solely a driver for Microsloth ANSI.SYS emulation. I would've expected that as ANSI is just an agreed terminal-function control protocol that for an apps driver to be generically ANSI compliant it should send several escaped sequences to try and hit on every possible way of talking an "ANSI" compliant terminal emulation into achieving what's actually required E.G. to CLS & HOME cursor position say "ESC[H ESC[F ESC[2J" This sort of thing being required because some features the emulation writer chooses to leave out of their emulation (which is within the range of the ANSI spec) can sometimes be simulated by other sequences and the important thing is that the driver produces the correct display output on as many ANSI compatable terminals as possible. To make a Microsloth ANSI.SYS emulation perform a VT-100 ESC[2J the programs ANSI driver would have to send "ESC[s ESC[2J ESC[u" to store current cursor position, clear screen and home, followed by restore previously saved cursor position... >There is additional information on ANSI X3.64, the DEC VT100, and >other topics in my collection accessed via this URL: > > http://www.cs.utk.edu/~shuford/terminal_index.html Sounds intresting but I'm email only for the mo. Cheers Johnathan. -- * Meeeow ! Call Spuddy on +44 (01268) 515441 for FREE mail & Usenet access * = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Newsgroups: comp.terminals Path: cs.utk.edu!news.msfc.nasa.gov!news.ingr.com!imci4 !newsfeed.internetmci.com!in2.uu.net!wizard.pn.com!brighton.openmarket.com !decwrl!amd!step!dan From: dan@stepeng.com (Daniel Weaver) Subject: Re: ANSI control sequence spec? (terminal emulation) Message-ID: Keywords: ANSI, terminal, X3.64, ISO DP6429, VT525 Organization: Step Engineering References: <4lofmo$mf2@elmer.wrq.com> <4m2tgoINNgeu@duncan.cs.utk.edu> Date: Tue, 30 Apr 1996 19:14:10 GMT Lines: 40 In article <4m2tgoINNgeu@duncan.cs.utk.edu> shuford@cs.utk.edu (Richard Shuford) writes: >In article <4lofmo$mf2@elmer.wrq.com> > jeffreyk@wrq.com (Jeff Kauffman) writes: >> >> In particular, I'm looking for the sequence CSI=2h, which is >> rumored to set the cursor to a block cursor. >Strictly speaking, there is no control sequence of this type in the >ANSI X3.64 standard itself. The ANSI X3 technical subcommittee did >not specify the operation of changing cursor appearance, so if such a >code exists, it must be a proprietary code invented by some vendor. >The committee set aside ranges of codes for such purposes, therefore >you could say that it is a code that conforms to the ANSI structure. The ANSI spec allows the characters <=>? to be used for private escape sequences. DEC has chosen ? to call out their private sequences for the CSI h and CSI l commands. Tektronix picked the = for some of their extentions to the CSI m command. These extensions are permitted by the ANSI spec but the actual behaviour of the sequence is not specified by the spec. The spec goes on to warn that a given private sequence may be implemented differently, or may mean something totally different, when sent to different terminals. The fact that CSI?25h and CSI?25l turn the cursor on and off on many non-DEC terminals can only be attributed to one of two things: 1) A consious attempt to make terminal programming easier. 2) The desire to blindly follow someone elses lead. > Maybe this code is associated with some ANSI-style terminal that is > not a Digital Equipment Corporation product, but that seems even > less likely to me. A quick scan of the Linux terminfo data base found the CSI=2l sequence in the iris-ansi entry. And yes it is used in setting block mode cursor. iris-ansi|iris-ansi-net|IRIS emulating ANSI terminal, cnorm=\E[9/y\E[12/y\E[=6l, cvvis=\E[10/y\E[=1h\E[=2l\E[=6h, Dan Weaver = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Newsgroups: comp.terminals Path: cs.utk.edu!stc06.ctd.ornl.gov!fnnews.fnal.gov!uwm.edu!news.cse.psu.edu !news.cc.swarthmore.edu!netnews.upenn.edu!news.voicenet.com !news2.noc.netcom.net!noc.netcom.net!ixnews1.ix.netcom.com!johnh From: johnh@netcom.com (john haskey) Subject: Re: ANSI control sequence spec? (terminal emulation) Message-ID: Keywords: ANSI, terminal, X3.64, ISO DP6429, VT525 References: <4lofmo$mf2@elmer.wrq.com> <4m2tgoINNgeu@duncan.cs.utk.edu> Date: Sat, 11 May 1996 05:24:40 GMT Sender: johnh@netcom15.netcom.com In article <4m2tgoINNgeu@duncan.cs.utk.edu>, Richard Shuford wrote: >In article <4lofmo$mf2@elmer.wrq.com> jeffreyk@wrq.com (Jeff Kauffman) writes: >> >> Does anyone know where I could find a spec for ansi terminal control >> sequences? In particular, I'm looking for the sequence CSI=2h, which is >> rumored to set the cursor to a block cursor. >> The DEC VT520 Programmers Reference Manual documents the DECSCUSR (Set Cursor Style) command, but judging by the name, it is DEC-specific. The sequence is CSI ps SP q Where ps can be 0, 1, 2, 3, 4 meaning Blinking Block, Blinking Block, Steady Block, Blink Underline, Steady Underline, respectively. > I'm assuming you really want the equals sign "=" in the sequence. > The sequence CSI 2 h would lock the keyboard on many DEC terminals. > CSI 2 l would unlock it. (That is a lowercase L in there, BTW.) > None of the sequences ending in 'h' that are documented in the ANSI Index by Final Character have an '=' sign in them. ---john. -- johnh@netcom.com Proud owner of a II/8 Balcom & Vaughn and an Allen Models 0-4-2T = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Newsgroups: comp.protocols.kermit.misc Path: utkcs2!stc06.ctd.ornl.gov!fnnews.fnal.gov!uwm.edu!rutgers !news.columbia.edu!watsun.cc.columbia.edu!fdc From: fdc@watsun.cc.columbia.edu (Frank da Cruz) Date: 26 Jun 1996 13:51:29 GMT Organization: Columbia University Message-ID: <4qrf91$mdv@apakabar.cc.columbia.edu> References: Lines: 44 Subject: Re: linedraw chars in vt320 emulation In article , Kees Hendrikse wrote: : : I'm trying to access a Unix-based application through MSKermit 3.14 under : "vt320" emulation. The app uses line-draw characters to draw boxes on the : screen, but the boxes keep showing up with lower-case letters instead of : line-draw chars. Kermit uses the Latin1 char set, DOS uses Code Page cp850 : and everything is set to 8 bits. : : The application uses DEC SS2 as single-shift-out character, i.e., the : top-line of a box is sent as: : : {0x9b}7;5H{0x8e}l{0x8e}q{0x8e}q{0x8e}q{0x8e}q{0x8e}q{0x8e}k : : Kermit simply ignores the 0x8e's. How do I tell kermit to process them : and put the appropriate line-draw char on the screen? : SS2 (hexadecimal 8E) is Single Shift 2. It means: the next character value is to be treated as a pointer into the terminal's G2 table. The character after it is an "l" or a "q" or a "k". So "q", for example, whose ASCII value is 113 (decimal), would be translated into the 113th character of whatever character set had previously been designated to G2. If the DEC "Special Graphics" character set had been designated to G2 by: ESC * 0 then SS2 followed by "q" should select a horizontal line box-drawing character. Evidently it does not do this in MS-DOS Kermit, so that's a bug that we will have to fix. The bug involves 8-bit SS2 only. If you use SS2 in its 7-bit form: ESC N everything works fine, so you might be able to work around the problem by telling your application that you have a 7-bit connection, hopefully coercing it to send C1 controls in their 7-bit form. Also note that locking shifts do work correctly, so using LS2 (ESC n) instead of SS2 produces the desired results: {0x9b}7;5H{0x1b}nlqqqqqqqqqqqqqqqqk{0x0f} Thanks for the report. - Frank = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Article 5305 of comp.protocols.kermit.misc: Path: cs.utk.edu!news.msfc.nasa.gov!newsfeed.internetmci.com!uwm.edu!rutgers!ne ws.columbia.edu!watsun.cc.columbia.edu!fdc From: fdc@watsun.cc.columbia.edu (Frank da Cruz) Newsgroups: comp.protocols.kermit.misc Subject: Re: DCS String Date: 20 Jun 1996 22:08:25 GMT Organization: Columbia University Lines: 41 Message-ID: <4qci4p$dil@apakabar.cc.columbia.edu> References: NNTP-Posting-Host: watsun.cc.columbia.edu In article , David Pyper wrote: : I'm using Kermit95, and when I use telnet to access a legacy application : on my site, the first screen sends some control codes which puts a the : following code on the status line: : : DCS STRING : : What is this and how can I get rid of it? : DCS means Device Control String. It is an escape sequence that starts out as ESC P (or 8-bit DCS) and ends with String Terminator, ESC \ (or 8-bit ST). When a DCS arrives, the terminal reads characters until the ST comes, then it interprets the intervening characters and executes them as a command. But what happens if the ST never comes? The terminal is hung forever, until you reset it. Try this on a real VT220 or 320 to see what I mean. How can this happen? Either your host is sending improper escape sequences (such as an unterminated DCS), or there is a disagreement between Kermit's terminal type and the type of terminal the host thinks you have (e.g. ESC P might be a valid sequence for some other terminal type), or the DCS lead-in was spontaneously generated as communications-line noise. A nice feature of Kermit 95 is that it tells you (in the status line) when a DCS has been received. That way, if the ST never comes, you'll know what's going on and you can (for example) push the "reset button" (verb \Kreset, assigned to Alt-R by default) to get back to normal. (Or, if more than about 4K of stuff arrives after DCS but before the ST, Kermit 95 breaks out of "DCS wait" automatically.) How do you make it stop happening? If the host is sending ESC P or 8-bit DCS to a terminal that it thinks is a VT220 or 320, without sending a the matching ST, then reconfigure your host not to do that -- it's wrong. For further assistance, send a session log to kermit-support@columbia.edu. - Frank