flat assembler
Message board for the users of flat assembler.

Index > Main > 1.69.38 question

Author
Thread Post new topic Reply to topic
fasmfan2008



Joined: 28 Oct 2007
Posts: 13
fasmfan2008
Code:
jz     0x12345678
    


1> jz 0x12345678
1>error: invalid use of symbol.
Post 22 Feb 2012, 07:31
View user's profile Send private message Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 7713
Location: Kraków, Poland
Tomasz Grysztar
You forgot to provide the context - I suspect this an object output format, or relocatable PE, because 1.69.37 has fixed a bug in relocatable formats that allowed earlier versions to assemble jumps to absolute addresses even though it was not able to generate appropriate relocation for them (and thus it was generating incorrect code).
Post 22 Feb 2012, 07:59
View user's profile Send private message Visit poster's website Reply with quote
l_inc



Joined: 23 Oct 2009
Posts: 881
l_inc
Tomasz Grysztar
But the error message does not look very informative. I also got that message in an MS COFF which was perfectly compiled by 1.69.35 (and also properly worked), but not with 1.69.37. That was actually my bug, but I spent hours to understand, what this error message is supposed to mean.
Post 22 Feb 2012, 12:41
View user's profile Send private message Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 7713
Location: Kraków, Poland
Tomasz Grysztar
I reused the same error message that is signalized in analogous situations when you use some relocatable symbol as target, without much thinking about it. I often just re-use existing error messages for all kind of even slightly-related errors, my fault.
Post 22 Feb 2012, 12:46
View user's profile Send private message Visit poster's website Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1901
DOS386
l_inc wrote:
But the error message does not look very informative.


Known issue: http://board.flatassembler.net/topic.php?p=134817#134817 FAQ B 3

http://board.flatassembler.net/topic.php?p=137175#137175
Post 23 Feb 2012, 06:32
View user's profile Send private message Reply with quote
l_inc



Joined: 23 Oct 2009
Posts: 881
l_inc
DOS386
That's not the same. FAQ B3 shows a situation, where one possible error message is chosen to be displayed in an ambiguous context: one tries to use a non-base register either as a symbol or as a base register. However in most cases a newbie knows, that cx is a register, but does not know it can't be a base register.

Regarding the subject of this topic an error message like "the address expression is not applicable in current addressing context" would be (as it seems to me) in any case a better option.
Post 23 Feb 2012, 16:25
View user's profile Send private message Reply with quote
shutdownall



Joined: 02 Apr 2010
Posts: 518
Location: Munich
shutdownall
l_inc wrote:
DOS386
However in most cases a newbie knows, that cx is a register, but does not know it can't be a base register.

Well in fact FASM stops at the wrong line. It's just one line and you can think what could be false. This would not be much characters in most cases. I even use some general error messages which seem to be the nearest error case. In the case above it would be the best to tell that "cx can not be used as base register". So with the name of the register itself.

In my eyes the deepness of the error messages in FASM are okay. Not perfect but where can you find perfect software excepting your own programming kitchen. Rolling Eyes
Post 23 Feb 2012, 17:02
View user's profile Send private message Send e-mail 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-2020, Tomasz Grysztar.

Powered by rwasa.