Windows


Windows - 6


*/

int FAR PASCAL WEP(int fSystemExit)

/*>*/

{

fSystemExit = fSystemExit

/* -W4 */

return 1 ; /* */

}

 

int EXPORT FAR PASCAL BogusCheck(void)

{

BYTE bPortVal ;

 

_asm {

mov dx,FAKE_PORT

in al,dx ; ?

mov bPortVal,al

}

 

return ((bPortVal & 0x80) == 0) ;

/* TRUE, */

 

}

 

void EXPORT FAR PASCAL BogusStart(HWND hWnd, WPARAM wParam)

{

wParamEvent = wParam ;

hWndEvent = hWnd ;

 

if (!lpfnPrevISR)

{

/* ISR */

_asm cli

lpfnPrevISR = GetPMVector(INT_DEV) ;

SetPMVector(INT_DEV,(FARPROC)IntSvcRtn) ;

_asm sti

 

/* ISR

* */

 

lpfnPrevRMISR = DPMI_GetRMVector(INT_DEV) ;

hReflector = AllocIntReflector(INT_DEV,(FARPROC)BogusCallback) ;

 

/* -

* */

_asm {

cli

in al,PIC01 ;

and al,NOT INT_MASK

out PIC01,al

sti

mov al,NOT FAKE_CTL_START

mov dx,FAKE_PORT

out dx,al ; -

}

}

}

 

int EXPORT FAR PASCAL BogusGetEvent(void)

{

WORD wCountRet ;

 

_asm {

mov ax,SEG wCount

mov es,ax

xor ax,ax

xchg ax,es:wCount ; ,

mov wCountRet,ax

}

 

return wCountRet ;

}

 

void EXPORT FAR PASCAL BogusStop(void)

{

hWndEvent - 0x0000 ; /* ISR " "*/

if (!lpfnPrevISR)

return ; /* , */

 

_asm {

mov dx,FAKE_PORT

l1:

in al,dx

rcr al,1

jnc l1 ; ,

 

cli

in al,PIC01

or al,INT_MASK

out PIC01,al ;

sti

}

 

DPMI_SetRMVector(INT_DEV, lpfnPrevRMISR) ;

/* */

FreeIntReflector(hReflector) ;

/* */

SetPMVector(INT_DEV, lpfnPrevISR) ;

/* */

 

lpfnPrevISR = NULL ;

}

/* */

_____________________________________________________________________

 

4. bogus.c




- -  - -  - -