probleme错误A2206:在EX pression缺少操作员 [英] probleme with error A2206: missing operator in expression

查看:1056
本文介绍了probleme错误A2206:在EX pression缺少操作员的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

家伙,您好我有这个code在这里组装它应该创建一个消息框,但是当我尝试使用MASM编译它

我得到这个错误:C:.. \\ TEST.ASM(26):错误A2206:在EX pression缺少操作员

  .386 .MODEL平,STDCALL选项​​casemap:无includelib C:\\ MASM32 \\ LIB \\ KERNEL32.LIB
includelib C:\\ MASM32 \\ LIB \\ USER32.LIB
包括C:\\ MASM32 \\包括\\ kernel32.inc
包括C:\\ MASM32 \\包括\\ user32.inc
包括C:\\ MASM32 \\包括\\ windows.inc。数据MSGTEXT分贝的Hello World!,0MsgTitle DB我的第一个消息框,0。code主要:XOR EBX,EBX
异或ECX,ECX
推偏移MsgTitle;称号
MOV EBX,ESP
推偏移MSGTEXT;文本
MOV ECX,ESP
XOR EAX,EAX
推EAX
推EBX
推ECX
推EAX
异或ESI,ESI** MOV ESI,0x7655ea71(内USER32.DLL窗函数MessageBoxA的绝对地址)**JMP ESI主要结束


解决方案

  MOV ESI,7655ea71h

请注意在 ^ h 而不是 0X

Hi guys I have this code here in assembly it should create a message box but when I try to compile it with Masm

I get this error: C:..\test.asm(26) : error A2206: missing operator in expression

.386 .model flat, stdcall

option casemap:none

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

.data MsgText db "Hello World!",0

MsgTitle db "My First MessageBox",0

.code

Main:

xor ebx,ebx    
xor ecx,ecx    
push offset MsgTitle ;title    
mov ebx,esp    
push offset MsgText    ;text    
mov ecx,esp    
xor eax,eax       
push eax    
push ebx    
push ecx  
push eax    
xor esi,esi 

**mov esi, 0x7655ea71 (absolute addresses of windows function MessageBoxA within USER32.DLL)**

jmp esi

end Main

解决方案

Should be

    mov esi, 7655ea71h

Note the h instead of 0x

这篇关于probleme错误A2206:在EX pression缺少操作员的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