flat assembler
Message board for the users of flat assembler.
Index
> Windows > Jump Variations ? near, far, relative, absolute,..........? |
Author |
|
vid 23 Sep 2010, 07:57
|
|||
23 Sep 2010, 07:57 |
|
Nameless 23 Sep 2010, 09:24
Code: A relative address = jmp ????????? absolute address > An address in a general-purpose register = jmp eax ;is that correct? absolute address > An address specified using the standard addressing modes of the processor = jmp ??????? i was asking about the examples so i know which is which, i guess i mistyped the question sorry but my native language isn't English |
|||
23 Sep 2010, 09:24 |
|
vid 23 Sep 2010, 12:58
"jmp label" is translated to jump to relative address (instruction pointer +- constant). You can also write this explicitly as "jmp $+5" where $ means address of current instruction.
jump to address in general purpose register is indeed "jmp eax" jump to address specified using addressing: jmp [1234], jmp [eax], jmp [4*esi + ebx + 20] All these are "near" jumps. Far jumps are not needed these days, only in system-level (ring0) programming. |
|||
23 Sep 2010, 12:58 |
|
Nameless 23 Sep 2010, 13:45
oh, kewl
thanks |
|||
23 Sep 2010, 13:45 |
|
b1528932 23 Sep 2010, 22:52
near direct jumps (mov eip,imm32)
near indirect jumps (mov eip,[modrm]) far direct jumps (mov cs,imm16, mov eip,imm32) far indirect jump (lcs eip,[modrm]) condition jumps (if condition, add eip,imm32). Note that near direct jumps are broken in 64bit mode. |
|||
23 Sep 2010, 22:52 |
|
vid 24 Sep 2010, 08:03
b1528932: those things in parentheses, what are they supposed to be? Some kind of pseudo-code?
|
|||
24 Sep 2010, 08:03 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.