ibse
ibse

Reputation: 583

Does this assembler statement load an instruction into register?

Reading the article https://web.archive.org/web/20171219120457/http://nairobi-embedded.org/005_elf_types.html about ELF Object File Types, I faced up with the following assembler x86 instructions:

mov 0x0(%rip),%rax #(1)
...
lea 0x0(%rip),%rsi #(2)

Do I correctly understand that (1) loads the next instruction to execute by cpu into rax register? Because rip holds the address of the next instruction to execute and (%rip) dereferences this address and access the value at this address and the value at this address is the next instruction to execute itself.

And can you explain the (2)?

Upvotes: 0

Views: 54

Answers (0)

Related Questions