1

Sometimes there are jump table like this:

operations:
    .long operation1, operation2, operation3

Then called by:

jmp *operations(,%ecx,4)

What I don't really understand is since you declare that number to a long, it's 32 bit, so operation + 4*ecx for ecx being 0,1,2 will translate into adding 0,4,8 which doesn't really equal to 0,32,64. So how does this jump actually occurs.

Margaret Bloom
  • 41,768
  • 5
  • 78
  • 124

0 Answers0