;-------------------------------------------------------------------
; MACRO
;-------------------------------------------------------------------
MMVW               macro   _arg1,_arg2
                   mov     ax,_arg2
                   mov     _arg1,ax
                   endm

OUTPB              macro   _ptr,_data
                   mov     dx,_ptr
                   mov     al,_data
                   out     dx,al
                   endm

INPB               macro   _ptr
                   mov     dx,_ptr
                   in      al,dx
                   endm

OUTPW              macro   _ptr,_data
                   mov     dx,_ptr
                   mov     ax,_data
                   out     dx,ax
                   endm

OUTPWax            macro   _ptr
                   mov     dx,_ptr
                   out     dx,ax
                   endm

INPW               macro   _ptr
                   mov     dx,_ptr
                   in      ax,dx
                   endm

WPCB               macro   _ptr,_data
                   OUTPW   _ptr,_data
                   endm

WPCBax             macro   _ptr
                   OUTPWax _ptr
                   endm

RPCB               macro   _ptr
                   INPW    _ptr
                   endm

CLP1               macro   BIT
                   mov     ax,P1Shdw
                   and     ax,not BIT
                   WPCBax  P1LTCH
                   mov     P1Shdw,ax
                   endm

STP1               macro   BIT
                   mov     ax,P1Shdw
                   or      ax,BIT
                   WPCBax  P1LTCH
                   mov     P1Shdw,ax
                   endm

CLP2               macro   BIT
                   mov     ax,P2Shdw
                   and     ax,not BIT
                   WPCBax  P2LTCH
                   mov     P2Shdw,ax
                   endm

STP2               macro   BIT
                   mov     ax,P2Shdw
                   or      ax,BIT
                   WPCBax  P2LTCH
                   mov     P2Shdw,ax
                   endm

CLEP               macro   BIT
                   mov     al,EPShdw
                   and     al,not BIT
                   out     EPort,al
                   mov     EPShdw,al
                   endm

STEP               macro   BIT
                   mov     al,EPShdw
                   or      al,BIT
                   out     EPort,al
                   mov     EPShdw,al
                   endm

