[comp.os.minix] More PH 1.5 problems

kjh@pollux.usc.edu (Kenneth J. Hendrickson) (01/20/91)

In article <19300005@hpfcdj.HP.COM> king@hpfcdj.HP.COM (Mike King) writes:
>Other problems I have found with the stock Prentice Hall 1.5,
>which is equivalent to 1.5.10, release are:
[deleted]
>7.  No mention of what pc is but after experimenting and finding
>    that it tried to load prtso.s, I unpacked prtso.s to find
>    that it is pascal run time start off, so pc must be a pascal
>    compiler.

Can the binaries for the pascal compiler and pc.c (or equivalent) be
posted so those of us who didn't get it in an earlier version can have
it?  Thanks.

-- 
favourite oxymorons:   student athlete, military justice, mercy killing
Ken Hendrickson N8DGN/6       kjh@usc.edu      ...!uunet!usc!pollux!kjh

D98E%DDATHD21.BITNET@pucc.princeton.edu (Peter Lautenschlaeger) (01/22/91)

> Other problems I have found with the stock Prentice Hall 1.5,
> which is equivalent to 1.5.10, release are:
>
> 1.  The alarm clock goes off when using VI, forcing you to
>     logoff and then log back in and virecover the file.
>
  I was faced with the same problem and I'm now using elle
  since I can't recompile elvis until I got bcc via anonymous
  ftp from plains.nodak.edu i can't figure out the problem.
>
> 4.  The readall program will lock the system waiting for the
>     hard disc.  ( I was able to find a combination of partition
>     sizes that it would work with.)
>
  Guy Helmer and I were faced with the same problem, if you are
  eventually using a WD-1006 (RLL?,so do I) 1:1 controler, please
  let me know. The only thing I can say so far is after I updated
  to beta-1.6.11 the problem vanished.

> 6.  The ELLE sources are missing.
>          Does anyone know where I can get a copy of the standard
>          Minix version of ELLE ?
>
  The sources are on plains.nodak.edu in a subdirectory of /pub/Minix

  bye Peter

waltje@uwalt.nl.mugnet.org (Fred 'The Rebel' van Kempen) (01/22/91)

In article <19300005@hpfcdj.HP.COM>, king@hpfcdj.HP.COM (Mike King) wrote:
> Other problems I have found with the stock Prentice Hall 1.5,
> which is equivalent to 1.5.10, release are:
> 
> 6.  The ELLE sources are missing.
>          Does anyone know where I can get a copy of the standard
>          Minix version of ELLE ?
Yes, at various archives like "plains.NoDak.edu" and some MUGNET archives.
However, it is _very_ large (which is why it has not been included in the
standard distribution) and it cannot (yet) be compiled using ACK (which
is the second reason for it missing in /usr/src).

> 7.  No mention of what pc is but after experimenting and finding
>     that it tried to load prtso.s, I unpacked prtso.s to find
>     that it is pascal run time start off, so pc must be a pascal
>     compiler.
Correct.  I think I am one of the very few people who have the ACK
Pascal Compiler on their system.  "Pc" is the compiler driver of that
compiler (similar to "cc").  It is useless if you haven't got the
following files in /usr/lib:

	- pc_errors
	- pem
	- libp.a
	- prtso.s

This compiler works fine (I use it for some programming examples in
courses and such) and produces fine code.  I believe there are other
compilers from the same generator (ACK) that can be ported to MINIX,
like Modula-2 and Fortran.  Dunno for sure, though...

Fred.

waltje@uwalt.nl.mugnet.org (Fred 'The Rebel' van Kempen) (01/22/91)

In article <29428@usc>, kjh@pollux.usc.edu (Kenneth J. Hendrickson) wrote:
> In article <19300005@hpfcdj.HP.COM> king@hpfcdj.HP.COM (Mike King) writes:
>>Other problems I have found with the stock Prentice Hall 1.5,
>>which is equivalent to 1.5.10, release are:
> [deleted]
>>7.  No mention of what pc is but after experimenting and finding
>>    that it tried to load prtso.s, I unpacked prtso.s to find
>>    that it is pascal run time start off, so pc must be a pascal
>>    compiler.
> 
> Can the binaries for the pascal compiler and pc.c (or equivalent) be
> posted so those of us who didn't get it in an earlier version can have
> it?  Thanks.

