Question: (b) Consider the following code and answer the questions that follow. [10 marks] #include extern C { unsigned long __stdcall } .data D QWORD

(b) Consider the following code and answer the questions that follow. [10 marks] #include extern "C" { unsigned long __stdcall } .data D QWORD 1,2,3,4,5,6,7,8 .code mode(__int64*, _ int64); mode PROC C 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; } ;mov rax, [D+16] ; and rax, 3 ;mov rax,-1 ; and rax, 11 ;shr rax,1 } ; A i B ;mov rax, 8[8*rdx+rcx]} ;xor rax, rax ; C rax, rdx } ; D ; add RET mode ENDP end
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
