flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
revolution 25 Feb 2016, 12:50
Code: mov eax,your_target_address
jmp eax |
|||
![]() |
|
CandyMan 25 Feb 2016, 13:57
Code: push your_target_address ret _________________ smaller is better |
|||
![]() |
|
Appels 25 Feb 2016, 16:39
So there's no way to do it directly just like compilers do??!
|
|||
![]() |
|
JohnFound 25 Feb 2016, 16:48
Appels wrote: So there's no way to do it directly just like compilers do??! I am not very sure what you are asking for, but did you tried to compile the instructions from your first post? They are valid and compiles without errors. _________________ Tox ID: 48C0321ADDB2FE5F644BB5E3D58B0D58C35E5BCBC81D7CD333633FEDF1047914A534256478D9 |
|||
![]() |
|
Appels 25 Feb 2016, 16:55
JohnFound wrote:
Yes, I ended up with "Error: invalid use of symbol". I am running Windows 7 with fasm 1.71.39 |
|||
![]() |
|
JohnFound 25 Feb 2016, 17:11
It is not possible to get "invalid use of symbol". Post some minimal code that to raise this error. Everything compiles fine for me.
|
|||
![]() |
|
Trinitek 25 Feb 2016, 17:28
Disassemblers and debuggers will typically simplify a direct jump or call into a single instruction like you've shown in your top post. x86 does not support direct jumps to immediate absolute addresses with conditional jumps or calls. It is not a limitation of FASM.
This is what the Intel manual says: Quote: The Jcc instruction does not support far jumps (jumps to other code segments). When the target for the conditional |
|||
![]() |
|
revolution 25 Feb 2016, 17:44
The error "error: invalid use of symbol" is probably because you are using fixups
Code: include 'win32ax.inc' .code my_target_address = 0 start: call my_target_address ;<---error: invalid use of symbol invoke ExitProcess,0 data fixups end data .end start |
|||
![]() |
|
JohnFound 25 Feb 2016, 19:49
Hm. I never though in deep about fixups, but isn't it possible to fix the offsets the same way as all other addresses? The needed constant seems to be the same.
|
|||
![]() |
|
l_inc 25 Feb 2016, 23:17
JohnFound
Quote: isn't it possible to fix the offsets the same way as all other addresses? Here's a little explanation, why it's not. _________________ Faith is a superposition of knowledge and fallacy |
|||
![]() |
|
Appels 27 Feb 2016, 15:51
Allright thank you all, I'll put [SOLVED] in the thread title.
|
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.