flat assembler
Message board for the users of flat assembler.

Index > Main > struct + label with "dot" ... ?

Goto page Previous  1, 2
Author
Thread Post new topic Reply to topic
baldr



Joined: 19 Mar 2008
Posts: 1651
baldr 16 Oct 2010, 11:03
ouadji wrote:
Code:
struc AA1 {
   .x:
  \.y:
}
.BB1 AA1
jmp .BB1.x.y   ;does not compile

;is ".BB1.x.y" unattainable ?

;---------------------------------------------

struc AA1 {
   .x:
  \.y:
}
BB1 AA1
jmp BB1.x.y   ;does compile 
    
«.BB1.x.y» simply doesn't exist. .y becomes attached to most recent global label (or left alone if there isn't such, which in fact is our case). Anyway, look at the preprocessed source and most of it will be clear.
Post 16 Oct 2010, 11:03
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20309
Location: In your JS exploiting you and your system
revolution 16 Oct 2010, 12:27
ouadji wrote:

Quote:
The difference being the local labels do not change the base global label name for the next local label.
ok, i understood, here is the key of this problem.


just for the fun, Razz
Code:
struc AA1 {
   .x:
  \.y:
}
.BB1 AA1
jmp .BB1.x.y   ;does not compile

;is ".BB1.x.y" unattainable ?

;---------------------------------------------

struc AA1 {
   .x:
  \.y:
}
BB1 AA1
jmp BB1.x.y   ;does compile 
    

Tomasz,when will we have a true doc about macros ?
Why this must remain the gods secret !!
(thank you)
.BB1.x is also a local label. The leading dot (.) makes it local to whatever was the last global label (if one exists).
Post 16 Oct 2010, 12:27
View user's profile Send private message Visit poster's website Reply with quote
ouadji



Joined: 24 Dec 2008
Posts: 1081
Location: Belgium
ouadji 16 Oct 2010, 12:32

Quote:
Anyway, look at the preprocessed source and most of it will be clear.
should I look inside the Windows code to use Windows ?
Tomasz,when will we have a true doc about macros ?
must one really analyze the fasm code to be able to use macros fully ?
is this a gods secret ? thank you Tomasz.

(thank you baldr and revolution for your replies)

_________________
I am not young enough to know everything (Oscar Wilde)- Image
Post 16 Oct 2010, 12:32
View user's profile Send private message Send e-mail Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20309
Location: In your JS exploiting you and your system
revolution 16 Oct 2010, 12:44
ouadji wrote:
should I look inside the Windows code to use Windows ?
How much did you pay for Windows? Now compare that to how much you paid for fasm.
Post 16 Oct 2010, 12:44
View user's profile Send private message Visit poster's website Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4330
Location: Now
edfed 16 Oct 2010, 13:14
macro are well documented.
revolution post enough replies to every problem we meet.

that's open a question in my mind, revolution is maybe a friend of tomasz, living more or less in krakow, somebody like an enginer, who work(ed) in krakow and travalling a lot, originary from english or american country

and without internet, the fasm manual explain well how ot use macro, just we need ot read it right, and try, try, try, in order to understand.

but its true that more examples in the doc would be better, for example, bring just examples on basic tricks... like beginners questions... but how to invent beginner quesiton without them, then, when a pertinent question is asked on the forum, it can be interresting to report it in the official doc.

i think that a software needs approximattely 50% code, and 50% doc, in term of devellopement time.
then, for fasm who is develloped since a lot of years, the write of the doc will take lot of years too.

be patient.

that's the philosophy of asm, learn by the tests, and the errors.
Post 16 Oct 2010, 13:14
View user's profile Send private message Visit poster's website Reply with quote
ouadji



Joined: 24 Dec 2008
Posts: 1081
Location: Belgium
ouadji 16 Oct 2010, 15:28

yes, i agree with you edfed.
I'm "grumbling" a little ! Wink
a Belgian likes to complain from time to time!

That said, fasm is a fantastic tool.
A compiler with a incredible precision and efficiency.
Quote:
from revolution:
How much did you pay for Windows?
Xp Pro 32bits, 50 euros with "ebay" Razz

_________________
I am not young enough to know everything (Oscar Wilde)- Image
Post 16 Oct 2010, 15:28
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:  
Goto page Previous  1, 2

< 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.