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 >
Wrap
Assembly Source File
|
1988-04-16
|
514b
|
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+6]
PUBLIC Read_Register
Read_Register PROC FAR
PUSH BP
MOV BP,SP
MOV DX,Register ;Fetch register address
IN AL,DX ;Read value
XOR AH,AH
POP BP
RET 2
Read_Register ENDP