Possible Duplicate:
What’s the purpose of the LEA instruction?
Having just started assembly language I would like if someone could tell me the difference between using:
load R1,one[R0] rather than lea R1,1[R0]
when using the value in R1 only as an increment value. For the former, the data is given (one data 1) whereas for the latter data it is not.
In the first case you are loading data, in the second case you are loading an address.
E.g. if R0 contains 0x1000:
then
load R1,1[R0]will load 0x4849 into R1 (assuming the load instruction is a 16 bit load, and the architecture is big endian), whereaslea R1,1[R0]will load 0x1001 into R1.