Log in

View Full Version : Puzzled by FPU


Paddy
June 28th, 2001, 18:04
I am a newbie trying to deepen my understanding of assembly by delving more deeply into a protection scheme I have already cracked using some NOPs.
Immediately before the crucial jump in the programme I have found the following code

FCOMP REAL8 PTR [EBP-00C0]
FSTSW AX
TEST AH,40
The programme jumps to the 'good guy' code when 4000h is in the AX register. According to the Intel web site FCOMP compares the value in the first register of the FPU with the memory location [ebp-00C0] and if the two values are identical 4000h is placed in AX.
What puzzles me is that just before I F10 the FCOMP line the bottom right hand side of the register window shows the contents of EBP-00C0 to be 00000000 while the contents of ST0 is shown as 8 but FCOMP still (ultimately) places 4000h in the AX register.
What is going on here?



Paddy.

eazylife
June 28th, 2001, 19:12
your looking at the fpu registers, as floating point numbers.. and your looking at ebp-c0, in your data window, as a dword ?????

try 'dl ebp-c0' or 'dt ebp-c0' ..

RTFM

hz
June 28th, 2001, 19:35
hiya eazylife,
Why don't we just try and keep it nice and easy round here, the guy just asked a question. Would have saved you some typing and been nicer without the rtfm remark.
What is it round here?, everyone's a master cracker except me and Paddy.
regards

eazylife
June 29th, 2001, 04:41
hmmmm? did i answer his question? did i help? did i add the rtfm to be sarcastic, with a big smiley by the side of it??

sarcastically saying rtfm, see, if i was being evil or cruel or elitest, the only word in my post would have been RTFM

well i can see im not wanted, so i shall fuckoff and not bother trying ..

hz
June 29th, 2001, 08:01
hiya eazylife,
If I have taken your reply as sarcastic when it wasn't meant to be, then I apologise. Who said your not wanted?, of course your wanted here, eveyone is, are you going to get upeset evey time some one misinterprets or disagrees with you?.
regards

hz
June 29th, 2001, 15:26
cmon eazylife,
I was man enough to apologise, are you man enough to accept it?.

Paddy
June 30th, 2001, 06:13
Thanks fellas for the replys.
I was afraid I had started a war there for a while.

When I use dl instead of d as suggested by eazylife there is indeed an 8 in ebp-00c0.

Reading some of your replies on the forum I am wondering, if you guys are newbies, what word is used to describe someone who knows as little as I do.