Please give me the process! The \"move\" instructions take the form of movq sour
ID: 3754365 • Letter: P
Question
Please give me the process!
The "move" instructions take the form of movq source, destination This has the effect of copying a value from source to destination. See Figure 3.3 on page 181 for the different forms that source and destination can take Note: instead of a q, the last letter of "mov" might instead be a b, w, or I, depending on the size of the value that you're moving. See Figure 3.4 on page 183 movb Move byte movw Move word (2 bytes) movl Move double word (4 bytes) movq Move quad word (8 bytes) legacy name from original 8086's 16-bit word aka, move long word For the following questions, use this table that indicates the contents of some registers and the contents of some memory locations: %rax 0x04 %rbx Ox1B %rcx 0x10 %rdx Ox02 %rsp 0xF800 Register Register Content Memory Address Memory Content OxF828 0xF820 0xF818 0xF810 0xF808 0xF800 OxOFOF 0x1E1E Ox2D2D 0x917B 0xC5 0x09Explanation / Answer
() loads the value at address found in the register enclosed whereas register without () denotes memory address itself.
4)
movq (%rsp), %rax
As per definition (%rsp) ~ (0xF800) ~ value stored at address 0xF800 ~ 0x09 => rax
5)
movq %rbx, (%rsp)
As per definition %rbx ~ 0x1B ~ load this address into (%rsp) ~ load this address into (0xF800)
So after this instruction is executed, 0xF800 will contain 0x1B