Faruk Chaudhry

Effecient assembly code to add to the timer channel registers

Discussion created by Faruk Chaudhry on Jun 18, 2006
Latest reply on Jun 21, 2006 by CompilerGuru
Most of my programs are in C and I cannot determine the best way to code in assembly the following statement:
#define time_base 0xF424;
TPMC0V = TPMC1V + time_base; // Add input capture time + delay to TPMC0V
I became lazy and relied on the compiler to generate the assemby code which results in 34 clock cycles. 
The code is within the input capure ISR and basically adds the captured value + a predetermined delay to the output compare registers. 
The complication is the 16 bit value to be added. Is there a way in the assembler to indicate high and low bytes?