[COFF] TECO variants
Mike Markowski via COFF
coff at tuhs.org
Tue Sep 23 22:13:42 AEST 2025
On 9/22/25 10:28 PM, Joseph Holsten via COFF wrote:
> ...I’ve wondered how unusual extensions like Control-R were on other systems. Were different implementations as different as some authors make it sound? Or were they roughly as similar as the QED implementations?
>
> Also, do you buy the modern argument that TECO vs emacs proved the command language and the extension language should be entirely different?
The 1980 DEC TECO manual has a section on some differences, but they
don't seem that big. Their list is likely not all-inclusive, only
talking about their versions of teco on various OSes. I learned TECO at
age 16 in 1978 on a PDP-11/70 RSTS/E system and thought I was
all-powerful :-D, such an incredible program. For fun I recently
compiled Paul Cantrell's Video TECO on my ubuntu box (must add -lncurses
to makefile). It's aaalmost as nice as vi but of course not as fully
visually oriented. I won't be giving up on vim...
Many TECO commands can be preceded by an integer or followed by a
string. The output of a command can be used as the input to another,
making TECO a quasi-functional language. I don't have the background to
comment on the pros and cons of the command language, but for something
begun in 1962 it's impressive.
"It has been observed that a TECO command sequence more closely
resembles transmission line noise than readable text." -Ed Post
Here is a macro of Cantrell's that converts the word at current pointer
position to lower case:
.UU<0A-32"E0;'0A-9"E0;'0A-10"E0;'C>.UL$QUJQL-QU<0A-64"G0A-91"L0A+32IDR''C>$
What do you mean, it's unreadable? :-) Curious what it was doing, I
rewrote with comments:
.UU ! Put dot in Q-reg U. !
< ! Loop till finding white space. !
0A-32"E0;' ! Ascii code at dot == space? break !
0A-9"E0;' ! Ascii code at dot == \t? break !
0A-10"E0;' ! Ascii code at dot == \n? break !
C ! Fwd 1 char. !
>
.UL$ ! Put loc of 1st white space in L. !
QUJ ! Return to original dot. !
QL-QU< ! Loop from U (orig dot) to L (1st white space). !
0A-64"G ! If ascii code at dot >= 'A': !
0A-91"L ! If also <= 'Z': !
0A+32I ! Insert lower case letter. !
D ! Delete upper case letter. !
R ! Back up 1 char to prepare for 'C' below. !
'
'
C ! Fwd 1 char !
>$
Mike Markowski
More information about the COFF
mailing list