Skip to contentSkip to conversation

.unset

DISCUSSION Maciej Hrebien 2 participants 2 messages Sep 22, 2002 – Sep 23, 2002

lore
Share & tools
lore
#0 lore raw

Hi there!

The GAS has the .set directive (or .equ if You like) which defines a value to use during assembly. My question is how to unset this value to be not seen in code after this operation (like C's undef). Is it possible?

.set xyz, 1

.ifdef xyz
.unset xyz
.endif

"xyz" not seen here!

Something like the example above with the proper ".unset" directive which i can't find. Maybe there is a different way to do this?

Sorry if this is some kind of redundant question but i really can't figure out how to do this :(

Signature · 1 line
Maciej Hrebien
#1 lore raw
Quoted 6 lines · On Sun, 22 Sep 2002 21:50:15 +0200 Maciej Hrebien <[email protected]> wrote:

Hi there!

The GAS has the .set directive (or .equ if You like) which defines a value to use during assembly. My question is how to unset this value to be not seen in code after this operation (like C's undef). Is it possible?

no. asm, not "C":)
'.set' doesn't define a compiler control item but, in assembly terms a 'label' which to 'un'-defining would be quite silly - and useless, re AS manual, 7.67:
" ...value stored in the object file is the last value..."

the sequence of CC -E ... | GASP ... | AS ... can help for
any kind of asm control but, also is quite tricky (re my www pages "F4A").

Quoted 21 lines

.set xyz, 1

.ifdef xyz
.unset xyz
.endif

"xyz" not seen here!

Something like the example above with the proper ".unset" directive which i can't find. Maybe there is a different way to do this?

Sorry if this is some kind of redundant question but i really can't figure out how to do this :(

Signature · 6 lines
Maciej Hrebien

-
To unsubscribe from this list: send the line "unsubscribe linux-assembly" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Signature · 1 line
Linux,Assembly,Forth: http://www.lxhp.in-berlin.de/index-lx.shtml en/de