No.  The ACK-Pascal compiler is (c) VU Amsterdam, and because of that
it cannot be posted to this group.  The same goes for the current C
compiler, as you all know.

However, with enough interest for this compiler, we might be able to
convince the (c) holder to allow for the posting of the _binary_, as
with the C compiler.  Votes to pascal@uwalt.nl.mugnet.org. please...

Fred.

ghelmer@dsuvax.uucp (Guy Helmer) (01/22/91)

In <42396@nigel.ee.udel.edu> D98E%DDATHD21.BITNET@pucc.princeton.edu (Peter Lautenschlaeger) writes:
>>
>> 4.  The readall program will lock the system waiting for the
>>     hard disc.  ( I was able to find a combination of partition
>>     sizes that it would work with.)
>>
>  Guy Helmer and I were faced with the same problem, if you are
>  eventually using a WD-1006 (RLL?,so do I) 1:1 controler, please
>  let me know. The only thing I can say so far is after I updated
>  to beta-1.6.11 the problem vanished.

I tried just applying the single fix to my 1.5 at_wini.c from MINIX 1.6 that
wasn't cosmetic, and my disk just locked up sooner.  Does anyone
have any technical material on the WD-1007/WD-1006 controllers
that lists exactly which bits to wait on before sending
commands to the controller, and what timing restrictions there
may be with these controllers?  I strongly suspect that the
wini driver is sending commands to the controller before it
is ready, and then waiting for a response that never comes.

BTW, the routine controller_ready() in at_wini.c is the place
where the CPU blocks until certain bits become set/unset.
MINIX 1.6 modifies the wait loop slightly, but that single change
by itself did not help my problem.

-- 
More information that you couldn't have existed another day without, from:
Guy Helmer                       helmer@sdnet.bitnet, uunet!dsuvax!ghelmer
work: DSU Computing Services                                (605) 256-5315
play: MidIX System Support Services - Crufty Hacks 'R' Us   (605) 256-2788

nemossan@uitec.ac.jp (Sakurao NEMOTO) (01/25/91)

In the article <481@uwalt.nl.mugnet.org> Fred writes;
	Pascal-compiler may be released in binary-form as C-compiler.

I want to have Pascal compiler, even in binary only.  Please distrbibute it!

overby@plains.NoDak.edu (Glen Overby) (01/27/91)

In article <481@uwalt.nl.mugnet.org> waltje@uwalt.nl.mugnet.org (Fred 'The Rebel' van Kempen) writes:
>No.  The ACK-Pascal compiler is (c) VU Amsterdam, and because of that
>it cannot be posted to this group.  The same goes for the current C
>compiler, as you all know.

There seem to be a lot of people who think we can just distribute the
program freely on the net.  Why don't you ask the same thing of Turbo C,
Turbo Pascal or Lotus 1-2-3?  Those products even cost more money than does
the Minix compilers!

Enclosed is an (OLD!) post about how to get the Pascal and C compilers --
even includes sources.  I believe it cost $100, which is cheaper than Minix
sources/binaries and only twice what the Minix book costs.

If you don't want to pay that money for software, wait for the Free Software
Foundation to come out with a Pascal compiler and buy it from them for $200.

Glen Overby

======================================================================== 50
Received: by NDSUVM1 (Mailer X1.24) id 2006; Thu, 15 Oct 87 01:19:26 CDT
Date:         14 Oct 87 10:11:59 GMT
Reply-To:     INFO-MINIX@UDEL.EDU
Sender:       Minix operating system <MINIX-L@NDSUVM1>
From:         "Andrew S. Tanenbaum" <ast@cs.vu.nl>
Subject:      Version 1.2 C compiler for MINIX
Comments: To: info-minix@UDEL.EDU
To:           Glen Overby

The MINIX Version 1.2 C compiler is now available from the following
two companies.  Contact them for pricing and other information.

  UniPress Software            Transmediair Utrecht BV
  2025 Lincoln Highway            Melkweg 3
  Edison, NJ 08817            3721 RG Bilthoven
  USA                    Holland
  Tel: (201) 985-8000            Tel: +31 (30) 78 18 20

