Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Address Memory Contents 0 x 1 0 0 4 0 1 0 0 0 x 1 0 0 3 8 0 x 1 0 0

Address Memory Contents
0x10040100
0x100380x10040
0x10030200
0x1002825
0x100200x10028
0x100180x10020
0x10010500
0x100080x10018
0x100002
Register Contents
%rdi 0x10028
%rsi 0x10
%rdx 16
%rcx -8
For each of the following assembly code sequences, say what value ends up in %rax at
the end of the sequence of instructions. Assume the starting state is what was given for the previous
problem.
a. movq $-32(%rdi),%rax
movq (%rax),%rax
movq (%rax),%rax
addq %rcx,%rax
b. subq $0x18,%rdi
shrq $2,%rdx
movq (%rdi),%rax
addq (%rdi,%rdx,8),%rax

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Ai And The Lottery Defying Odds With Intelligent Prediction

Authors: Gary Covella Ph D

1st Edition

B0CND1ZB98, 979-8223302568

More Books

Students also viewed these Databases questions