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

Arithmetic on numbers larger than 32 bits

I need to add a 32-bit number to a 48-bit number. What I want to do is perform the first 32 bit arithmetic in C as follows:
Wv.A += Wv.B ;
And to propagate the carry to the most significant word as follows:
__asm { ADDC WORD Wv+10,#0 }
Unfortunately I get on compilation the following error:
error C195: inline-asm: Invalid instruction operand(s)
Apparently the identifier Wv is not known by the compiler though it is known in C expressions and similar assembler statements are generated by the compiler when I select a SRC output of the compiler. Is someone familiar with inline assembly? Thanks

0