This compiler is better in at least three ways than the 1.1 compiler:
   1.  It produces better object code (fewer bytes and faster execution)
   2.  Compilation speed is improved
   3.  A number of bugs have been fixed

It is my experience that on the whole, the object code size is smaller
than the PC-IX compiler without the -O flag, and about 6% larger than
the PC-IX compiler with the -O flag.  I have not tested it on other
compilers.  That is left as an exercise for the reader.  The difference
between MINIX and PC-IX varies considerably from program to program.
If anyone publishes measurements later, be sure to run tests on a large
sample to get meaningful measurements.

As with the Pascal compiler described in a companion posting, this
compiler belongs to the Vrije Universiteit, which uses the royalties
on sales to fund graduate student travel.  Please do not further
distribute the compiler.

The various passes of the 1.2 compiler are not plug compatible with the
1.1 compiler.  You have to use all of 1.1 or all of 1.2.  Mix and match
won't work.

While on the subject of compilers, I should perhaps mention that we have
a running Modula 2 compiler, and are working on porting it to MINIX.
The VAX and SUN-3 versions are currently undergoing heavy testing.
The Modula 2 compiler follows the same structure as C and Pascal, only
with mem instead of cem or pem as the front end, and an additional
library for the Modula specific routines.

Andy Tanenbaum
: MINIX-L NDSUVM1 10/15/87
: Andrew S. Tanenbaum Glen Overby         10/14/87 Version 1.2 C compiler for MI
======================================================================== 167
Received: by NDSUVM1 (Mailer X1.24) id 2180; Thu, 15 Oct 87 01:21:51 CDT
Date:         14 Oct 87 10:11:17 GMT
Reply-To:     INFO-MINIX@UDEL.EDU
Sender:       Minix operating system <MINIX-L@NDSUVM1>
From:         "Andrew S. Tanenbaum" <ast@cs.vu.nl>
Subject:      Pascal compiler now available for MINIX
Comments: To: info-minix@UDEL.EDU
To:           Glen Overby

At long last, here is the announcement of the Pascal compiler for MINIX.
It is available from the following two companies:

  UniPress Software            Transmediair Utrecht BV
  2025 Lincoln Highway            Melkweg 3
  Edison, NJ 08817            3721 RG Bilthoven
  USA                    Holland
  Tel: (201) 985-8000            Tel: +31 (30) 78 18 20

Source code is available.  Contact them for pricing and more information.
As this compiler belongs to the Vrije Universiteit, and the royalties the
sales generate are used to allow graduate students to travel to conferences,
I ask people not to copy or further distribute the software from UniPress
and Transmediair.  These ground rules are different than for MINIX itself.

I will be off-line for several weeks starting tomorrow.  If there are
TECHNICAL questions (as opposed to marketing questions), they can be
directed to Ceriel Jacobs at ceriel@cs.vu.nl.
Andy Tanenbaum (ast@cs.vu.nl)
===========================================================================

.ce 5
THE MINIX PASCAL COMPILER

Andrew S. Tanenbaum
Johan Stevenson
Ceriel Jacobs

