首页
社区
课程
招聘
[求助]新手学汇,编译某程序无法通过。
发表于: 2016-9-23 14:33 3644

[求助]新手学汇,编译某程序无法通过。

2016-9-23 14:33
3644
先发代码
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
.386
.model flat,stdcall
option casemap:none
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
; Include 文件定义
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
include        windows.inc
include        gdi32.inc
includelib        gdi32.lib
include        user32.inc
includelib        user32.lib
include        kernel32.inc
includelib        kernel32.lib
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
; 数据段
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
.data
hWnd     db     ?
szBuffer  db     256 dup (?)
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
.const
szCaption db     'sendmessage',0
szStar    db     'Prese OK to send message ,param:&08x!',0
szRetuen  db     'Send message returned',0
szDestClass db   'MyClass',0
szText    db     'Text send to other window',0
szNo      db     'receive message window notfound',0

;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
.code
start:
      invoke FindWindow,addr szDestClass,NULL
  .if    eax
         mov hWnd,eax                                           ;编译无法通过的这句
invoke wsprintf ,addr szBuffer,addr szStar,addr szText
invoke MessageBox,NULL,addr szBuffer,addr szCaption,MB_OK
invoke SendMessage,hWnd,WM_SETTEXT,0,addr szText
invoke MessageBox,NULL,addr szRetuen,addr szCaption,MB_OK
  .else
         invoke MessageBox,NULL,addr szNo,addr szCaption,MB_OK
  .endif
  invoke ExitProcess,NULL
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
end  start
在看罗老师的WIN32汇编 其中有个例子 我在编译的过程中 发现
mov hWnd,eax                                           ;编译无法通过的这句
如果注释掉这句,就能成功编译
这是为什么呢?
..求大神解答下。

[培训]《安卓高级研修班(网课)》月薪三万计划,掌握调试、分析还原ollvm、vmp的方法,定制art虚拟机自动化脱壳的方法

收藏
免费 0
支持
分享
最新回复 (2)
雪    币: 16444
活跃值: (2463)
能力值: ( LV9,RANK:147 )
在线值:
发帖
回帖
粉丝
2
hWnd     db     ?
改dd吧
2016-9-23 15:24
0
雪    币: 12
活跃值: (132)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
3
谢谢...自己太粗心了
2016-9-23 18:37
0
游客
登录 | 注册 方可回帖
返回
//