flat assembler
Message board for the users of flat assembler.

Index > Main > anonymous and not anonymous

Author
Thread Post new topic Reply to topic
ouadji



Joined: 24 Dec 2008
Posts: 1081
Location: Belgium
ouadji 31 Oct 2010, 11:40

amazing, here is a label both anonymous and not anonymous
Code:
struct AA
dx dd ?
ends

@@  AA

mov eax,[@B]       ;anonymous

mov eax,[@@.dx]    ;not anonymous

2 passes, 12 bytes
    

_________________
I am not young enough to know everything (Oscar Wilde)- Image
Post 31 Oct 2010, 11:40
View user's profile Send private message Send e-mail Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4334
Location: Now
edfed 31 Oct 2010, 13:19
cool: Very Happy

Code:
struct AA
entry:
mov ecx,43
mov eax,[esi]
add esi,4
loop:


@@:
add eax,[esi]
loop @@.loop
    


but it will give problems when multiple @@: AA will be defined.
Post 31 Oct 2010, 13:19
View user's profile Send private message Visit poster's website Reply with quote
baldr



Joined: 19 Mar 2008
Posts: 1651
baldr 31 Oct 2010, 16:06
ouadji & edfed,

Nothing strange, see MACRO\STRUCT.INC. Or preprocess the source. It's @b/@r/@f references that make @@ constant special.
Post 31 Oct 2010, 16:06
View user's profile Send private message 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.