To continue a discution with Donkey in another thread:

Originally posted by Donkey:

Hi Bogdan,

In TASM, if you are not identifying the structure then does that mean that all member names must be unique ? For example you can't have 2 structs with cbSize ? I think I would find this limiting more than liberating. Though you can replace @@ you still need the ability to have a label that is not added to the symbol table so it would be just renaming the directive, not really abolishing it.


Yes it does mean that i must have unique structure names in TASM unless i use MASM compatible mode :grin:

Initially I have also thought it is a problem (somehow i still think it is)
But i have learned to live with it and i am quite pleased by the fact that i have less to type :tongue: and the code looks cleaner.

I mean what difference is in between naming: .xxx_struct_cbSize and xxx_struct.cbSize ?

Usually I extablish a naming convention like in naming structures members: xxs_cbsize and i am usually more happy with this than the full qualifying aspect... but yes i think it is a matter of taste and it makes a lot of problems with RadASM and i have to convers MASM includes manually.

About "@@" : (not the unnamed forward/backward reference)

Yes i agree but in TASM "@@" is a little different than in MASM, what i meant is that TASM useses this to signal local symbol table for current PROCEDURE ... while in MASM this is by default not having to type @@ in front of any LOCAL desired symbol... this bothers me a little

Since we have the option to define global labels inside a procedure by using "::" after a lablel and see no use for globalization of local stack variables... i think the use of @@ for signaling local symbol table in TASM is wrong...

At least this i will remove in my SOL_ASM ;)

Maybe this assumptions they made in TASM are responsible for its speed?
Posted on 2004-02-28 05:14:30 by BogdanOntanu
I would just also like to point out that assume while not used by very many people wouldn't work if only unique names were allowed.

On a purely personal level I wouldn't like to have unique structre names. But this is more an asthetic thing than technical.
Posted on 2004-02-28 06:12:42 by Eóin
You will not need "assume" directive with unique struc member names, that is the whole ideea, i guess assume will work... but will do nothing in such case.

The fact that "assume" directive exists shows that it is somehow considered cumbesome to type the structure_name.structure_member one multiple instructions ;)

And this issue might have a technical impact on internal structure of the assembler and speed

I can also see a bad technical impact on IDEs (like RADASM), since with unique names the IDE auto-completion and member choose list has to be done differently
Posted on 2004-02-28 06:32:20 by BogdanOntanu
Sorry, I wasn't very clear. What I ment was that using .xxx_struct_cbSize to reference structre members wouldn't work with assume.

Plus I dislike underlines, I prefeer dots, but thats just a personal thing.
Posted on 2004-02-28 09:37:11 by Eóin
From a technical point of view, requiring unique names means you are storing names in a large global table, possibly slowing down search times.

Another reason for not requiring unique names is easy translation from C code that uses struct. (We won't get into C++ here.)

It makes more sense to me if the assume syntax was created before the .struct_name.member syntax, but that is just speculation on my part. The former looks like it's just an extension of an existing directive, while the latter is completely new notation for replacing (struct_name PTR xxxx) syntax.
Posted on 2004-02-28 19:02:20 by tenkey