首页
社区
课程
招聘
逻辑左移与循环左移区别?
发表于: 2005-5-3 19:42 12568

逻辑左移与循环左移区别?

2005-5-3 19:42
12568
1) SHL    逻辑左移.
2) ROL    循环左移.

就是这2个指令 不懂什么意思 (没学过汇编 又很想学crack 累啊,google了老半天都没有结果 桌上也没一本汇编的书 _-##)

-----------------------------------------------------
比如eax=0x00006100
    ebx=0x61000000

SHL eax,10;
ROL ebx,6;

上面2个怎么个移法啊

[课程]Linux pwn 探索篇!

收藏
免费 7
支持
分享
最新回复 (4)
雪    币: 100
活跃值: (15)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
zmh
2
去看看汇编的指令吧 小子
2005-5-4 10:16
0
雪    币: 339
活跃值: (1510)
能力值: ( LV13,RANK:970 )
在线值:
发帖
回帖
粉丝
3
谁最开始都不会

SHL     dest,count

Modifies flags: CF OF PF SF ZF (AF undefined)
        .-.     .---------------.     .-.
        |C|<----|7 <---------- 0|<----|0|
        '-'     '---------------'     '-'
        Shifts the destination left by "count" bits with zeroes shifted
        in on right.  The Carry Flag contains the last bit shifted out.

Usage:  ROL     dest,count
        Modifies flags: CF OF
        .-.     .---------------.
        |C|<-.--|7 <---------- 0|<-.
        '-'  |  '---------------'  |
             '---------------------'
        Rotates the bits in the destination to the left "count" times with
        all data pushed out the left side re-entering on the right.  The
        Carry Flag will contain the value of the last bit rotated out.

SHL eax,10
翻译成C就是:  eax <<= 0x10;

ROL有点麻烦:
ROL(a, b)是:
a = ((unsigned int)a << b) | ((unsigned int)a >> (32 - b))
2005-5-4 13:51
0
雪    币: 207
活跃值: (40)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
4
呵 THX 记下来了
2005-5-4 15:07
0
雪    币: 77
活跃值: (11)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
5
同意三楼说的。。。
2005-7-14 13:28
0
游客
登录 | 注册 方可回帖
返回
//