Question: Change the given Assembly program ColorLoop.asm by creating a loop that prints the string in the 1 5 other colors available ( all but black
Change the given Assembly program "ColorLoop.asm" by creating a loop that prints the string in the other colors available all but black
You must use a loop to accomplish this!
Hint: Remember LOOP uses register ecx as the loop counter.
You are free to print them in any order, just as long as you print in all colors, all on a black background.
Hint: white is represented by the integer value and blue is represented by the integer value with all other colors represented by the integer values in between
; ColorLoopasm
INCLUDE Irvineinc
data
str BYTE "This line is displayed in color",
code
main PROC
mov eax, white ; white on black background
call SetTextColor
mov edx, OFFSET str
call WriteString
call Crlf ; sends a newline to console
exit
main ENDP
END main
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
