home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / sys / intel / 2193 < prev    next >
Encoding:
Text File  |  1992-11-09  |  1.9 KB  |  51 lines

  1. Newsgroups: comp.sys.intel
  2. 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
  3. From: pfk@rz.uni-jena.de (Frank Klemm)
  4. Subject: Re: Undocumented instructions in x86 CPUs
  5. Message-ID: <1992Nov09.162920.213@rz.uni-jena.de>
  6. Sender: pfk@rz.uni-jena.de (Frank Klemm)
  7. Reply-To: pfk@rz.uni-jena.de (Frank Klemm)
  8. Organization: Friedrich-Schiller-University Jena, Germany
  9. References: <mostert.51@cs.sun.ac.za> <FH==sq#@engin.umich.edu> <15341@auspex-gw.auspex.com>
  10. Date: Mon, 09 Nov 1992 16:29:20 GMT
  11. Lines: 38
  12.  
  13.  
  14. In article <15341@auspex-gw.auspex.com>, guy@Auspex.COM (Guy Harris) writes:
  15. |> 
  16. |> In addition, AAM is claimed to take 17 cycles in the table on page E-5,
  17. |> and an unsigned divide is claimed to take - surprise, surprise - 14 to
  18. |> 17 cycles with a one-byte operand.
  19. |> 
  20. |> Sounds as if AAM was - at least in the implementations on which you
  21. |> tried it - really the "divide AL by a one-byte immediate operand,
  22. |> stuffing the quotient into AH and remainder in AL" instruction....
  23. |> 
  24. |> 10 hex is 16 decimal, and if D4 10 does a base-16 AAM, then it would be
  25. |> 
  26. |>     AH = AL >> 4
  27. |>     AL = AL & 0xF
  28. |> 
  29. |> Try it with hex 11, and see if it does
  30. |> 
  31. |>     AH = AL / 17
  32. |>     AL = AL MOD 17
  33. |> 
  34. |> Note, though, that they may have cut corners in future implementations,
  35. |> such as the 586^H^H^HPentium, so that hex A is the only operand that
  36. |> works correctly.
  37. |> 
  38. |> The same, of course, may well apply to *other* undocumented
  39. |> instructions; programmer, beware!  (What's Latin for "programmer"? :-))
  40. |> I've heard a claim that the bit-field instructions didn't completely
  41. |> work, even on the 386; I've no idea whether there's any truth to that
  42. |> claim or not.
  43. |>
  44. This instruction must be supported in future development. Reason is that Borland
  45. uses this trick in it libraries. If this instruction is not supported, many program
  46. do not run. I think I'm right.
  47.  
  48. Frank
  49.  
  50. examples: printf, scanf ...
  51.