Built-in BIOS function definitions
This section provides definitions for the following built-in functions: Initialize I/O,
Write I/O, and Read I/O. These functions can only be used with DOS operating
systems. If you use a different operating system, the functionality can still be used
by your application but must be integrated into your software.
Initialize I/O
Function: efh
Subfunction: 00h
Purpose:
To set the directions and to program the
initial values of an I/O port.
Calling registers:
Ah
efh
AL
00h
DI
Port A configuration
Initial Data Direction Mask
xxxxxxxx
xxxxxxxxB
direction: 1=output, 0=input
BX
Port B configuration
Initial Data Direction Mask
xxxxxxxx
xxxxxxxxB
direction: 1=output, 0=input 0->input
CX
Port C configuration
Initial Data Direction Mask
xxxxxxxx
xxxxxxxxB
direction: 1=output, 0=input
DX
ffffh
AL
Error
code
Comments:
This function is used to initialize the
I/O before normal use.
Programming example:
/* Inline assembly code for Borland C++ 3.1 */
asm {
mov
ax,0ef00h
mov di,00ffh
/*port A all outputs,
init data=all 0’s */
mov bx,55ffh
/*port B all outputs,
init
data=55h*/
mov cx,0000h
/*port C all inputs*
mov
dx,0ffffh
int
17h
}
Write I/O
Function: efh
Subfunction: 01h
Purpose:
To write a value to an I/O port.
Calling registers:
AH
efh
AL
01h
DI
Port A mask and data
70
Содержание 5266
Страница 18: ...Figure 2 1 5266 component diagram top 18 ...
Страница 19: ...Figure 2 2 5266 component diagram bottom 19 ...
Страница 20: ...Figure 2 3 5266 dimensions inches 20 ...
Страница 21: ...Figure 2 4 5266 dimensions mm 21 ...