Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!nuchat!sugar!schaub From: schaub@sugar.UUCP (Markus Schaub) Newsgroups: comp.sys.amiga,comp.lang.modula2 Subject: M2Amiga, another bunch of answers Message-ID: <1221@sugar.UUCP> Date: Fri, 4-Dec-87 10:48:20 EST Article-I.D.: sugar.1221 Posted: Fri Dec 4 10:48:20 1987 Date-Received: Wed, 9-Dec-87 07:39:25 EST Organization: Sugar Land UNIX - Houston, TX Lines: 117 Keywords: M2Amiga, Modula-2, Programming Xref: mnetor comp.sys.amiga:11964 comp.lang.modula2:557 Again several people mailed or posted comments and/or questions on M2Amiga and Modula-2. I tried to keep the quotes as short as possible. >>>difficult to use Modula-2 on the Amiga because _everything_ is written >>>for C programming, most notably the RKM. Is this problem any different >>We faced this problem, using pointers extensively and playing a lot >>with all different kinds of ROM stuff (always with Modula-2, starting >>with our PD version (Fish #24)) we managed to get very close to C and the > I have been using Modula-2 (Benchmark) for about 5 months and > this has not been a problem. I don't know about M2Amiga, but in > Benchmark all the RKM routines are supported and it is often easier Modula-2 versions _can_ be a problem if the definition uses a variable parameter instead of a pointer to the structure. In the Amiga OS you often can give NIL (=NULL for C/TDI M2 people) to get default values. M2Amiga supports ALL RKM routines. > to deal with than using C because the listings of the .DEFs are > can be quite revealing (often the best source I have). Documentation of the RK is not the job of the developer of a compiler. For the Amiga C Compiler (Lattice) this is a little bit different because these sources were used to write the RK. (I assume) Our Defs contain all structures and procedures this makes it very easy to read them. If there are too many comments in the Defs all you see are comments. The list of procedures with all the requested parameters, their names and types in a definition module is very helpful indead. >>PROCEDURE Add (* $E- equal to a label in Assembly *) >>BEGIN >> add D0, D1; RTS >>END Add; > would you need to use INLINE statements to code the "Add" procedure > above? (I assume you must, but just thought I'd ask, as an in-line Yes, you still need the INLINE statement, we still believe that it is possible to write everything in Modula-2, so we did not include an inline assembler. If however you want to write Assembly code you can use the object converter to convert your Assembler output into a M2Amiga object file. There you can even use the Open/CloseLibrary mechanism and all other goodies of the runtime-system. > In general the only real disadvantage to using Modula-2 vs. C > as a dev. lang. for the Amiga seems to be the fact that so much > C source is available. None the less, Modula-2 seems to be gaining > a foothold. Because M2 should be much easier for a begginer to > learn, and the fact that M2 compilers are a relative bargain, more > and more people are likely to use it, and thus the shortage of > source will diminish. I have noticed an improvement in just the > last few months. > I think that if the Amiga C users realized just how much faster > the compile-link-execute-debug cycle is using M2 as opposed to C > there would be many converts. Yes, there is a lot of C source around. I translated a lot to Modula-2 and I learned a lot doing it. I think, with little understanding of C, everbody can get the substantial parts out of a C source. > What would really make this possible would be a good interface > so that M2 routines could (without serious programming effort) > call C routines from an existing C library. Lets face, if you > have a large collection of C routines, and you have to give them > up or convert them yourself in order to switch, your not going > to switch! There is at least one other change for the compiler nessesary, adaption to C parameter conventions, we can make a M2 procedure behave like a C proc but not the other way around. (Small fix if needed). To fit the C libraries into M2 environment is not easy. But I have some ideas about doing this. Let's see if I find some time besides reading this newsgroup. This could cause serious problems for a Source Level Debugger. >either. I'm as big a 'C' bigot as anyone, but I'm still gonna give Modula >a try. First, thanx Peter for being open minded, I'm looking forward to your list of comments, flames, ... >> Modula II is *much* too wordy for my tastes... when I look at source >> I want to see my PROGRAM, not a bunch of keywords. > >Me too. My biggest complaint with highly structured languages is that you >can't see anything but the structure. I'm currently working with a syntax directed editor for Modula-2 on the PC and now that I'm used to it I think this is a good thing. Forget about typing keywords, semicolons, indentation etc. Very nice features are wrap and unwrap of LOOP/IF/WHILE etc statements. Select a block and say 'make an IF'. Not yet available on the Amiga, and I don't know if it ever will be. >In the latest (January) issue of AmigaWorld, Oxxi is advertising Benchmark >Modula-2. Does anyone have it or M2Amiga? Could you send me (mail, please) I hope they didn't forget our ad in AmigaWorld. >your impressions of the two systems? A comparison would be wonderful. > What library support is standard > How well does the integrated editor/compiler work I have both systems but! (see disclaimer) I'm waiting for a comparison too. NEWS: Yesterday I recieved a few disks from Europe and I found a really nice environment for M2Amiga on it. It is not integrated into the editor, it calls the programs in correct order. It works with mouse and menus and I think this will be the environment for our dynamic linker. There all modules are loaded, linked and executed instead of the conventional link / execute cycle. This is very helpful during development because it loads always the latest version of your modules. -- // Markus Schaub uunet!nuchat!sugar!schaub (713) 523 8422 // M2Amiga Developer trying to get back the money I paid for my \\ // Amiga by selling a few M2Amiga. \X/ c/o Interface Technologies Corp, 3336 Richmond #323, Houston Tx 77098