tags:

views:

111

answers:

1

Hi.

I have been looking at some assembly code and have found that this comes up rather regularly.

@@: 
...
... ; some instructions
...
LOOP @B

Sometimes there is also @F.

I suppose that @B means to go back to the previous label and @F the the "forward/front" label? Am I right? This only works with "@@" labels? If I have label "label1" and used @B, would that work too?

Thanks.

+3  A: 

You've got it figured out.

These are most useful in macro expansions. If your macro contains a loop, using these built-in symbols allow you to write the macro such that it can be expanded more than once. If your macro were required to use a standard label, expanding the macro twice would create duplicated labels.

These relative label references (@B, @F) never refer to normally-defined labels, only to @@.

Here are some documentation links:

Heath Hunnicutt