please i need you to debugg my code. bellow is

 please i need you to debugg my code. bellow is question and my code is uploaded

Implement the Insertion Sort algorithm for an array of int values in Intel assembly language. The algorithm, in C, is given below, assuming int a[ ], n; where n is the number of elements stored in the array. for(i=1;i=0&&a[location]>temp) { a[location+1]=a[location]; location–; } a[location+1]=temp; } Implementing this in Intel assembly language can be tricky because you are limited to the 4 data registers and you might need to be accessing other values as well. This may require that you move values back and forth between variables and registers. Remember that array access in assembly language is of the form a[ebx] where ebx is storing the byte offset, not the array index. You can have variations of this notation like a[ebx*4] so that ebx can be incremented in units of 1 instead of 4, and a[ebx+4] or a[ebx*4+4] to access a[i+1]. Write the program in C first to make sure you understand the logic, and then either convert the instructions into assembly instructions or write it from scratch using your C code as a basis. Your program will be organized as follows: • initialize the int array (hardcode this in the program so that you don’t have to input the values) and the number of elements of the array in C code • enter assembly code to perform the sort o all logic for the sorting algorithm must be done in assembly code • exit assembly code and output the sorted array using a for loop in C to iterate through the array Use only one array (do not manipulate a copy of the array). Run the program on the 2 data sets below. Between runs, change the array values and the number of elements in the array, recompile and rerun it. Collect both sets of output and attach them in comments at the bottom of your source code. Remember to comment your code, especially with respect to how it helps accomplish sorting. This program should be contained in one file and use only one function (main). Run #1: 100, 99, 97, 95, 90, 87, 86, 83, 81, 77, 74, 69, 63, 50, 44, 43, 39, 31, 29, 12 Run #2: 123456, 342100, 87539, 606006, 443322, 198371, 99109, 88018, 707007 Hand in your source code with the output from the two runs. 

Share This Post

Email
WhatsApp
Facebook
Twitter
LinkedIn
Pinterest
Reddit

Order a Similar Paper and get 15% Discount on your First Order

Related Questions

1. Why is color so intimately tied to “spirituality”, for

1.  Why is color so intimately tied to “spirituality”, for Kandinsky?  What does Kandinsky say about that himself in the book, on the spiritual in art? Feel free to quote from the book. (see attachment) 2.  How does color in Kandinsky interact with form to foster special kinds of non-representational effects

The core elements of a service (as opposed to a

Premium Paper Help is a professional writing service that provides original papers. Our products include academic papers of varying complexity and other personalized services, along with research materials for assistance purposes only. All the materials from our website should be used with proper references.

Assignment 7: Prison System Infographic111111 unread replies.111111 replies. www.youtube.com/watch?v=yNxQO5NiiPM  As we learned in this video, minority

Assignment 7: Prison System Infographic111111 unread replies.111111 replies. www.youtube.com/watch?v=yNxQO5NiiPM  As we learned in this video, minority groups are differentially imprisoned in our country. You are to create an infographic highlighting facts (outside of facts presented in the video) about differential incarceration.   Here are some questions that you may want

Socrates claim in the “Apology”

Explain and evaluate Socrates’ claim in the Apology that “the unexamined life is not worth living for a human being,” and briefly analyze and discuss the particular method he uses to discover the truth (i.e., dialectics or the Socratic Method). Do you agree that a human being cannot live a

Intro to Co-Design What we want you to do For your Nursing Assignment Help

Intro to Co-Design What we want you to do  For your individual project, assemble a co-design team, using selected principles of design justice. In your response, answer the following questions: 1) If the design process is intended to prioritize design’s impact on the community over the intentions of the designer, what

It could be said that we all are born aggressive

It could be said that we all are born aggressive but as we mature to adulthood we become less aggressive, transferring our aggressive tendencies to more acceptable behaviors such as sports and competition. One of the ways in which theorist have describe this process learning is social learning theory. Alfred

How did the European public perceive World War I when

  How did the European public perceive World War I when it first began in 1914? Did people support the war or did they oppose it? Why? The Europeans What impact did the continuation of World War I have on the experiences of soldiers? Did soldiers continue supporting the war or

Please respond to the following questions based upon these course objectives: Examine the nursing role in the use of information systems and technologies to improve client outcomes.Evaluate the import Nursing Assignment Help

Please respond to the following questions based upon these course objectives: Examine the nursing role in the use of information systems and technologies to improve client outcomes. Evaluate the importance of computer-human interface, ethics, confidentiality, privacy and documentation related to nursing practice. Utilize educational technologies to provide client education within

Read and provide a reply in 250 words- Topic- Aligning

 Read and provide a reply in 250 words- Topic-   Aligning Stockholder and Management Interests &Time Value of Money/Markets Post: Part 1: Stockholders and Management Interests A variety of smart decisions are used to enhance the company’s competitiveness and help it reach its objectives. Better strategies to fulfil the objectives

Week 6 Discussion The media portray many images of nursing,

Week 6 Discussion The media portray many images of nursing, some favorable and some unfavorable. Does media portrayal of nursing affect how patients perceive nurses as authority figures? Why or why not? Think about nursing stereotypes and discuss the ways you can influence the public image of nursing. Discuss the

For this week’s discussion, use the Company Dossier through the

For this week’s discussion, use the Company Dossier through the Internet, to research one publicly traded company in which you are interested. Locate the company website and financial statements. Review the stockholders’ equity section of the company’s balance sheet. Be prepared to discuss. Imagine that you are advising an investor

Select three U.S. companies from the same industry and review

Select three U.S. companies from the same industry and review their annual reports to determine their accounting policy on foreign currency translation.  Given their practice on this issue, do you think their financial statements comparable? Explain your answer. Please write a one page with references. I need a plagiarism report

Week 1 ProjectAssignment Investigating the Career of an Academic or

Week 1 ProjectAssignment  Investigating the Career of an Academic or Advanced Researcher For this week’s research paper, let’s start using your logistical skills in the South University Online Library. Look for practitioner-oriented publications that discuss the career of an academic or advanced researcher. The Chronicle of Higher Education and the

Pick 3 interesting entities for self-driving cars and draw an

Pick 3 interesting entities for self-driving cars and draw an ER model. Do not use customers and sales as entities but rather the technology they use. Provide domain specific attributes that are needed by the company as part of its data in order to conduct its business. Have two different

400-600 words APA 6 format, in-text citation, Use at least

400-600 words APA 6 format, in-text citation, Use at least two (2) scholarly references to substantiate your work. Please provide a copy of all references used.   Assignment Details: Team Conflict Conflict exists in nature and, by extension, in all human relationships. Team members bring diverse views, beliefs, behaviors, and perspectives.

This 3-4 page Project Assignment picks up the discussion of

   This 3-4 page Project Assignment picks up the discussion of the self in the week 2 discussion by asking you to further explore the question of who you are. If any of the philosophers we read this session might agree with your view, identify the philosopher and explain their

Address the following questions: • How does the artifact bring

Address the following questions: • How does the artifact bring together the different methods and focus an understanding of the data presented in the module? • How does it show the relationship between the artistic and the spiritual? • How does it illumine the process of creativity and its relationship

Write the second part of a proposal for a research

 Write the second part of a proposal for a research project that you intend to do. Your proposal should be between 5 (minimum) and 8 (maximum) pages long on an A4-size paper using 12 Font Arial and 1.5 spacing. Your proposal MUST contain the following items.  1. LITERATURE REVIEW  (a)