Newsgroups: comp.sys.amiga.programmer
Path: utzoo!utgpu!bhgs
From: bhgs@gpu.utcs.utoronto.ca (R. Holdom)
Subject: Re: ARP and DICE - How to link??
Message-ID: <1991Mar6.213253.27365@gpu.utcs.utoronto.ca>
Organization: UTCS Public Access
References: <1991Feb25.121623.16551@uni-paderborn.de> <stephane.3564@Chucla.CAM.ORG> <B+A&R&_@warwick.ac.uk>
Date: Wed, 6 Mar 1991 21:32:53 GMT

In article <B+A&R&_@warwick.ac.uk> estdwha@warwick.ac.uk (CrisP) writes:
  (stuff deleted)
>
>With Dice2.06 there is a little program call fdtolib that can create the such
>a .lib file from the .fd file. I have already created myself a amigs.lib from
>.fd files. And am working an arp.lib. But I have forseen a problem with the
>PrintF() and simular functions. In the Arp library you pass the mutiple
>undefined parameters as a pointer to an array. It would be nice to pass them
>as seperate parameters. I know that fdtolib creates the glue code needed from
>the .fd file. I know that it then uses das to assemble it. But what I can't
>work out is what it does from there.
>
>~ CrisP.

   (more stuff deleted)

Just this mourning I was doing this very thing.  fdtolib works fine for
all of the simple function calls (ie no Printf's and stuff that don't return
a second value via IoErr()) For the rest, the arp guys have already done
the job for us.  In the programers package (the one with the documentation)
there is a file called LatticeGlue.a which was designed to work with
Lattice (as you may have guessed) but which suits our needs fine.
The only thing I had to modify was they have the line:
		xref	_ArpBase
but this causes the assembler (at least the one I used) to make this
symbol by refferenced from the pc register, instead of a4, as we want.
So i just put the line:
		section		"",data
right before the above line and everything was fine. I also took out
the stuff for making the choice between Near and Far memory models,
since we want the near one.  I assembled the file using the Lattice
assembler from Lattice C 4.0.1, since Matt's is still somewhat
anemic(sp?).  Then I just joined the two files, and everything is
fine. 

   If anyone is interested, it probably wouldn't be too hard to
make a file that Matt's assembler could handle.  So send me a note
and I'll try it.

                                Jon Spencer.

