Question: READ THIS BEFORE YOU ANSWER--> Easy68K assembly code only! I WILL GIVE YOU THUMBS UP! THANK YOU. Please reserve a block memory of 10 word

READ THIS BEFORE YOU ANSWER--> Easy68K assembly code only! I WILL GIVE YOU THUMBS UP! THANK YOU.

Please reserve a block memory of 10 word size elements and do the following operations. You need to use subroutine (branch) to finish this question. Please resolve all the questions in one code.

In the first subroutine. First, read an array [5, 7, 12, 3, 8, 21, 1, 12, 2, 16] from the keyboard and store it at the reserved space. Second, please input a decimal number from keyboard. If the number that you enter is either 1 or 2, terminate the 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.

In the second subroutine, please display all odd numbers in the array if the number that you enter is 1; display all even numbers in the array if it is 2.

In the third subroutine, please sort all the elements in the array in ascending order.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!