Dec Hex Bin
3 3
ORG ; THREE
Arithmetic
and Logic
Instructions
And Programs
The x86 PC
Assembly Language, Design, and Interfacing © 2010, 2003, 2000, 1998 Pearson Higher Education, Inc.
By Muhammad Ali Mazidi, Janice Gillespie Mazidi and Danny Causey Pearson Prentice Hall - Upper Saddle River, NJ 07458
OBJECTIVES
this chapter enables the student to:
• Demonstrate how 8-bit and 16-bit unsigned
numbers are added in the x86.
• Convert data to any of the forms:
– ASCII,packed BCD,unpacked BCD.
• Explain the effect of unsigned arithmetic
instructions on the flags.
• Code the following Assembly language unsigned
arithmetic instructions:
– Addition instructions: ADD and ADC.
– Subtraction instructions SUB and SBB.
– Multiplication and division instructions MUL and DIV.
The x86 PC
Assembly Language, Design, and Interfacing © 2010, 2003, 2000, 1998 Pearson Higher Education, Inc.
By Muhammad Ali Mazidi, Janice Gillespie Mazidi and Danny Causey Pearson Prentice Hall - Upper Saddle River, NJ 07458
OBJECTIVES (cont)
this chapter enables the student to:
• Code BCD arithmetic instructions:
– DAA and DAS.
• Code the Assembly language logic instructions:
– AND, OR, and XOR.
– Logical shift instructions SHR and SHL.
– The compare instruction CMP.
• Code bitwise rotation instructions
– ROR, ROL, RCR, and RCL.
• Demonstrate an ability to use all of the above
instructions in Assembly language programs.
• Perform bitwise manipulation using the C language.