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
We want to create a structure that will represent a deck of cards  (not necessarily full). Each card has a character (between  '2'  to  '9' and  'T',  'J',  'Q',  'K',  'A') and a

Eclipse Jsp Project. I am making a a project on my website and i was making a help support page on which the user can submit their question and the question is saved to a text file


Design an application that opens and analyses word files. Requirements: Create an application that analyses text documents. It should open a text file, read each word in

We are need of a PrestaShop Expert We are getting a fresh design created for our Jewellery website. This job is in 2 parts 1. The website engine is PrestaShop as well as w

I need an application that will gather data from one SQL Database and update another. Data is contained in dbo.CallList with following fields: Customer_ID, AlreadyPickedUp, Phone_N

Question: (a) How do you implement the following in ASP.NET: (i) Server-side Comments (ii) Server-side Include Directives. (b) What is the purpose of a HashTable? (

Write a Prolog predicate remove_nth(N,L1,L2) that is true if list L2 is just list L1 with its Nth element removed. If L1 does not have an Nth element then the predicate should fail

Explain the Goto Statement - Computer Programming? The goto statement is employed to alter the normal sequence of program execution by transferring control to some other part o

You are to build a Schema in XML Schema Language that will be used to support the development of the new central course information management system and other supporting applicati