From: <kieft_brian@si.com>
To: linux-assembly@vger.kernel.org
Subject: GAS - \@ in macros and labels
Date: Wed, 29 May 2002 10:49:36 -0400 [thread overview]
Message-ID: <004C6F8A.C21188@si.com> (raw)
I'm having a little trouble with specifying labels inside of two different
macros using the \@ variable. See the following...
.MACRO tableHdr someArgs
A_\@:
.DC.W (B_\@ - A_\@)
stuff....
.ENDM
.MACRO tableEnd someArgs
B_\@:
.ENDM
Unfortunately the number produced by \@ will never be in sync between the two
macros due to the fact that a new macro call will increment the counter (not to
mention that there may be some other macros called in between Hdr and End).
So I attempted to resolve the situation by creating my own variable...
.MACRO tableHdr someArgs
.SET CMD_NUM,\@
A_CMD_NUM:
.DC.W (B_CMD_NUM - A_CMD_NUM)
stuff....
.ENDM
.MACRO tableEnd someArgs
B_CMD_NUM:
.ENDM
Unfortunately GAS sees this as literal text and throws a bunch of "symbol
already defined" errors. Any ideas on how to make the CMD_NUM appear as its
value in a label? Thanks,
Brian
**********************************************************************
This e-mail and any files transmitted with it are confidential and may
be legally privileged or otherwise exempt from disclosure under
applicable law. This e-mail and its files are intended solely for
the individual or entity to whom they are addressed and their content
is the property of Smiths Aerospace. If you are not the intended
recipient, please do not read, copy, use or disclose this communication.
If you have received this e-mail in error please notify the e-mail
administrator at postmaster@si.com and then delete this e-mail, its
files and any copies.
This footnote also confirms that this e-mail message has been scanned
for the presence of known computer viruses.
***********************************************************************
next reply other threads:[~2002-05-29 14:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-29 14:49 kieft_brian [this message]
2002-05-30 17:13 ` GAS - \@ in macros and labels Scott Lanning
2002-05-30 22:44 ` h-peter recktenwald
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=004C6F8A.C21188@si.com \
--to=kieft_brian@si.com \
--cc=linux-assembly@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.