Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!bloom-beacon!gatech!udel!mmdf From: gay%CLSEPF51.BITNET@cunyvm.cuny.edu (David Gay) Newsgroups: comp.sys.amiga Subject: Re: 80286- er, 68000 memory models Message-ID: <2672@louie.udel.EDU> Date: 22 May 88 19:46:52 GMT Sender: mmdf@udel.EDU Lines: 47 Let's try & clear this all up : 1) There are never any problems calling the shareable libraries (the interface is (& was recently) precisely described). They don't use any of the small, tiny, large ... you name it models. When you call them from C, you go through a stub (except if you use Lattice's pragmas) which transfers the arguments from the stack to the registers (*). In C: 2) The pointers are *always* 32 bits. 3) The differnt "models" are only used "internally" by the C compilers (that is, to refer to their own code & data). Thus the *C* libraries must come in several versions (in Lattice V4, you have short & long int's plus some rarely used ones which use "large" data internally). 4) The PC-relative/absolute code methods can be mixed freely. 5) absolute data modules can refer to all the data, "small" code only to that in the __MERGED hunk (in Lattice) 6) I repeat, all this only affects your C code, and in no way impedes access to the ROM. I hope this doesn't generate even more confusion :-) David Gay EPFL, Ecole Polytechnique Federale de Lausanne GAY@CLSEPF51.bitnet Switzerland Glorf ! Disclaimer: They don't even know I exist. I'm hiding away in the computer room. (*) I once followed a call to an intuition routine: this was what was happening: C calculates the parameters (in registers), stuffs them on the stack Calls the stub routine stub routine puts them in the registers, calls intuition In the rom, the parameters are put back on the stack (:-)) The actual routine is called ... and reads some of the stack into registers. Fun !