The University of Texas at Austin

Department of Electrical and Computer Engineering# List of Instructions for the Project

Department of Electrical and Computer Engineering

EE 382N – Spring 2016

Yale N. Patt, Instructor

Ben Lin, Stephen Pruett, TAs

Yale N. Patt, Instructor

Ben Lin, Stephen Pruett, TAs

The following table contains all instruction variations you will implement in the project. It includes the instruction variations due to the operand size override and REP prefix; in addition, many instructions may be preceded by a segment override prefix (consult the manuals for details).

Opcode | Mnemonic | Description |
---|---|---|

`04 ` | `ADD AL,` | Add imm8 to AL |

`05 ` | `ADD AX,` | Add imm16 to AX |

`05 ` | `ADD EAX,` | Add imm32 to EAX |

`80 /0 ` | `ADD ` | Add imm8 to r/m8 |

`81 /0 ` | `ADD ` | Add imm16 to r/m16 |

`81 /0 ` | `ADD ` | Add imm32 to r/m32 |

`83 /0 ` | `ADD ` | Add sign-extended imm8 to r/m16 |

`83 /0 ` | `ADD ` | Add sign-extended imm8 to r/m32 |

`00 /` | `ADD ` | Add r8 to r/m8 |

`01 /` | `ADD ` | Add r16 to r/m16 |

`01 /` | `ADD ` | Add r32 to r/m32 |

`02 /` | `ADD ` | Add r/m8 to r8 |

`03 /` | `ADD ` | Add r/m16 to r16 |

`03 /` | `ADD ` | Add r/m32 to r32 |

`0F BB ` | `BTC ` | Compliments the selected bit. Stores original value in CF |

`0F BB ` | `BTC ` | Compliments the selected bit. Stores original value in CF |

`0F BA /7 ` | `BTC ` | Compliments the selected bit. Stores original value in CF |

`0F BA /7 ` | `BTC ` | Compliments the selected bit. Stores original value in CF |

`E8 ` | `CALL ` | Call near, relative, displacement relative to next instruction |

`E8 ` | `CALL ` | Call near, relative, displacement relative to next instruction |

`FF /2` | `CALL ` | Call near, absolute indirect, address given in r/m16 |

`FF /2` | `CALL ` | Call near, absolute indirect, address given in r/m32 |

`9A ` | `CALL ` | Call far, absolute, address given in operand |

`FC` | `CLD` | Clear DF flag |

`0F 42 /` | `CMOVC ` | Move if carry (CF=1) |

`0F 42 /` | `CMOVC ` | Move if carry (CF=1) |

`0F B0 /` | `CMPXCHG ` | Compare AL with r/m8. If equal, r/m8 = r8 and ZF=1. Else, ZF=0, AL=r/m8. |

`0F B1 /` | `CMPXCHG ` | Compare AX with r/m16. If equal, r/m16 = r16 and ZF=1. Else, ZF=0, AX=r/m16. |

`0F B1 /` | `CMPXCHG ` | Compare EAX with r/m32. If equal, r/m32 = r32 and ZF=1. Else, ZF=0, EAX=r/m32. |

`27` | `DAA` | Decimal adjust AL after addition |

`F4` | `HLT` | Halt |

`CF` | `IRETD` | Interrupt return (32-bit operand size) |

`77 ` | `JNBE ` | Jump short if not below or equal (CF=0 and ZF=0) |

`75 ` | `JNE ` | Jump short if not equal (ZF=0) |

`0F 87 ` | `JNBE ` | Jump near if not below or equal (CF=0 and ZF=0) |

`0F 87 ` | `JNBE ` | Jump near if not below or equal (CF=0 and ZF=0) |

`0F 85 ` | `JNE ` | Jump near if not equal (ZF=0) |

`0F 85 ` | `JNE ` | Jump near if not equal (ZF=0) |

`EB ` | `JMP ` | Jump short, relative, displacement relative to next instruction |

`E9 ` | `JMP ` | Jump near, relative, displacement relative to next instruction |

`E9 ` | `JMP ` | Jump near, relative, displacement relative to next instruction |

`FF /4` | `JMP ` | Jump near, absolute indirect, address given in r/m16 |

`FF /4` | `JMP ` | Jump near, absolute indirect, address given in r/m32 |

`EA ` | `JMP ` | Jump far, absolute, address given in operand |

`EA ` | `JMP ` | Jump far, absolute, address given in operand |

`88 /` | `MOV ` | Move r8 to r/m8 |

`89 /` | `MOV ` | Move r16 to r/m16 |

`89 /` | `MOV ` | Move r32 to r/m32 |

`8A /` | `MOV ` | Move r/m8 to r8 |

`8B /` | `MOV ` | Move r/m16 to r16 |

`8B /` | `MOV ` | Move r/m32 to r32 |

`8C /` | `MOV ` | Move segment register to r/m16 |

`8E /` | `MOV ` | Move r/m16 to segment register |

`B0+ ` | `MOV ` | Move imm8 to r8 |

`B8+ ` | `MOV ` | Move imm16 to r16 |

`B8+ ` | `MOV ` | Move imm32 to r32 |

`C6 /0` | `MOV ` | Move imm8 to r/m8 |

`C7 /0` | `MOV ` | Move imm16 to r/m16 |

`C7 /0` | `MOV ` | Move imm32 to r/m32 |

`0F 6F /` | `MOVQ ` | Move quadword from mm/m64 to mm. |

`0F 7F /` | `MOVQ ` | Move quadword from mm to mm/m64. |

`F6 /2` | `NOT ` | Reverse each bit of r/m8 |

