|
-
Nov 2nd, 2000, 06:14 PM
#1
Thread Starter
Frenzied Member
Say I want to compare 2 floaring point numbers, I have a number in st(7) and a number in st(0), I want to compate st(7)with st(0) and pop st(0), then jump if st(0) was greater than st(7).
So I should use fcomp, I've got that much, but then what, do I just use ja or is there a special thing I have to do?
-
Nov 3rd, 2000, 03:49 PM
#2
Monday Morning Lunatic
I think it sets the comparison flag in the same way as cmp, so the normal jump commands can be used.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Nov 4th, 2000, 06:28 AM
#3
Thread Starter
Frenzied Member
again you're too late parksie, you're wrong as well.
fcomp sets the FPU status word, which you can copy to ax using fstsw, then you have to use test or bt or something to check the relevent bits.
-
Nov 4th, 2000, 10:40 AM
#4
Monday Morning Lunatic
Ooops...
Oh well - it's what I managed to extract from the rather minimal docs I have...anyway, you've got it sorted now, so that's okay.
(notes down info for future reference) <-- see? learn something new every day
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Nov 4th, 2000, 01:25 PM
#5
Thread Starter
Frenzied Member
The Art Of Assembler has some pretty good info on it, so does intel, there's links to AoA all over this site so I won't bother looking it up. just in case you need to do some floating point stuff
-
Nov 4th, 2000, 01:32 PM
#6
Monday Morning Lunatic
I found a really neat trick for learning how to do certain things with asm...
Write it in C++, then turn full listings on in the project options. Out comes a load of asm code .
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Nov 4th, 2000, 02:13 PM
#7
Thread Starter
Frenzied Member
I can't find that, I use the dissasembly window when it's debugging (run it and put a break point in, then right click on the code you want and hit go to dissasembly, and there's all your code.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|