
Why old versions of 286 Xenix did not run on 386s - yuhong
http://www.os2museum.com/wp/?p=2626
======
caf
I wonder if you could fix this by writing a binary patch that redirected the
copyseg routine to a version that zeroed the last 2 bytes of the destination
instead of copying them from the source.

~~~
yuhong
Yea, but copyseg may also be used for other things too and as mentioned in the
article and comments this wasn't the only problem with IBM PC XENIX 1.0.

------
flinkblinkhink
What useful stuff could really be done on Xenix - seems like such a low spec
system to run a unix ish OS on.

~~~
bodyfour
The first UNIX machine that I used was a 286. There were several companies
that offered UNIX or UNIX-like environments on AT hardware. In my case I began
with Microport UNIX, but I did get my share of Xenix later on.

In our case we had several rs232-connected terminals we used to do development
on. By today's standards it was primitive, but the tools weren't really that
different : we had vi, make, a C compiler, etc. We also used troff for
typesetting documentation. Primarily we were developing bespoke curses-based
apps for various companies.

In addition to the serial terminals, the console supported virtual terminals.
You could switch between four of them with Alt+F1/F2/F3/F4 just like a modern
linux machine in text mode. This made the console a coveted spot for doing
programming.

We certainly weren't running X11. For one thing, it would have taken too many
resources. X11 was barely usable with 4MB of RAM (I think we started with
2.5MB but we did upgrade that a bit eventually) but at that point you wouldn't
want to run a compile job too. With 8MB it was actually usable enough to run
some xterms.

However, even if that machine had the RAM the SVR2-based OS wouldn't have been
modern enough to run X. You didn't have sockets, the select() system call,
gettimeofday() (only second-granularity timekeeping was available from the
kernel), etc.

You didn't have networking of course, other than uucp. With uucp you could at
least hookup with the internet for email and usenet although we never did
that. We did have local email though. (Only the mailx CLI though; nothing as
fancy as Elm or PINE)

I remember processes could only use up to 20 file descriptors. Of course,
without sockets there wasn't much to spend them on.

There was no multithreading, although SYSV shared memory was available. If you
really wanted to you could do MT-like programming using explicit shared memory
segments, but it usually wasn't worth the bother.

Everything on the machine was statically-linked. Shared libraries would have
been pretty difficult to implement on the 286 since it didn't have real
virtual memory: each process's memory had to be contiguous in physical RAM. Of
course this meant that there was no mmap() system call. malloc() was
implemented completely on top of sbrk()

There wasn't any job-control (^Z/fg/bg etc) -- every terminal was running a
single process at a time. Tools like screen were just becoming available but
we couldn't use it since that OS didn't support pty's.

The shells available weren't nearly as fancy as we have today -- no up-arrow
to get the previous command, etc. In fact, when we started we only had
/bin/sh: if you made a typo in a command you'd have to retype the whole thing.
Very soon afterwards we got a copy of csh so we could do editing like "!!",
"^foo^bar", etc.

For scripting we mostly had awk/sed/sh. This was before perl became popular;
obviously before things like python and ruby were on the scene.

Oh, and I should also mention: these types of OSes were sold for around $1000
in 1986 dollars. There were some cheaper options, primarily Coherent's
unlicensed UNIX clone which started at around $100. However, the biggest
player in the space was SCO and they stayed eye-watering expensive until they
got swept away by the tide of Linux and BSDs in the 90s.

Anyway, although it was primitive in every way compared a modern Linux or OS/X
machine it was certainly a useful environment for its time.

If you're interested in this sort of history, I'd recommend checking out
[http://www.tuhs.org/](http://www.tuhs.org/) You can get even earlier PDP-11
versions on UNIX and run them in an editor. It's fascinating to see what parts
of changed drastically and what things are exactly the same 35 years later.

~~~
rootbear
The 20 file descriptor limit was a pain for an app I worked on that wanted to
write data to 26 files based on the first letter of a person's last name. I
would have killed to have been able to keep 26 descriptors open at once. Ah,
the bad old days...

