Common undocumented instructions
Copyright 2000 by G.Mazur
Last update: 2000-09-18
-
SALC (SETALC)
-
SALC instruction is present in all x86 processors excluding NEC V-series.
It sets the AL register to 0 of carry flag is cleared and to 0xff if carry
flag is set.
-
UMC CPUs are believed to implement specific CPU detection method based
on SALC. If SALC is executed in these CPUs with FS: prefix prepended, the
contents of EAX is set to some magic value.
-
AAM and AAD
-
AAM and AAD instructions are in fact 2-byte instructions, with immediate
argument encoded in the second byte. The argument is used as a divisor/multiplicand.
The default "no argument" form is translated by assemblers in such way
that the argument has the value of 10, making it "decimal correction".
Other values may be used to perform division and multiplication by different
factors. This behavior is fully documented in current Intel manuals. NEC
V-series CPUs do not decode the second byte, treating all forms of AAM
and AAD as default, with argument being equal to 10.