Assembly code snippets

Back to the snippets overview

Details

Titlepower of X
AuthorThe Svin
Submitted by:The Svin
Date added:2002-03-23 11:25:41
Date modified:2002-03-23 11:25:41

Comments

Calculate power of X

Snippet

    fld power
    fld x
    fyl2x
    fld1
    fld st(1)
    fprem
    f2xm1
    fadd
    fscale
    fxch st(1)
    fstp st
;st0 = X^power