flat assembler
Message board for the users of flat assembler.

Index > Compiler Internals > highlight bug

Author
Thread Post new topic Reply to topic
daluca



Joined: 05 Nov 2005
Posts: 86
daluca 05 Feb 2007, 18:39
well is just a minor bug but: names that start with the $ symbol like:
$label,$name1 etc.... are effectively
interpreted as names but highlighted as numbers in FASMW
I think this is bug since the reazon for use highlighting is to separate diferent
groups so numbers get one colour,comments get another,symbol characters
another and so.
so it can be confusing to have a label that is highlighted as a number specialy
with certain characters like l or o that can be confused with 1 or 0.
Post 05 Feb 2007, 18:39
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 05 Feb 2007, 19:56
it's hard to differ them. When you see $A, is it name or hexadecimal digit 0xA ?
Post 05 Feb 2007, 19:56
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2341
Location: Usono (aka, USA)
rugxulo 05 Feb 2007, 20:06
Someone correct me if I'm wrong, but ...


  • $A is Pascal
  • 0xA is C
  • 0Ah is typical asm (suggested, IMO)


Of course, feel free to do whatever you want, but it's better to be consistent (no matter what you choose).
Post 05 Feb 2007, 20:06
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 05 Feb 2007, 21:22
rugxulo you are right. Both 3 types supported.

I am surprised FASM supports names starting with "$". I would consider this a bug.
Post 05 Feb 2007, 21:22
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
daluca



Joined: 05 Nov 2005
Posts: 86
daluca 05 Feb 2007, 23:10
I thought that the bug was the highlight but as vid found out:

Code:
mov ax,$A
$A:
    


1 Passes, 3 bytes.

this is serious.
Post 05 Feb 2007, 23:10
View user's profile Send private message Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1903
DOS386 07 Feb 2007, 00:31
Quote:

$A is Pascal


That's what I prefer ("$", not the PASCAL) Wink

Quote:
0xA is C
0Ah is typical asm (suggested, IMO)


The "h" at the end means horrible and generates unnecessary bugs:

http://board.flatassembler.net/topic.php?t=1484 Sad Sad Sad

BTW: the number syntax (how to write HEX numbers, how to write BINARY
numbers) seems completely undocumented ... something that could be
fixed in the manual (besides JG vs JA / sign vs unsign) Wink

Quote:
I am surprised FASM supports names starting with "$". I would consider this a bug.


Agree. Names beginning with "$" sould be completely banned ... or at least
insist that "g".."z" follows the "$".

_________________
Bug Nr.: 12345

Title: Hello World program compiles to 100 KB !!!

Status: Closed: NOT a Bug
Post 07 Feb 2007, 00:31
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8356
Location: Kraków, Poland
Tomasz Grysztar 07 Feb 2007, 10:23
Funny, I did really believe I had added such a check... Very Happy
Post 07 Feb 2007, 10:23
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8356
Location: Kraków, Poland
Tomasz Grysztar 10 Feb 2007, 13:32
Fixed in 1.67.19.
Post 10 Feb 2007, 13:32
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.