Morning Michael. The compiler is probably optimising out unused code.
If the result from an operation is not used, and if it has no side
effects then the code can be pulled out without affecting the operation
of the program.
Try returning one of the values or making the variables static. I
often use a dummy function call like
void spoil(int dummy)
{
}
...
spoil(numThousands);
while testing to force the code to be generated.
-- Michael

On Sun, 12 Oct 2003, Michael Hope wrote:
> Morning Michael. The compiler is probably optimising out unused code.
> If the result from an operation is not used, and if it has no side
> effects then the code can be pulled out without affecting the operation
> of the program.
>
> Try returning one of the values or making the variables static. I
> often use a dummy function call like
Morning? :) I agree with Michael, Michael. The PIC optimizer is way too
aggressive. The code that you posted had no global scope and thus was
deemed unnecessary! You can either try what Michael says, or perhaps place
your code in a while(1) loop.
Scott