vi

148 views
Skip to first unread message

Peter Gode

unread,
May 7, 2024, 8:48:57 AMMay 7
to [PiDP-11]
ich finde auf 2.11BSD und unix5,6,7 kein vi editor!
Gibt's ersatz?

Johnny Billquist

unread,
May 7, 2024, 9:15:35 AMMay 7
to pid...@googlegroups.com
vi do exist in 2.11BSD:

simh:/home/bqt> which vi
/usr/ucb/vi

Johnny

On 2024-05-07 14:48, Peter Gode wrote:
> ich finde auf 2.11BSD und unix5,6,7 kein vi editor!
> Gibt's ersatz?
>
> --
> You received this message because you are subscribed to the Google
> Groups "[PiDP-11]" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to pidp-11+u...@googlegroups.com
> <mailto:pidp-11+u...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pidp-11/6377134c-9341-4504-82d5-d6839ccc41acn%40googlegroups.com <https://groups.google.com/d/msgid/pidp-11/6377134c-9341-4504-82d5-d6839ccc41acn%40googlegroups.com?utm_medium=email&utm_source=footer>.

--
Johnny Billquist || "I'm on a bus
|| on a psychedelic trip
email: b...@softjar.se || Reading murder books
pdp is alive! || tryin' to stay hip" - B. Idol

Warner Losh

unread,
May 7, 2024, 9:25:07 AMMay 7
to Johnny Billquist, [PiDP-11]


On Tue, May 7, 2024, 7:15 AM Johnny Billquist <b...@softjar.se> wrote:
vi do exist in 2.11BSD:

simh:/home/bqt> which vi
/usr/ucb/vi

It can be built for V7, but there's a couple of other libraries you need to bring over too iirc. But it's also too large to be practical on V7 since iiirc that lacks overlay support...

Warner

To unsubscribe from this group and stop receiving emails from it, send an email to pidp-11+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pidp-11/bc15ee78-7efe-419f-815c-9aa047bf9f60%40softjar.se.

Johnny Billquist

unread,
May 7, 2024, 10:04:58 AMMay 7
to Warner Losh, [PiDP-11]
On 2024-05-07 15:24, Warner Losh wrote:
>
>
> On Tue, May 7, 2024, 7:15 AM Johnny Billquist <b...@softjar.se
> <mailto:b...@softjar.se>> wrote:
>
> vi do exist in 2.11BSD:
>
> simh:/home/bqt> which vi
> /usr/ucb/vi
>
>
> It can be built for V7, but there's a couple of other libraries you need
> to bring over too iirc. But it's also too large to be practical on V7
> since iiirc that lacks overlay support...

I would be surprised if you managed to even link it.
vi depends on overlays and separate I/D space to fit:

simh:ucb/ex> file /usr/ucb/vi
/usr/ucb/vi: overlaid separate sticky executable
simh:ucb/ex> size /usr/ucb/vi
text data bss dec hex
48512 3670 14488 66670 1046e total text: 78592
overlays: 14656,15424
simh:ucb/ex>


Johnny

Johnny Billquist

unread,
May 7, 2024, 10:17:32 AMMay 7
to pid...@googlegroups.com
On 2024-05-07 16:04, Johnny Billquist wrote:
> On 2024-05-07 15:24, Warner Losh wrote:
>>
>>
>> On Tue, May 7, 2024, 7:15 AM Johnny Billquist <b...@softjar.se
>> <mailto:b...@softjar.se>> wrote:
>>
>>     vi do exist in 2.11BSD:
>>
>>     simh:/home/bqt> which vi
>>     /usr/ucb/vi
>>
>>
>> It can be built for V7, but there's a couple of other libraries you
>> need to bring over too iirc. But it's also too large to be practical
>> on V7 since iiirc that lacks overlay support...
>
> I would be surprised if you managed to even link it.
> vi depends on overlays and separate I/D space to fit:
>
> simh:ucb/ex> file /usr/ucb/vi
> /usr/ucb/vi:    overlaid separate sticky executable
> simh:ucb/ex> size /usr/ucb/vi
> text    data    bss    dec     hex
> 48512   3670    14488   66670   1046e   total text: 78592
>         overlays: 14656,15424
> simh:ucb/ex>

Comments in the Makefile mentions building without split I/D, so maybe
possible, but then it is even more relying on overlays... Not sure if
that have been tested in ages, though.

Clem Cole

unread,
May 7, 2024, 11:30:35 AMMay 7
to Warner Losh, [PiDP-11]
Warner,


