[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference hydra::amiga_v1

Title:AMIGA NOTES
Notice:Join us in the *NEW* conference - HYDRA::AMIGA_V2
Moderator:HYDRA::MOORE
Created:Sat Apr 26 1986
Last Modified:Wed Feb 05 1992
Last Successful Update:Fri Jun 06 1997
Number of topics:5378
Total number of notes:38326

3093.0. "Getting the 68881 to work with Lattice C" by OBIWAN::MIANO (I'm outta that place!!!!) Sat Nov 11 1989 00:19

I have recieved my Lattice C upgrade an I still can't get
6888888888888888881 stuff to work.

Does anyone know how to get FPU stuff to work from start to finish

What should the command line be? (LC -F8)
What math files should be included (MATH.H AND/OR M68881.H)?
What libraries need to be included?

By the way, whenever I try to examine a double variable or
indirect pointer reference to a double pointer the system crashes
or the CPR process gets locked up.

John
T.RTitleUserPersonal
Name
DateLines
3093.1try thisSMAUG::SPODARYKBinary ThrottleSun Nov 12 1989 03:1040
    John,
    
         Lets see if I can get this stuff straight...
    
    To use your 68881 you can 
    
    #include <math.h> 
    compile normally, and link with lcmieee.lib and lcm.lib
    
    For 'inline' 881 code 
    
    #include <m68881.h> /* and probably <math.h> */
    compile with the -f8 switch and link with lcm881.lib and lcm.lib
    
    ** Remember, the order of linking is very important.  This screwed
    me up also.  You'll want to search the 'specific' library first,
    and then use the default library (lcm.lib) for any routines not
    included in the 'specific'.
    
    If you are doing the compile/link in one shot you'll
    want to specify the libraries in a reverse (searching) order.
    In english, this means that the libraries you want searched first
    will be specified last.  Ie.
    
    $ lc -O -m2 -Lm+lib:lcmieee.lib foo 
    $ lc -O -m2 -f8 -Lm+lib:lcm881.lib foo_inline
    
    If you are using Blink directly, then specify them in the order you
    want them to be searched in. Ie.
    
    $ blink FROM lib:c.o+foo.o TO foo LIB lib:lcmieee.lib+lib:lc.lib+amiga.lib
    $ blink FROM lib:c.o+foo.o TO foo LIB lib:lcm881.lib+lib:lc.lib+amiga.lib
    
    To use the FFP stuff just compile with the -ff switch and link with
    the lib:lcmffp.lib.  Don't link with lcm.lib, since it uses the IEEE
    format, and not the ffp format.
    
    That should solve your problems,
    
    Steve