flat assembler
Message board for the users of flat assembler.

Index > Windows > FPU Float FADDP

Author
Thread Post new topic Reply to topic
Kinex



Joined: 16 Jul 2004
Posts: 32
Kinex
I have a question about the FPU Instructions I got some info now from the
a site and came up with some code. If there is anyone who is fimiliar with
FPU Instructions can you tell me if this would work?

I have the two floats 1 and 2
I want to add them and store the result at FRESULT?

Code:
FLOAD1 dd 1.0
FLOAD2 dd 2.0
FRESULT dd ?

FLD [FLOAD1]
FLD [FLOAD2]
FADDP
FST FRESULT ;pop from top of the stack to a 32Bit REgister     


Regards,
Kinex

Edit: Sorry changed [FRESULT] to FRESULT Wink
Post 30 Dec 2005, 02:43
View user's profile Send private message Reply with quote
Kinex



Joined: 16 Jul 2004
Posts: 32
Kinex
Ok forget it.. it works nice Wink
Post 30 Dec 2005, 03:35
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.