fldpi ; Load pi into st(0). pushd 180 fild DWORD PTR [esp] ; Load 180 into st(0). Pi is now st(1). fdiv ; Divide pi by 180, store result in st(0). fld oldFovValue ; Load the old FOV into st(0). Move the divided result into st(1). fmul ; Multiply the old FOV value by st(1) and store it in st(0). pushd 2 fild DWORD PTR [esp] ; Load 2 into st(0). Multiplied result is now st(1). fdiv ; Divide the multiplied result by 2 and store it in st(0). fptan ; Calculate the tangent of st(0). Store 1 in st(0) and the calculated angle in st(1). fstp st ; Pop 1 off of the stack. fild aspect1 ; Load the source LCM aspect height. fild aspect2 ; Load the destination LCM aspect height. fdiv ; Divide aspect 1 by aspect 2. fmul ; Multiply by the calculated tangent. fld1 ; Load 1 on to the stack. fpatan ; Calculate the inverse tangent. pushd 2 fild DWORD PTR [esp] ; Load 2 on to the stack. fmul ; Multiply the inverse tangent by 2. pushd 180 fild DWORD PTR [esp] ; Load 180 on to the stack. fldpi ; Load pi on to the stack. fdiv ; Divide 180 by pi. fmul ; Multiply by the inverse tangent(*2). fstp newFovValue ; Store st(0).