
;************************************************************************
; Write_Register                                                        *
; Write a value to a register                                           *
; Entry:        Register - Output port to write value to                *
;               Value    - Value to output                              *
;************************************************************************

Register        EQU     [BP+4]
Value           EQU     [BP+6]

        PUBLIC  _Write_Register
_Write_Register PROC NEAR
        PUSH    BP
        MOV     BP,SP
        MOV     DX,Register             ;Fetch register address
        MOV     AL,Value
        OUT     DX,AL
        POP     BP
        RET
_Write_Register ENDP
