Re: A92: Constants and immediate values + movem


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

Re: A92: Constants and immediate values + movem



On Sun, 17 Aug 1997 Niklas Brunlid <e96nbr@efd.lth.se> writes:

>If I define a constant and use it, what is the difference between
>
>   add.l	CONSTANT,a1
>
>and
>
>   add.l	#CONSTANT,a1

The first adds the contents of memory at the address specified by 
CONSTANT, but the second adds the value of CONSTANT.

>Also, what's the default datalength (byte/word/longword) when using
"movem"
>with dataregisters? It's not longword, found that out by trial and error
;-(

It usually defaults to word length.  MOVEM only uses words and longwords,
and can never use bytes.  However, when using MOVEM to transfer data to
the
registers, the entire register is always affected.  When you MOVEM word
values into registers, they are sing-extended to fill the whole register.

--
Patrick Davidson (ariwsi@juno.com)
Visit my home page!  Stuff for Amiga, TI-85, TI-92, even DOS!
http://www.calweb.com/~kwdavids/patrick/
http://www.toptown.com/hp/ariwsi/ 


References: