Path: utzoo!attcan!uunet!mcvax!botter!star.cs.vu.nl!ast From: ast@cs.vu.nl (Andy Tanenbaum) Newsgroups: comp.os.minix Subject: Re: Minix C Compiler Sources from UniPress Software -- What do I get? Keywords: C Compiler Sources UniPress Message-ID: <846@ast.cs.vu.nl> Date: 13 Jul 88 09:06:32 GMT References: <290@enlog.Wichita.NCR.COM> Reply-To: ast@cs.vu.nl (Andy Tanenbaum) Organization: VU Informatica, Amsterdam Lines: 34 In article <290@enlog.Wichita.NCR.COM> tdavis@enlog.Wichita.NCR.COM (Tim Davis) writes: >What pieces of source code are actually on the [UniPress] diskettes? Although I haven't actually seen their package, what is supposed to be on the diskettes is enough C code that if you compile it somewhere, you get a binary of a compiler that turns C programs into 8088 code in MINIX format. You can use this to cross compile from a VAX or SUN etc. The code generator-generator is not present. The main reason is that cgg does not use Yacc, but LLGEN, our own compiler-writing system. LLGEN in turn uses .... Before all is said and done, you need some 6 megabytes of source code, 40 megabytes of free disk space, a machine with an address space considerably in excess of 1 MB, and more. This is the full ACK, which is indeed sold for $995 (university price) and is aimed at VAX and SUN class machines, not PC and AT class machines. It also includes front ends for other languages and back ends for 8080/8086/Z80/Z8000/68000/68020/VAX/PDP-11 6502/NS32032 and other CPUs. While the standard code generator is hard to modify without full ACK (since it is full of machine-generated tables), the interfaces between the cpp - cem - opt - cg - asld passes are very well defined. It is conceivable that someone could take the input to cg and write a wholly new program to expand the incoming EM code into 68000 assembler or binary. If fact, if you just did a dumb macro expansion of the 100 or so EM instructions, it is probably only a week's work, but the code will not be optimal. Conclusion: for general compiler development, porting etc, you need full ACK and a VAX/SUN class machine, but the MINIX C compiler source is not worthless by any means. Many people use it to cross compile on non-Intel CPUs, for example, and the front end is useful even if you have to write your own back end (and assembler) from scratch. Andy Tanenbaum (ast@cs.vu.nl)