Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Assembly @@ label question

Tags:

assembly

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.

like image 446
nunos Avatar asked Feb 05 '26 06:02

nunos


1 Answers

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:

  • @@
  • @B
  • @F
  • Microsoft Macro Assembler Reference
like image 159
Heath Hunnicutt Avatar answered Feb 07 '26 19:02

Heath Hunnicutt



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!