Careful - early ex/vi did not need overlays -- it does not have as many features, supports far fewer terminals, likely to have
many  more bugs, etc ... but it worked "good enough" for many of us in those days -- even on V6.😉  
Anyway, an early version of ex with the vi (visual mode) with a limited termcap as Sixth Edition (PDP-11) binaries are the original 2BSD tape

I have not tried this in a while, but I put this set of directions together for someone else a few years ago.  The SIMH instances I currently have are either virgin or
It's heavily mucked with, so I can not check it 100%, but I'm fairly sure it's complete.
You might want to consider just installing the entire 2bsd tape on V6 and later V7, as I may have missed something
that ex/vi needs (I don't think so).

FWIW:  adding all of the core 2bsd distribution tape would be very similar to
how many of the old UNIX sites all tended to run it back in the day [before Shannon and Cantor's overlay code  - which got picked up in the later
2BSD releases].  These binaries work for Sixth Edition, but frankly, if you want to run ex/vi on an early V7, just read the tape into your system and rebuild
the binaries following Bill's instructions.

That said, I believe that if you copy the file 2bsd.tar.gz from TUHS, unzip it on your local system, and then copy that file
to /tmp on your virgin SIMH V6 instance.  
Now the following script should set up ex/vi (note you probably should
do the mkdir(1) commands to make the directories since the original V7 tar(1), like it predecessor, tp(1),
handled directories a little differently than modern versions).

dd if=/tmp/2bsd.tar bs=1b skip=1 count=49 of=/bin/v6tar
chmod 775 /bin/v6tar

ln /bin/v6tar /bin/tar

cd /
mkdir bin/ucb
mkdir bin/etc
mkdir doc/ex
mkdir doc/vi
mkdir ucb
mkdir usr/preserve

v6tar xvf /tmp/bsd.tar \
bin/etc/termcap \
bin/etc/ttytype \
bin/lib/ex2.0preserve \
bin/lib/ex2.0recover \
bin/lib/ex2.0strings \
bin/ucb/ex \
doc/ex/edit.tut \
doc/ex/edit.vindex \
doc/ex/ex.changes \
doc/ex/ex.rm \
doc/ex/ex.summary \
doc/ex/makefile \
doc/vi/makefile \
doc/vi/vi.chars \
doc/vi/vi.in \
doc/vi/vi.summary \
doc/vi/x \
man/ex.u \
man/vi.u \
tar.1

ln bin/ucb/ex bin/ucb/vi

You'll probably want to change where the man pages are including tar.1 but I'll let you figure that all out. This will get you going.
Also in later BSDs (3.0) /usr/bin/ucb was deprecated and everything moved into /usr/ucb -- I'm just giving everything to you
as WNJ did in the 2BSD tape.

ISTR you'll need to look at the ex manual, on reboot /etc/rc runs a script to run ex2.0preserve/ex2.0recover et al.
before the rc script clobbers /tmp.  

Finally, if you add /usr/bin/ucb to your PATH then ex(1) and vi(1) should "just work".

isy...@gmail.com

unread,
May 7, 2024, 11:50:27 AMMay 7
to [PiDP-11]
Dear All,

 Last non split I/D space version of vi (binary) I have is for Ultrix V2. The V3 tapes all have a split I/D version so far as I know.
 This version is 'close' to V7(m). Runs OK on a PDP11/40 (sort of! see Isysxp/PDP11-on-the-M5-Core: A networked PDP 11/40 emulator using the M5Core2 (github.com)).
 There is a V3 image (non split I/D (overlay)sysgen'd kernel) here as well with a split I/D version of vi which wont run on this emulator.
 Lots of fun to be had making these OSs work!

Regards, Ian.

Clem Cole

unread,
May 7, 2024, 11:58:46 AMMay 7
to Peter Gode, [PiDP-11]
below

On Tue, May 7, 2024 at 8:49 AM Peter Gode <peter...@gmail.com> wrote:
ich finde auf 2.11BSD und unix5,6,7 kein vi editor! Gibt's ersatz?
<I can't find a vi editor on 2.11BSD and unix5,6,7! Is there a replacement?> 
The earliest version of ex(1) is on the 2bsd tape, and it is known to work on any UNIX from the sixth edition onward (see my reply to Warner) - remember vi(1) is the visual command for ex(1).  Joy links ex(1) binary to vi(1), checks to see how it was started and enters vi(1) mode if that's how ex(1) starts up.  I never tried to get it running on the Fifth edition - we did not have it back in the day - we just used ed 😉

The biggest issue will be the C programming language matured from V5 to V6 to V7.

Webb Miller's 's' from his tools book is a very simple (subset) vi-based tool for an ANSI terminal only and extremely portable.
It's known to work on 8-bit systems like Z80's and 6502 so it will certainly fit on a Fifth or Sixth edition, but the C compiler will take some work.

Heinz-Bernd Eggenstein

unread,
May 7, 2024, 2:52:15 PMMay 7
to [PiDP-11]
As for 2.11BSD, would "jove" count as Ersatz?  http://www.retro11.de/ouxr/211bsd/usr/new/man/cat1/jove.0.html

It's in /usr/new/jove

I personally see no reason to use vi if you can use JOVE instead, but maybe there is a specific reason why you need something like vi ??

Cheers
HBE

David Johnson

unread,
May 7, 2024, 3:51:32 PMMay 7
to Heinz-Bernd Eggenstein, [PiDP-11]
Let’s not start any religious editor wars. 

  -- ddj
Dave Johnson

On May 7, 2024, at 2:52 PM, 'Heinz-Bernd Eggenstein' via [PiDP-11] <pid...@googlegroups.com> wrote:


--
You received this message because you are subscribed to the Google Groups "[PiDP-11]" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pidp-11+u...@googlegroups.com.

Carl Marbach

unread,
May 7, 2024, 3:54:26 PMMay 7
to pid...@googlegroups.com

Real DECmen use TECO.....

David Johnson

unread,
May 7, 2024, 3:55:14 PMMay 7
to Carl Marbach, pid...@googlegroups.com

Steve Platt

unread,
May 7, 2024, 4:07:37 PMMay 7
to pid...@googlegroups.com

HT or HK??

And do you mean HKEW$EX$$  ?

Fun TECO game:  type in your name to see what it does.  Opt: use an $ after every character.

Johnny Billquist

unread,
May 7, 2024, 4:21:01 PMMay 7
to pid...@googlegroups.com
jove is a good alternative, in my opinion. Of course, this probably
boils down to Emacs vs. vi as usual.

And while I'm at it, both vi and jove are limited to editing files that
fit in memory. Which is why I might plug a bit for nema, which is my
emacs clone I wrote. It works both in RSX, 2.11BSD and other systems,
fits on a PDP-11 while still able to edit files over a meg in size.

Johnny
> --
> You received this message because you are subscribed to the Google
> Groups "[PiDP-11]" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to pidp-11+u...@googlegroups.com
> <mailto:pidp-11+u...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pidp-11/9411bbf4-0107-4f86-a73d-daba4706fc34n%40googlegroups.com <https://groups.google.com/d/msgid/pidp-11/9411bbf4-0107-4f86-a73d-daba4706fc34n%40googlegroups.com?utm_medium=email&utm_source=footer>.

Johnny Billquist

unread,
May 7, 2024, 4:25:44 PMMay 7
to pid...@googlegroups.com
You can hack anything with Teco and DDT.

On 2024-05-07 22:07, Steve Platt wrote:
> HT or HK??

That of course depends on what you want to do.

> And do you mean HKEW$EX$$  ?

You really want to make sure people get miserable? :-)

> Fun TECO game:  type in your name to see what it does.  Opt: use an $
> after every character.

Sadly, my name is rather uninteresting. :-(

Johnny
>>>>> https://groups.google.com/d/msgid/pidp-11/9411bbf4-0107-4f86-a73d-daba4706fc34n%40googlegroups.com <https://groups.google.com/d/msgid/pidp-11/9411bbf4-0107-4f86-a73d-daba4706fc34n%40googlegroups.com?utm_medium=email&utm_source=footer>.
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "[PiDP-11]" group.
>>>> To unsubscribe from this group and stop receiving emails from it,
>>>> send an email to pidp-11+u...@googlegroups.com.
>>>> To view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/pidp-11/BF8678E6-1A3B-4162-84FF-35803C23DC94%40brown.edu <https://groups.google.com/d/msgid/pidp-11/BF8678E6-1A3B-4162-84FF-35803C23DC94%40brown.edu?utm_medium=email&utm_source=footer>.
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "[PiDP-11]" group.
>>> To unsubscribe from this group and stop receiving emails from it,
>>> send an email to pidp-11+u...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/pidp-11/b17739e5-c3ad-4a78-9d8a-eb458e9266de%40marbachs.com <https://groups.google.com/d/msgid/pidp-11/b17739e5-c3ad-4a78-9d8a-eb458e9266de%40marbachs.com?utm_medium=email&utm_source=footer>.
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "[PiDP-11]" group.
>> To unsubscribe from this group and stop receiving emails from it, send
>> an email to pidp-11+u...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/pidp-11/81C87ABE-90BE-473A-A9A0-B56F7FB53F60%40brown.edu <https://groups.google.com/d/msgid/pidp-11/81C87ABE-90BE-473A-A9A0-B56F7FB53F60%40brown.edu?utm_medium=email&utm_source=footer>.
>
> --
> You received this message because you are subscribed to the Google
> Groups "[PiDP-11]" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to pidp-11+u...@googlegroups.com
> <mailto:pidp-11+u...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pidp-11/83b5e766-87cd-483c-9fcd-d11bc1a765a4%40comcast.net <https://groups.google.com/d/msgid/pidp-11/83b5e766-87cd-483c-9fcd-d11bc1a765a4%40comcast.net?utm_medium=email&utm_source=footer>.

Charley Jones

unread,
May 7, 2024, 4:33:56 PMMay 7
to Johnny Billquist, pid...@googlegroups.com
Johnny Five Alive!

Sent from my iPhone 15pm!
Charley Jones, PMP

> On May 7, 2024, at 1:25 PM, Johnny Billquist <b...@softjar.se> wrote:
>
> You can hack anything with Teco and DDT.
> To view this discussion on the web visit https://groups.google.com/d/msgid/pidp-11/4becc020-d6f1-49c2-9384-fb4f114085a2%40softjar.se.

Bob Eager

unread,
May 7, 2024, 5:08:12 PMMay 7
to [PiDP-11]
On Tuesday 7 May 2024 at 21:25:44 UTC+1 b...@softjar.se wrote:
You can hack anything with Teco and DDT.

The correct quote is "You can hack anything you want, with TECO and DDT". (Alice's PDP-10)

The original being "You can get anything you want, at Alice's Restaurant"

(excepting Alice)

Johnny Billquist

unread,
May 7, 2024, 5:17:49 PMMay 7
to pid...@googlegroups.com
On 2024-05-07 23:08, Bob Eager wrote:
> On Tuesday 7 May 2024 at 21:25:44 UTC+1 b...@softjar.se wrote:
>
> You can hack anything with Teco and DDT.
>
> The correct quote is "You can hack anything you want, with TECO and
> DDT". (Alice's PDP-10)

Thanks for the correction. Now that I see it, I remembered it better. :-)

> The original being "You can get anything you want, at Alice's Restaurant"
>
> (excepting Alice)

Yup.

Johnny

steve...@gmail.com

unread,
May 7, 2024, 8:39:50 PMMay 7
to [PiDP-11]

You can even calculate the digits of Pi in TECO:



What else could anyone ask for out of an editor?

-- steve

Steve Platt

unread,
May 7, 2024, 9:00:08 PMMay 7
to pid...@googlegroups.com

And the possibly apocryphal Fortran compiler written in Teco...

I wasn't that complex.  But I did, for a while, keep a long-running correspondence with a group of friends.  Early email era, most didn't have it, so we communicated by USMail. A single file with whatever I wrote and some metadata ('.fred" marker, etc. for fred).  And a Teco macro; whenever someone ("fred") sent me a letter, I would write a bit in the "everyone" letter with fred's update and what was new in my life.  I ran the macro, which prompted me for a name ("fred"), read in the file, printed out the new stuff after the fred marker, and move the fred marker to the end.

Everyone's reply had only the text that was new since they last wrote to me.

Ah, the state of the art in 1979...

--
You received this message because you are subscribed to the Google Groups "[PiDP-11]" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pidp-11+u...@googlegroups.com.

Carl Marbach

unread,
May 8, 2024, 7:29:16 AMMay 8
to pid...@googlegroups.com
My article in November 1979  RSTS Professional:

Why TECO.jpg

Carl Marbach

unread,
May 8, 2024, 7:33:18 AMMay 8
to pid...@googlegroups.com
My TECO article from November 1979 RSTS Professional

Why TECO 1.pdf

timr...@gmail.com

unread,
May 8, 2024, 12:12:06 PMMay 8
to [PiDP-11]
Personally I prefer VI.  Your mileage may vary.

Lawrence Fisher (RealTimeCat)

unread,
May 11, 2024, 7:36:46 PMMay 11
to [PiDP-11]
That brings back some memories - my first "published article" was a TECO macro that used the W feature to provide a screen-driven more type of command on RSTS/E, published in your magazine!
Reply all
Reply to author
Forward
0 new messages