I believe the standard way of implementing jumps in x86 is to do your comparison with something like:
cmpl %ebx, %eax
Which stores the result in the eflags register, and then the following jump command uses that eflags register:
je some_label
But what if I want to save the result of the comparison to do the jump later? I thought about doing something like:
cmpl %eax, %ebx
je storetrue
storefalse:
pushl $0
jmp done
storetrue:
pushl $1
done:
...
Do I need to do it this way or is there a more direct way that doesn't require the extra jumps?