flat assembler
Message board for the users of flat assembler.

Index > Main > Why two dots in numeric constants?

Author
Thread Post new topic Reply to topic
Borsuc



Joined: 29 Dec 2005
Posts: 2466
Location: Bucharest, Romania
Borsuc
I was always wondering since I first looked into the FASM Windows headers (it's not related to windows anyway, that's why it's in Main forum Wink ).. Why have some macros something like:

Code:
local ..opcode    

even though ..opcode is a numeric constant, not a label, so why two preceeding dots used? or are there just arbitrary? just wondering...

I am also quite confused of the dots in labels (. or ..), so if anyone can xplain this i'll be thankful.

Regards,
Grey Beast
Post 22 Jan 2006, 16:32
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 7750
Location: Kraków, Poland
Tomasz Grysztar
They are not needed there but were left just-in-case Wink

As for what dots do, here's some sample, hope it might be helpful:
Code:
a:   ; defines a
.x:  ; defines a.x
.y:  ; defines a.y
..z: ; defines ..z
.t:  ; defines a.t
b:   ; defines b
.x:  ; defines b.x
.y:  ; defines b.y    

This feature was taken exactly as-is from the NASM.
Post 22 Jan 2006, 16:57
View user's profile Send private message Visit poster's website Reply with quote
Borsuc



Joined: 29 Dec 2005
Posts: 2466
Location: Bucharest, Romania
Borsuc
Aha, I knew it was just for convenience, nothing special Very Happy
Post 22 Jan 2006, 17:00
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 7750
Location: Kraków, Poland
Tomasz Grysztar
In fact it was left from the old times, when the = definitions would also begin a new section of dotted locals - this was later changed, as disturbing and not really useful feature.
Post 22 Jan 2006, 17:10
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-2020, Tomasz Grysztar. Also on YouTube, Twitter.

Website powered by rwasa.