.PP
The MINIX Pascal compiler is derived from the Amsterdam Compiler Kit
(see Communications of the ACM, Sept 1983, pp. 654-660).  The MINIX
Pascal compiler and MINIX C compiler are built up of several modules,
most of which are common to both compilers.  Schematically, the two
compilers look like this:
.nf

   cpp         preprocessor (handles #include, #define, etc)
  /   \
pem   cem      pem = Pascal front end; cem = C front end (parser)
 \     /
   opt         optimizer (reads EM code, produces optimized EM)
    |
   cg          code generator (reads optimized EM, produces .s)
    |
   asld        assembler-loader (assembles .s files to a.out)
.fi

In addition, there are driver programs that call the compiler passes.
The C driver is called cc; the Pascal driver is called pc.  Pascal
also has a program em_pc that does error reporting and other things.
The two compilers are almost the same.  The only real difference is the
front end, which converts the input program to EM code, an intermediate
code used throughout the ACK system.
Once the front end has converted the input program to EM code, the
optimization, code generation and assembly is identical.

.PP
The directories contain the sources of the MINIX Pascal compiler.
Binaries for MINIX are also included.
The front-end is written in Pascal, the rest is written in C.
The compiler uses UNIX system calls for I/O, but none of these are very
elaborate, mostly just reads and writes, so the compiler should be easy to
port to various computers. The biggest problem is probably, that the front-end
is written in Pascal, so you need a Pascal compiler (preferably the
Amsterdam Compiler Kit Pascal compiler) to compile it.
It has been tested on the folowing systems:
.nf

  - IBM PC running the PC-IX operating system (PC-IX = IBM's UNIX
    for the PC)
  - VAX 11/750 running 4.1 BSD
  - IBM PC running MINIX
  - SUN 3 workstation
.fi

Moving it to other systems is up to the user.

.PP
The compiler is distributed as 7 directories.
The files in each directory are to be compiled and linked into a separate
binary, so that when you are done you will have 7 binaries.
These correspond to the main program,
an error reporter, and the 5 passes of the compiler.
The table below describes the programs (named for their directories), the
input files and the output files, and a brief description of what the
programs do.
See Appendix C of "Operating Systems: Design and Implementation" by
Andrew S. Tanenbaum (Prentice-Hall, 1987) for additional information.


.nf
Prog  Input  Output  Function
pc    ---    ---     Main program; calls the various passes
em_pc ---    ---     Driver and error reporter for Pascal compiler
cpp   file.p file.i  Preprocessor (handles #include, #define, #ifdef)
pem   file.i file.k  Parsing and semantic analysis
opt   file.k file.m  Optimization
cg    file.m file.s  Code generation
asld  file.s a.out   Assembly and linking of libraries
.fi

.PP
The directories "cpp", "opt", "cg", and "asld", are the same ones as those
of the MINIX C compiler. Only the front-ends and the driver programs are
different, although the "pc" program is perfectly capable of driving the
C compiler. In fact, if you make a link "cc" to "pc", then this "cc" behaves
much like the MINIX "cc".
The (older) cc program cannot drive Pascal.
The versions of opt and cg provided with Pascal are the same ones as are
supplied with the MINIX 1.2 C compiler.  Be careful about mixing pieces
of the MINIX 1.1 and 1.2 C compilers however; they are not interchangeable.
You need all of 1.1 or all of 1.2, not mixtures.

.PP
Each directory, except for the front-end, contains a makefile.
Each makefile contains two options, for making a compiler to run on MINIX and
for making a compiler to run on a VAX running UNIX.
To generate a compiler to run on MINIX, make sure that the variable 'l' gives
the directory in which the MINIX library is contained, and the CFLAGS variable
contains a -I flag for the standard include files, such as <stdio.h>.
Then type 'make minix'.
Similarly, for making a cross compiler to run on a VAX that produces code to
run on MINIX, type 'make unix'.

.PP
There are two minor things to watch out for.
First, the program 'pc' must know where to find the various passes of the
compiler.
These are defined by the strings PP, PC, PEM, OPT, CG, and ASLD in the files
'pc/pcpaths.h', 'pc/paths512k.h', and 'pc/paths640k.h'.
The variables LIBC and LIBP tell pc where to find the libraries.

.PP
As described in the book, the compiler produces .s files, rather than .o
files (even when you say 'pc -c file.p'), and the assembler-linker expects
these.
The libraries are also in .s format, except that they are in compact format.
The programs libpack and libupack in the commands directory can be used to
go back and forth between compact and ASCII format.

.PP
The other thing to watch out for is in cg.
The file 'wr.c' contains a procedure 'write' that does the compaction of the
ASCII output fed to it.
However, when it finally wants to generate output, it calls 'realwrite',
which calls 'callm1'.
In the MINIX version, 'callm1' is a library procedure that sends a message to
the file system to achieve output.
In the UNIX version, it calls an assembly language version of the UNIX write(2)
system call, only renamed, because 'write' is being used to filter output
from ASCII to compact code.

.PP
Other than these two minor issues, and of course the fact that the Pascal
front-end is written in Pascal, there is nothing tricky about the compiler
and it should work without much trouble.
: MINIX-L NDSUVM1 10/15/87
: Andrew S. Tanenbaum Glen Overby         10/14/87 Pascal compiler now available
-- 
		Glen Overby	<overby@plains.nodak.edu>
	uunet!plains!overby (UUCP)  overby@plains (Bitnet)