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

📄 80x86-code.htm

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

<pre><font color="#008080">        none              -     2     5     7             2
</font></pre>

<pre><font color="#008080">CMC - Complement Carry Flag</font></pre>

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

<pre><font color="#008080">        Toggles (inverts) 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
&#12;CMP - Compare</font></pre>

<pre><font color="#008080">        Usage:  CMP     dest,src
        Modifies flags: AF CF OF PF SF ZF</font></pre>

<pre><font color="#008080">        Subtracts source from destination and updates the flags but does
        not save result.  Flags can subsequently be checked for conditions.</font></pre>

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

<pre><font color="#008080">        reg,reg           3     2     2     1             2
        mem,reg          9+EA   7     5     2            2-4  (W88=13+EA)
        reg,mem          9+EA   6     6     2            2-4  (W88=13+EA)
        reg,immed         4     3     2     1            3-4
        mem,immed       10+EA   6     5     2            3-6  (W88=14+EA)
        accum,immed       4     3     2     1            2-3
</font></pre>

<pre><font color="#008080">CMPS - Compare String (Byte, Word or Doubleword)</font></pre>

<pre><font color="#008080">        Usage:  CMPS    dest,src
                CMPSB
                CMPSW
                CMPSD   (386+)
        Modifies flags: AF CF OF PF SF ZF</font></pre>

<pre><font color="#008080">        Subtracts destination value from source without saving results.
        Updates flags based on the subtraction and  the index registers
        (E)SI and (E)DI are incremented or decremented depending on the
        state of the Direction Flag.  CMPSB inc/decrements the index
        registers by 1, CMPSW inc/decrements by 2, while CMPSD increments
        or decrements by 4.  The REP prefixes can be used to process
        entire data items.</font></pre>

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

<pre><font color="#008080">        dest,src          22    8     10    8             1  (W88=30)
</font></pre>

<pre><font color="#008080">CMPXCHG - Compare and Exchange</font></pre>

<pre><font color="#008080">        Usage:  CMPXCHG dest,src  (486+)
        Modifies flags: AF CF OF PF SF ZF</font></pre>

<pre><font color="#008080">        Compares the accumulator (8-32 bits) with &quot;dest&quot;.  If equal the
        &quot;dest&quot; is loaded with &quot;src&quot;, otherwise the accumulator is loaded
        with &quot;dest&quot;.</font></pre>

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

<pre><font color="#008080">        reg,reg           -     -     -     6             2
        mem,reg           -     -     -     7             2</font></pre>

<pre><font color="#008080">        - add 3 clocks if the &quot;mem,reg&quot; comparison fails
</font></pre>

<pre><font color="#008080">CWD - Convert Word to Doubleword</font></pre>

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

<pre><font color="#008080">        Extends sign of word in register AX throughout register DX forming
        a doubleword quantity in DX:AX.</font></pre>

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

<pre><font color="#008080">        none              5     2     2     3             1
&#12;CWDE - Convert Word to Extended Doubleword (386+)</font></pre>

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

<pre><font color="#008080">        Converts a signed word in AX to a signed doubleword in EAX by
        extending the sign bit of AX throughout EAX.</font></pre>

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

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

<pre><font color="#008080">DAA - Decimal Adjust for Addition</font></pre>

<pre><font color="#008080">        Usage:  DAA
        Modifies flags: AF CF PF SF ZF (OF undefined)</font></pre>

<pre><font color="#008080">        Corrects result (in AL) of a previous BCD addition operation.
        Contents of AL are changed to a pair of packed decimal digits.</font></pre>

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

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

<pre><font color="#008080">DAS - Decimal Adjust for Subtraction</font></pre>

<pre><font color="#008080">        Usage:  DAS
        Modifies flags: AF CF PF SF ZF (OF undefined)</font></pre>

<pre><font color="#008080">        Corrects result (in AL) of a previous BCD subtraction operation.
        Contents of AL are changed to a pair of packed decimal digits.</font></pre>

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

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

<pre><font color="#008080">DEC - Decrement</font></pre>

<pre><font color="#008080">        Usage:  DEC     dest
        Modifies flags: AF OF PF SF ZF</font></pre>

<pre><font color="#008080">        Unsigned binary subtraction of one from the destination.</font></pre>

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

<pre><font color="#008080">        reg8              3     2     2     1             2
        mem             15+EA   7     6     3            2-4
        reg16/32          3     2     2     1             1
</font></pre>

<pre><font color="#008080">DIV - Divide</font></pre>

<pre><font color="#008080">        Usage:  DIV     src
        Modifies flags: (AF,CF,OF,PF,SF,ZF undefined)</font></pre>

<pre><font color="#008080">        Unsigned binary division of accumulator by source.  If the source
        divisor is a byte value then AX is divided by &quot;src&quot; and the quotient
        is placed in AL and the remainder in AH.  If source operand is a word
        value, then DX:AX is divided by &quot;src&quot; and the quotient is stored in AX
        and the remainder in DX.</font></pre>

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

<pre><font color="#008080">        reg8             80-90  14    14    16            2
        reg16           144-162 22    22    24            2
        reg32              -    -     38    40            2
        mem8        (86-96)+EA  17    17    16           2-4
        mem16     (150-168)+EA  25    25    24           2-4  (W88=158-176+EA)
        mem32              -    -     41    40           2-4
&#12;ENTER - Make Stack Frame  (80188+)</font></pre>

<pre><font color="#008080">        Usage:  ENTER   locals,level
        Modifies flags: None</font></pre>

<pre><font color="#008080">        Modifies stack for entry to procedure for high level language.
        Operand &quot;locals&quot; specifies the amount of storage to be allocated
        on the stack.   &quot;Level&quot; specifies the nesting level of the routine.
        Paired with the LEAVE instruction, this is an efficient method of
        entry and exit to procedures.</font></pre>

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

<pre><font color="#008080">        immed16,0         -       11       10         14          4
        immed16,1         -       15       12         17          4
        immed16,immed8    -   12+4(n-1) 15+4(n-1)    17+3n        4
</font></pre>

<pre><font color="#008080">ESC - Escape</font></pre>

<pre><font color="#008080">        Usage:  ESC     immed,src
        Modifies flags: None</font></pre>

<pre><font color="#008080">        Provides access to the data bus for other resident processors.
        The CPU treats it as a NOP but places memory operand on bus.</font></pre>

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

<pre><font color="#008080">        immed,reg         2   9-20    ?                   2
        immed,mem         2   9-20    ?                  2-4
</font></pre>

<pre><font color="#008080">HLT - Halt CPU</font></pre>

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

<pre><font color="#008080">        Halts CPU until RESET line is activated, NMI or maskable interrupt
        received.  The CPU becomes dormant but retains the current CS:IP
        for later restart.</font></pre>

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

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

<pre><font color="#008080">IDIV - Signed Integer Division</font></pre>

<pre><font color="#008080">        Usage:   IDIV   src
        Modifies flags: (AF,CF,OF,PF,SF,ZF undefined)</font></pre>

<pre><font color="#008080">        Signed binary division of accumulator by source.  If source is a
        byte value, AX is divided by &quot;src&quot; and the quotient is stored in
        AL and the remainder in AH.  If source is a word value, DX:AX is
        divided by &quot;src&quot;, and the quotient is stored in AL and the
        remainder in DX.
                                 Clocks                 Size
        Operands         808x  286   386   486          Bytes</font></pre>

<pre><font color="#008080">        reg8          101-112   17    19    19            2
        reg16         165-184   25    27    27            2
        reg32            -      -     43    43            2
        mem8     (107-118)+EA   20    22    20           2-4
        mem16    (171-190)+EA   38    30    28           2-4  (W88=175-194)
        mem32            -      -     46    44           2-4
&#12;IMUL - Signed Multiply</font></pre>

<pre><font color="#008080">        Usage:  IMUL    src
                IMUL    src,immed        (286+)
                IMUL    dest,src,immed8  (286+)
                IMUL    dest,src         (386+)
        Modifies flags: CF OF (AF,PF,SF,ZF undefined)</font></pre>

<pre><font color="#008080">        Signed multiplication of accumulator by &quot;src&quot; with result placed
        in the accumulator.  If the source operand is a byte value, it
        is multiplied by AL and the result stored in AX.  If the source
        operand is a word value it is multiplied by AX and the result is
        stored in DX:AX.  Other variations of this instruction allow
        specification of source and destination registers as well as a
        third immediate factor.</font></pre>

<pre><font color="#008080">                                  Clocks                Size

⌨️ 快捷键说明

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