Question: Consider the following Ox 8 6 program: . data . code array DWORD 1 , 2 , 3 , 4 , 5 , 6 ,

Consider the following Ox86 program:
.data
.code
array DWORD 1,2,3,4,5,6,7,8,9 ; array
arraySize =($-array)/4
main PROC
mov ecx,arraySize-1
L1:
mov esi,OFFSET array
mov eax,[esi]
cdg
mov bx,2
idiv bx
add esi,4
cmp edx,0
je lbl
jmp next
Ibl:
next:
mov eax,[esi]
END main
shr eax, 1
mov [esi),eax
loop L1
exit
main ENDP
What is the content of the array at the end of the program?
0,2,1,4,2,6,3,8,4
O 1,1,3,2,5,3,7,4,9
1,2,1,4,2,3,7,8,4
O 0,1,1,2,2,3,3,4,4

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!