home bbs files messages ]

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,397 of 4,675   
   R.Wieser to All   
   Re: FPU (x87) code debugging.   
   08 Aug 21 10:11:47   
   
   From: address@nospicedham.not.available   
      
   Robert,   
      
   > It might have some safeguards against executing data :)   
      
   I've used the "trick" before, so I don't think so.  Currently I'm torn   
   between the posibilities that the processor I'm using might not be having   
   that command, that I'm simply bungling up or that there is some kind of   
   memory alignment involved (the latter one would not be the first time I've   
   run into it).   
      
   Is there any possibility you could take a look at and post what code gets   
   generated for an "FXSAVE {register pointer}" ?   
      
   >> I don't get that - why only the first one, and why would   
   >> it clobber (the value at) the stack top ?   
   >   
   > The stack is eight FP registers, any load pushes the one   
   > on the top into the bit bucket.   
      
   True.  But such a push would only clobber anything if the (circular) stack   
   is completely full.   
      
   > Actually, I believe the registers are a circular file,   
      
   It has to be, as my example code works : after the second FLD1 the TOS is 6.   
   But I can still execute a FSTP ST(2) ,which seemingly points at 6+2 = 8.   
      
   > and the load overwrites and decrements TOS.   
      
   The info to, for instance, FLD mentions decrementing first, than store   
   (which is why I didn't understand your "clobbering" remark).   
      
   > Aren't those three bits (0-7) the Top-of-Stack pointer?   
      
   Yep.    I was assuming that that value would (implicitily) tell me how many   
   values where placed on the stack.   Turns out it doesn't.   :-\   
      
   > People sometimes compare the FPSW with the x86 flags register.   
   > It is not.   
      
   Similar perhaps (both contain status flags), but (ofcourse) not the same.   
      
   > 34 years ago I wrote an extention to MS-DOS DEBUG.COM   
   > to examine the x87.   
      
   I'm not sure what you mean with an 'extension' (wasn't aware that Debug   
   supported such a thing), but years ago I wrote something for it (using   
   memory patching) so it could deal with a few more opcodes.   
      
   > Converting binaryFP to decimal FP was hard.   
      
   Thats something I still have to take a look at.  Just not at this moment.   
   :-)   
      
   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