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
The GuessingGame class contains a skeleton for a program to play a guessing game with the user. The program should randomly generate an integer between 1 and 10 and then ask the us

Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4


One of the main strengths of the Perl programming language are its powerful text manipulation features. In this assignment, you will put them to use for writing a Perl program tha

Write a pseudocode for a program that reads a temperature as a whole number from a user and outputs a “probable” season (winter, sprint, summer, or fall) depending on the temperatu

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

In the procedure section, it is important to have a clear circuit diagram with component values and a brief, but accurate description of each step taken. 1. Tables for both the

I need help with this question. The problem i''m having is that what''s the syntax for using dynamic memory allocation of objects of one class in the constructor of some other clas

The method should call getAllCities() and return the index of the City that has the shortest (euclidian) distance to the. longitude and latitude passed as parameters

You need to create a Fraction calculator program.You need to create a Fraction class to represent fraction objects and a FractionCalculator class that will perform operations on fr