Jumping in asm
Is it possible without labels to jump over 1 or more instructions?
Thanks in advance! |
I don't think it's possible. You cannot know how compiler (nasm, gas, ...) do binary elf format. That means one instruction could be replaced with 2 others. So label are needed.
Maybe you can predicate this behavior and increase your IP register somehow to skip some instruction. |
Thanks for the details! I alway's thought that each line (not empty) is one instruction.
|
From NASM Documents
Quote:
From what I have been testing, each instruction becomes 5 instructions thus to do a relative jump its 5*n where n is the number of instructiosn to jump. Are all instructions come out as 5 instructions when compiled? I didn't test all instructions but the ones I have tested become 5 instructions when compiled. Thanks in advance! |
All times are GMT -5. The time now is 08:08 PM. |