1.下载

 http://asmirvine.com/

引入Irvine32库

引入Irvine32库

 

或者https://github.com/Eazybright/Irvine32 也有个库

 

下载后解压到C:\irvine

引入Irvine32库

 

2.创建asm项目

(1)

创建一个空C++项目,再创建一个test.asm的文件 

引入Irvine32库

 

 (2)

右键项目-生成依赖项-生成自定义...

引入Irvine32库

 

 (3)

 如果没有属性里没有Microsoft Macro Assembly

  1. 右击已经建好的项目,添加项
  2. 选择c++文件,并将文件名设置为.asm后缀。
  3. 右击此文件,可见Microsoft Macro Assembly

 

3.导入链接库

(1)

C:\irvine

引入Irvine32库

 

 (2)

引入Irvine32库

 

 (3)

 

引入Irvine32库

 

 

4.测试

; This program adds and subtracts 32-bit integers
; and stores the sum in a variable.

INCLUDE Irvine32.inc

.data
val1     dword  10000h
val2     dword  40000h
val3     dword  20000h
finalVal dword  ?

.code
main PROC

    mov    eax,val1            ; start with 10000h
    add    eax,val2            ; add 40000h
    sub    eax,val3            ; subtract 20000h
    mov    finalVal,eax        ; store the result (30000h)
    call    DumpRegs            ; display the registers

    exit
main ENDP
END main

成功

引入Irvine32库

 

相关文章:

  • 2021-09-03
  • 2021-04-25
  • 2021-05-07
  • 2021-11-02
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-21
猜你喜欢
  • 2022-12-23
  • 2022-01-17
  • 2021-11-30
  • 2022-01-29
  • 2022-12-23
  • 2021-11-01
  • 2021-09-15
相关资源
相似解决方案