Answered step by step
Verified Expert Solution
Link Copied!

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:

  1. Declare arrays of the following sizes.
    1. A 32 bit array of length 45 named as MAJOR_ARRAY.
    2. 9 32 bit arrays of length 5 each named as ARRAY_1 and so on up to 9.
    3. A 32 bit array of length 45 named as MAJOR_SORTED_ARRAY.
  2. Generate 45 random 3 digit numbers and stored them in MAJOR_ARRAY. While generating the numbers, keep in mind the following restrictions.
    1. 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.
    2. The program must generate 5 numbers from each set given below.
      1. 100 to 199
      2. 200 to 299
      3. 300 to 399
      4. 400 to 499
      5. 500 to 599
      6. 600 to 699
      7. 700 to 799
      8. 800 to 800
      9. 900 to 999
    3. Each set must contain 5 numbers that are present in array.
    4. All numbers should be generated continuously using one loop having range between 100 and 999.
  3. 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.
    1. 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.
  4. Create a function named as SORTING that sorts all 9 arrays in ascending order using bubble sort.
  5. Create a function named as MERGING_ARRAYS that will merge all nine small arrays into one array named as MAJOR_SORTED_ARRAY.
    1. While merging keep track that all data remain sorted but this time it is sorted in descending order.
  6. 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

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

Strategic Database Technology Management For The Year 2000

Authors: Alan Simon

1st Edition

155860264X, 978-1558602649

More Books

Students also viewed these Databases questions