Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.lang.asm.x86    |    Ahh, the lost art of x86 assembly    |    4,675 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 4,387 of 4,675    |
|    Frank Kotler to R.Wieser    |
|    Re: FPU (x87) code debugging.    |
|    06 Aug 21 13:57:16    |
      From: fbkotler@nospicedham.myfairpoint.net              On 08/06/2021 01:11 PM, R.Wieser wrote:       > Moderator, Frank : I'm not sure if questions about the x87 FPU are permitted       > here. If not than please just discard. If they are than please remove this       > line. :-)              Hi Rudy,       Consider the line removed.       I think x87 is on topic. If necessary, I so rule it. :)       I don't know the answer, though...       Best.       Frank       >       > Hello all,       >       > I've just been writing some basic code to parse a simple float, and realized       > that I had no idea how to check if the x87 FPU was empty after I was done -       > as a simple measure to check if my code cleaned up correctly.       >       > I've been looking at using the ST bits in the FPU status word, but had to       > find that they (unexpectedly) didn't end at zero after I done my thing :       >       > minimal example:       >       > fld1 ;Load       > fld1       >       > fstp st(2) ;Swap ST(0) and ST(1) <-- this is the culprit       >       > fstp st(0) ;Discard       > fstp st(0)       >       > At this point all the ST bits are set, indicating a minus one, not zero.       >       > My questions at this point are:       >       > 1) Have I done anything wrong in the above ? I don't think so, but "you       > never know" ....       >       > 2) How do I, for debugging purposes, check the FPU stack ?       >       > Regards,       > Rudy Wieser       >       >              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca