hmwk2_prob_ch

# Hmwk2_prob_ch - COMPE 271 HOMEWORK 2 DUE ON 12/2010 Below you are given a C program which sorts 20 numbers(integer in ascending or descending order

This preview shows pages 1–2. Sign up to view the full content.

COMPE 271 HOMEWORK 2 DUE ON 12/_/2010 Below you are given a C program which sorts 20 numbers (integer) in ascending or descending order using three different sort algorithms. These algorithms are insertion sort, exchange sort and bubble sort. The sort algorithms are implemented as three C functions and are given below. The main program calls the three sort functions for sorting three different arrays and prints out the sorted arrays. You are asked to implement the three sort functions in assembly language in windows and/or Linux environment. Please note that you are required to implement all three functions in assembly language. A copy of the skeleton code for assembly functions is also given on the last page of this document. //----------------------------------------------------------------------- // Insertion Sort void insertion_sort ( int numbers[], int max) { int i, j, k; int value; k = 0; for (i = 1 ; i < max; i++) { value = numbers[i]; j = i-1; while (j >= 0 && numbers[j] > value )

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 06/07/2011 for the course COMPE 271 taught by Professor Staff during the Fall '08 term at San Diego State.

### Page1 / 3

Hmwk2_prob_ch - COMPE 271 HOMEWORK 2 DUE ON 12/2010 Below you are given a C program which sorts 20 numbers(integer in ascending or descending order

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online