110 likes | 244 Views
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.
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.