Reputation: 479
Im doing some homework and confused re: this line of code:
ja 8048448 <switch_prob+0x28>
I understand everything except for the part ... how is that modifying the jump to 8048448? (I believe this is the break statement)
Let me know if more code is needed.
Thanks
Upvotes: 0
Views: 806
Reputation: 12788
@echristopherson already correctly answered your question: What you have there is conditional jump (ja
stands for jump if above) to 8048448. As he also mentions <switch_prob+0x28>
is just a label generated by the debugger or disassembler to be used to refer to 8048448. This is only to improve the readability, nothing more.
My contribution here is to explain that this doesn't have anything to do with jump tables mentioned in the title (IA32 Jump Table). With a jump table you'd store target addresses in memory and perform an indirect jump based on the said jump table. As an example you might have:
mov eax,0
jump [jumptable+edx*4]
jumptable:
dd branch1
dd branch2
// ...
branch1:
lea edx,[somestring]
mov ah,09h
int 21h
branch2:
mov ax,4c00h
int 21h
Of course for this example to make more sense initial value of eax
should be dynamic.
Upvotes: 1
Reputation: 7074
<switch_prob+0x28>
is just a label + offset the disassembler uses to make the address 8048448
look more meaningful to humans.
Upvotes: 3