Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!mcvax!nikhefh!gert From: gert@nikhefh.UUCP (Gert Poletiek) Newsgroups: comp.sys.atari.st Subject: Re: Megamax inline assembly woes (solution) Message-ID: <272@nikhefh.UUCP> Date: Mon, 11-May-87 05:07:20 EDT Article-I.D.: nikhefh.272 Posted: Mon May 11 05:07:20 1987 Date-Received: Wed, 13-May-87 07:16:01 EDT References: <8705030519.AA18707@ucbvax.Berkeley.EDU> <1058@bath63.ux63.bath.ac.uk> <270@nikhefh.UUCP> <1959@ihuxy.ATT.COM> Reply-To: gert@nikhefh.UUCP (Gert Poletiek) Organization: Nikhef-H, Amsterdam (the Netherlands). Lines: 93 In article <1959@ihuxy.ATT.COM> nowlin@ihuxy.ATT.COM (Jerry Nowlin) writes: >In article <270@nikhefh.UUCP>, gert@nikhefh.UUCP (Gert Poletiek) writes: >> >> The Mark Williams package is far better, it implements K&R to the full, >> and the extensions like struct assignment, structs as function arguments, >> functions returning structs, enumerated type. The only thing it lacks is >> an in line assembly implementation like Megamax. >> >> >> Gert Poletiek > >I have Megamax and while I haven't tried it yet the manual says that >structure assignment and passing by value are supported. What else did >you think was left out of Megamax? I have the devkit, Lattice and Megamax >and wouldn't trade Megamax for both of the others put together. > >Jerry Nowlin >(...!ihnp4!ihuxy!nowlin) I own the Lattice and Megamax compilers, used the devkit at work, and copied Mark Williams 2.01 from a friend to try it out. Now I'm looking for the fastest way to get MWC officially (if that's the word). Some of the things that Mark Williams will compile and Megamax will not: Passing a structure to a function: function ( var ) struct x var; /* notice the absence of the '*var' !! */ { ... } Function returning a structure: struct x function ( ... ) { struct x x; .... return ( x ); /* return a structure !! */ } Declaring variables both at the top of a function and in a loop: function ( ... ) { int x, y, z; .... while ( condition ) { register char *cp; /* <<< megamax won't allow this */ } } All of these things are not in the 'C programming language' by K&R, but they are additions made to the C language by K&R and are (as far as I know) documented for the first time in the Unix Programmer's Manual for version 7 Unix from Bell. It may be that these things are not really needed, but they make life a lot easier (sometimes). Now for the bugs in the Megamax package: - the optimizer will crash if you reference a label in assembly (inside a C function) but forget to declare it - sometimes the linker garbles a module taken from a library. - the librarian will crash if you try to create a library with more than about 115 modules in it. - the megamax guys don't know what initialized data is. - the resource generator crashes on complex object trees. - the resource generator does not allow you to create 'UserProc' objects These bugs in Megamax, and the fact that the Mark Williams package is very complete, make me choose for Mark Williams-C. Gert Poletiek