zoukankan      html  css  js  c++  java
  • VisualStudio 编写汇编代码相关设置

    VS编写汇编代码方法

    1. 新建空项目,不创建解决方案

    2. 项目右键,Build Customizations,选择masm

    3. 新建源文件,后缀为.ASM

    4. 编写代码

      .386                            ; Tells MASM to use Intel 80386 instruction set.
      
      .model flat,stdcall             ; Flat memory model
      
      option casemap:none             ; Treat labels as case-sensitive
      
      include    masm32includewindows.inc
      include    masm32includekernel32.inc
      includelib    masm32libkernel32.lib
      
      include    masm32includeuser32.inc
      includelib    masm32libuser32.lib
      
      .data                           ; Begin initialized data segment
      
             MsgBoxCaption db "Win32 Assembly Programming",0
             MsgBoxText db "Hello World!!!Welcome to ASM Programming under CLR",0
      
      .code                            ; Beginning of code
      
      start:                          ; Entry point of the code
              invoke MessageBox, NULL, addr MsgBoxText, addr MsgBoxCaption, MB_OK
              invoke ExitProcess, NULL
              end start
      
    5. 项目属性,Linker--->General--->Additional Library Directories--->添加masm32include masm32lib masm32macros

    6. Linker--->Input--->Additional Dependencies--->添加masm32.lib

    7. Linker--->General Manifest--->NO

    8. Linker--->System--->Windows

    9. Linker--->Advance--->Entry Point--->start

    10. Microsoft Macro Assembly--->Suppress Banner--->Yes

    11. Microsoft Macro Assembly---> Include Paths--->where masm32 located

    12. Test and debug

  • 相关阅读:
    JS 中的foreach和For in比较
    SQL 查询CET使用领悟
    .NET开源项目
    asp.net获取客户端IP方法(转载)
    jQuery Mobile 基础(第四章)
    jQuery Mobile 基础(第三章)
    jQuery Mobile 基础(第二章)
    机器学习笔记之梯度下降法
    特征脸是怎么提取的之主成分分析法PCA
    word2vec初探
  • 原文地址:https://www.cnblogs.com/oasisyang/p/13190342.html
Copyright © 2011-2022 走看看