Arbitrary Length Math with a 56F8013

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Arbitrary Length Math with a 56F8013

Jump to solution
2,782 Views
jag
Contributor IV
Hi,
for a program I'm doing I need to do some math with very large numbers.
Very large numbers means 64 bits (signed) variables.
Just to be clear: it is not my decision to use 64 bit variables.
The problem is, as I think you have understood, that the 56800/E can NOT use 64 bit variables, but "only" 32 bits.
So I need to split the 64 bit variable in 2 chucks of 32 bit each, and do the math (only + and - luckily) with these 32 bits chucks.
Now I'm wondering if exist some algorithm already implemented for the 56800/E that do this kind of math.
Or else I'll write it, but I've no uidea how to manage the overflow (and underflow) of the low chuck.

Thanks Bye Jack
Tags (1)
0 Kudos
Reply
1 Solution
1,625 Views
jag
Contributor IV
I reply to myself :smileytongue:.

The 56800/E core can do 64 bit addition and subtraction (cfr. pag. 5-29 of DSP 56800E Reference Manual).

So problem solved. Or at least I don't have to implement the algorithm myself.
Now I just have to search for the C function (or write the assembler routine in my C code).

Bye Jack

View solution in original post

0 Kudos
Reply
1 Reply
1,626 Views
jag
Contributor IV
I reply to myself :smileytongue:.

The 56800/E core can do 64 bit addition and subtraction (cfr. pag. 5-29 of DSP 56800E Reference Manual).

So problem solved. Or at least I don't have to implement the algorithm myself.
Now I just have to search for the C function (or write the assembler routine in my C code).

Bye Jack
0 Kudos
Reply