flat assembler
Message board for the users of flat assembler.

Index > Linux > hmm... what's my error...

Author
Thread Post new topic Reply to topic
scientica
Retired moderator


Joined: 16 Jun 2003
Posts: 689
Location: Linköping, Sweden
scientica 28 Jan 2005, 15:31
I can't get the display_offset macro (from the manual) to work in my elf file ('format ELF'') :/
it fails with this error:
Code:
macros/macros.asm [7] display_offset [1]:
    d1 = '0'+ $ shr 12 and 0Fh
error: invalid expression.    

I remember having this error some other time, but I cat seem to rememder when (and I can't find any posts about this)... or if I got the answer to it.

I've tried calling the macro from both data and code sections - still same error...

but if I add this line before the display_offset line "display $"
I get this bizzare error:
Code:
flat assembler  version 1.57
W
_lib.asm [54]:
display_offset
macros/macros.asm [11] display_offset [5]:
    if d1>'9'
error: invalid use of symbol.    

_________________
... a professor saying: "use this proprietary software to learn computer science" is the same as English professor handing you a copy of Shakespeare and saying: "use this book to learn Shakespeare without opening the book itself.
- Bradley Kuhn
Post 28 Jan 2005, 15:31
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8353
Location: Kraków, Poland
Tomasz Grysztar 28 Jan 2005, 17:47
This happens when $ is relocatable symbol (and so the d1 also becomes the relocatable symbol), when the object or PE format is selected for output.
Post 28 Jan 2005, 17:47
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8353
Location: Kraków, Poland
Tomasz Grysztar 29 Jan 2005, 09:13
It was asked (in different variants) many times already, so I think it qualifies to the FAQ. I will add it.
Post 29 Jan 2005, 09:13
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.