54.Visual Studio2017调用MASM32

从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

效果如下:
在这里插入图片描述

发布了51 篇原创文章 · 获赞 1 · 访问量 623

猜你喜欢

转载自blog.csdn.net/weixin_44737922/article/details/105458779
今日推荐