NASM拒绝创建MessageBox()

时间:2015-09-07 05:45:56

标签: winapi assembly nasm

我正在学习nasm并试图从gcc制作一个消息框。我的代码是这样的:

%include "win32n.inc"

extern MessageBoxA
import MessageBoxA user32.dll
extern ExitProcess
import ExitProcess kernel32.dll

section .data USER32

title db "Hello", 0
message db "Hello World",0

section .text
global main

    main:
    push dword MB_OK
    push dword title
    push dword message
    push dword 0
    call [MessageBoxA]

    push dword 0
    call [ExitProcess]

然后我收到此错误:

Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.

C:\Program Files (x86)\CodeBlocks\MinGW\bin\NASM>cd\nasm

C:\nasm>nasm -fwin32 msgboxnasm.asm
msgboxnasm.asm:1: fatal: unable to open include file `win32n.inc'

C:\nasm>

0 个答案:

没有答案