Xenix, K&R and f2c…

Well a friend of mine let me have access to a Xenix 386 machine with a C compiler! Which was great, The first thing I built was gzip, as I couldn’t imagine a machine without it…

then I spent the better part of 3 hours ‘fixing’ f2c/libf2c for some Zork fun. Well let me say that while it was fun and all, the C environment from Xenix is…. old. No stdlib.h.. Among other things. Also gzip and f2c had issues where some programs would use ‘local’ copies of procedures… Naturally whatever compiler (MS?) my friend had wouldn’t have any of that!

Not to mention the other slight stumbling block, was that this was a K&R Compiler… Ouch.

However I was able to bash together a version of f2c that ran!

However it left me fixing the prototypes for the output… Because by default f2c outputs in ANSI.

It’s no biggie for ‘hello’ or even the textcnv program for Dungeon, but there was no way I was going to do this for the 100’s of procedures in Dungeon…

But the upshot is that the simple answer was a man page away…

Use the -K flag, instead of the -C flag, and all will be well.

I didn’t bother trying to clean up the gettim.C thing, maybe some other day, but I can’t promise much.

But in the meantime, here it is, for the 2 or 3 people with some kind of legacy Xenix thing out there..

 

Dungeon-2.5.6 for Xenix.

This is an 80386 exe, so you 80286 users would be out of luck… I don’t know if I even can make 80286 stuff.. I think the next thing I’ll have to see how hard it is to build is that ACK as it says it supports Xenix… And free compilers are always ‘good’ things.

4 thoughts on “Xenix, K&R and f2c…

  1. Hey any chance you could provide me with the code for the Dungeon you built? I have the full development set for Xenix 80286 and I could compile it for 286. I’m trying to find Zork for Xenix 286. My machine is running Microsoft Xenix 286 V3.1 and this is before SCO V

  2. neozeed,

    Thank you so much. I do have Fortran and development sets believe it or not for Microsoft Altos Xenix 8086 for Xenix 3.0 & 3.1. I also have the full development sets for Xenix 80286 running Xenix 3.2. I have
    x.out and fortran (f77) You’ll have to forgive me I am not an expert on programming… I’ve compiled maybe a few programs in the past by using “make” with I think C compiler.

    Would you be interested in giving me a hand at compiling it? Any chance you can contact me off line if you are interested and we can talk?

Leave a Reply