I'm looking for math routines for the SX processor. I noticed a link in the sticky thread to such a lib but that link is long broken. As I think of it a lot of the links are broken to old SX threads.
Can you be more specific? Are you coding in assembly or SX/B? 8 bit, 16-bit, 32-bit integers or floating point (I doubt it)?
What operations do you need?
Can you be more specific? Are you coding in assembly or SX/B? 8 bit, 16-bit, 32-bit integers or floating point (I doubt it)?
What operations do you need?
Sorry, My initial was made on my phone which made a lot of detail difficult. I'm considering using the SX processor with various sensors and output via lcd. The problem is that the first sensor I looked into using (of course) needs to have the output run through a formula that requires multiplication. For example the temp/humidity sensor sold by Parallax requires multiplication by a fraction and finding the square of a number. For my purposes I could get away with integer multiplication and division. I haven't ruled out some sort of a look up table but haven't worked out a way to do it that I like yet.
Sorry, My initial was made on my phone which made a lot of detail difficult. I'm considering using the SX processor with various sensors and output via lcd. The problem is that the first sensor I looked into using (of course) needs to have the output run through a formula that requires multiplication. For example the temp/humidity sensor sold by Parallax requires multiplication by a fraction and finding the square of a number. For my purposes I could get away with integer multiplication and division. I haven't ruled out some sort of a look up table but haven't worked out a way to do it that I like yet.
I forgot to mention that my plan is to program in assembly but I'm not adverse to using SX/B.
I found a number of routines based on code for the basic stamp that will do what I need. It would be nice if the links contained in the best of SX threads and downloads thread worked though. A lot of interesting stuff there!
Here's my library of routines (word integers) that are mostly assembly but designed to be used in an SX/B context. You need to pre-define the variables, then include the sub/func definitions at the top of your SX/B programs and include the "guts" of the routines anywhere in the main program.
Comments
What operations do you need?
Here's a good place to start if you're looking for assembly code: http://www.sxlist.com/techref/scenix/lib/math/basic.htm
Sorry, My initial was made on my phone which made a lot of detail difficult. I'm considering using the SX processor with various sensors and output via lcd. The problem is that the first sensor I looked into using (of course) needs to have the output run through a formula that requires multiplication. For example the temp/humidity sensor sold by Parallax requires multiplication by a fraction and finding the square of a number. For my purposes I could get away with integer multiplication and division. I haven't ruled out some sort of a look up table but haven't worked out a way to do it that I like yet.
I forgot to mention that my plan is to program in assembly but I'm not adverse to using SX/B.