flat assembler
Message board for the users of flat assembler.

Index > DOS > float comparing

Author
Thread Post new topic Reply to topic
veach1



Joined: 16 Jul 2004
Posts: 165
veach1
Hello!
Could somebody help me in comparing several floating point numbers (represented by strings)

_________________
dream of mind creates a monster
Post 26 May 2005, 14:42
View user's profile Send private message Reply with quote
Giedrius



Joined: 13 Feb 2005
Posts: 40
Location: Lithuania
Giedrius
I don't have much experience in assembly (not yet), but I would do it by counting numbers to the point (.) and the one with more of them is bigger. If it is equal, then start checking from left until the end of the string (they're equal then) or until a larger number is found.

_________________
Better to rule in hell, than to be a slave in heaven...
Post 26 May 2005, 18:19
View user's profile Send private message Reply with quote
farrier



Joined: 26 Aug 2004
Posts: 274
Location: North Central Mississippi
farrier
veach1,

Have a look at:

http://ray.masmcode.com/

His fpulib is fairly complete and useful. The code and library are in MASM32 format, but the lib can be used in FASM--I think VORTEX posted a link for using MASM libs with FASM--or can be converted to a DLL. His tutorial is very helpful.

farrier

_________________
Some Assembly Required
It's a good day to code!
U.S.Constitution; Bill of Rights; Amendment 1:
... the right of the people peaceably to assemble, ...
The code is dark, and full of errors!
Post 27 May 2005, 08:56
View user's profile Send private message Reply with quote
veach1



Joined: 16 Jul 2004
Posts: 165
veach1
I shouldn`t use any libs
Post 27 May 2005, 13:17
View user's profile Send private message Reply with quote
farrier



Joined: 26 Aug 2004
Posts: 274
Location: North Central Mississippi
farrier
veach1,

Raymond supplies the source code for the entire library. You could use:

FpuAtoFL - Converts a decimal string to a REAL10 number

FpuComp - Compares two numbers

Prepared by Raymond Filiatreault.

Look at the source for these and they should help you

farrier

_________________
Some Assembly Required
It's a good day to code!
U.S.Constitution; Bill of Rights; Amendment 1:
... the right of the people peaceably to assemble, ...
The code is dark, and full of errors!
Post 27 May 2005, 15:36
View user's profile Send private message Reply with quote
veach1



Joined: 16 Jul 2004
Posts: 165
veach1
thank you!
Post 30 May 2005, 07:30
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.

Powered by rwasa.