On Tue, Oct 14, 2003 at 04:46:17PM -0400, Jacob Welch wrote: > Pedro Zorzenon Neto wrote: > > > In the assembler, there is no "cmp" after "mov", and msp user guide > >tells that "mov" opcode does not affect Z flag. > > > > > The ADD is the instruction that affects the Z flag, and since the MOV > doesn't alter Z, it is still intact when the JNE is executed. Mspgcc > looks like it is correct.
Hi Jacob, Thanks for the answer, take a look in C code: (* (int *) (++menu_stack[menu_i].item) != NULL) I have to compare with zero after the "mov" instruction. Before it, when the ADD opcode is executed, I have: (int *) (++menu_stack[menu_i].item) Not the contents where it points to... Don't know if I was clear in my explanation...