Presentation is loading. Please wait.

Presentation is loading. Please wait.

Princess Sumaya Univ. Computer Engineering Dept. Chapter 7:

Similar presentations


Presentation on theme: "Princess Sumaya Univ. Computer Engineering Dept. Chapter 7:"— Presentation transcript:

1 Princess Sumaya Univ. Computer Engineering Dept. Chapter 7:

2 Princess Sumaya University 22342 – Computer Org. & Assembly Lang. Computer Engineering Dept. 1 / 10 Shift & Rotate Instructions  SHL (Shift Left) ●SHLreg, imm8 ●SHLmem, imm8 ●SHLreg, CL ●SHLmem, CL  In bit = 0, Out bit goes to CF  SHR (Shift Right)  ROL (Rotate Left)  ROR (Rotate Right)

3 Princess Sumaya University 22342 – Computer Org. & Assembly Lang. Computer Engineering Dept. 2 / 10 Arithmetic Shift Instructions  SAL (Shift Arithmetic Left) ●Same as SHL  SAR (Shift Arithmetic Right) ●SARreg, imm8 ●SARmem, imm8 ●SARreg, CL ●SARmem, CL  In bit = SF, Out bit goes to CF

4 Princess Sumaya University 22342 – Computer Org. & Assembly Lang. Computer Engineering Dept. 3 / 10 Sign Extension Instructions  Convert Byte to Word ●CBW  Convert Word to Double ●CWD

5 Princess Sumaya University 22342 – Computer Org. & Assembly Lang. Computer Engineering Dept. 4 / 10 Addition & Subtraction  ADD Instruction ●ADDreg, reg ●ADDreg, mem ●ADDreg, imm ●ADDmem, reg ●ADDmem, imm  SUB Instruction  INC Instruction ●INCreg ●INCmem  DEC Instruction

6 Princess Sumaya University 22342 – Computer Org. & Assembly Lang. Computer Engineering Dept. 5 / 10 Multiply Instruction  MUL (Unsigned Multiply)  IMUL (Signed Multiply) ●MULreg orIMUL reg ●MULmem orIMUL mem  8-bit Multiply  16-bit Multiply AL 8-bit × AX AX 16-bit × AXDX

7 Princess Sumaya University 22342 – Computer Org. & Assembly Lang. Computer Engineering Dept. 6 / 10 Multiply Instruction Example: Program File.Data Var1DB2 Var2DB3 Var3DW3 Var4DW4.Code END

8 Princess Sumaya University 22342 – Computer Org. & Assembly Lang. Computer Engineering Dept. 7 / 10 Multiply Instruction Example: Program File.Data Var1DB2 Var2DB- 3 Var3DW- 3 Var4DW4.Code END

9 Princess Sumaya University 22342 – Computer Org. & Assembly Lang. Computer Engineering Dept. 8 / 10 Divide Instruction  DIV (Unsigned Divide)  IDIV (Signed Divide) ●DIVreg orIDIV reg ●DIV mem orIDIV mem  8-bit Divide  16-bit Divide AL 8-bitAX AX 16-bit AXDX AH DX

10 Princess Sumaya University 22342 – Computer Org. & Assembly Lang. Computer Engineering Dept. 9 / 10 Divide Instruction Example: Program File.Data Var1DB20 Var2DB3 Var3DW45 Var4DW4.Code END

11 Princess Sumaya University 22342 – Computer Org. & Assembly Lang. Computer Engineering Dept. 10 / 10 Divide Instruction Example: Program File.Data Var1DB- 48 Var2DB5 Var3DW- 1002 Var4DW249.Code END

12 Princess Sumaya University 22342 – Computer Org. & Assembly Lang. Computer Engineering Dept. Chapter 7


Download ppt "Princess Sumaya Univ. Computer Engineering Dept. Chapter 7:"

Similar presentations


Ads by Google