[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Pascal header for MTLib?



 >        I don't know if ORCA/Pascal is able to pass parameters
 >from right to left on the stack the way C does, but if it can,

This belongs in ...programmer, but anyway. Sure, Pascal can
pass parameters right to left, just declare them backwards.
Really, a slightly better way to handle this is to write 
code you want shared between ORCA languages using left to
right parameters, then in C you can reverse the order and
upcase the name by using the pascal "declarator" or whatever
the term is for volatile, const, static, etc.

But Really, the IIGS lacks a standard parameter passing protocol.
Mike says the compiler writers initially hammered out as standard
what ORCA/Pascal does, which was promptly violated by APW C and I
think TML Pascal, and later violated by MPW IIGS Pascal. ORCA/C
and Modula-2 don't follow it by default, but have the option of
fitting in. Of course, from asm it is confusing to have one (well, really
more, but I'm only counting e1/0000) protocol for the system
and one to interface with compiler generated code, so I've always
favored the Toolbox protocol as standard, but Mike and Jawaid and
others insist it is quicker to not push result space.
This issue has always bugged me. There are similar problems on
the Mac, but the PowerMacs wipe it out with one register intensive
protocol already well established by IBM (and glue to
every 68K style in the Mixed Mode Manager).

--
 -- jay.krell@cornell.edu