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

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

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