Write a program in ARM assembly language (which can be executed on ARMSim simula
ID: 3711985 • Letter: W
Question
Write a program in ARM assembly language (which can be executed on ARMSim simulator) to sort a series of integer numbers. Series of integer numbers are stored in a file named input.txt. Input file contains 0 or more integer numbers. Your program should open the file for reading, read each of the numbers and store them in memory, sort the numbers in ascending order, and store the result in the file named output.txt.
There are many different ways of performing this sorting operation. One of the simplest is to search the sequence for the smallest number and swap it with the first number. Now the first number is the smallest number and it is in correct position. Now apply the same process to the rest of the numbers.
Java code for sorting:
min = j; }
}
}
Example:
Before execution of program: Input: 5, 4, 2, 6, 7, 8 Output: 2, 4, 5, 6, 7, 8
Explanation / Answer
The answer seems to be already there:
min = j; }
}
}
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.