Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Assembly use irvine32,inc and MASM For this program, you will ask the user for a String which will be a maximum of 40 characters long.
Assembly use irvine32,inc and MASM
For this program, you will ask the user for a String which will be a maximum of 40 characters long. You will then generate two random numbers using your BetterRandomNumber procedure from Assignment #4-these numbers being between 0 and 15 inclusive. Save the numbers as the foreground and background colours. You will also set to variables called row and col to 5- which will be the row and col numbers where the text printing will start. Then, loop 300 times and inside the loop: a) set the cursor at row and col; b) set the text colour; c) write the string; d) advance the foreground colour and every time it reaches zero, decrement the background colour; e) rotate the string one character to the left the first character will become the last character; f) advance the row value until it reaches 31 and then reset it back to 10 and increase the col value; and g) delay the program 1/20 of a second When the loop is done, set the cursor to row 30, and column 0 Here is an algorithm defining this problem which will give you an example of how to create a comment-based algorithm to solve the problems. More comments may be necessary and you can add them as required i collect a string from user (max 40 char) generate random foreground and background colour, store in vars clear the screen ; set ro, column variables initially to (5, 5) ; loop 300 times set cursor at (row, col) -->combine and set the colour -->write the string -->advance foreground colour, if hits zero, decrease background colour (wraps around,) --> rotate string to left, first char to end -->advance cursor row value, if it hits 25, reset to 5 and increment col value >delay 1/20 second iset cursor to row 30, column zero For this program, you will ask the user for a String which will be a maximum of 40 characters long. You will then generate two random numbers using your BetterRandomNumber procedure from Assignment #4-these numbers being between 0 and 15 inclusive. Save the numbers as the foreground and background colours. You will also set to variables called row and col to 5- which will be the row and col numbers where the text printing will start. Then, loop 300 times and inside the loop: a) set the cursor at row and col; b) set the text colour; c) write the string; d) advance the foreground colour and every time it reaches zero, decrement the background colour; e) rotate the string one character to the left the first character will become the last character; f) advance the row value until it reaches 31 and then reset it back to 10 and increase the col value; and g) delay the program 1/20 of a second When the loop is done, set the cursor to row 30, and column 0 Here is an algorithm defining this problem which will give you an example of how to create a comment-based algorithm to solve the problems. More comments may be necessary and you can add them as required i collect a string from user (max 40 char) generate random foreground and background colour, store in vars clear the screen ; set ro, column variables initially to (5, 5) ; loop 300 times set cursor at (row, col) -->combine and set the colour -->write the string -->advance foreground colour, if hits zero, decrease background colour (wraps around,) --> rotate string to left, first char to end -->advance cursor row value, if it hits 25, reset to 5 and increment col value >delay 1/20 second iset cursor to row 30, column zeroStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started