We're just starting out with asm and I'm trying to make sense of my lecturer's code:
movl (%esp), %ebx
leal (%esp), %ecx
I don't see how these two instructions are different except for the register they operate on.
This first one moves the address pointed by the Stack Pointer into register BX.
The second one loads effective address pointed by Stack Pointer into register CX.
If I got it right, is there any point in using two different asm instructions, or was the lecturer just trying to show it did the same thing?