flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
MHajduk 07 May 2011, 20:04
ouadji wrote:
![]() |
|||
![]() |
|
LocoDelAssembly 07 May 2011, 20:45
Maybe you are using a relocatable format or added fixups in a PE?
|
|||
![]() |
|
ouadji 07 May 2011, 21:08
Code: format MS COFF ;<======================== ;with "MS COFF" does not compile ;without "MS COFF" does compile. ..... old = $ org ($ and 0x00000FFF) ;<--- does not compile, invalid expression But this does compile ... it's amazing ! Code: format MS COFF ... old = $ org ($ + 0x00000FFF) ; doesn't work with "and", but ok with "+" ... org old+($-$$) ... |
|||
![]() |
|
LocoDelAssembly 07 May 2011, 21:49
ouadji, adding a constant is supported because that is something that can be relocated, however, applying bit operation isn't as the loader/linker can only relocate by adding a new base, and not also remembering you wanted an AND operation to be performed over the "$" address.
Still, in your particular example if you specified a section with 4096 bytes alignment that would be something that could be relocated, but fasm can't realize this. |
|||
![]() |
|
ouadji 07 May 2011, 22:07
Quote:
Quote: Still, in your particular example if you specified a section with 4096 bytes alignment that would be something that could be relocated, but fasm can't realize this. Indeed, it is! Code: format MS COFF align 0x1000 ;<----- ;code old = $ org ($ and 0x00000FFF) ;code org old+($-$$) ;code (thank you all for your help) |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2023, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.