comp.lang.ada
 help / color / mirror / Atom feed
From: hasan@ut-emx.uucp (David A. Hasan)
Subject: Re: Meridian Ada compiler for Macintosh
Date: 21 Mar 91 17:32:57 GMT	[thread overview]
Message-ID: <45957@ut-emx.uucp> (raw)
In-Reply-To: 10691@ncar.ucar.edu

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 

  reply	other threads:[~1991-03-21 17:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1991-03-19 15:01 Meridian Ada compiler for Macintosh abdlm
1991-03-20 18:15 ` Herb Poppe
1991-03-21 17:32   ` David A. Hasan [this message]
1991-03-25 14:01     ` Douglas Surber
1991-03-25 20:09       ` Magnus Rimvall
1991-03-26  4:27         ` Michael Feldman
1991-03-27 13:55         ` Douglas Surber
1991-03-23  3:57 ` rharwood
  -- strict thread matches above, loose matches on Subject: below --
1991-03-25 18:02 Duane Small
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox