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
Write a script called 'prob3.m' that does the same thing as the previous question except that it makes use of a switch-case construct instead of an if-else. In the file 'hw4.m'

In this assignment, you will design a program to perform the following task: Calculate the total price to purchase all the components required to build a state-of-the-art gaming c

Example :  Solve the following differential equation. y (3)   -  12 y''+48 y' + 64 y = 12 - 32 e -8t + 2 e 4t Solution :    We first require the complementary solution

1. Write a program that figures out how long it will take to pay off a credit card by making payments of $10 each month. Take care to avoid infinite loops. (How would a bank preven

these 8 numbers (15, 20, 25, 30, 35, 40, 45, and 50) with using conditional jump

This assignment is an individual programming assignment using Perl. It addresses objectives 3, 4, 5 and 8 as listed in the Subject Outline document. The assignment is based on them

MVC Architecture Model/view/controller (MVC) is a program structure, currently regarded an executive design used in program technological innovation. The design isolates "domain lo

Problem 1 Explain the Booch Methodology 2 Why does every interaction diagram need a written description? Explain 3 Explain the five core workflows of the Unified Process

.NET class libraries in .NET Whether you create value in C# or VB.NET, you are getting in touch with techniques in the same .NET category your local library. The same .NET str

PLEASE HELP ME ORACLE PROGRAMING TRIGGER