首页
社区
课程
招聘
[旧帖] [讨论]div问题 0.00雪花
发表于: 2007-9-11 23:13 4323

[旧帖] [讨论]div问题 0.00雪花

2007-9-11 23:13
4323
mov        eax,401981440
mov        edx,1048576
div        edx
为什么错?
还有我这个问题 http://bbs1.pediy.com/showthread.php?t=51467
谁能解决下,谢谢了

[招生]科锐逆向工程师培训(2024年11月15日实地,远程教学同时开班, 第51期)

收藏
免费 0
支持
分享
最新回复 (5)
雪    币: 200
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
2
自己顶 !!
2007-9-11 23:13
0
雪    币: 242
活跃值: (14)
能力值: ( LV4,RANK:50 )
在线值:
发帖
回帖
粉丝
3
Description
Divides unsigned the value in the AX, DX:AX, EDX:EAX, or RDX:RAX registers (dividend)
by the source operand (divisor) and stores the result in the AX (AH:AL), DX:AX, EDX:EAX,
or RDX:RAX registers. The source operand can be a general-purpose register or a memory location.
The action of this instruction depends on the operand size (dividend/divisor). Division
using 64-bit operand is available only in 64-bit mode.
Non-integral results are truncated (chopped) towards 0. The remainder is always less than the
divisor in magnitude. Overflow is indicated with the #DE (divide error) exception rather than
with the CF flag.
In 64-bit mode, the instruction’s default operation size is 32 bits. Use of the REX.R prefix
permits access to additional registers (R8-R15). Use of the REX.W prefix promotes operation
to 64 bits. In 64-bit mode when REX.W is applied, the instruction divides the unsigned value in
RDX:RAX by the source operand and stores the quotient in RAX, the remainder in RDX.
See the summary chart at the beginning of this section for encoding data and limits. See Table
3-20.
2007-9-12 00:33
0
雪    币: 260
活跃值: (102)
能力值: ( LV9,RANK:170 )
在线值:
发帖
回帖
粉丝
4
你怎么偏偏用edx?
看看基础吧。
2007-9-12 08:59
0
雪    币: 2384
活跃值: (766)
能力值: (RANK:410 )
在线值:
发帖
回帖
粉丝
5
mov  eax,401981440
mov  ecx,1048576
xor edx,edx
div  ecx
2007-9-12 11:26
0
雪    币: 200
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
6
嘿嘿 今天我终于会了 谢谢firefly whtty 小虾
xor edx,edx
mov mov  eax,401981440
mov  ecx,1048576
div ecx
版主貌似有点错误啊,应该先将edx清0吧
2007-9-12 14:42
0
游客
登录 | 注册 方可回帖
返回
//