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,411 of 4,675    |
|    Robert to R.Wieser    |
|    Re: FPU (x87) code debugging.    |
|    09 Aug 21 13:08:37    |
      From: redelm@nospicedham.ev1.net.invalid              R.Wieser wrote in part:       > Robert,       >> Well, please make sure the pointer is correct       >       > :-) And how do you propose that should be done ?       > It sounds like a great idea, but ...              Walk before you run, when in trouble, drop back. Before trying       a potentially troublesome instruction like FXSAVE, use MOV.       Even hand-assemble from hex if those facilities are in doubt:               MOV EAX, "pointer" ; to see if you can read loc        MOV "pointer", EAX ; to see if you can write                     >> (trash easily gets caught in the upper bits in mixed-mode)       >       > Somewhere along the line I forgot to mention that I was programming in 32-bit       > mode (under Win XP). So, no mixed mode and no trash in the upper bits.              I don't think XP does 64, but the CPU might. The upper-upper could       get trash. ISTR needing to set something to get IN/OUT to work.                     >> Ah, but circularity is achieved by masking, 8=0 when masked at 3bits.       >       > Well ... It /can/ be achieved that way, but only under       > certain conditions (related to origin and size). :-)              Zero origin, power-of-two size. Check on both.       Ever wonder why there are so many buffers this way?              > The problem has been located though : I simply used the wrong R/M value       > while hand-encoding the FXSAVE command (likely mixing up the 16 bit table       > with the 32 bit one). IOW, I was providing the target addres in a certain       > register while the command expected it in another register/form.              Debugging with MOV test (hand-assembled) could have caught.              -- Robert              --- 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