Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hey experts Just need question 2 ! ( 25 pts) CS 3843 Computer Organization I-HW #09 Name/abc123: DueWed. Aug9th, 2017 1. (15 pts) Write an

image text in transcribed
image text in transcribedHey experts Just need question 2 !
( 25 pts) CS 3843 Computer Organization I-HW #09 Name/abc123: DueWed. Aug9th, 2017 1. (15 pts) Write an assembly program to do a binary search on the wordlist provided in the included ".cpp" file. The ".cpp" file calls the function with specific words designed to test your algorithm. Your assembly program should also count the number of steps required (i.e. how many strcmp calls you need to make) and track which element in the array that has the word. Return 1 if the word is not in the list. The binary search routine should first check the endpoints (the wordlist is a fixed length, 75 words I believe) and then the middle. If not found, cut the list in half and try again until the address of the start of the list 2 the address of the end of the list. The example shows you how to access the parameters and the word 1ist. Remember, it is an array of character pointers, so each element in the word list array is 4 bytes (i.e. a pointer to the word itself) 2. (10 pts) You will also need to implement a "strcmp" function to check if the words match. Embed th subroutine within your inline assembly code. You are welcome to set up a common stack frame or do a "fast" call by carrying the respective values in the registers Deliverables: Hard copy of your assembly source code. Screenshot of the output

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

Spatial Databases With Application To GIS

Authors: Philippe Rigaux, Michel Scholl, Agnès Voisard

1st Edition

1558605886, 978-1558605886

More Books

Students also viewed these Databases questions

Question

Has each action got a clear and measurable outcome?

Answered: 1 week ago