home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
QBasic & Borland Pascal & C
/
Delphi5.iso
/
C
/
Samples
/
C-ASM_VI.ARJ
/
PROGASM.ZIP
/
PROG006.ASM
< prev
next >
Wrap
Assembly Source File
|
1988-04-10
|
789b
|
22 lines
;************************************************************************
; Read_Register *
; Read a value from a register *
; Entry: Register - Port to read value from *
; Exit: AX - Value read in *
;************************************************************************
Register EQU [BP+4]
PUBLIC _Read_Register
_Read_Register PROC NEAR
PUSH BP
MOV BP,SP
MOV DX,Register ;Fetch register address
IN AL,DX ;Read value
XOR AH,AH
POP BP
RET
_Read_Register ENDP