zoukankan      html  css  js  c++  java
  • 汇编语言的强制类型转换

    首先来看错误的写法

     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

    。。。

  • 相关阅读:
    .Net加密保护工具分析介绍
    正则表达式
    easyui datagrid toolbar 添加搜索框
    为jQuery-easyui的tab组件添加右键菜单功能
    苹果系统无法启动的解决步骤
    解决MVC4发布在IIS7后,路径无法访问.apk文件的解决方法
    C#微信公众平台开发者模式开启代码
    ios svn无法连接xp或者win7系统svn的解决方法
    SQL SERVER 2008 R2 SP1更新时,遇上共享功能更新失败解决方案
    easyui textarea回车导致datagrid 数据无法展示的问题
  • 原文地址:https://www.cnblogs.com/tk091/p/2681968.html
Copyright © 2011-2022 走看看