欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

54.Visual Studio2017调用MASM32

程序员文章站 2024-03-01 18:41:04
...

从MASM32.com下载MASM SDK,装在C盘(D盘可能会报错)
配置过程

.386                            ; Tells MASM to use Intel 80386 instruction set.

.model flat,stdcall             ; Flat memory model

option casemap:none             ; Treat labels as case-sensitive

include    C:\masm32\include\windows.inc
include    C:\masm32\include\kernel32.inc
includelib    C:\masm32\lib\kernel32.lib

include    C:\masm32\include\user32.inc
includelib    C:\masm32\lib\user32.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

效果如下:
54.Visual Studio2017调用MASM32