Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Posted a similar question but could not edit it. This has more relevant informat

ID: 3872173 • Letter: P

Question

Posted a similar question but could not edit it. This has more relevant information. Thank you.

Read the instructions carefully to allow you to fill in the table correctly. Register values: Register64-bit Contents %rax |0x100 %rsi |0x1 %rdi |0x4 Relevant area of Memory Address 32-bit contents Ox100 0x70 Ox104 0x80 Ox108 0x42 0x10C Oxcc Ox110 0x100 Values are decimal unless preceded by 0x. The movl instruction moves 32 bits of data from the given source to the given destination. For each instruction below, indicate what is updated (if register, give name including %. If memory give as M address where address is n hex MOx2 is an example and what the new value is. Treat each Instruction independently this is not a sequence of instructions. New Value Instruction What changed? movl 0x1cc, %rax movl Ox1cc (%rax) movl 0x99, 8(% rax) movi %rdi,%rax, % rdi) movl 16(%rax), % rdi movl (% rax, % rsi,8), % rax movl 4(%rax, %rdi,2), %rsi movl %rdi,16(%rax, % rax,2)

Explanation / Answer

Value of adress in rax register + 8

*(rax+8) = 0x99

rdl = *(rax+rdl)

rdl = *(0x100 + 0x4)

rdl =0x80

rdl=*(rax+16)

rdl=*(0x100+10)

rdl=0x100

rax= *(rax+rsl*8)

rax= *(0x100 + 0x1 *8)

rax=0x42

rsl = *(rax+rdl*2 +4)

rsl=*(0x100+0x4*2 +4)

rsl=0xcc

*(rax+rax*2+16) = rdl

M[0x110]=0x4

Instruction What Changed New Value movl 0x1cc , %rax Value of rax register 0x1cc movl 0x1cc (%rax) Value of address in rax register value of M[0x100]=0x1cc movl 0x99,8(%rax)

Value of adress in rax register + 8

*(rax+8) = 0x99

value of M[0x108]=0x99 movl %rdl,(%rax,%rdl) value of register rdl

rdl = *(rax+rdl)

rdl = *(0x100 + 0x4)

rdl =0x80

movl 16(%rax) , %rdl value of register rdl

rdl=*(rax+16)

rdl=*(0x100+10)

rdl=0x100

movl (%rax,%rsl,8) , %rax value of register rax

rax= *(rax+rsl*8)

rax= *(0x100 + 0x1 *8)

rax=0x42

movl 4(%rax,%rdl,2) ,%rsl value of register rsl

rsl = *(rax+rdl*2 +4)

rsl=*(0x100+0x4*2 +4)

rsl=0xcc

movl %rdl,16(%rax,%rax,2) value of memory address (rax+rax*2+16)

*(rax+rax*2+16) = rdl

M[0x110]=0x4

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote