zoukankan      html  css  js  c++  java
  • 位操作指令bitwise logical instructions

    AND, OR, XOR, NOT      <-----------Bitwise logical instructions

    ROL, ROR, RCL, RCR, SHL, SHR          <-------------shift instructions

    AND op1,op2

    结果放在op1中。

    AND的一种应用是在一个数中分离出几个bits

    OR, XOR和AND的格式相同

    NOT只有一个操作数

    Shift/rotate指令的一般格式:shl <register/memory>,<count>

    这里的count可以是一个立即数,也可以是CL寄存器。(这个寄存器被称为count register)

    使用SHL指令会使最左边的那一个数转移到Carry Flag中

    所有的算术运算指令、所有的bitwise logical instructions、所有的shift instructions以及部分其他指令会影响Carry Flag标记

    ROL:  rotate left

    ROR:  rotate right

    RCL:  rotate carry left(移动的时候带着Carry Flag标记位一起移动)

    RCR:  rotate carry right(移动的时候带着Carry Flag标记位一起移动)

    CLC:  clear carry flag,把Carry Flag标记位清零。没有任何操作数,不会对其他任何东西产生影响

    STC:  set carry flag,把Carry Flag标记为设为1。没有任何操作数,不会对其他任何东西产生影响

  • 相关阅读:
    UVALive 7509 Dome and Steles
    HDU 5884 Sort
    Gym 101194H Great Cells
    HDU 5451 Best Solver
    HDU 5883 The Best Path
    HDU 5875 Function
    卡特兰数
    UVa 11729 Commando War 突击战
    UVa 11292 The Dragon of Loowater 勇者斗恶龙
    Spark Scala Flink版本对应关系
  • 原文地址:https://www.cnblogs.com/wangshuo/p/1991320.html
Copyright © 2011-2022 走看看