The MASM Forum

General => The Campus => Topic started by: roivic on March 02, 2013, 02:26:57 PM

Title: Multiplication on real numbers
Post by: roivic on March 02, 2013, 02:26:57 PM
I was told to create an 8086 ALP to calculate the average of a circle, My question is: How can i multiply the radius collected with PI(3.142) which is a real number.
Title: Re: Multiplication on real numbers
Post by: jj2007 on March 02, 2013, 04:08:59 PM
include \masm32\include\masm32rt.inc
.code
start:
   push 100
   fldpi
   fimul dword ptr [esp]
   fistp dword ptr [esp]
   pop eax
   inkey str$(eax)
   exit
end start

Now go and read the attachment. And remember there is a "no homework rule" here ;-)
Title: Re: Multiplication on real numbers
Post by: roivic on March 05, 2013, 02:19:26 AM
Hehe.. thanks