flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
Japheth 18 Jun 2009, 10:49
> What am I doing wrong here?
This is a slightly advanced topic. tss_start is a label, which becomes a so-called "relocatable item" in the object module. The value of relocatable items is, unlike absolute constants, not known at assembly time. Instead the linker (or OS loader) will assign the final value. To help the linker the assembler has to add fixups for relocatable items, which tell the linker how the final value is to be calculated. However, the types of fixups is rather limited and depends on the object format. That's why you cannot do all kinds of arithmetic with labels. Now, as far as your source is concerned: there might exist a work-around in Fasm for expression (<label> and 0xffff), because COFF supports a fixup for the lower 16bits of an address. However, some other label calculations in your source - which use "shift right" operators - surely won't work. |
|||
![]() |
|
kwistjhp 18 Jun 2009, 10:57
Ah, I see, thanks! So I suppose best thing to do is to compute the values at runtime then.
|
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.