home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.intel
- Path: sparky!uunet!mcsun!Germany.EU.net!rrz.uni-koeln.de!unidui!math.fu-berlin.de!Sirius.dfn.de!hpux.rz.uni-jena.de!pfk
- From: pfk@rz.uni-jena.de (Frank Klemm)
- Subject: Re: Undocumented instructions in x86 CPUs
- Message-ID: <1992Nov09.162920.213@rz.uni-jena.de>
- Sender: pfk@rz.uni-jena.de (Frank Klemm)
- Reply-To: pfk@rz.uni-jena.de (Frank Klemm)
- Organization: Friedrich-Schiller-University Jena, Germany
- References: <mostert.51@cs.sun.ac.za> <FH==sq#@engin.umich.edu> <15341@auspex-gw.auspex.com>
- Date: Mon, 09 Nov 1992 16:29:20 GMT
- Lines: 38
-
-
- In article <15341@auspex-gw.auspex.com>, guy@Auspex.COM (Guy Harris) writes:
- |>
- |> In addition, AAM is claimed to take 17 cycles in the table on page E-5,
- |> and an unsigned divide is claimed to take - surprise, surprise - 14 to
- |> 17 cycles with a one-byte operand.
- |>
- |> Sounds as if AAM was - at least in the implementations on which you
- |> tried it - really the "divide AL by a one-byte immediate operand,
- |> stuffing the quotient into AH and remainder in AL" instruction....
- |>
- |> 10 hex is 16 decimal, and if D4 10 does a base-16 AAM, then it would be
- |>
- |> AH = AL >> 4
- |> AL = AL & 0xF
- |>
- |> Try it with hex 11, and see if it does
- |>
- |> AH = AL / 17
- |> AL = AL MOD 17
- |>
- |> Note, though, that they may have cut corners in future implementations,
- |> such as the 586^H^H^HPentium, so that hex A is the only operand that
- |> works correctly.
- |>
- |> The same, of course, may well apply to *other* undocumented
- |> instructions; programmer, beware! (What's Latin for "programmer"? :-))
- |> I've heard a claim that the bit-field instructions didn't completely
- |> work, even on the 386; I've no idea whether there's any truth to that
- |> claim or not.
- |>
- This instruction must be supported in future development. Reason is that Borland
- uses this trick in it libraries. If this instruction is not supported, many program
- do not run. I think I'm right.
-
- Frank
-
- examples: printf, scanf ...
-