Question: Write an assembly procedure that takes a 32-bit signed integers array Arrl of size Sizel and a given number N1 then counts how many

Write an assembly procedure that takes a 32-bit signed integers array Arrl 

Write an assembly procedure that takes a 32-bit signed integers array Arrl of size Sizel and a given number N1 then counts how many numbers less than N1 appear in the array Arr1. Preconditions: (1) The start index of the array Arr1 is stored in edx. (2) The array size Sizel is stored in ecx. (3) The number N1 is stored in ebx. Post conditions: (1) Number of numbers less than N1 in Arrl is stored in eax. (2) All used registers, inside the procedure, are retained back to original values (hint: use the stack). .data Arr1 Sizel N1 .code DWORD 8, -7, 10, 3, 2, 0, 1 DWORD 7 DWORD 5 ; Define the procedure here main PROC lea edx, Arrl www. mov ecx, Sizel www mov ebx, N1 www ; Call the procedure here INVOKE ExitProcess, 0 main ENDP END main

Step by Step Solution

3.39 Rating (149 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Sure Heres an assembly procedure that takes an array Arrl of size Sizel and a given number N1 and counts how many numbers less than N1 appear in the array The procedure follows the provided preconditi... View full answer

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 Programming Questions!