Question: Q 1 : The ShowAllColors Procedure. Create a procedure to show all of the text color combinations. Use EAX for this. Prompt the user for

Q1: The ShowAllColors Procedure. Create a procedure to show all of the text color combinations. Use EAX for this. Prompt the user for a message string, then call your procedure. In the procedure, assume the offset of the message string is in the EDX register, set ECX to 256, and EAX to zero. Preserve all General-Purpose registers and the flags. Loop on the following: (a) Set the text color (using SetTextColor)(b) Print your message (c) Increment EAX (using INC) ADD EAX, 1(d) Exchange EAX and EBX, or push EAX to the stack (e) Set the text color to black (set EAX =0 and CALL SetTextColor)(f) Carriage Return, Line Feed (using CrLf)(g) Delay for 50 msec (0.05 seconds, using Delay) a.** SEIZURE WARNING ** If you are at risk of having seizures due to flashing lights, you may consider changing the delay to a longer value - the color combinations your procedure will generate will display very quickly, even with a 50-millisecond delay. If this applies to you, you may use a longer delay (1 to 2 seconds instead of 50 milliseconds) without penalty. Please add a comment to your code if you use a different delay so the grader is aware. Note: 1 second =1000 milliseconds, and 2 seconds =2000 milliseconds. (h) Exchange EAX and EBX again, or pop EAX from the stack (i) Loop At the end of your function before returning, set the colour to grey text on black (value 07h). A snip of the output of this question is below. Be sure to push and pop general-purpose registers and the flags to preserve their values!. This procedure should display output like this:

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!