Re: A89: Line 1111 Emulator


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

Re: A89: Line 1111 Emulator




Wouldn't add.l 10, a7 be faster then doing it with lea?
Generally, (at least on the Intel processors),  adding an immediate to a
register is faster than setting a memory address to a register.

Daniel Imfeld

In a message dated 12/28/1998 8:54:16 PM Pacific Standard Time,
oh@hem.passagen.se writes:

> 10(a7) points to the address stored in a7 added with 10. that is what a
>  number outside a parthesis means..
>  so 
>  
>  lea 10(a7),a7 	
>  
>  is calculating this address and stores it in a7, in this case it is
>  identical to add.l #10,a7
>  another example...
>  lets say you have an address stored in a0.. the address is $4c00.
>  you want to access a byte stored 12 bytes away from a0, then you write
this:
>  
>  move.b 12(a0),d0
>  
>  this will put the byte stored at $4c0c into d0..
>  you can also do like this,
>  
>  move.b	2(a0,d1),d0
>  
>  if you have 10 in d1, you will access the same byte again..
>  hope this helps..
>  
>  //Olle
>  btw..  get yourself a Programmers Reference from Motorola, and look stuff
>  like this up by yourself..   or read Jimmy Mårdells file..
>