Hacker News new | past | comments | ask | show | jobs | submit login
Why old versions of 286 Xenix did not run on 386s (os2museum.com)
47 points by yuhong on Sept 21, 2014 | hide | past | favorite | 13 comments

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.

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.

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

Early versions of Unix didn't require a lot of resources. The first machine I used Unix on was a PDP-11/45 with 256K (yes, kilobytes) of memory that happily supported several users. A PC/AT would have probably performed reasonably well running XENIX if it had enough memory so it wouldn't have to swap all the time. (The Unix I used on the 11 was Version 7 from Bell Labs.)

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/ 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.

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...

Company-wide email for Microsoft.

You are aware that Unix was written on the PDP-7?

4K-word of RAM and tape drives.

[1]: http://en.wikipedia.org/wiki/PDP-7

My high school had 12 terminals on a TRS-80 Model 16 running Xenix. It was mostly used for a COBOL class. 6-8 MHz 68000.


You could, for example, have a dozen text-based POS terminals connected to one central machine via serial connection. Put a modem on there too and you can process credit card transactions. Simple apps without graphics really didn't consume many resources back in the day.

I set up a number of small companies in the Philadelphia area with Foxbase running on Xenix with terminals on each desk connected to a cheapish PC. Much cheaper than Netware and separate PCs!

I too had a similar experience with Foxbase, then CA Clipper, then FoxPro, then MS Visual FoxPro. Oh the good old days.

For quite a long time my main OS was Minix 1.5(?) on an NEC V30 (8086 clone) with under 1MB of RAM. I even had a tty plugged into the serial port so it could (just about) be used by two people (or more likely, for scrolling logs on the tty while using the main display for work).

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact