⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 80x86-code.htm

📁 关于单片机接口技术的文档
💻 HTM
📖 第 1 页 / 共 5 页
字号:
</font></pre>

<pre><font color="#008080">BSF - Bit Scan Forward (386+)</font></pre>

<pre><font color="#008080">        Usage:  BSF     dest,src
        Modifies flags: ZF</font></pre>

<pre><font color="#008080">        Scans source operand for first bit set.  Sets ZF if a bit is found
        set and loads the destination with an index to first set bit.  Clears
        ZF is no bits are found set.  BSF scans forward across bit pattern
        (0-n) while BSR scans in reverse (n-0).</font></pre>

<pre><font color="#008080">                                 Clocks                 Size
        Operands         808x  286   386   486          Bytes</font></pre>

<pre><font color="#008080">        reg,reg           -     -   10+3n  6-42           3
        reg,mem           -     -   10+3n  7-43          3-7
        reg32,reg32       -     -   10+3n  6-42          3-7
        reg32,mem32       -     -   10+3n  7-43          3-7
</font></pre>

<pre><font color="#008080">BSR - Bit Scan Reverse  (386+)</font></pre>

<pre><font color="#008080">        Usage:  BSR     dest,src
        Modifies flags: ZF</font></pre>

<pre><font color="#008080">        Scans source operand for first bit set.  Sets ZF if a bit is found
        set and loads the destination with an index to first set bit.  Clears
        ZF is no bits are found set.  BSF scans forward across bit pattern
        (0-n) while BSR scans in reverse (n-0).</font></pre>

<pre><font color="#008080">                                 Clocks                 Size
        Operands         808x  286   386   486          Bytes</font></pre>

<pre><font color="#008080">        reg,reg           -     -   10+3n  6-103          3
        reg,mem           -     -   10+3n  7-104         3-7
        reg32,reg32       -     -   10+3n  6-103         3-7
        reg32,mem32       -     -   10+3n  7-104         3-7
</font></pre>

<pre><font color="#008080">BSWAP - Byte Swap       (486+)</font></pre>

<pre><font color="#008080">        Usage:  BSWAP   reg32
        Modifies flags: none</font></pre>

<pre><font color="#008080">        Changes the byte order of a 32 bit register from big endian to
        little endian or vice versa.   Result left in destination register
        is undefined if the operand is a 16 bit register.</font></pre>

<pre><font color="#008080">                                 Clocks                 Size
        Operands         808x  286   386   486          Bytes</font></pre>

<pre><font color="#008080">        reg32             -     -     -     1             2
&#12;BT - Bit Test           (386+)</font></pre>

<pre><font color="#008080">        Usage:  BT      dest,src
        Modifies flags: CF</font></pre>

<pre><font color="#008080">        The destination bit indexed by the source value is copied into the
        Carry Flag.</font></pre>

<pre><font color="#008080">                                 Clocks                 Size
        Operands         808x  286   386   486          Bytes</font></pre>

<pre><font color="#008080">        reg16,immed8      -     -     3     3            4-8
        mem16,immed8      -     -     6     6            4-8
        reg16,reg16       -     -     3     3            3-7
        mem16,reg16       -     -     12    12           3-7
</font></pre>

<pre><font color="#008080">BTC - Bit Test with Compliment (386+)</font></pre>

<pre><font color="#008080">        Usage:  BTC     dest,src
        Modifies flags: CF</font></pre>

<pre><font color="#008080">        The destination bit indexed by the source value is copied into the
        Carry Flag after being complimented (inverted).</font></pre>

<pre><font color="#008080">                                 Clocks                 Size
        Operands         808x  286   386   486          Bytes</font></pre>

<pre><font color="#008080">        reg16,immed8      -     -     6     6            4-8
        mem16,immed8      -     -     8     8            4-8
        reg16,reg16       -     -     6     6            3-7
        mem16,reg16       -     -     13    13           3-7
</font></pre>

<pre><font color="#008080">BTR - Bit Test with Reset (386+)</font></pre>

<pre><font color="#008080">        Usage:  BTR     dest,src
        Modifies flags: CF</font></pre>

<pre><font color="#008080">        The destination bit indexed by the source value is copied into the
        Carry Flag and then cleared in the destination.</font></pre>

<pre><font color="#008080">                                 Clocks                 Size
        Operands         808x  286   386   486          Bytes</font></pre>

<pre><font color="#008080">        reg16,immed8      -     -     6     6            4-8
        mem16,immed8      -     -     8     8            4-8
        reg16,reg16       -     -     6     6            3-7
        mem16,reg16       -     -     13    13           3-7
</font></pre>

<pre><font color="#008080">BTS - Bit Test and Set  (386+)</font></pre>

<pre><font color="#008080">        Usage:  BTS     dest,src
        Modifies flags: CF</font></pre>

<pre><font color="#008080">        The destination bit indexed by the source value is copied into the
        Carry Flag and then set in the destination.</font></pre>

<pre><font color="#008080">                                 Clocks                 Size
        Operands         808x  286   386   486          Bytes</font></pre>

<pre><font color="#008080">        reg16,immed8      -     -     6     6            4-8
        mem16,immed8      -     -     8     8            4-8
        reg16,reg16       -     -     6     6            3-7
        mem16,reg16       -     -     13    13           3-7
&#12;CALL - Procedure Call</font></pre>

<pre><font color="#008080">        Usage:  CALL    destination
        Modifies flags: None</font></pre>

<pre><font color="#008080">        Pushes Instruction Pointer (and Code Segment for far calls) onto
        stack and loads Instruction Pointer with the address of proc-name.
        Code continues with execution at CS:IP.</font></pre>

