Can anybody clear the concept of Iczelion few questions which i need to understand clearly.....
RGB macro red,green,blue
xor eax,eax
mov ah,blue
shl eax,8
mov ah,green
mov al,red
endm
Explain each line of RGB macro code
2)
invoke SelectObject, hdc, eax
mov hfont,eax
RGB 200,200,50
invoke SetTextColor,hdc,eax
RGB 0,0,255
invoke SetBkColor,hdc,eax
invoke TextOut,hdc,0,0,ADDR TestString,SIZEOF TestString
invoke SelectObject,hdc, hfont
invoke EndPaint,hWnd, ADDR ps
What is the meaning of 3 and 5 line that is RGB 200,200,50 and RGB 0,0,255.
Is this the color code of Text Color and Background color???
Explain in your own way!!!
Thanks in advance. :8)
EnFeR RoI
RGB macro red,green,blue
xor eax,eax ; mov eax, 0
mov ah,blue ; mov eax, 256*blue
shl eax,8 ; move to the B position
mov ah,green ; move green to the G position
mov al,red ; add the R
endm
ex R=12h, g=34h, b=56h
mov ah, 56h ; eax=00005600h
shl eax,8 ; eax=00560000h
mov ah, 34 ; eax=00563400h
mov al, 12 ; eax=00563412
and my second question sir???
Thanks in advance.
EnFeR RoI. :bg
It calls the RGB macro with those parameters.
RGB is a macro !
thanks for reply if i want other color than RGB,what is the code and where i get a list of color code???
For example:- if you want pure red color, you should use 255,0,0. Or if you want pure white color, you must use 255,255,255.
Thanks in advance.
EnFeR RoI. :8)
Go here :
http://www.pagetutor.com/colorpicker/index.html
Pick the colors, see the hex codes
:green2
RGB 200,200,50
invoke SetTextColor,hdc,eax
RGB 0,0,255
invoke SetBkColor,hdc,eax
the RGB macro places the 3 colours into EAX
the text colour is set to red 200, green 200, and blue 50
the background colour is set to red 0, green 0, and blue 255
(which sounds like it wouldn't be very pretty)
if you put all possible colours in a text table, it would have 16,777,216 entries - that's a long table
but, you have the right idea - medium grey is 127,127,127
if you GOOGLE, there are colour tables all over the place
[]
thanks all the members of masm for clearing my concept..
Thanks in advance.
EnFeR RoI.