How does jump works ?
Does it set the IP register or does it increase it ??
Is it relative or absolute change of place were we execute the code?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
On Intel, there is both near jump that increments the IP, and far jump that uses an absolute address. So the answer is – both.
On other architectures, typically, both forms of jump are available as well, but not necessarily as the same command. On ARM, for example, for far jump you just assign to the PC register (
mov pc, rx). Or load it from memory. TheB(branch) command, on the other hand, adds an increment to the same PC register.