75.5k views
1 vote
This program is significantly more difficult than previous programs, partially due to the more advanced concepts. However, the Rubric (see below) now has a number of point deductions for not meeting requirements. It is not uncommon for a student to generate a program that meets the Program Description but violates several Program Requirements, causing a significant loss in points. Please carefully review the Rubric to avoid this circumstance.

The purpose of this assignment is to reinforce concepts related to usage of the runtime stack, proper modularization practices, use of the STDCALL calling convention, use of arrays, and Indirect Operands addressing modes (CLO 3, 4, 5).

1. Using Indirect Operands, Register Indirect, and/or Base+Offset addressing
2. Passing parameters on the runtime stack
3. Generating "random" numbers
4. Working with arrays

What you should do

Program Description

Help create and test a MASM program to perform the following tasks (check the Requirements section for specifics on program modularization):Declare global constants ARRAYSIZE, LO, and HI. Generate ARRAYSIZE random integers in the range from LO to HI (inclusive), storing them in consecutive elements of array randArray. (e.g. for LO = 20 and HI = 30, generate values from the set [20, 21, ... 30])

◦ ARRAYSIZE should be initially set to 200,
◦ LO should be initially set to 15
◦ HI should be initially set to 50
◦ Hint: Call Randomize once in main to generate a random seed. Later, use RandomRange to generate each random number.

1 Answer

7 votes

Final answer:

The college-level Computers and Technology question is about creating a MASM program that generates an array of random numbers, emphasizing assembly language concepts and adherence to specific requirements laid out in the rubric.

Step-by-step explanation:

The question requires the creation of a program using MASM (Microsoft Macro Assembler) to generate an array of random numbers within a specified range, utilizing assembly language concepts like the runtime stack, proper modularization, the STDCALL calling convention, registers, arrays, and indirect operands. This pertains to the field of Computers and Technology and is suitable for a college level assignment. Key tasks include:

  • Declaration of global constants representing array size, and the range of random numbers.
  • Initialization of a random seed.
  • Generation of random numbers using a custom routine (e.g., RandomRange).
  • Storing the generated random numbers in an array.

Points will be deducted from the assignment score if the program violates the specified Program Requirements, even if it matches the Program Description. Careful attention to the Rubric is crucial for successful completion of the program and maximization of points.

User Brundolf
by
7.9k points

No related questions found