+ 2
Assembly Jumpsā Limits
Assembly uses jumps for conditionals and such, but why the jump is limited? Why ājeā and ājneā can jump less than ājmpā?
1 Answer
+ 1
Jump statements are limited to the maximum length of the instruction addressing format.
For Example : In my Hypothetical Instruction Set, I have a maximum of of 128 bits for a literal after jump. So, the max I can jump is (2^128)-1 memory spaces. je and jne can jump the exact same distance if I want because I made my machine that way. So, there is no hard rule why je and jne jump less than jmp, it's just a convention carried on by keeping backwards compatibility for something we don't really use now.