Many, many years ago on the old Rabbit-Semi yahoo group there was a partial library someone had written that supported basic 64bit integer math. I think it was called BigNum or something along those lines.
Do any of you long-time Rabbit users remember and would you have access to it or a similar file?
Unfortunately, our move to a fancy new 32bit F4 processor has been delayed due to the chip shortage. As a result, I need to get a little more life out of our R3000 based product.
It’s a fairly decent library for working with 64-bit numbers via a struct with high/low 32-bit values. You could take a look at the Rabbit platform code in that XBee Host Library configures macros referenced by the file to work within Dynamic C 10.
You might also be able to find the original Mozilla project to obtain unmodified copies of those files. I don’t think the GitHub version of the XBee Host Library repository included the full commit history, so the original versions of jslong.{c,h} are likely absent.
But if you use the Small Device C Compiler (SDCC), you can just use the types ISO C99 has for that: long long, unsigned long long and the types from stdint.h, i.e. as uint64_t, uint64_fast_t, uint64_least_t.
Thanks for the suggestions.
I will look into jslong.c and see what I can do.
In my searches for an answer, I found SDCC, I had not heard of that before. However, this is an existing codebase written in DynamicC that is fairly large I don’t really want to re-write everything to support a new compiler.