Mail Archives: djgpp/1998/05/15/20:51:03
From: | yorka AT dlc DOT fi (Atte Koivula)
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | FPU instructions in NASM
|
Date: | Fri, 15 May 1998 20:49:47 GMT
|
Organization: | Majik
|
Lines: | 18
|
Message-ID: | <355ca863.1204556@news.dlc.fi>
|
NNTP-Posting-Host: | kou74.pp.dlc.fi
|
Mime-Version: | 1.0
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Hi,
I have a problem with FPU instructions in NASM. I'm trying to write a
program that takes a float value as input and then gives the square
root of that value as output (either by returning the result or by
moving it in a variable that has been given as an argument for the
function).
If I understood the idea correctly (by experimenting), I should store
the number into the FPU stack (possibly with fld or something), then
do a 'fsqrt' and then store the output to a variable (fst or something
like that), but I do not know the proper syntax as pieces of example
source code on the subject are scarce to say the least.
I realize that this message should be in an asm newsgroup, but since
many of you use NASM I thought I'd post it here.
-aK
- Raw text -