Re: A89: Re: evaluating expressions


[Prev][Next][Index][Thread]

Re: A89: Re: evaluating expressions




> Hi!
>
> > Btw, is lea "better" than addq when adjusting the stack pointer?
>
> Yes, because
>
> addq.l #8,a7
>
> does not exist (a first argument of addq is limited to 0-7, because
> 3 bits are reserved for it). So, I used
>
> lea (a7,8),a7
>
> which is 2 bytes shorter than
>
> add.l #8,a7

Nope. Motorola's engineers knew that you'll never add an immediate value of zero
to something, so addq takes values from 1 to 8. :)
The only occasion where adding zero could be useful would be to create a small
delay, but there are other ways to get equelly long delays.

 / Niklas Brunlid
Check out Prosit for the TI-89 / TI-92+ at http://prosit.ticalc.org
Random PQF Quote follows:

The Kappamaki, a whaling research ship, was currently researching the
question: How many whales can you catch in one week?
        -- (Terry Pratchett & Neil Gaiman, Good Omens)





References: