Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!caip!cbmvax!rossi From: rossi@cbmvax.cbm.UUCP (Lisa Rossi) Newsgroups: net.micro.amiga Subject: Re: A Bunch of Questions Message-ID: <540@cbmvax.cbmvax.cbm.UUCP> Date: Thu, 17-Jul-86 10:36:40 EDT Article-I.D.: cbmvax.540 Posted: Thu Jul 17 10:36:40 1986 Date-Received: Sat, 19-Jul-86 01:05:36 EDT References: <17@alberta.UUCP> Reply-To: rossi@cbmvax.UUCP (Lisa Rossi-Siracusa) Distribution: net Organization: Commodore Technology, West Chester, PA Lines: 166 In article <17@alberta.UUCP> andrew@alberta.UUCP (Andrew Folkins) writes: > > I have a bunch of questions, and any answers would be greatly > appreciated. I'm using a 512K Amiga (Great machine, guys!), 2 disk > drives (actually 3 if you count the 5.25"), and Lattice C 3.02. > > >1. First off, I was trying to use the Motorola Fast Floating Point > library a couple of days ago, and found I was missing the files > "mathlink.lib" and "mathlink_lib.lib", so I have no way of linking to > the library routines. The question : where can I get these files? > I've already checked with two dealers in the area, and they don't have > them. (The salesman didn't even know what the MFFP was.) Just out of > curiosity, where were they supposed to be, if anywhere? Would it be > possible for some kind soul mail them to me, or would this action > bring the Net Police and the phone cops down on (me/us/everyone)? > The files mathlink.lib and mathlink_lib.lib do not exist. You must open one or more of the following libraries - mathtrans.library (for FFP transcendental math functions), mathffp.library (for FFP basic math functions), or mathieeedoubbas.library (for IEEE Double precision math functions). I will also warn you of one other problem - The variables used for FFP math are defined as ints. You can not use FLOATs because Lattice V3.03 converts FLOAT to DOUBLE during expression evaluation and when passing arguments. The public domain Fred Fish series disk has a program called latffp.c which shows how to access the libraries and functions. If you do not have it, the kludge below will show you basically what must be done. The following section of code was taken from the latffp.c program on one of the Fred Fish public domain disks. here goes.... char st1[80] = "3.1415926535897"; char st2[80] = "2.718281828459045"; int MathBase; /* Basic FFP lib pointer */ int MathTransBase; /* Transcendental FFP lib pointer */ int dots_good = 0; union kludge1 { FLOAT num1; int i1; } k1; union kludge2 { FLOAT num2; int i2; } k2; union kludge3 { FLOAT num3; int i3; } k3; show_dot() {if(++dots_good == 1000) {dots_good = 0; printf(".");}} show_result(num) FLOAT num; {printf("\nResult = %f",num);} show_result_ffp(in_val); /* convert to IEEE and display */ int in_val; { union kludge_sr { FLOAT new_iv_f; int new_iv_il; } k; k.new_iv_i = SPTieee(in_val); show_result(k.new_iv_f); } main() { /* Always test to make sure the libraries open correctly - I'm being lazy. */ MathBase = OpenLibrary("mathffp.library",0); MathTransBase = OpenLibrary("mathtrans.library",0); /* FFP SPADD */ k1.num1 = PI; /* V1.0 lattice C BUG! Can't have */ k2.num2 = k1.num1-PIME; /* two constant assignments in a */ /* row. Fake it by making the */ /* second and expression. */ printf("\n\n50,000 additions of %s to %s (Compiler Interface)\n",st1,st2); for(dots_good = 0, i = 1; i < 50000; i++) { k3.num3 = k1.num1 + k2.num2; show_dot(); } show_result(k3.num3); k1.i1 = SPFieee(k1.i1); k2.i2 = SPFieee(k2.i2); printf("\n\n50,000 additions of %s to %s (Function Interface)\n",st1,st2); for(dots_good = 0, i = 1; i < 50000; i++) { k3.i3 = SPAdd(k2.i2, k1,i1); show_dot(); } show_result_ffp(k3.i3); } that's all there is to it ....wow >2. A related matter, what happened to DiskEd and ATOM and such things? > Shouldn't they have come with Lattice C? Or are they only for > registered developers? > No, they do not come with Lattice C. They are however being distributed to developers who purchase the developers kit. >3. Does anyone out there have a spare handler for the 5.25" disk drive, > i.e. one that would allow me to use it as an AmigaDOS device? I've > read the relevant sections of the RKM, but I thought I'd check before > reinventing the wheel. How about any information on using the thing to > read other disk formats? > Don't know of anyone who has done this. >4. Does anyone have any information about 3.5" disk formats more detailed > than is found in the technical reference? (Where on the disk is the > root block located? What are the actual values of the block Type and > Secondary Type?) > The root block is the center block of the disk 880. As far as I know the values of the block type and secondary type are undocumented. >5. Does anyone out there have any documentation for microEMACS v 0.7? > nope. >6. Has anyone tried Turbo Pascal yet? What's the verdict? > haven't tried it. >7. Finally, what is Lattice's upgrade policy? (Who do I write to and how > much will it cost me?) > I'm not sure, your best bet would be to call Lattice. -- ************************************************************************* Lisa Rossi-Siracusa Commodore Business Machines uucp: {ihnp4|seismo|caip}!cbmvax!rossi arpa: cbmvax!rossi@seismo.css.GOV or rossi@cbmvax.UUCP@{seismo|harvard} tel : (215) 431-9180 *************************************************************************