;============================================================================================================================================= ; Step_5.asm ;This program is testing the desktop ;(C)I don't take any responsibility for the use of this program ; Zedr0n -- connection closed ;============================================================================================================================================= ;============================================================================================================================================= ; Options/Declarations ;============================================================================================================================================= .386 .model flat, stdcall option casemap:none include windows.inc include kernel32.inc include gdi32.inc include user32.inc includelib \masm32\lib\kernel32.lib includelib \masm32\lib\gdi32.lib includelib \masm32\lib\user32.lib ;============================================================================================================================================ ; Macros ;============================================================================================================================================ RGB macro red,green,blue xor eax,eax mov ah,blue shl eax,8 mov ah,green mov al,red endm ;============================================================================================================================================= ; Data segment ;============================================================================================================================================= .data hPen HGDIOBJ ? ;============================================================================================================================================ ; Variables segment ;============================================================================================================================================ .data? hWnd HWND ? hDC HDC ? i db ? ;============================================================================================================================================= ; Code segment ;============================================================================================================================================= .code start: invoke GetDesktopWindow mov hWnd,eax invoke GetWindowDC,hWnd mov hDC,eax RGB 255,0,0 invoke CreatePen,PS_SOLID,4,eax mov hPen,eax invoke SelectObject,hDC,hPen invoke Ellipse,hDC,100,100,200,200 invoke ExitProcess,NULL end start