1 / 11

Understanding IA-32 Instructions: Arithmetic and Logical Operations for Pentium Processors

This document details key IA-32 (Pentium) instructions including inc, dec, nop, mul, imul, div, idiv, neg, and not. Each instruction is accompanied by its functionality, such as incrementing or decrementing a value, performing multiplication or division, and affecting the status flags (O, S, Z, C). This guide aims to provide clarity on how these operations manipulate data in 32-bit architecture, alongside important notes about operand forms and flag behavior. Ideal for programmers and system architects familiarizing themselves with low-level operations.

anson
Télécharger la présentation

Understanding IA-32 Instructions: Arithmetic and Logical Operations for Pentium Processors

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. More IA32 (AKA Pentium) Instructions inc, dec, nop, mul, imul, div, idiv, neg, & not

  2. inc • dst = dst + 1 • Flags affected: O, S, Z (C not affected).

  3. dec • dst = dst – 1 • Flags affected: O, S, Z (C not affected).

  4. nop • (Actually xchg eax, eax.) • Flags affected: none.

  5. mul (unsigned) • edx:eax = eax * src (32-bit version) • Flags affected: • O and C are 0 if edx is zero; O and C are 1 if edx is not zero • S and Z are undefined

  6. imul (signed) • Note: One, two, and three operand forms! • Flags affected: Varies w/ number of operands! • Note: Some accumulator-style instructions. • Note: Some yield 32- or 64-bit results for 32-bit values.

  7. imul (signed) X X

  8. div (unsigned) • eax = edx:eax / r/m32 (32-bit version) • quotient range: 0 to 232 - 1 • edx = edx:eax % r/m32 • Flags affected: all are undefined.

  9. idiv (signed) • eax = edx:eax / r/m32 (32-bit version) • edx = edx:eax % r/m32 • quotient range: -231 to 231 - 1 • Flags affected: all are undefined.

  10. neg

  11. not

More Related