Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Use masm x86 32 bit assembly language. include irvine library Filename: Mystrings.asm Description: Write a program that uses the procedures to accomplish the functions outlined

Use masm x86 32 bit assembly language. include irvine library

image text in transcribed

image text in transcribed

Filename: Mystrings.asm Description: Write a program that uses the procedures to accomplish the functions outlined below. The input from the user (Userin) determines how many times to generate random strings. (Do not generate 1 string only and repetitively display it.) Each string generated will be unique. Remember, in general, a procedure should be fairly simple and accomplish 1 basic step. You may call Irvine procedures from your procedures. An example: Your procedure gets input from the user, you can call an Irvine function from within your procedure to do this. Use of dumpregs/dumpmem in the submitted files is discouraged and will result in a loss of points. 1. Create a procedure (UserEnter) that asks for an unsigned integer input (UserIn) from a user. The procedure must pass this integer back to the calling procedure in a register. This number will determine how many randomly generated strings to print. Your procedure must tell the user what to do. Don't just present a blank screen waiting for imput. 2 Create a procedure (Strings) that creates a string of random length. You will need a working array to temporarily store a string. Declare this array in this procedure. This procedure may call other(s) of your procedures. NOTE: You may declare an array of the maximum size since you don't know what the random string length will be. Use indexed addressing to move through your array. 3. Prior to generating the random string, you must call a procedure (How Many) that generates a number L between 10 and 34. L will determine how long the string will be. Each string should be of a different length. The Userin determines how many strings to generate. This procedure determines how long the strings will be. This procedure may call other(s) of your procedures. 4. Create a procedure (Alpha) that randomly generates a Capital Letter. This letter will be passed back to the Strings procedure for insertion into the String. This procedure should be called L times. 5. You will need to clear the temp string after using it. Create a procedure (ClrString) to do this. Notes: Use the Irvine library to Print each randomly generated string. To require a key press before exiting the program. Set the seed for random number generation. Generate a random unsigned integer in the required range. Randomly generate the strings of length between 10 and 34. Specifications: 1. All data from the user will be saved into an appropriately sized and declared variable. If this information is needed in other procedures, Pass the offset to the variable to that procedure in a register. (do not use the stack for this). 2. The output will be shown in the console window with one string per line. 3. The string will only have CAPITAL letters. 4. You must use indexed addressing. 5. You must have at least 5 procedures; each with a proper description. 6. None of the actual work for this assignment will be in main PROC. Only calls to appropriate procedures. It may be necessary to mov data into registers for each call, but this should be minimal. 7. You may use any command Chapter 5 and below. Commands from Chapters not yet covered in class will result in a reduction of 50% in your grade. 8. Each procedure (except Main) will accomplish one basic task. 9. Data local to a procedure must be declared in that procedure, i.e. prompts. When using local data, you must have a data and a .code in your procedure. 10. Do not use DumpRegs/Dump Mem in the completed submission. You may use it to troubleshoot only. 11. Part of the program will be graded on the basis of program style. I reserve the right to judge style as I deem fit for the assignment. The use of comments is required and not optional 12. At this time, do not use any of the text box procedures from the Irvine Library. 13. Upload to Canvas prior to the due date. Extra Credit Note: If you choose to complete the extra credit, it MUST be submitted as a separate file AND you must also submit the assignment as stated above. If you do the extra credit, you must submit TWO files. One for the assignment and one for the extra credit. Extra Credit ( 5 pts): Add and use a procedure (colorthestring) which prints each string in a random foreground color (exclude black on black). The extra credit must meet all specifications as stated above. You may choose to write another procedure to determine the foreground color. The entire string will be printed in the same color. Filename: Mystrings.asm Description: Write a program that uses the procedures to accomplish the functions outlined below. The input from the user (Userin) determines how many times to generate random strings. (Do not generate 1 string only and repetitively display it.) Each string generated will be unique. Remember, in general, a procedure should be fairly simple and accomplish 1 basic step. You may call Irvine procedures from your procedures. An example: Your procedure gets input from the user, you can call an Irvine function from within your procedure to do this. Use of dumpregs/dumpmem in the submitted files is discouraged and will result in a loss of points. 1. Create a procedure (UserEnter) that asks for an unsigned integer input (UserIn) from a user. The procedure must pass this integer back to the calling procedure in a register. This number will determine how many randomly generated strings to print. Your procedure must tell the user what to do. Don't just present a blank screen waiting for imput. 2 Create a procedure (Strings) that creates a string of random length. You will need a working array to temporarily store a string. Declare this array in this procedure. This procedure may call other(s) of your procedures. NOTE: You may declare an array of the maximum size since you don't know what the random string length will be. Use indexed addressing to move through your array. 3. Prior to generating the random string, you must call a procedure (How Many) that generates a number L between 10 and 34. L will determine how long the string will be. Each string should be of a different length. The Userin determines how many strings to generate. This procedure determines how long the strings will be. This procedure may call other(s) of your procedures. 4. Create a procedure (Alpha) that randomly generates a Capital Letter. This letter will be passed back to the Strings procedure for insertion into the String. This procedure should be called L times. 5. You will need to clear the temp string after using it. Create a procedure (ClrString) to do this. Notes: Use the Irvine library to Print each randomly generated string. To require a key press before exiting the program. Set the seed for random number generation. Generate a random unsigned integer in the required range. Randomly generate the strings of length between 10 and 34. Specifications: 1. All data from the user will be saved into an appropriately sized and declared variable. If this information is needed in other procedures, Pass the offset to the variable to that procedure in a register. (do not use the stack for this). 2. The output will be shown in the console window with one string per line. 3. The string will only have CAPITAL letters. 4. You must use indexed addressing. 5. You must have at least 5 procedures; each with a proper description. 6. None of the actual work for this assignment will be in main PROC. Only calls to appropriate procedures. It may be necessary to mov data into registers for each call, but this should be minimal. 7. You may use any command Chapter 5 and below. Commands from Chapters not yet covered in class will result in a reduction of 50% in your grade. 8. Each procedure (except Main) will accomplish one basic task. 9. Data local to a procedure must be declared in that procedure, i.e. prompts. When using local data, you must have a data and a .code in your procedure. 10. Do not use DumpRegs/Dump Mem in the completed submission. You may use it to troubleshoot only. 11. Part of the program will be graded on the basis of program style. I reserve the right to judge style as I deem fit for the assignment. The use of comments is required and not optional 12. At this time, do not use any of the text box procedures from the Irvine Library. 13. Upload to Canvas prior to the due date. Extra Credit Note: If you choose to complete the extra credit, it MUST be submitted as a separate file AND you must also submit the assignment as stated above. If you do the extra credit, you must submit TWO files. One for the assignment and one for the extra credit. Extra Credit ( 5 pts): Add and use a procedure (colorthestring) which prints each string in a random foreground color (exclude black on black). The extra credit must meet all specifications as stated above. You may choose to write another procedure to determine the foreground color. The entire string will be printed in the same color

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

Building The Data Warehouse

Authors: W. H. Inmon

4th Edition

0764599445, 978-0764599446

More Books

Students also viewed these Databases questions

Question

5. How can I help others in the network achieve their goals?

Answered: 1 week ago

Question

design a simple disciplinary and grievance procedure.

Answered: 1 week ago