-
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?
-
I think it sets the comparison flag in the same way as cmp, so the normal jump commands can be used.
-
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.
-
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 :)
-
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
-
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 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.