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

  1.  
  2. ;************************************************************************
  3. ; Read_Register                             *
  4. ; Read a value from a register                        *
  5. ; Entry:    Register - Port to read value from            *
  6. ; Exit:     AX     - Value read in                *
  7. ;************************************************************************
  8.  
  9. Register    EQU    [BP+6]
  10.  
  11.     PUBLIC    Read_Register
  12.  
  13. Read_Register    PROC FAR
  14.     PUSH    BP
  15.     MOV    BP,SP
  16.     MOV    DX,Register        ;Fetch register address
  17.     IN    AL,DX            ;Read value
  18.     XOR    AH,AH
  19.     POP    BP
  20.     RET    2
  21. Read_Register    ENDP
  22.