From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f53ba,fd53726026d8bec7 X-Google-Attributes: gidf53ba,public X-Google-Thread: 1164f8,fd53726026d8bec7 X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 1992-06-08 05:16:32 PST Xref: sparky comp.sys.dec:3462 comp.sys.ibm.pc.misc:9222 Path: sparky!uunet!decwrl!mcnc!ais!bruce From: bruce@ais.com Newsgroups: comp.sys.dec,comp.sys.ibm.pc.misc Subject: Re: Looking for VT-100 escape sequences listing. Message-ID: <3250@ais.com> Date: 8 Jun 92 12:15:26 GMT References: <5JUN199209015583@zeus.tamu.edu> <6825889@MVB.SAIC.COM> <1992Jun6.000727.56330@cc.usu.edu> Organization: Applied Information Systems, Chapel Hill, NC In article , chan@ece.scarolina.edu (Simon Chan) writes: >>In article , wiegley@phakt.usc.edu (Jeffrey Wiegley) writes: >>> regarding: >>> >>> NoNoNoNoNo. I want a LISTING of what escape sequences do what on a vt100, >>> not a list of escape sequences for a vt100. >>> >>> I.E. something like... >>> >>> (ESC)[;H(ESC)[2J will clear the screen and home the cursor >>> etc, etc... >>> > Taken from VT100 Programming Reference Card (DIGITAL) Typing in all these ANSI escape sequences is a bit of a chore (which is why I didn't do it even though I have all the DEC documentation from their latest terminals). It's a great public service & I'm sure there are a lot of people on the net who will appreciate it. But there are a couple of typos in your list: > Save cursor and attributes ESC 7 > Restore cursor and attributes ESC B Restore cursor and attributes is ESC 8, not ESC B. The attributes saved and restored are the position, video attribute modes (reverse video, etc), origin mode, character sets (G0, G1, etc), & wrap flag. On VT220's and above, it also saves the selective erase attribute & the single shift 2 or single shift 3 (SS2 or SS3) state. > From cursor to end of line ESC [ K or ESC [ O K > From beginning of line to cursor ESC [ 1 K > Entire line containing cursor ESC [ 2 K > From cursor to end of screen ESC [ J or ESC [ O J > From beginning of screen to cursor ESC [ 1 J > Entire screen ESC [ 2 J The ones given here as ESC [ O K and ESC [ O J should be ESC [ 0 K and ESC [ 0 J (number zero, not letter "O"). > Programmable LEDs > ESC [ Ps;Ps;...Ps q > Ps = 0 or None All LEDs Off > 1 L1 on > 2 L2 on > 3 L3 on > 4 L4 on > Any other parameter values are ignored. Note that the programmable LED's are not supported on DEC terminals above the VT100 family. > Character Set (G0 and G1 Designators) Use these with the ASCII characters Shift In/Shift out (SI/SO, hex 0f and 0e respectively). > Scrolling Region > ESC [ Pt ; Pb r > Pt is the number of the top line of the scrolling region; > Pb is the number of the bottom line of the scrolling region > and must be greater than Pt. The default for pt is line 1, the default for pb is the end of the screen. NOTE: Most of the escape sequences have defaults for the parameters, if the values are outside the range or omitted. The action is not necessarily the same for out-of-range parameters and for omitted parameters, but it is usually not `the sequence is ignored'. For example, in the cursor position sequence, the default for the row and the column is 1, if either or both of these is 0 or omitted. But if either one of them is greater than the number of rows or columns, then the cursor moves to the last row or column (as appropriate). Likewise for the Set Scrolling Region sequence; if the row and column are omitted then the effect is to set the entire screen to be one scrolling region, NOT!!! as some emulators implement it, to ignore the sequence or, worse, to set it to a 1-line scrolling region (!!!). One minor pet peeve. An awful lot of the VTxxx emulators out there don't really emulate a VT100 very well - this includes a lot (probably _most_) of the commercial products. I know that it can be tricky to get all the little details right - I've written them myself, but I _do_ wish that anyone who is writing one of these things would get hold of some copies of the VTxxx torture test/demo files and try running them through their emulators. You may be surprised at how poorly a lot of the emulators out there handle the little details ... some of them are so bad that they are not really useable as VT100 emulators; they are more of a satire on a VT100 than a real emulator. Bruce C. Wright