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:
- Write user defined procedures
- Call and test user defined procedures
- 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