mov di,00ffh /*port A: no change */
mov bx,8000h /*port B: bit 7 set to 0*/
mov cx,0202h /*port C: bit 1 set to 1*/
mov
dx,0ffffh
int
17h
}
Read I/O
Function: efh
Subfunction: 02h
Purpose:
To read from an I/O port.
Calling registers:
AH
efh
AL
02h
DX
ffffh
Return registers:
AL
Port A data
Ah
Port B data
BL
Port C data
Carry flag cleared if successful
Carry flag set if error
AL
Error
code
Comments:
This function is used to read from the
I/O.
Programming example:
/* Inline assembly code for Borland C++ 3.1 */
asm {
mov
ax,0efoch
mov
dx,0ffffh
int
17h
mov
aData,al
mov
bData,ah
mov
cData,bl
}
76