home *** CD-ROM | disk | FTP | other *** search
/ QBasic & Borland Pascal & C / Delphi5.iso / C / Samples / C-ASM_VI.ARJ / PROGASM.ZIP / PROG003.ASM < prev    next >
Assembly Source File  |  1988-04-10  |  793b  |  22 lines

  1.  
  2. ;************************************************************************
  3. ; Write_Register                                                        *
  4. ; Write a value to a register                                           *
  5. ; Entry:        Register - Output port to write value to                *
  6. ;               Value    - Value to output                              *
  7. ;************************************************************************
  8.  
  9. Register        EQU     [BP+4]
  10. Value           EQU     [BP+6]
  11.  
  12.         PUBLIC  _Write_Register
  13. _Write_Register PROC NEAR
  14.         PUSH    BP
  15.         MOV     BP,SP
  16.         MOV     DX,Register             ;Fetch register address
  17.         MOV     AL,Value
  18.         OUT     DX,AL
  19.         POP     BP
  20.         RET
  21. _Write_Register ENDP
  22.