;*DDK*************************************************************************/
;
; COPYRIGHT    Copyright (C) 1995 IBM Corporation
;
;    The following IBM OS/2 WARP source code is provided to you solely for
;    the purpose of assisting you in your development of OS/2 WARP device
;    drivers. You may use this code in accordance with the IBM License
;    Agreement provided in the IBM Device Driver Source Kit for OS/2. This
;    Copyright statement may not be removed.;
;*****************************************************************************/
;/*****************************************************************************
;*
;* SOURCE FILE NAME = CLISTI.INC
;*
;* DESCRIPTIVE NAME = cli and sti instructions translation
;*
;*
;* VERSION      V2.0
;*
;* DATE         *
;*
;* DESCRIPTION  These macros translate cli and sti instructions (lower case)
;*              to include bracing jumps in an attempt to avoid code page
;*              faults during the cli sti pair.
;*
;* FUNCTIONS    NONE
;*
;* NOTES        NONE
;*
;* STRUCTURES   NONE
;*
;* EXTERNAL REFERENCES
;*
;*              NONE
;*
;* EXTERNAL FUNCTIONS
;*
;*              NONE
;*
;* CHANGE ACTIVITY =
;*   DATE      FLAG        APAR   CHANGE DESCRIPTION
;*   --------  ----------  -----  --------------------------------------
;*   mm/dd/yy  @Vr.mpppxx  xxxxx  xxxxxxx
;*
;*****************************************************************************/

IF1

lbl macro n,m
n&m:
endm

jmplbl macro n,m
jmp short n&m
endm

casesensitive equ <wibblewobble>

ifdef CASESENSITIVE
 .err
 %out !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 %out !                                                 !
 %out ! clisti.inc requires full case sensitivity....   !
 %out ! Use -ml option on masm comand line.             !
 %out !                                                 !
 %out !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 .err
endif


cli macro
        local   uniqueLabel

uniqueLabel:

thisLabel equ <uniqueLabel>

jmplbl  PostSti_ %thisLabel

lbl     PreCli_ %thisLabel

        CLI

endm



sti macro

        STI

jmplbl  PostCliSti_ %thisLabel

lbl     PostSti_ %thisLabel

jmplbl  PreCli_ %thisLabel

lbl     PostCliSti_ %thisLabel

endm


ENDIF ; if1
