How can I multiply 2 data that result in a 64 bit value? For example: unsigned long a = 4000000000, c; unsigned int b = 60000; c = a * b; //this have a problem!!! Has any library that can I use? Thanks Leonardo
"It was Graham :)" So it was - sorry, Erik!
"I'm always struck by the fact that the DPTR has an INC instruction, but no DEC." Aren't there a few derivatives that do add a decrement instruction? Anyhow, still doesn't help with the OP's multiplications...
I don't see how anybody could add an instruction to the 8051 machine language without requiring a whole new compiler (like the MX51 does). What some derivatives do add is a special bit in an SFR that changes the meaning of the normal 'inc dptr' instruction into 'dec dptr'.
"What some derivatives do add is a special bit in an SFR that changes the meaning of the normal 'inc dptr' instruction into 'dec dptr'." That's probably what I've seen referred to, then.
"That's probably what I've seen referred to, then" Or perhaps not: http://www.keil.com/forum/docs/thread908.asp