110 likes | 258 Vues
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.
E N D
More IA32 (AKA Pentium) Instructions inc, dec, nop, mul, imul, div, idiv, neg, & not
inc • dst = dst + 1 • Flags affected: O, S, Z (C not affected).
dec • dst = dst – 1 • Flags affected: O, S, Z (C not affected).
nop • (Actually xchg eax, eax.) • Flags affected: none.
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
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.
imul (signed) X X
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.
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.