[comp.unix.xenix] MINIX

ast@botter.cs.vu.nl (Andy Tanenbaum) (01/11/87)

First, I would like to apologize if I over-crossposted.  I haven't posted much
to the net before, so I may have done things wrong.  I was under the impression
that if one sends to multiple groups it cross posts them in such a way that
each reader only gets the message once, even if the reader subscribes to all 
of them.  If I am wrong will somebody please tell me how to do it (by mail).
It is also possible that I messed up.  Furthermore, we were having news and
mail problems at the time, which may have contributed.    It was my intention
that a lot of people see it once, not that a few people see it many times.

As to being commercial, that's true I guess, but since I am supplying 50,000
lines of source code without copy protection  for $79, and I don't mind a 
limited amount of copying of the binary and source code, it is not in the same 
league as normal PC software in terms of the owners zealously guarding both 
binaries and sources.  In fact, it is probably somewhat closer to the Free 
Software Foundation's way of doing things (also copyrighted) than to Lotus.  
I assumed (and judging by the response, probably correctly) that there would be
a fair amount of interest.  Sorry if I offended people.  

Maybe it would be best to set up comp.os.minix now.  Will everyone who would
want to subscribe to it send me mail.  If there is a sufficient number, I
will ask the local guru how one sets up a new group and try to avoid messing 
that up too.  I will cross post this to various groups, but just stick to 
comp.sys.ibm.pc or comp.os.minix (depending on the reaction) in the future.

Several people have asked me questions whose answers may be of general interest,
so I will post them here.

Q1: Can you have multiple users on a PC?
A1: In theory yes.  The terminal driver has an array indexed by terminal
    number from 0 to some maximum.  At present that maximum is 1, so you
    have to change a constant and recompile the tty driver.  Also, there
    is no RS232 driver (the deadline had a race with RS232 and the deadline
    won).  Therefore such a driver has to be made, but it is quite simple.
    Most of the hooks and handles you need are already there, for example,
    when it is time to output a character on tty n, the driver calls a
    function pointed to by tty_struct[n].tty_devstart, so each terminal
    can have a different routine to actually output the character. In this
    way you can mix various device types.

Q2: How compatible does a machine have to be to run MINIX?
A2: It needs a NEC uD765 chip as floppy disk controller, a Motorola 6845 as
    video controller, etc.  If the hard disk controller is nonstandard, the
    hard disk won't work, but the rest will.  Machines with different I/O
    chips but try to hide this by presenting the same BIOS interface won't
    work.  About a dozen different clones have been tested.  MINIX worked
    without problems on 80% and failed on 20%.

Q3: Can you call assembler routines from the MINIX C compiler in order to
    write drivers for new devices?
A3: Yes.  The C compiler uses the standard UNIX calling convention of pushing
    the parameters onto the stack in reverse order, so there is no problem
    writing bits of a program in assembler.  The assembly language accepted
    by the MINIX assembler is identical to that of PC-IX, the "official" IBM
    UNIX system for the PC.  Assembly routines for reading and writing I/O
    ports are present in the file kernel/klib88.s (port_in and port_out).

Q4: What do you mean it will sort of run on a 512K machine?
A4: It will boot fine and run ok with 512K, but since it doesn't swap, it
    won't be possible to run a lot of background jobs without running out
    of memory.  Also, if you use make, you may discover that make + cc +
    the various passes that get forked off may not fit in core at once, which
    causes EXECs to fail and make to get an error return.  This can be solved
    by changing the amount of stack space allocated to the compiler passes
    using the chmem utility.  (chmem is functionally the same as in PC-IX,
    which works the same way.)  Reducing the stack allocated to compiler
    passes means that some very large programs may not compile.  With a 640K
    system, files > 50K characters have compiled.  With 512K, that limit may
    be lower.

Andy Tanenbaum (minix@cs.vu.nl)

harris@ecsvax.UUCP (Mark Harris) (01/14/87)

In article <1028@botter.cs.vu.nl>, ast@botter.cs.vu.nl (Andy Tanenbaum) writes:
> Q2: How compatible does a machine have to be to run MINIX?
> A2: It needs a NEC uD765 chip as floppy disk controller, a Motorola 6845 as
>     video controller, etc. 

Will MINIX run with an Enhanced Graphics Adapter?  My system has an
EGA/monochrome monitor.

- Mark Harris, Appalachian State University