Question: section .data array DWORD 1,2,3,4,5,6,7,8,9 ; array arraySize = ($-array)/4 section .code main PROC mov ecx,arraySize-1 mov esi,OFFSET array L1: mov eax,[esi] cdq mov bx,2
section .data
array DWORD 1,2,3,4,5,6,7,8,9 ; array
arraySize = ($-array)/4
section .code
main PROC
mov ecx,arraySize-1
mov esi,OFFSET array
L1:
mov eax,[esi]
cdq
mov bx,2
idiv bx
add esi,4
cmp edx,0
je lbl
jmp next
lbl:
mov eax,[esi]
shr eax,1
mov [esi],eax
next:
loop L1
exit
main ENDP
END main
Step by Step Solution
3.36 Rating (152 Votes )
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
Document Format (2 attachments)
635fb11a6d4fb_232802.pdf
180 KBs PDF File
635fb11a6d4fb_232802.docx
120 KBs Word File
