|
最近学习32位汇编的问题,在线等高手解答。
1、 mov EBX,[1000h] 不须要段超越的话,那是不是就是直接把地址1000H内的内容送入EBX中? 可以这么说,不过在Win32中,除了你的程序是运行在Ring0层的才能访问这个地址。Ring3的程序访问这个地址会另程序崩毁。 2、mov EBX,[EAX+12h] 这些寻指又怎么理解呢。是不是在32位汇编中就不可以使用了。 可以使用,这条指令即以eax的保存着的地址值再+12个字节的偏移量里的地址里的内容传给ebx。 |
|
最近学习32位汇编的问题,在线等高手解答。
对16位的汇编不太懂,不过win32的指针已经可以指向4G的大小,只要有权限,可以指向任何地址。所以16位可以寻址的地方在32位上应该都可以做到。 API函数中有一个lstrcmp函数。 |
|
|
|
[求助]rep cmpsb不能用吗?
rep不能修饰cmpsb指令。只有repe/rpez/repne/rpenz才能修饰cmpsb指令。VC内联汇编虽然你是使用rep,但VC最后会将rep处理成repe指令。 |
|
请教C++Build编译器相关配置(For DLL)?[求助]
int是未标准定义的类型,在不同的编辑器不同的平台上他代表者不同的位长。所以他的长度不一定是16位的,在32位的平台上也可以是32位的。你那个C文件我没有BC++编辑器,我是用VC++编译的。经过下面的测试可以看出C的int和Delphi的SmallInt的位长是不等的。C的int是32位,而SmallInt是16位的。不过BC++中的int是不是16位的我就不太清楚了。你可以在BC++中用sizeof(int)测试看看,是16位的还是32位的。 VC++中 sizeof(int) == 4 Delphi中 sizeof(SmallInt) = 2 Delphi中 sizeof(Integer) = 4 |
|
请教C++Build编译器相关配置(For DLL)?[求助]
const MAXCMDSIZE = 16; // Maximal length of 80x86 command MAXCALSIZE = 8; // Max length of CALL without prefixes NMODELS = 8; // Number of assembler search models TEXTLEN = 255; // Maximal length of text string asmdll = 'assembl.dll'; type TAsmModel = packed record // Model to search for assembler command code:array[0..MAXCMDSIZE-1] of byte; // Binary code mask:array[0..MAXCMDSIZE-1] of byte; // Mask for binary code (0: bit ignored) //下面的变量溢出了,将下面的SmallInt改成Integer即可。 length:SmallInt; // Length of code, bytes (0: empty) jmpsize:SmallInt; // Offset size if relative jump jmpoffset:SmallInt; // Offset relative to IP jmppos:SmallInt; // Position of jump offset in command end; PAsmModel = ^TAsmModel; //DLL函数声明 function AssembleCode(Cmd: PChar; IP: DWORD; Model: PAsmModel; Attempt: Integer; ConstSize: Integer; ErrText: PChar):Integer; Stdcall; external asmdll; //调用 procedure TForm1.BnClick(Sender: PObj); var myModel: TAsmModel; s : PChar; Input : String; TmpStr, ErrBuf : array[0..TEXTLEN] of Char; i: Integer; begin if EB1.Text <> '' then begin FillChar(TmpStr, TEXTLEN, 0); //将TEXTLEN改成TEXTLEN+1 FillChar(myModel, SizeOf(myModel), 0); s := @TmpStr[0]; Input := EB1^.Text; //EB1^.Text??,Edit控件可以这样用指针访问吗?你的是Delphi几? for i:=1 to Length(Input) do begin s^ := Input[i]; inc(s); if i>TEXTLEN then break; end; AssembleCode(@TmpStr[0], $401000, @myModel, 0, 0, @ErrBuf[0] ); Input := ''; //函数出来后,Input已经变了 EB2.Clear ; //指针也变错了 if myModel.length >0 then begin for i:=1 to myModel.length do Input := Input + Format('%s', [myModel.code[i]] ); //'%s'的格式不能用于Byte的类型,应该用'%x'的参数才对,或者使用强制类型转换char(myModel.code[i]) EB2.Text := Input; end else EB2^.Text := ErrBuf; //EB2^.Text??,Edit控件可以这样用指针访问吗?你的是Delphi几? end; end; PS:不要点将,呵 |
|
[求助]关于C++的windows编程
只要你的编译器支持调用WinApi函数,当然可以了。 如果你是使用VC++编译器的,可以使用SDK方式,也可以使用MFC。 如果你是使用BC++编译器的就更简单了,当然也可以使用SDK方式。 如果你想用SDK方式,可以看看《Windows程序设计》那本书。网上有电子版下载,你可以找找。 |
|
[原创]笨笨雄转正后热情略有下降啊
这才是吃得人上人,方能苦中苦。 |
|
[求助]文件起始位置与内存一样的PE文件为什么会执行快些
如果文件的区块始初位置和在内存中装入地址不相同,系统在装载程序时还必须进行对齐等操作,而如果文件的区块始初位置和内存中的相同,就可以省一些初始操作。所以执行会快些。就像不加壳(密)的程序比加壳(密)后的程序执行要快的道理是一样的。 |
|
[求助]读取在EXE文件尾添加的数据问题
exe的尾部附加数据不会和程序一起映射到进程中,如果你要读取尾部附加数据,只有自己用CreateFile加载文件再读取。 |
|
[求助]运行脚本出错
odbgscript是ollyscript的升级版本。你所说的指令只有最新的脚本插件才支持。 |
|
关于VB浮点运算
最初由 wopasi 发布 VB的浮点运算和整数的运算是一样使用的。很简单的,只需将类型定义成浮点类型,其它的就和整数的运算一样使用了。根本没有什么书或教程。 |
|
|
操作理由
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 }}
勋章
兑换勋章
证书
证书查询 >
能力值