given the following assembly instructions
mov ax, bx
add ax, di
How can I write a single instruction to have the same effect as those two?
given the following assembly instructions
mov ax, bx
add ax, di
How can I write a single instruction to have the same effect as those two?
There is no guarantee that there is an equivalent 'single instruction' for any two (or more) instructions. In this case, the solution appears to be
mov ax, bx+di
However, that instruction does not exist. But there is the lea
command: What's the purpose of the LEA instruction?
and so this ought to work:
lea ax, [bx+di]