Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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 zero

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_2

Step: 3

blur-text-image_3

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

Professional Microsoft SQL Server 2014 Administration

Authors: Adam Jorgensen, Bradley Ball

1st Edition

111885926X, 9781118859261

More Books

Students also viewed these Databases questions

Question

What is an audit committee? Generally, what are its duties?

Answered: 1 week ago

Question

Why do HCMSs exist? Do they change over time?

Answered: 1 week ago