`F7 /2` | `NOT ` | Reverse each bit of r/m16 |

`F7 /2` | `NOT ` | Reverse each bit of r/m32 |

`0C ` | `OR AL, ` | AL OR imm8 |

`0D ` | `OR AX, ` | AX OR imm16 |

`0D ` | `OR EAX, ` | EAX OR imm32 |

`80 /1 ` | `OR ` | r/m8 OR imm8 |

`81 /1 ` | `OR ` | r/m16 OR imm16 |

`81 /1 ` | `OR ` | r/m32 OR imm32 |

`83 /1 ` | `OR ` | r/m16 OR imm8 (sign-extended) |

`83 /1 ` | `OR ` | r/m32 OR imm8 (sign-extended) |

`08 /` | `OR ` | r/m8 OR r8 |

`09 /` | `OR ` | r/m16 OR r16 |

`09 /` | `OR ` | r/m32 OR r32 |

`0A /` | `OR ` | r8 OR r/m8 |

`0B /` | `OR ` | r16 OR r/m16 |

`0B /` | `OR ` | r32 OR r/m32 |

`0F FE /` | `PADDD ` | Add packed doubleword integers from mm/m64 and mm. |

`0F C4 /r ` | `PINSRW ` | Copies the word from r32/m16 and inserts it into mm at the index specified by imm8. |

`8F /0` | `POP ` | Pop top of stack into m16; increment stack pointer |

`8F /0` | `POP ` | Pop top of stack into m32; increment stack pointer |

`58+ ` | `POP ` | Pop top of stack into r16; increment stack pointer |

`58+ ` | `POP ` | Pop top of stack into r32; increment stack pointer |

`1F` | `POP DS` | Pop top of stack into DS; increment stack pointer |

`07` | `POP ES` | Pop top of stack into ES; increment stack pointer |

`17` | `POP SS` | Pop top of stack into SS; increment stack pointer |

`0F A1` | `POP FS` | Pop top of stack into FS; increment stack pointer |

`0F A9` | `POP GS` | Pop top of stack into GS; increment stack pointer |

`FF /6` | `PUSH ` | Push r/m16 |

`FF /6` | `PUSH ` | Push r/m32 |

`50+` | `PUSH ` | Push r16 |

`50+` | `PUSH ` | Push r32 |

`6A` | `PUSH ` | Push imm8 |

`68` | `PUSH ` | Push imm16 |

`68` | `PUSH ` | Push imm32 |

`0E` | `PUSH CS` | Push CS |

`16` | `PUSH SS` | Push SS |

`1E` | `PUSH DS` | Push DS |

`06` | `PUSH ES` | Push ES |

`0F A0` | `PUSH FS` | Push FS |

`0F A8` | `PUSH GS` | Push GS |

`F2 AE` | `REPNE SCAS ` | Finds matching word in AL in string specified by ES:EDI |

`F2 AF` | `REPNE SCAS ` | Finds matching word in AX in string specified by ES:EDI |

`F2 AF` | `REPNE SCAS ` | Finds matchine word in EAX in string specified by ES:EDI |

`C3` | `RET` | Near return to calling procedure |

`CB` | `RET` | Far return to calling procedure |

`C2 ` | `RET ` | Near return to calling procedure and pop imm16 bytes from stack |

`CA ` | `RET ` | Far return to calling procedure and pop imm16 bytes from stack |

`D0 /4` | `SAL ` | Multiply r/m8 by 2, once |

`D2 /4` | `SAL ` | Multiply r/m8 by 2, CL times |

`C0 /4 ` | `SAL ` | Multiply r/m8 by 2, imm8 times |

`D1 /4` | `SAL ` | Multiply r/m16 by 2, once |

`D3 /4` | `SAL ` | Multiply r/m16 by 2, CL times |

`C1 /4 ` | `SAL ` | Multiply r/m16 by 2, imm8 times |

`D1 /4` | `SAL ` | Multiply r/m32 by 2, once |

`D3 /4` | `SAL ` | Multiply r/m32 by 2, CL times |

`C1 /4 ` | `SAL ` | Multiply r/m32 by 2, imm8 times |

`D0 /7` | `SAR ` | Signed divide r/m8 by 2, once |

`D2 /7` | `SAR ` | Signed divide r/m8 by 2, CL times |

`C0 /7 ` | `SAR ` | Signed divide r/m8 by 2, imm8 times |

`D1 /7` | `SAR ` | Signed divide r/m16 by 2, once |

`D3 /7` | `SAR ` | Signed divide r/m16 by 2, CL times |

`C1 /7 ` | `SAR ` | Signed divide r/m16 by 2, imm8 times |

`D1 /7` | `SAR ` | Signed divide r/m32 by 2, once |

`D3 /7` | `SAR ` | Signed divide r/m32 by 2, CL times |

`C1 /7 ` | `SAR ` | Signed divide r/m32 by 2, imm8 times |

`AE` | `SCAS ` | Compare byte in AL with byte specified by memory address |

`AF` | `SCAS ` | Compare word in AX with word specified by memory address |

`AF` | `SCAS ` | Compare doubleword in EAX with doubleword specified by memory address |

`FD` | `STD` | Set DF flag |

`90+` | `XCHG AX,` | Exchange r16 with AX |

`90+` | `XCHG EAX,` | Exchange r32 with EAX |

`86 /` | `XCHG ` | Exchange r8 with r/m8 |

`87 /` | `XCHG ` | Exchange r16 with r/m16 |

`87 /` | `XCHG ` | Exchange r32 with r/m32 |