Path: utzoo!attcan!uunet!peregrine!elroy!ames!mailrus!purdue!bu-cs!dartvax!eleazar.dartmouth.edu!earleh From: earleh@eleazar.dartmouth.edu (Earle R. Horton) Newsgroups: comp.sys.mac.programmer Subject: Re: How do I use a floating point chip in a MAC II? Keywords: programming floating MAC Message-ID: <12638@dartvax.Dartmouth.EDU> Date: 13 Mar 89 02:44:55 GMT References: <2129@aecom.YU.EDU> <1397@husc6.harvard.edu> Sender: news@dartvax.Dartmouth.EDU Reply-To: earleh@eleazar.dartmouth.edu (Earle R. Horton) Organization: Thayer School of Engineering Lines: 29 In article <1397@husc6.harvard.edu> siegel@endor.UUCP (Rich Siegel) writes: > > Use the 68881 code generation option, which will generate direct >calls to the coprocessor, and the Math881 library. The easy way to run >on multiple machines is to have separate versions of your program. > This is the easy way for the programmer, maybe. For ease of use on the customer end, you might want to do what Microsoft Excel does: use the math chip if present, use SANE if not. I have thought about this, and it does not appear to be easy. The worst part seems to be that the fundamental floating point data type, "extended," is 10 bytes with SANE and 12 bytes with the math chip. This seems to mean that Excel, for instance, must have duplicate functions for all floating point operations, and loads in the right ones at the start based on the environment. The previous sentence is a guess, of course, but you would have to do something slick to have a program which makes use of the math chip when it can, and uses SANE when it cannot. Another choice is to write a 68881 emulator. In view of the large number of addressing modes, registers, and operations, this might be a horrendous task. I seem to remember from a previous article in this newsgroup that someone claims to have written one, by the way. Earle R. Horton. 23 Fletcher Circle, Hanover, NH 03755--Graduate student. He who puts his hand to the plow and looks back is not fit for the kingdom of winners. In any case, 'BACK' doesn't work.