flat assembler
Message board for the users of flat assembler.
Index
> Main > Write code that can be runs in any memory address? |
Author |
|
revolution 14 Jun 2016, 12:07
In 32-bit code there are no EIP relative memory instructions. So you have to load a GP register with the current EIP and use that to access memory:
Code: data1 db 1 call my_eip my_eip: pop ebx ;get current EIP mov al,[ebx+data1-my_eip] |
|||
14 Jun 2016, 12:07 |
|
DOS386 06 Jul 2016, 09:41
> so the code must can be run in any addresses of memory
Bisa PIC (position independent code) http://board.flatassembler.net/topic.php?t=11170 _________________ Bug Nr.: 12345 Title: Hello World program compiles to 100 KB !!! Status: Closed: NOT a Bug |
|||
06 Jul 2016, 09:41 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.