3 ms·
LEA is used for calculating integer A + B * C in one instruction for C that is 1, 2 or 4 It is meant for calculating array index addresses base+index*itemsize
by rep_movsd 4y ago
LEA is used for calculating integer A + B * C in one instruction for C that is 1, 2 or 4
It is meant for calculating array index addresses base+index*itemsize but was found by many assembly programmers of the early days to be useful for general arithmetic. All compilers use this trick