Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This problem is based off of Chapter 8.11, Problem 8PE of Assembly Language for x86 Processors. (The book solution does not run properly, so please

This problem is based off of Chapter 8.11, Problem 8PE of Assembly Language for x86 Processors. (The book solution does not run properly, so please don't just copy paste that into this. If you do use it as a reference, please keep this in mind.)

Write a procedure named CountMatches that receives points to two arrays of signed doublewords, and a third parameter that indicates the length of the two arrays. For each element xi in the first array, if the corresponding yi in the second array is equal, increment a count. At the end, return a count of the number of matching array elements in EAX. Write a test program that calls your procedure and passes pointers to two different pairs of arrays. Use the INVOKE statement to call your procedure and pass stack parameters. Create a PROTO declaration for CountMatches. Save and restore any registers (other than EAX) changed by your procedure.

This problem must follow the following rules:

*Is an Assembly Language Program (so no Java, Python, etc.)

*Uses "INCLUDE Irvine32.inc" and nothing more. If the word "include" needs to be used more than once, then there's already something wrong.

*Runs successfully on Microsoft Visual Studio (If you could prove it runs by showing the output, that would be great).

Everytime I make a request, there's always something wrong, so please, follow this format for how the code must be constructed.

Everything below will be present if the code is following the rules and assumptions of the Assembly Language for x86 Processors book, so you can just copy paste the following, because you're going to need it.

_________________________________

INCLUDE Irvine32.inc

.data

.code

main PROC

main ENDP

END main ; this part may change depending on any additional procedures added.

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

Excel As Your Database

Authors: Paul Cornell

1st Edition

1590597516, 978-1590597514

More Books

Students also viewed these Databases questions

Question

What is a met model? How is a met model used?

Answered: 1 week ago

Question

Why is the System Build Process an iterative process?

Answered: 1 week ago