Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please write a 68000 assemble language program to accept an array of size 10, display odd or even numbers, and sort the array in increasing

image text in transcribed

Please write a 68000 assemble language program to accept an array of size 10, display odd or even numbers, and sort the array in increasing order. You need to use 3 subroutines (branch) to finish this question. The functionalities of each subroutine are described below: 1) In the first subroutine, read an array [5, 7,12, 3, 8, 21, 1, 12, 2, 16] from the keyboard and store it in a reserved space. Next, accept an input from the user, if the input is either 1 or 2, call the next subroutine and terminate this subroutine. If the input value is any other number, please print out an error message, like "Invalid input, please input 1 or 2" and repeat this input operation until a correct value is received. (30) 2) In the second subroutine, display all odd numbers in the array if the accepted input is 1; display all even numbers in the array if it is 2 (30) 3) In the third subroutine, please sort all the elements in the array in ascending order and display the array. (30) Please paste your code and the screenshots of displayed result and memory Please write a 68000 assemble language program to accept an array of size 10, display odd or even numbers, and sort the array in increasing order. You need to use 3 subroutines (branch) to finish this question. The functionalities of each subroutine are described below: 1) In the first subroutine, read an array [5, 7,12, 3, 8, 21, 1, 12, 2, 16] from the keyboard and store it in a reserved space. Next, accept an input from the user, if the input is either 1 or 2, call the next subroutine and terminate this subroutine. If the input value is any other number, please print out an error message, like "Invalid input, please input 1 or 2" and repeat this input operation until a correct value is received. (30) 2) In the second subroutine, display all odd numbers in the array if the accepted input is 1; display all even numbers in the array if it is 2 (30) 3) In the third subroutine, please sort all the elements in the array in ascending order and display the array. (30) Please paste your code and the screenshots of displayed result and memory

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Medical Image Databases

Authors: Stephen T.C. Wong

1st Edition

1461375398, 978-1461375395

More Books

Students also viewed these Databases questions

Question

Are you really powerful and perceived as such by others?

Answered: 1 week ago

Question

What is management growth? What are its factors

Answered: 1 week ago

Question

7. Discuss the advantages of embedded learning.

Answered: 1 week ago