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
Q: 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 and EAX to zero. Preserve all GeneralPurpose registers and the flags. Loop on the following: a Set the text color using SetTextColorb Print your message c Increment EAX using INC ADD EAX, d Exchange EAX and EBX, or push EAX to the stack e Set the text color to black set EAX and CALL SetTextColorf Carriage Return, Line Feed using CrLfg Delay for msec 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 millisecond delay. If this applies to you, you may use a longer delay to seconds instead of milliseconds without penalty. Please add a comment to your code if you use a different delay so the grader is aware. Note: second milliseconds, and seconds 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 h A snip of the output of this question is below. Be sure to push and pop generalpurpose 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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
