Ok. I've readed 2 books and god knows how much material on the net about assemly programming, but I have never came across text explainig why some people put @ and @@ before jump labels. Could anybody explain that to me?

PS. maybe I'm just so stupid...
Posted on 2003-07-23 17:46:17 by iwabee
Well, I know that @@ is a local label you use when you don't want to put a name to it...
cmp eax,1

je @F ;this jumps FORWARD to the next @@
; do some stuff...
@@: ;more stuff...
cmp eax,2
je @B ;this jumps BACKWARDS to the previous @@

However I have no idea of why some labels have a name, and begin with @ and @@... I'd be interested in the answer too :grin:
Posted on 2003-07-23 17:52:33 by QvasiModo
Posted on 2003-07-23 17:55:24 by NaN
NaN: Thanks for the link :)

Still, how come sometimes I see labels like this?

cmp eax,1
je @@MyOtherLabel

; do some stuff...

cmp edx,5
jb @MyLabel

Why the @ and @@ in the beginning of the label name?
Posted on 2003-07-23 18:03:34 by QvasiModo
If others are like me... Then, it is completely a habitual thing. :)

I create local labels (visible only inside a file) prefixed by '?' so that I know it is a local thing when I read it later. Some people prefer '@', and others have their own rules.
Posted on 2003-07-23 20:12:32 by Starless
Hi QvasiModo,

Anything ending in a single colon (:) is a local label i.e.

lable: ; is local

for global labels in MASM you must use a double colon (::)

lable:: ; is global
Posted on 2003-07-23 20:18:25 by donkey
Posted on 2003-07-23 22:22:56 by Poimander
Since we are on WTHs

why are some people just crazy with underscores?



its ugly as hell :)
Posted on 2003-07-23 23:06:08 by RobotBob
It more readable than MYLONGASSBLAHLAHBLAH
Posted on 2003-07-23 23:34:00 by eet_1024
I used mixed case:

Posted on 2003-07-23 23:56:57 by donkey
right on! :alright:

I think all variables show actually say something too, like:

Like WindowHandle instead of hWnd.etc..
I used hungarian notation at one time and grew sick of it.

EDIT: I'm happy, two people typed ass not in anger! lol
Posted on 2003-07-24 00:18:54 by RobotBob

Hi QvasiModo,

Anything ending in a single colon (:) is a local label i.e.

lable: ; is local

for global labels in MASM you must use a double colon (::)

lable:: ; is global

Thanks for the tip, donkey! :alright:

I used mixed case:


So do I, I think it's more descriptive. But I always end up with the bad habit of using @1, @2, @3... just because I'm a lazy programmer. :grin:
Posted on 2003-07-24 07:43:17 by QvasiModo
For me its mainly cause of its name "At".

ie. jmp @Error

"Jump at Error" (its how my mind 'says' it while programming).

Posted on 2003-07-24 18:03:53 by NaN
I think @@ prefix is a habit whom used to tasm. Because it's already assumes(if any other prefered) @@ is a local variable where prefixed. Nowadays most people using masm32 and it has a @@ as a different purpose but not a prefix. Anyway, if this is not a habit from tasm usage, then it is nothing, meaningless, decoration, i think so.

Posted on 2003-07-24 21:12:19 by cakmak
Anonymous labels are good to have, but I find myself moving away from using them and I like it better. :)
Posted on 2003-07-24 22:15:41 by bitRAKE
since i do lots and lots and lots of loops

mine are normally named LoopA LoopA_1 LoopB_1 but i think loopd is one im not allowed to use lol...

but this helps me when im translating files and lets me know what step im at...
Posted on 2003-07-25 13:19:20 by devilsclaw