Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
* Alpha Assembler, label minus label
@ 1995-09-04  4:00 Niels Elgaard Larsen
  0 siblings, 0 replies; only message in thread
From: Niels Elgaard Larsen @ 1995-09-04  4:00 UTC (permalink / raw)


When I try to assemble the following:

	.data
	.word	0x42
l1:
	.word	0x42
l2:
	.word	0x43
	.word l2-l1

I get:
as0: Error: A1.s, line 7: Symbol must have absolute value: l1
      .word l2-l1

Why?

The Programmer guide says:

  �   If  the  operator    is  a minus    sign   (-)  and   the  first
          operand    refers   to  a relocatable     text-section,      data-
          section,    or  bss-section     symbol,    type   propagation      rules
          can  vary:


          -   The   second    operand    can  be  absolute    (if  it  was
               previously     defined)    and  the  result   has  the  first
               operand's     type.


          -   The   second    operand    can  have   the  same   type   as
               the  first   operand    and  the  result   is  absolute.


          -   If  the  first   operand    is  external    undefined,     the
               second    operand    must   be  absolute.

--
   Niels Elgaard Larsen
   Department of Computer Science, University of Copenhagen, Denmark
   E-mail: elgaard@diku.dk



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1995-09-04  4:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1995-09-04  4:00 Alpha Assembler, label minus label Niels Elgaard Larsen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox