I/O input program examples
To configure ports A and C as inputs and port B as outputs, issue the following
commands:
OUT 123h, 2 ‘Direction Mode’
OUT 120h, 0
OUT 121h, FF
OUT 122h, 0
OUT 123h, 3 ‘Operation Mode’
To read ports A and C, issue the following commands:
PORTA = INP(120h) (port A)
PORTC = INP(122h) (port C)
Enhanced INT 17h function definitions
This section provides definitions for the following functions using the INT17
handler, I17HNDLR.EXE: Initialize I/O, Write I/O, and Read I/O.
I17HNDLR.EXE is a TSR program and is called out by the XE–800 SBC BIOS. By
default, when the “X” jumper is on, the INT17 extended BIOS is operational. If the
“X” jumper is removed and DOS is the operating system, the I17HNDLR.EXE TSR
can be used. Once executed, the TSR is active, but it must be executed each time
the system is rebooted. Copy the I17HNDLR.EXE utility to your boot device and
add it to your AUTOEXEC.BAT.
Note
The INT17 functions can only be used with DOS operating systems. If you use a
different operating system, the INT17 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
66
Содержание XE-800
Страница 18: ...Figure 2 1 XE 800 SBC component diagram top 18 ...
Страница 19: ...Figure 2 2 XE 800 SBC component diagram bottom 19 ...
Страница 20: ...Figure 2 3 XE 800 SBC dimensions 20 ...
Страница 89: ...MOV AX 0fb0bh MOV DX 0ffffh INT 17h MOV aData AL if aData 1 printf U1 jumper is ON n 89 ...