Лабораторная работа: График функции по Assembler’у
cmp memdc,0
jne WMCREATE
invoke DeleteDC,memdc
WMCREATE:
invoke GetDC,hW
mov hdc,eax
invoke CreateCompatibleDC,hdc
mov memdc,eax
invoke GetWindowRect,hW,offset rect_
mov eax,rect_.bottom
sub eax,rect_.top
mov Height_, eax
mov eax, rect_.right
sub eax, rect_.left
mov Width_, eax
invoke CreateCompatibleBitmap,hdc,Width_,Height_
invoke SelectObject,memdc,eax
invoke CreateSolidBrush,RGBW
invoke SelectObject,memdc,eax
invoke PatBlt,memdc,0,0,Width_,Height_,PATCOPY
invoke ReleaseDC,hW,hdc
invoke CreatePen,PS_SOLID,2,0
mov hPen,eax
invoke SelectObject,memdc,hPen
mov eax,Height_
sub eax,27
shr eax,1
mov OffsetY,eax
mov eax,Width_