Category : Files from Magazines
Archive   : WDMAY92.ZIP
Filename : 3N05054B

 
Output of file : 3N05054B contained in archive : WDMAY92.ZIP
Listing 2

/*****************************************************/
/* fpumsg.c */
/* -- Module to implement PeekMessage() with a check */
/* of the FPU's status word. */
/*****************************************************/

#include
#include "fpumsg.h"

BOOL
FPeekMessageLpfn(LPMSG lpmsg, HWND hwnd,
WORD wMsgFilterMin, WORD wMsgFilterMax,
WORD wRemoveMsg, LPFN_NOTIFY lpfnNotify)
/*****************************************************/
/* -- PeekMessage() wrapper. */
/* -- Get a message from the queue. */
/* -- Check the FPU's status first, and if we have */
/* racked up exceptions, call lpfnNotify. */
/* -- Makes sure all exceptions are masked after the */
/* call to PeekMessage(), so win87em won't UAE us */
/* if we do generate an exception. */
/* -- lpmsg : Store message here. */
/* -- hwnd : Get message for this window, */
/* NULL for all windows. */
/* -- wMsgFilterMin : Least message. */
/* -- wMsgFilterMax : Greatest message. */
/* -- wRemoveMsg : PeekMessage() flags. */
/* -- lpfnNotify : Callback in case of FPU */
/* exception. */
/*****************************************************/
{
BOOL fGotMessage;
WORD wStatus, wControl;

/* Get the status of the FPU. */
_asm fstsw wStatus;
_asm wait;

/* Get rid of any exceptions. */
_asm fclex;

/* Did an exception occured? */
if (wStatus & 0x003f)
Notify(wStatus, lpfnNotify);

/* Get a message. */
fGotMessage = PeekMessage(lpmsg, hwnd,
wMsgFilterMin, wMsgFilterMax, wRemoveMsg);

/* Mask all exceptions to prevent win87em from */
/* blowing us away. */
_asm fstcw wControl;
_asm wait;
wControl |= 0x003f;
_asm fldcw wControl

return fGotMessage;
}



  3 Responses to “Category : Files from Magazines
Archive   : WDMAY92.ZIP
Filename : 3N05054B

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/