From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!cs.utexas.edu!ut-emx!hasan From: hasan@ut-emx.uucp (David A. Hasan) Newsgroups: comp.lang.ada Subject: Re: Meridian Ada compiler for Macintosh Message-ID: <45957@ut-emx.uucp> Date: 21 Mar 91 17:32:57 GMT References: <4504@dftsrv.gsfc.nasa.gov> <10691@ncar.ucar.edu> Organization: UTexas Center for Space Research List-Id: In article <10691@ncar.ucar.edu> hpoppe@ncar.ucar.edu (Herb Poppe) writes: >In article <4504@dftsrv.gsfc.nasa.gov> abdlm@dftsrv.gsfc.nasa.gov writes: >> I will be recieving my new Meridian Ada compiler for the Macintosh >>tomorrow [ ... ] >I should like to know how well this compiler supports writing normal Mac >programs (ToolBox and OS support). [ ... ] There is a separate Environment Library User's Guide in the Meridian documentation which discusses fairly extensively how to work with the Mac toolbox and OS. There are chapters for each volume of Inside Macintosh, a chapter for selected Mac Tech. Notes, a chapter which discusses working with MPW (e.g., writing MPW tools), a chapter discussing HyperCard scripting, and more. There are Ada packages provided which implement many of the managers. I haven't used these yet. However, it all *seems* fairly complete. >I should like to know how tasking works in conjunction with the MacOS >(MultiFinder, WaitNextEvent). Meridian provides two scheduling algorithms: non-preemptive (the default) and preemtive. There is no indication whatsoever that these cooperate with Multifinder. Of course, as I mentioned above, there is an environment library package which corresponds to the event manager. You can call WaitNextEvent through this package, I assume. But it does not seem to be integrated with tasking. >I should like to know what "Chapter 13" elements are implemented >(representation specs., interrupts, etc.) > Rep. spec restrictions are discussed in the Compiler User's Guide. They do not seem constraining for the most part. Address clauses for constant and variable objects are supported but not for subprograms, packages, or task units. Address clauses for task entries are supported. The meaning of task entry addr. clauses is discussed under interrupts. A task entry's addr. clause can be used to associate an entry with a unix-like signal. Only signal 2 is supported: command-dot interrupt from the keyboard. Interrupt entries may not have parameters. This seems pretty limited to me, but I don't use tasks much. >I should like to know about interfacing (pragma INTERFACE) to other MPW >languages, THINK languages. > The discussion of this in the Compiler User's Guide is very sparse. One statement leaves me very confused: "The caller removes the parameters from the stack after the called subprogram returns." I have always understood that Mac routines clean up after themselves, e.g. Macintosh Revealed Vol. 1 (first edition) says "The [toolbox] routine will remove its parameters from the stack before returning...". I suppose that MPW might have changed things, but in fact the entire discussion in the guide makes it seem difficult to call non-Ada routines. Whether calling non-MPW languages is feasible, I cannot say. It does say, however, that "all object modules must be compatible with the MPW Linker." If there is some MPW C routine void p() {...} out there, to call it from Ada, you write package callit is procedure p; pragma interface (c,p); end callit; with callit; procedure main is begin callit.p; end main; (This is taken from the guide. Notice that p() has no parameters. There is no example in which the C routine does have paramters.) It is possible to write machine code routines by using the package machine_code. To do this, you have to essentially write the code in hex. -- | David A. Hasan | hasan@emx.utexas.edu