Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- TASM 2.x / MASM 6.x Assembly Language - <b>fyl2x y * log2(x) exception flags: p</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
FYL2X             Y * Log2(X)                 Exception Flags: P

FYLOG2X

       Logic:      T1 . ST(1) * Log2(ST)
                   pop stack
                   ST . T1

     FYL2X calculates Y * Log2(X). X comes from ST and Y from ST(1). This
     instruction pops the stack and places Y * Log2(X) in the new ST.

     Operands must be in the range 0 < X < ., -. < Y < +.. You can use
     this formula to convert to other bases:

                                   Log X
                                      2
                         Log X =   ------
                            n      Log n
                                      2

  --------------------------------------------------------------------------
   Operands            Clocks         Bytes           Example
   FYL2X               900-1100         3             FYL2X
  --------------------------------------------------------------------------

See Also: FYL2XP1

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson