Usenet comp.os.linux.alpha (1997-2013)
 help / color / mirror / Atom feed
* newbie assembly question: lda versus addq
@ 1999-11-14  5:00 david_morse
  1999-11-15  5:00 ` Martin Sinot
  0 siblings, 1 reply; 2+ messages in thread
From: david_morse @ 1999-11-14  5:00 UTC (permalink / raw)


Hi all,
  Is there any way in which "addq X, literal, Y" is superior to "lda
Y,literal(X)"?  That I can tell addq only supports an 8 bit literal,
while lda supports 16 bit literals.  Why would I ever want to use the
addq version?

PS: Thanks Jon, Mark, and Peter for your responses on assembly
documentation.  Those docs have helped quite a bit.


Sent via Deja.com http://www.deja.com/
Before you buy.



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: newbie assembly question: lda versus addq
  1999-11-14  5:00 newbie assembly question: lda versus addq david_morse
@ 1999-11-15  5:00 ` Martin Sinot
  0 siblings, 0 replies; 2+ messages in thread
From: Martin Sinot @ 1999-11-15  5:00 UTC (permalink / raw)



<david_morse@my-deja.com> wrote in message
news:80l2s1$cfs$1@nnrp1.deja.com...
> Hi all,
>   Is there any way in which "addq X, literal, Y" is superior to "lda
> Y,literal(X)"?  That I can tell addq only supports an 8 bit literal,
> while lda supports 16 bit literals.  Why would I ever want to use the
> addq version?
>
> PS: Thanks Jon, Mark, and Peter for your responses on assembly
> documentation.  Those docs have helped quite a bit.
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.

As far as I can see, the only reason you would want to use addq is
if you want to be able to generate an exception. Other than that,
I see no difference in performance between the two. And then lda
has the advantage of being able to add a signed 16-bit integer,
while addq can only add an unsigned 8-bit integer. You might
still want to use addq for readability reasons, though.

Martin Sinot
martin@spase.nl





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1999-11-15  5:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-11-14  5:00 newbie assembly question: lda versus addq david_morse
1999-11-15  5:00 ` Martin Sinot

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