|
|
|
|
|
关于SetWindowsHookEx的一个小疑惑,在线等大神
#pragma comment(linker, "/SECTION:.SHARED,RWS") #pragma data_seg(".SHARED") static int number=0; HHOOK m_Hook = NULL; #pragma data_seg() 写成上述这样就可以了。 光是定义成全局变量是不行的,无法共享。 |
|
|
|
[win32汇编] lea指令为什么不能用addr 代替呢?
[QUOTE=ifbeyu;1350928]谢谢大哥回复,听你的意思 在我的这个例子里面是局部变量所以只能用lea。 但是在我经常看见在子程序里面局部变量用 addr 例如 local @szBuffer[128]:byte invoke wsprintf,addr @szBuffer,addr szFormat,wParam i...[/QUOTE] 你跟踪一下编译出来的EXE文件,看一下@szBuffer这个数组到底是 静态的还是动态的。如果是静态的话,是可以用addr @szBuffer这种 形式的,反之肯定不行。 给你看个例子: 函数f()的源代码: f proc uses ebx esi edi x, y local @buf[100h]:byte mov eax, x add eax, y lea ebx, @buf mov [ebx], eax ret f endp 编译出来变成: 00401000 /$ 55 push ebp 00401001 |. 8BEC mov ebp, esp 00401003 |. 81C4 00FFFFFF add esp, -0x100 00401009 |. 53 push ebx 0040100A |. 56 push esi 0040100B |. 57 push edi 0040100C |. 8B45 08 mov eax, [ebp+0x8] 0040100F |. 0345 0C add eax, [ebp+0xC] 00401012 |. 8D9D 00FFFFFF lea ebx, [ebp-0x100] 00401018 |. 8903 mov [ebx], eax 0040101A |. 5F pop edi 0040101B |. 5E pop esi 0040101C |. 5B pop ebx 0040101D |. C9 leave 0040101E \. C2 0800 retn 0x8 显然,数组@buf是动态的,它的首地址为ebp-100h。 你要是想取它的地址必须用lea ebx, @buf,改成mov ebx, addr @buf或者mov ebx, offset @buf肯定错。 建议你在学习“高级”用法前,先掌握“低级”的用法,就是老老实实用call,而不用invoke, 函数定义不用xxx proc uses ...这种形式,而用xxx:代替,里面的参数处理像[ebp+8]这种及动态变量[ebp-100h] 这种全部自己来。 |
|
[win32汇编] lea指令为什么不能用addr 代替呢?
自以为是了吧。 局部变量是用[ebp-n]这种形式构造的, 跟EAX没有任何关系。 而[ebp-n]是不可以用addr或offset取其偏移地址的,只能用lea。 |
|
|
|
|
|
[求助]有哪位达人知道路由器固件用什么平台开发出来的
我试过在Linux Fedora平台编译Netgear WNDR4500的固件, 通过修改固件,把被雷劈坏的wan口转移到LAN1上。 Netgear许多型号的固件是开源的。 |
|
MD5加密结果让人匪夷所思
MD5源代码没几行,自己对照着看一下,是否为MD5的变形算法。 |
|
求科学解释32位IEEE754为何采用127做阶码偏移量?
127是8位符号数的最大值。 偏置指数不采用符号数,而是采用非符号数,是为了方便比较指数的大小。 例如偏置指数的值=126,则实际指数值=126-127=-1; 例如偏置指数的值=128,则实际指数值=128-127=+1; 显然后者指数值>前者指数值。 |
|
[原创][2014-12-11更新]程序员记忆录!.
楼主精神可嘉,不过学习方法有严重问题,怎么能用学英文的方式来学编程: "艰难的背下了‘Windows环境下32位汇编语言程序设计(第2版)’后,我的手指头好痛好痛,每天把所有例子打3遍" |
|
[转帖] WinEdt.v8.1.Build.20131031.Cracked-EAT
It does not work! After installation, it does not show any windows and dies in memory. When I uninstall it, it deletes whole directory which contains all my .tex files! So damn it! |
|
[原创]保护模式-分段机制(附多篇保护模式文章)
楼主对"20位段界限"的理解有些偏差。 20位段界限并不表示段长度或页的数量,而是 段末地址或末页编号。当granularity=1且 此值=FFFFF时,表示最后一页编号为FFFFFh, 转化成地址=FFFFFh*4K=FFFFF000, 此地址就是最后一页的首地址,而页长度为 1000H。
|
|
[推荐]IDA Pro 2013年前3名获奖插件出炉 一等奖1900美元
中文翻译得跟P一般,google翻译的吧? |
操作理由
RANk
{{ user_info.golds == '' ? 0 : user_info.golds }}
雪币
{{ experience }}
课程经验
{{ score }}
学习收益
{{study_duration_fmt}}
学习时长
基本信息
荣誉称号:
{{ honorary_title }}
能力排名:
No.{{ rank_num }}
等 级:
LV{{ rank_lv-100 }}
活跃值:
在线值:
浏览人数:{{ visits }}
最近活跃:{{ last_active_time }}
注册时间:{{ user_info.create_date_jsonfmt }}
勋章
兑换勋章
证书
证书查询 >
能力值