This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to perform 6 byte addition with efficiency using C code

unsigned long ul1=XX, ul2=YY, ul;
unsigned int ui1=AA, ui2=BB, ui;

ui=ui1+ui2;
ul=ul1+(ul2+(unsigned long)CY);

very inefficient code is generated by C51.
but this can be done using ADC (add with carry) if assembly is used.

Is there any way in C itself, to perform 6 byte addition?

0