I tried to solve the question shown below:
Just using both, and jg or jle, how can the following code be implemented?
if %eax > 4 jmp do else jmp l1
of course, without changing the value of eax
This question is taken from a textbook, but no answer. Can you show me how to solve it?
EDIT: I tried:
subl $4, %eax andl %eax, %eax jg do jmp l1 . . . do : addl $4, %eax . . . l1: addl $4, %eax
user1041338
source share