• COHERENT 3.2 development system including all MWC sources available

    From Udo Munk@21:1/5 to All on Wed Feb 27 13:30:27 2019
    I have rebuild a complete COHERENT 3.2 system, that includes all the latest MWC sources
    and build scripts, to build the whole system one self. All the details are too much, so the
    following is an abstract only.

    Of course I use virtual machines nowadays and not some half broken retro hardware,
    details can be read here: https://www.autometer.de/unix4fun/coherent/index.html

    During the 90's MWC used RCS for the source repository and the MWC archives includes
    the change history for most parts of the system. At that time RCS revision 4 was used,
    later revisions are much larger and probably won't build on 16bit UNIX systems anymore.
    So I Y2K fixed RCS 4, but so that it sticks with 2 digit year numbers, logs and headers
    looks more consistent, IMHO. Modified sources and binaries are installed under /usr/local,
    the manual pages are added. If not familiar with RCS start reading 'man rcsintro'.

    The whole system sources under /usr/src/sys are checked in with RCS, when possible
    the old versions were kept. I also cleaned out RCS and the sources from unneeded stuff
    like old binaries, objects etc. The sources are the latest versions I could find and make fit
    together. The resulting system should be like 3.2.1a plus later 3.2.2 and 3.2.3 improvements.
    By running a single shell script the whole system is build on a second hard disk, which then
    can be booted to use the self build system, see file /README.

    The sources contain stuff for the PDP-11, Z800x and m68k versions of COHERENT, it still might
    be possible to build cross compiler/assembler etc. for these targets, so far the focus was on
    getting the iapx286 version working, no idea if other targets can be build.

    Besides RCS quite a bit of the UNIX software we were using in the 90's and which was distributed
    with sources is build and installed under /usr/local. Some nice games are included, modified
    to keep the data files under /usr/local/lib. Traditionally games lived under /usr/games on
    such systems, but this was populated by MWC already and I want add-on software clearly
    separated. Manual pages for the add-on software are installed under /usr/man/LOCAL and
    indexed.

    Under user udo (no password) there is some additional software installed, benchmarks
    and z80pack-1.6, that is able to run a 32KB CP/M 2.2. A bootable CP/M disk images
    is included from later z80pack releases, that allows to use the system to some degree.
    During the early 90's I was using COHERENT 3.x systems as Z80 cross development machine,
    shows the serious usage from way back then. I also installed MWC's Z80 cross assembler besides
    my own, the Z80 still is an interesting target nowadays, we still need cross assemblers for that.
    Systems from that time have no skeleton files to setup users, so there are .rc files for Bourne,
    Korn and csh shell under user udo. The Korn shell is configured as login shell, that is what I
    prefer, of course can be changed in /etc/passwd.

    Download of the VM image is available here: https://www.autometer.de/unix4fun/coherent/ftp/vms/

    Of course the system still has bugs, lots of things could be improved, support for newer
    hardware could be added and what not else. With the complete system sources handy on
    a working development system everything can be modified to your hearts content, I believe
    the provided box is a very good base for doing further work with the system.

    Last but not least if you have problems with the system feel free to drop me a line, I probably
    will look into it.

    Best regards,
    Udo

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Udo Munk@21:1/5 to All on Tue Mar 19 15:03:35 2019
    I have uploaded a 3.2 disk image with several improvements:

    The shell had a problem with graves, introduced by a late patch. I checked out an older
    version of eval.c without the patch, now graves are working again for existing scripts and
    I removed workarounds like used in /etc/brc.

    The international keyboard support was missing some sources, added that and the programs
    to load international keyboard tables now can be build completely from the sources.

    I configured uucp using a com2l direct connection. The Qemu VM can map the serial lines
    to TCP/IP ports on the host, and with Taylor uucp on the host we can connect to TCP/IP
    ports. When trying it with the 3.2.1 uucp build from sources I noticed several build
    problems, which are fixed. The window size was raised to 6 in the sources and I got
    lots of rejected packets for some reason. Changed the g protocol back to 3/64 default,
    is working now perfectly. Great fun to mess with the old HDB uucp bits again we used before
    Taylor uucp. I left the old MWC BBS system and devices configuration as comments in the
    uucp configuration files for historical reasons, active is a direct com2l device to the host tho.
    Running uucp over a 9600 baud serial line is slow, that results in ca. 900 Bytes/s transmission
    rate. But then again you might get an idea how that was using COHERENT uucp with a
    2400 baud Hayes modem in 1990 :)

    Have fun,
    Udo

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Udo Munk@21:1/5 to All on Mon Mar 25 12:40:50 2019
    I made further improvements to the 3.2 source box and uploaded a new disk image.

    There were several permission and build problems, which have been fixed. If you build
    the 3.2.1 system from sources now, and then cpdir /usr/sys and /usr/src/sys to the build disk, the new system also can rebuild it self from sources. Ad infinitum.
    This makes sure that development tools, libraries, shell etc. are properly working.

    Then I have ported unproto to COHERENT 3.2, back then in 1995 I had not time and patience to fiddle with the old 16 bit stuff anymore. By using acc instead of cc
    ANSI C can be compiled now. To test the setup I've checked out the ANSI'fied revision of the MWC Z80 cross assembler and modified the Makefile to build
    with acc.

    Have fun,
    Udo

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Nils M Holm@21:1/5 to Udo Munk on Tue Mar 26 19:07:22 2019
    Udo Munk <udo.munk@freenet.de> wrote:
    Then I have ported unproto to COHERENT 3.2, back then in 1995 I had
    not time and patience to fiddle with the old 16 bit stuff anymore.
    By using acc instead of cc ANSI C can be compiled now.

    I have meant to do this in order to port my latest LISP system (http://t3x.org/klisp/) to Coherent 3.2!

    When compiling it I noticed a minor hickup in acc/unproto: unproto
    seems to introduce a spurious line break in its output, which means
    I have to unproto the C fine manually, remove the newline, and then
    compile the output. Not a big problem, though!

    I will have a closer look later. For now, I am happy to see LISP
    running on Coherent 3.2! :) It's pretty cool to see what you can do
    in 64K bytes of memory!

    Thanks for saving me some work!

    Nils

    --
    Nils M Holm < n m h @ t 3 x . o r g > www.t3x.org

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Udo Munk@21:1/5 to Nils M Holm on Tue Mar 26 15:42:53 2019
    On Tuesday, March 26, 2019 at 8:07:23 PM UTC+1, Nils M Holm wrote:

    When compiling it I noticed a minor hickup in acc/unproto: unproto
    seems to introduce a spurious line break in its output, which means
    I have to unproto the C fine manually, remove the newline, and then
    compile the output. Not a big problem, though!

    The manual page mentions this, should be possible to fix it.

    I will have a closer look later. For now, I am happy to see LISP
    running on Coherent 3.2! :) It's pretty cool to see what you can do
    in 64K bytes of memory!

    Thanks for saving me some work!

    You're welcome,
    Udo

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Udo Munk@21:1/5 to Nils M Holm on Wed Mar 27 15:12:06 2019
    On Wednesday, March 27, 2019 at 10:08:01 PM UTC+1, Nils M Holm wrote:
    BTW, is there any official home page for unproto? Google did not
    come up with anything recent.

    I did't find one either when I was searching for a newer version or bugs fixes.

    But here is a better acc.sh, still improving things ...

    #!/bin/sh
    #
    # This is a wrapper to use 'unproto' together with the MWC C compiler
    # distributed with Coherent 3.x. Unfortunately the design of this
    # compiler doesn't allow to substitute the cpp pass with an alternate
    # one.
    #
    # Copyright (C) 2019 Udo Munk

    USAGE="usage: acc [cpp, cc and ld options] source"
    COPTIONS=""
    POPTIONS="-D__STDC__=1"

    tempfile=unp$$

    set -- `getopt I:D:U:EOcfKQV:o:L:l:AB:M:nN:q:St:v $*`
    if [ $? != 0 ]
    then
    echo $USAGE
    exit 1
    fi

    for i in $*
    do
    case $i in
    -I) POPTIONS=$POPTIONS"-I"$2" "; shift 2;;
    -D) POPTIONS=$POPTIONS"-D"$2" "; shift 2;;
    -U) POPTIONS=$POPTIONS"-U"$2" "; shift 2;;
    -E) POPTIONS=$POPTIONS"-E "; shift;;
    -O) COPTIONS=$COPTIONS"-O "; shift;;
    -c) COPTIONS=$COPTIONS"-c "; shift;;
    -f) COPTIONS=$COPTIONS"-f "; shift;;
    -K) COPTIONS=$COPTIONS"-K "; shift;;
    -Q) COPTIONS=$COPTIONS"-Q "; shift;;
    -V) COPTIONS=$COPTIONS"-V"$2" "; shift 2;;
    -o) COPTIONS=$COPTIONS"-o "$2" "; shift 2;;
    -L) COPTIONS=$COPTIONS"-L"$2" "; shift 2;;
    -l) COPTIONS=$COPTIONS"-l"$2" "; shift 2;;
    -A) COPTIONS=$COPTIONS"-A "; shift;;
    -B) COPTIONS=$COPTIONS"-B"$2" "; shift 2;;
    -M) COPTIONS=$COPTIONS"-M"$2" "; shift 2;;
    -n) COPTIONS=$COPTIONS"-n "; shift;;
    -N) COPTIONS=$COPTIONS"-N"$2" "; shift 2;;
    -q) COPTIONS=$COPTIONS"-q "$2" "; shift 2;;
    -S) COPTIONS=$COPTIONS"-S "; shift;;
    -t) COPTIONS=$COPTIONS"-t "$2" "; shift 2;;
    -v) COPTIONS=$COPTIONS"-v "; shift;;
    --) shift; break;;
    -*) echo $USAGE; exit 1;;
    esac
    done

    if [ $# -lt 1 ]
    then
    echo "no source file"
    exit 1
    fi

    if [ ! -f $1 ]
    then
    echo "cannot open $1"
    exit 1
    fi

    case $1 in
    *.c)
    /usr/local/bin/unproto $POPTIONS $1 >/tmp/$tempfile.c
    /bin/cc $POPTIONS $COPTIONS /tmp/$tempfile.c
    if [ -f $tempfile ]
    then
    /bin/mv $tempfile `basename $1 .c`
    else
    if [ -f $tempfile.o ]
    then
    /bin/mv $tempfile.o `basename $1 .c`.o
    fi
    fi
    /bin/rm -f /tmp/$tempfile.c
    ;;
    *.o | *.s | *.a)
    /bin/cc $COPTIONS $*
    ;;
    *)
    echo "unknown source file"
    exit 1
    ;;
    esac

    exit 0

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Nils M Holm@21:1/5 to Udo Munk on Wed Mar 27 21:08:00 2019
    Udo Munk <udo.munk@freenet.de> wrote:
    On Tuesday, March 26, 2019 at 8:07:23 PM UTC+1, Nils M Holm wrote:
    When compiling it I noticed a minor hickup in acc/unproto: unproto
    seems to introduce a spurious line break in its output, which means
    I have to unproto the C fine manually, remove the newline, and then
    compile the output. Not a big problem, though!

    The manual page mentions this, should be possible to fix it.

    BTW, is there any official home page for unproto? Google did not
    come up with anything recent.

    --
    Nils M Holm < n m h @ t 3 x . o r g > www.t3x.org

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Nils M Holm@21:1/5 to Udo Munk on Thu Mar 28 18:05:12 2019
    Udo Munk <udo.munk@freenet.de> wrote:
    On Wednesday, March 27, 2019 at 10:08:01 PM UTC+1, Nils M Holm wrote:
    BTW, is there any official home page for unproto? Google did not
    come up with anything recent.

    I did't find one either when I was searching for a newer version or bugs fixes.

    Too bad! I would like to link to some official source on my homepage.

    I think I managed to fix the bug in unproto! It only procsesses
    cpp directives at the beginnings of lines, so

    #include <something>

    will cause it trouble, because cpp will emit a line #line directive
    with a leading blank. The following patches fixes the bug:

    --- tok_io.c.old 2019-03-28 14:24:41.000000000 +0100
    +++ tok_io.c 2019-03-28 18:59:41.000000000 +0100
    @@ -281,7 +281,7 @@

    /* tok_get - get next token */

    -static int last_tokno = '\n';
    +static int new_line = 1;

    struct token *tok_get()
    {
    @@ -326,7 +326,7 @@
    COLLECT(t->vstr, c, ISDOT(c));
    t->tokno = TOK_OTHER;
    break;
    - } else if (c == '#' && last_tokno == '\n') {
    + } else if (c == '#' && new_line) {
    do_control();
    continue;
    } else {
    @@ -358,7 +358,12 @@
    break;
    }
    }
    - last_tokno = t->tokno;
    + if (t->tokno == '\n')
    + new_line = 1;
    + else if (t->tokno == TOK_WSPACE)
    + ;
    + else
    + new_line = 0;
    t->end_line = in_line;
    return (t);
    }


    But here is a better acc.sh, still improving things ...

    Thanks!

    --
    Nils M Holm < n m h @ t 3 x . o r g > www.t3x.org

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Udo Munk@21:1/5 to Nils M Holm on Thu Mar 28 11:35:09 2019
    On Thursday, March 28, 2019 at 7:05:13 PM UTC+1, Nils M Holm wrote:

    Too bad! I would like to link to some official source on my homepage.

    I can put it into my GitHub repositories or you create one, then it can be linked.
    We just do it on our own, as usual ;-)

    I think I managed to fix the bug in unproto! It only procsesses
    cpp directives at the beginnings of lines, so

    Thanks!

    And thank you for the patch, I'll incorporate it into the system.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Nils M Holm@21:1/5 to Udo Munk on Fri Mar 29 19:23:20 2019
    Udo Munk <udo.munk@freenet.de> wrote:
    On Thursday, March 28, 2019 at 7:05:13 PM UTC+1, Nils M Holm wrote:

    Too bad! I would like to link to some official source on my homepage.

    I can put it into my GitHub repositories or you create one, then it can be linked.

    There is an official version:
    ftp://ftp.porcupine.org/pub/unix/unproto5.shar.Z

    But I also put a copy of my modified version on my homepage: http://www.t3x.org/files/unproto-1.7.tar.Z

    We just do it on our own, as usual ;-)

    I agree in principle. :)

    In this particular case, though, Wietse Venema, the author of
    unproto, pointed me to his FTP server!

    --
    Nils M Holm < n m h @ t 3 x . o r g > www.t3x.org

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Udo Munk@21:1/5 to Nils M Holm on Sat Mar 30 05:47:48 2019
    On Friday, March 29, 2019 at 8:23:22 PM UTC+1, Nils M Holm wrote:

    There is an official version: ftp://ftp.porcupine.org/pub/unix/unproto5.shar.Z

    But I also put a copy of my modified version on my homepage: http://www.t3x.org/files/unproto-1.7.tar.Z

    Thanks, will be included in the 3.2 development system.
    I didn't increase the version number because the changes
    were only a few, but we should indicate that it is different from 1.6.

    In this particular case, though, Wietse Venema, the author of
    unproto, pointed me to his FTP server!

    Nice to know that he still is around, way back then I used quite
    some software he wrote or contributed to.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Udo Munk@21:1/5 to All on Fri May 31 04:28:00 2019
    I have release the latest version of my COHERENT 3.2 development system,
    which is available here:

    https://www.autometer.de/unix4fun/coherent/ftp/vms/

    The disk image now includes the lately improved unproto version 1.7.

    As a further test I build the latest version of my Z80 assembler from the current z80pack development branch on GitHub on the system. This
    version is used on modern POSIX compatible systems, by using unproto
    the system is ANSI C89 conform and so modern software also can be build.

    There might be smaller changes here and there which are not really essential, so I didn't take notes.

    Have fun with the box,
    Udo

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Udo Munk@21:1/5 to All on Fri Sep 25 14:10:41 2020
    I have checked in the latest unproto 1.7 sources on GitHub, the software is useful for any
    old UNIX with K&R compiler and it can be better maintained there.

    https://github.com/udo-munk/unproto

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)