QuestionQuestion

Please see Question.pdf

Solution PreviewSolution Preview

This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.

Assignment #7

; Sort a list of number using the selection sort algorithm.
; Also finds the minimum, median, maximum, sum, and average of the list.

; **********************************************************************************
; Selection Sort Algorithm:

; begin
; for i = 0 to len-1
; small = arr(i)
; index = i
; for j = i to len-1
; if ( arr(j) < small ) then
; small = arr(j)
; index = j
; end_if
; end_for
; arr(index) = arr(i)
; arr(i) = small
; end_for
; end_begin

; **********************************************************************************

section .data

; -----
; Define standard constants.

TRUE equ 1
FALSE equ 0

SUCCESS equ 0 ; successful operation
NOSUCCESS equ 1 ; unsuccessful operation

STDIN equ 0 ; standard input
STDOUT equ 1 ; standard output
STDERR equ 2 ; standard error

SYS_read equ 0 ; system call code for read
SYS_write equ 1 ; system call code for write
SYS_open equ 2 ; system call code for file open
SYS_close equ 3 ; system call code for file close
SYS_fork equ 57 ; system call code for fork
SYS_exit equ 60 ; system call code for terminate
SYS_creat equ 85 ; system call code for file open/create
SYS_time equ 201 ; system call code for get time

LF equ 10
SPACE equ " "
NULL equ 0
ESC equ 27

; -----
; Program specific constants

LIMIT equ 10000
STR_SIZE equ 10
MAX_STR_SIZE...
$45.00 for this solution

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available Assembly Language Programming Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Decision:
Upload a file
Continue without uploading

SUBMIT YOUR HOMEWORK
We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats