• 汇编语言的强制类型转换


    首先来看错误的写法

     1 .386
     2 .model flat,stdcall
     3 option casemap:none
     4 
     5 ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
     6 ;
     7 ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
     8 include windows.inc
     9 include user32.inc
    10 include kernel32.inc
    11 
    12 includelib user32.lib
    13 includelib kernel32.lib
    14 
    15 ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    16 ;
    17 ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    18 .data
    19 szBuffer   db  1024 dup(?)
    20 
    21 ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    22 ;
    23 ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    24 .code 
    25 start:
    26 move  eax,dword ptr szBuffer
    27 invoke  MessageBox,NULL,NULL,NULL,MB_OK
    28 invoke ExitProcess,NULL
    29 end start


    下面是正确的写法

     1 .386
     2 .model flat,stdcall
     3 option casemap:none
     4 
     5 ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
     6 ;
     7 ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
     8 include windows.inc
     9 include user32.inc
    10 include kernel32.inc
    11 
    12 includelib user32.lib
    13 includelib kernel32.lib
    14 
    15 ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    16 ;
    17 ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    18 .data
    19 szBuffer   db  1024 dup(?)
    20 
    21 ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    22 ;
    23 ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    24 TestProc proc 
    25     
    26     push eax
    27     mov  eax,dword ptr szBuffer
    28     pop eax
    29     ret
    30 
    31 TestProc endp
    32 ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    33 ;
    34 ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    35 .code 
    36 start:
    37 call TestProc
    38 invoke  MessageBox,NULL,NULL,NULL,MB_OK
    39 invoke ExitProcess,NULL
    40 end start

    。。。

  • 相关阅读:
    vue使用Echarts图表
    在vue中子组件修改props引发的对js深拷贝和浅拷贝的思考
    团队开发前端VUE项目代码规范
    Vue项目开发最新、最全代码规范文档
    Material Icons 查找的替代办法
    Material icons 全图标一览
    VueCropper 图片裁剪
    分区
    linux 安装图行界面
    Spotlight LGWR1 一直告警
  • 原文地址:https://www.cnblogs.com/tk091/p/2681968.html
Copyright © 2020-2023  润新知