|
Hi, I am currently working on a project that requires the calculation of non integer exponentials such as x^0.35 As suggested by some members of this board I am trying to use the HC11FP MATH11 floating point library that was supposedly at some time or another created by Motorola. This is the library that converts the floating point values into an "internal" format that consists of 3 integer variables that contain the sign, exponent and mantissa respectively. My problem is that the function FLTXTOY which should calculate X^Y is returning incorrect results. For example when calculating 55.59070587^0.2 the result returned is 1.000000238418 instead of the correct result 2.233568802 Does anyone have any experience in using this library? Any info you may be able to shed on this would be greatly appreciated. Below is an example of how I am using the library: LDX #VAR_X *point to "x" JSR GETFPAC1 put it in FPACC1 **HC11MathLib func** LDX #VAR_Y *point to "y" JSR GETFPAC2 put it in FPACC2 **HC11MathLib func** JSR FLTXTOY calculate x^y **HC11MathLib func** LDX #V_TEMPA point to TEMP JSR PUTFPAC1 FPACC1 -> TEMPA = x^y **HC11MathLib func** |
|
|
|
In a message dated 11/21/02 5:14:21 PM Eastern Standard Time, writes: > Hi, I am currently working on a project that requires the calculation > of non integer exponentials such as x^0.35 As suggested by some > members of this board I am trying to use the HC11FP MATH11 floating > point library that was supposedly at some time or another created by > Motorola. I know this isnt the answer you want, but if you wrote the prog in c, and used pow() I bet the right answer would pop out, and if it didnt, and you used icc11, the guy that wrote the compiler would fix it in a day or two.... [Non-text portions of this message have been removed] |
|
|
|
Hi all, Is it possible to use the same code from MC68HC11A1-CFN2 on the MC68HC711E9CFN2? Our programsize is only 500bytes and is located in the EEPROM. We start the device in bootstrap mode and download the program code to eeprom. Because both devices have the same eeprom size, sam RAM size, same location of eeprom. Only the config register differs. Any suggestions? Thanks in advance, Frank [Non-text portions of this message have been removed] |
|
--- In m68HC11@y..., BobGardner@a... wrote: > I know this isnt the answer you want, but if you wrote the prog in c, and > used pow() Unfortunately this code is being added to a much larger project that is entirely in assembly. I'm also stuck with an antiquated DOS Archmedes compiler and linker. > I bet the right answer would pop out, and if it didnt, and you used icc11, > the guy that wrote the compiler would fix it in a day or two.... What are you referring to with icc11? I'm not following you here. Does anyone have a compiled pow() function for the HC11? Maybe I could go the cheesy route and copy the compiled code? Thanks for the reply. Chris |
|
In a message dated 11/22/02 8:51:03 AM Eastern Standard Time, writes: > Unfortunately this code is being added to a much larger project that > is entirely in assembly. I'm also stuck with an antiquated DOS > Archmedes compiler and linker. Hey... legacy code maintence is what sw engineering is all about. Tell your boss I'll port the whole hoary old thing to c for $100 an hr.. don't pay unless it compiles and runs... [Non-text portions of this message have been removed] |