Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Easy68K assembly only please!! Not C++, C, Java, etc. Assembly only. Example commands include MOVE, CMP, ORG $1000, BRA, etc. Thank you! Please initialize an

Easy68K assembly only please!! Not C++, C, Java, etc. Assembly only. Example commands include MOVE, CMP, ORG $1000, BRA, etc. Thank you!

Please initialize an array [5, 0, 12, 3, 8, 21, 1, 14, 2, 16] and perform the following operations on this array. You need to use subroutine and branch to finish this question. There should be 3 major subroutines a, b and c in the program, one for each requirement given below:

Subroutine a: Keep loading numbers from keyboard until the input is 0 or 1. Hint: load the input from keyboard. Check whether the input is 0 or 1, and ask user to load another input if its neither 0 nor 1. Store the value only when its 0 or 1 and continue to part b

Subroutine b: Go through all the elements and pass current odd/even number to subroutine c for display. Hint: find out all odd/even elements in the initialized array. That is, if the stored input is 0, use the subroutine c to print out ONLY the elements with odd values (5, 3, 21, 1). If the stored input is 1, use the subroutine c to print out ONLY the elements with even values (0, 12, 8, 14, 2, 16)

Subroutine c: Print out value passed by subroutine b, one in each line. Hint: print out the value from subroutine b on separate lines. You need to call this subroutine for 4 or 6 times inside the subroutine b to print out odd/even numbers.

Thank you! Easy68k assembly code ONLY please.

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_2

Step: 3

blur-text-image_3

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

SQL Instant Reference

Authors: Gruber, Martin Gruber

2nd Edition

0782125395, 9780782125399

More Books

Students also viewed these Databases questions