Question
use lc-3 Write a selection sort for sorting the n 16-bit data items stored in the array Data in ascending order. Declare two labels n
use lc-3 Write a selection sort for sorting the n 16-bit data items stored in the array Data in ascending order. Declare two labels n and Data to hold the # of data items and the actual data to be sorted respectively. You may assume that the data values to be sorted are between 0 and 127. Before performing the sort, print the data elements, treating each as an ASCII character. Once the data has been sorted, print the contents of the array (no special formatting required), treating each element as an ASCII character. To test your program, use the following test case:
n .fill 14
data
.fill x7B
.fill x3F
.fill x6E
.fill x30
.fill x2A
.fill x5E
.fill x38
.fill x69
.fill x5C
.fill x60
.fill x34
.fill x5A
.fill x20
.fill x2A
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started