;-------------------------------------------------------------------
; 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
                   mov     P1Shdw,ax
                   WPCBax  P1LTCH
                   endm

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

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

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

TSP2               macro   BIT
                   RPCB    P2PIN
                   and     ax,BIT
                   endm