<pre><font color="#008080">                                                         Clocks
                   Operands                     808x   286     386     486</font></pre>

<pre><font color="#008080">        rel16 (near, IP relative)                19     7      7+m      3
        rel32 (near, IP relative)                -      -      7+m      3</font></pre>

<pre><font color="#008080">        reg16 (near, register indirect)          16     7      7+m      5
        reg32 (near, register indirect)          -      -      7+m      5</font></pre>

<pre><font color="#008080">        mem16 (near, memory indirect)            -     21+EA    11    10+m      5
        mem32 (near, memory indirect)            -      -     10+m      5</font></pre>

<pre><font color="#008080">        ptr16:16 (far, full ptr supplied)        28     13    17+m      18
        ptr16:32 (far, full ptr supplied)        -      -     17+m      18
        ptr16:16 (far, ptr supplied, prot. mode) -      26    34+m      20
        ptr16:32 (far, ptr supplied, prot. mode) -      -     34+m      20
        m16:16 (far, indirect)                 37+EA    16    22+m      17
        m16:32 (far, indirect)                   -      -     22+m      17
        m16:16 (far, indirect, prot. mode)       -      29    38+m      20
        m16:32 (far, indirect, prot. mode)       -      -     38+m      20</font></pre>

<pre><font color="#008080">        ptr16:16 (task, via TSS or task gate)    -     177     TS     37+TS
        m16:16 (task, via TSS or task gate)      -   180/185  5+TS    37+TS
        m16:32 (task)                            -      -      TS     37+TS
        m16:32 (task)                            -      -     5+TS    37+TS</font></pre>

<pre><font color="#008080">        ptr16:16 (gate, same privilege)          -      41    52+m      35
        ptr16:32 (gate, same privilege)          -      -     52+m      35
        m16:16 (gate, same privilege)            -      44    56+m      35
        m16:32 (gate, same privilege)            -      -     56+m      35</font></pre>

<pre><font color="#008080">        ptr16:16 (gate, more priv, no parm)      -      82    86+m      69
        ptr16:32 (gate, more priv, no parm)      -      -     86+m      69
        m16:16 (gate, more priv, no parm)        -      83    90+m      69
        m16:32 (gate, more priv, no parm)        -      -     90+m      69</font></pre>

<pre><font color="#008080">        ptr16:16 (gate, more priv, x parms)      -    86+4x  94+4x+m  77+4x
        ptr16:32 (gate, more priv, x parms)      -      -    94+4x+m  77+4x
        m16:16 (gate, more priv, x parms)        -    90+4x  98+4x+m  77+4x
        m16:32 (gate, more priv, x parms)        -      -    98+4x+m  77+4x
</font></pre>

<pre><font color="#008080">CBW - Convert Byte to Word</font></pre>

<pre><font color="#008080">        Usage:  CBW
        Modifies flags: None</font></pre>

<pre><font color="#008080">        Converts byte in AL to word Value in AX by extending sign of AL
        throughout register AH.</font></pre>

<pre><font color="#008080">                                 Clocks                 Size
        Operands         808x  286   386   486          Bytes</font></pre>

<pre><font color="#008080">        none              2     2     3     3             1
</font></pre>

<pre><font color="#008080">CDQ - Convert Double to Quad (386+)</font></pre>

<pre><font color="#008080">        Usage:  CDQ
        Modifies flags: None</font></pre>

<pre><font color="#008080">        Converts signed DWORD in EAX to a signed quad word in EDX:EAX by
        extending the high order bit of EAX throughout EDX</font></pre>

<pre><font color="#008080">                                 Clocks                 Size
        Operands         808x  286   386   486          Bytes</font></pre>

<pre><font color="#008080">        none              -     -     2     3             1
&#12;CLC - Clear Carry</font></pre>

<pre><font color="#008080">        Usage:  CLC
        Modifies flags: CF</font></pre>

<pre><font color="#008080">        Clears the Carry Flag.</font></pre>

<pre><font color="#008080">                                 Clocks                 Size
        Operands         808x  286   386   486          Bytes</font></pre>

<pre><font color="#008080">        none              2     2     2     2             1
</font></pre>

<pre><font color="#008080">CLD - Clear Direction Flag</font></pre>

<pre><font color="#008080">        Usage:  CLD
        Modifies flags: DF</font></pre>

<pre><font color="#008080">        Clears the Direction Flag causing string instructions to increment
        the SI and DI index registers.</font></pre>

<pre><font color="#008080">                                 Clocks                 Size
        Operands         808x  286   386   486          Bytes</font></pre>

<pre><font color="#008080">        none              2     2     2     2             1
</font></pre>

<pre><font color="#008080">CLI - Clear Interrupt Flag (disable)</font></pre>

<pre><font color="#008080">        Usage:  CLI
        Modifies flags: IF</font></pre>

<pre><font color="#008080">        Disables the maskable hardware interrupts by clearing the Interrupt
        flag.  NMI's and software interrupts are not inhibited.</font></pre>

<pre><font color="#008080">                                 Clocks                 Size
        Operands         808x  286   386   486          Bytes</font></pre>

<pre><font color="#008080">        none              2     2     3     5             1
</font></pre>

<pre><font color="#008080">CLTS - Clear Task Switched Flag (286+ privileged)</font></pre>

<pre><font color="#008080">        Usage:  CLTS
        Modifies flags: None</font></pre>

<pre><font color="#008080">        Clears the Task Switched Flag in the Machine Status Register.  This
        is a privileged operation and is generally used only by operating
        system code.</font></pre>

<pre><font color="#008080">                                 Clocks                 Size
        Operands         808x  286   386   486          Bytes</font></pre>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -