Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Provide code in assembly language. Also provide output screenshots WRITE THE CODES USING MASM615 COMPILER all parts in one file as one complete code. PARTS:
Provide code in assembly language. Also provide output screenshots
WRITE THE CODES USING MASM615 COMPILER
- all parts in one file as one complete code.
PARTS:
- Declare arrays of the following sizes.
- A 32 bit array of length 45 named as MAJOR_ARRAY.
- 9 32 bit arrays of length 5 each named as ARRAY_1 and so on up to 9.
- A 32 bit array of length 45 named as MAJOR_SORTED_ARRAY.
- Generate 45 random 3 digit numbers and stored them in MAJOR_ARRAY. While generating the numbers, keep in mind the following restrictions.
- Each generated number shall contain only 3 digits which are distinct. For example 123, 256, 789 etc. the number should not contain digits more or less than 3 and no digit is repeated as well.
- The program must generate 5 numbers from each set given below.
- 100 to 199
- 200 to 299
- 300 to 399
- 400 to 499
- 500 to 599
- 600 to 699
- 700 to 799
- 800 to 800
- 900 to 999
- Each set must contain 5 numbers that are present in array.
- All numbers should be generated continuously using one loop having range between 100 and 999.
- Create a function named as SEPARATION that separates numbers from the MAJOR_ARRAY into the above mentioned 9 sets and store them in separately declared small arrays named as ARRAY_1 and so on up to 9.
- When you implement separation then, ARRAY_1 contains 5 numbers between 100 and 199. Similarly ARRAY_2 contains 5 numbers between 200 and 299 and so on. Hence the last array which ARRAY_9 contains 5 numbers between 900 and 999.
- Create a function named as SORTING that sorts all 9 arrays in ascending order using bubble sort.
- Create a function named as MERGING_ARRAYS that will merge all nine small arrays into one array named as MAJOR_SORTED_ARRAY.
- While merging keep track that all data remain sorted but this time it is sorted in descending order.
- Create a function named as DISPLAY that will print all the arrays created.
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