Use an insertion sort to sort an array, Programming Languages

Use an insertion sort to sort an array (sequence) of long word integers. The size of the list will appear just before the list itself. Use the same labels as in this example:

LENGTH: DC.W 6
SPOT: DC.L 66,5,30,-4,10,12

The program must work for lists of between 1 and 20 numbers at a minimum, and should really work for much longer lists.

Include comments.

It is normal to turn this kind of application into a subroutine. The subroutine might well have two parameters. The first would be a size, and the second the location of the list of long word integers to be sorted. Thus: sort(int size, int *ai) might be a C prototype. So for the example above the actual parameters would be 6, and the address symbolized by SPOT.

Consider this a two part assignment. The first part is to get the insertion sort to work. The second part is to create and test a subroutine which  uses the code created in the first part. There will be separate due dates.

Program starts

                ORG   $0

DC.L  $8000

DC.L  START

                ORG   $2000

Posted Date: 3/25/2013 5:37:31 AM | Location : United States







Related Discussions:- Use an insertion sort to sort an array, Assignment Help, Ask Question on Use an insertion sort to sort an array, Get Answer, Expert's Help, Use an insertion sort to sort an array Discussions

Write discussion on Use an insertion sort to sort an array
Your posts are moderated
Related Questions
basic steps involved in spreadsheet developement

1. Logon to Linux. 2. Create a directory "Unix" under your home directory. Command(s): …………………………………………. 3. Create four sub-directories bin, conf, docs

Write a procedure named Str_concat that concatenates a source string to the end of a target string. Sufficient space must exist in the target string to accommodate the new characte

I need help I want to implement the Genetic Algorithm for Shortest path Kindly Help me I will be thankful to you

n2=2:100; t=3; while t { g3(t)=(1/2)*(0.63)*(0.8.^(n2)); t=t+1; } g3(1)=0; g3(2)=0; what is wrong with the code above? it tells me that line: g3(t)=(1/2)

Explain what is HTML language with an example? HTML is the HyperText Markup Language. HTML files are text files featuring semantically tagged elements. HTML filenames are suff

Although the Document object's write()and writeln() methods are part of the DOM, they cannot be used to change content after a Web page has been rendered. You can write code that e

ADO. NET ADO.NET (ActiveX Information Things for .NET) is a set of programs elements that developers can use to accessibility data and data solutions. It is an element of the platf

In the form of hypermedia documents, Web pages or materials accessed by the Internet can be located anywhere in the world. Regardless of where they originated, most of the Web d

Part 1 Given the following Regular Expressions, explain in detail the pattern accepted by each. Pay attention to all the characters being used. Your answers need not appear with