Question: This problem is in Assembly Language (MASM). After you finish, please attach the screenshot of the output if possible. Re-organize the following program ( you

This problem is in Assembly Language (MASM). After you finish, please attach the screenshot of the output if possible.

Re-organize the following program ( you may need to add or delete a line/s of code depending on the IDE you are using) so that the program displays the same string in four

different colors, using a loop. The program should Call the SetTextColor procedure

from the book's link library. Any colors may be chosen, but

you may find it easiest to change the foreground color.

** For best appearance, you may want to set your editor's Tab indent size to 5 **

!

INCLUDE Irvine32.inc

.code

main PROC

.data

str1 BYTE "This line is displayed in color",0

mov ecx,4 ; loop counter

mov eax, black + (white * 16) ; black on white backgrouund

L1: call SetTextColor

mov edx,OFFSET str1

add eax,2 ; add 2 to foreground color

loop L1

call WriteString

exit

END main

main ENDP

call Crlf

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!