python画八卦图的指令_我用win32汇编画八卦图

.386.model flat,stdcall

optioncasemap:none;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>;Include 文件定义;;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>;include MyFirstApp.incinclude  windows.incinclude  user32.incincludelib user32.lib

include  kernel32.incincludelib kernel32.lib

include  Gdi32.incincludelib Gdi32.lib;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>;数据段;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>.data?

hInstance dd ?;模块句柄hWinMain dd ?;窗口句柄stPs   PAINTSTRUCT <>;stRect   RECT <>;hDc  dd ?;.const

szClassName      db'MyTaiJi',0;类名szCaptionMain    db'汇编画八卦程序',0;窗口标题;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>;代码段;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>.code;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>;窗口过程;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>_ProcWinMain     proc  uses ebx edi esi,hWnd,uMsg,wParam,lParammoveax,uMsg;********************************************************************.if      eax ==    WM_PAINT

invoke    BeginPaint,hWnd,addr stPsmovhDc,eax

invoke    GetClientRect,hWnd,addr stRectcall_PaintTaiJi;invoke    EndPaint,hWnd,addr stPs;********************************************************************.elseif  eax ==    WM_CLOSE

invoke    DestroyWindow,hWinMain

invoke    PostQuitMessage,NULL;********************************************************************.else

invoke    DefWindowProc,hWnd,uMsg,wParam,lParamret.endif;********************************************************************xoreax,eaxret_ProcWinMain     endp;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>;构建窗口;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>_WinMain         proc

local@stWndClass:WNDCLASSEX

local@stMsg:MSG

invoke   GetModuleHandle,NULLmovhInstance,eax

invoke   RtlZeroMemory,addr @stWndClass,sizeof @stWndClass;********************************************************************;注册窗口类;********************************************************************invoke   LoadCursor,0,IDC_ARROWmov@stWndClass.hCursor,eaxpushhInstancepop@stWndClass.hInstancemov@stWndClass.cbSize,sizeof WNDCLASSEXmov@stWndClass.style,CS_HREDRAWorCS_VREDRAWmov@stWndClass.lpfnWndProc,offset _ProcWinMainmov@stWndClass.hbrBackground,COLOR_WINDOW +1mov@stWndClass.lpszClassName,offset szClassName

invoke   RegisterClassEx,addr @stWndClass;********************************************************************;建立并显示窗口;********************************************************************invoke   CreateWindowEx,WS_EX_CLIENTEDGE,\

offset szClassName,offset szCaptionMain,\

WS_OVERLAPPEDWINDOW,\100,100,600,400,\

NULL,NULL,hInstance,NULLmovhWinMain,eax

invoke   ShowWindow,hWinMain,SW_SHOWNORMAL

invoke   UpdateWindow,hWinMain;********************************************************************;消息循环;********************************************************************.while   TRUE

invoke    GetMessage,addr @stMsg,NULL,0,0.break    .if eax  ==0invoke    TranslateMessage,addr @stMsg

invoke    DispatchMessage,addr @stMsg

.endwret_WinMain         endp;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>;画太极八卦;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>_PaintTaiJi proc

LOCALhBrush:HBRUSH;黑色笔刷LOCALwBrush:HBRUSH;白色笔刷LOCALhPen:HPEN;白色画笔;LOCAL lpPoint:LPPOINTinvoke  Ellipse,hDc,0,0,200,200;大圆invoke  GetStockObject,BLACK_BRUSH;movhBrush,eax;获取黑色笔刷并保存起来invoke  GetStockObject,DC_BRUSH;movwBrush,eax;获取白色笔刷并保存起来invoke SelectObject,hDc,hBrush;选择黑色笔刷invoke Pie,hDc,0,0,200,200,100,0,100,200;左半个扇形invoke  Ellipse,hDc,50,100,150,200;右半小扇形invoke SelectObject,hDc,wBrush;选择白色笔刷invoke Pie,hDc,50,0,150,100,100,0,100,100;左半小扇形invoke Ellipse,hDc,95,145,105,155;上小圆;将画上小圆留下的黑色线条擦去invoke MoveToEx,hDc,100,1,0;起始坐标移动到(100,1)处;将白色(RGB值为:255 255 255)填充到eaxxoreax,eaxmovah,255moval,255shleax,8moval,255;invoke CreatePen,PS_SOLID,2,eax;movhPen,eax;invoke SelectObject,hDc,hPen;invoke LineTo,hDc,99,99;;invoke SelectObject,hDc,hBrush;选择黑色笔刷invoke  Ellipse,hDc,95,45,105,55;上小圆ret_PaintTaiJi endp;程序入口;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>start:call_WinMain

invoke   ExitProcess,NULL;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>end      start

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值