Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Consider the following code and answer the questions that follow. #include extern C { unsigned long _ _ stdcall mode ( _ _

Consider the following code and answer the questions that follow.
#include
extern "C"
{
unsigned long __stdcall
mode(__int64*,__int64);
}
int main(int argc, char* argv[])
{
_int64 A[]={1,2,3,4,5,6};
_int64 B = mode(A,3);
printf("
B:%ld", B);
return 0;
}
.data
D QWORD 1,2,3,4,5,6,7,8
.code
mode PROC C
//A
;mov rax, [D+16]
;and rax, 3
//B
;mov rax,-1
;and rax,11
;shr rax,1
//C
;mov rax,8[8*rdx+rcx]
//D
;xor rax,rax
;add rax,rdx
//D stops here
RET
mode ENDP
end
A
(i) Name the addressing mode used by each highlighted
line [A to D].
(ii) Predict the value printed to screen when each
highlighted section of code [A to D] is run separately.

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

Oracle Database Foundations Technology Fundamentals For IT Success

Authors: Bob Bryla

1st Edition

0782143725, 9780782143720

More Books

Students also viewed these Databases questions

Question

Which form of proof do you find least persuasive? Why?

Answered: 1 week ago