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 15 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 15 colors, all on a black background.
Hint: white is represented by the integer value 15, and blue is represented by the integer value 1, with all other colors represented by the integer values in between (1...15).
; (ColorLoop.asm)
INCLUDE Irvine32.inc
.data
str1 BYTE "This line is displayed in color",0
.code
main PROC
mov eax, white ; white on black background
call SetTextColor
mov edx, OFFSET str1
call WriteString
call Crlf ; sends a new-line 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 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 Databases Questions!