In Assembly Language (Visual Studio 2017), create a procedure that generates a random string of Length...

70.2K

Verified Solution

Question

Programming

In Assembly Language (Visual Studio 2017), create a procedurethat generates a random string of Length L, containing all capitalletters. When calling the procedure, pass the value of L in EAX,and pass a pointer to an array of byte that will hold the randomstring. Write a test program that calls your procedure 20 times anddisplays the strings in the console window. In your program, therandom string size shall be preset as a constant.

Please include output.

Objectives:

  1. Write user defined procedures
  2. Call and test user defined procedures
  3. Use Irvine.inc library to take input and display output.(INCLUDE Irvine32.inc)

How to See Result

You may notice that your console window will show up thenquickly disappear. You have two ways to view your result fromconsole window. One way is to set the break point at exit statementin main procedure. Another way is to add the following statementbefore exit statement in main procedure:

Call ReadChar

This will hold the console window to wait for your input. Youcan hit any key to close the console window. It is better if youadd a prompt to tell user what to do. For instance: “Press any keyto continue…”. To do so, you simply add

prompt BYTE “Press any key to continue…”, 0

in your .data section and add the following code before CallReadChar:

move dx, OFFSET prompt

Call WriteString

Answer & Explanation Solved by verified expert
4.0 Ratings (720 Votes)
LC0 string Before swapping LC1 string a LC2    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students