I/O Input Program Examples; Enhanced Int 17H Function Definitions; Initialize I/O - Octagon Systems XE–700 Reference Manual

Table of Contents

Advertisement

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
OUT 120h, 0
OUT 121h, FF
OUT 122h, 0
OUT 123h, 3
To read ports A and C, issue the following commands:
PORTA = INP(120h)
PORTC = INP(122h)

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–700 SBC BIOS. By
default, when the "X" switch is on, the INT17 extended BIOS is operational. If the
"X" switch is Off 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:
Subfunction:
Purpose:
Calling registers:
'Direction Mode'
'Operation Mode'
(port A)
(port C)
efh
00h
To set the directions and to program the
initial values of an I/O port.
Ah
efh
AL
00h
DI
Port A configuration
Initial Data
xxxxxxxx
direction: 1=output, 0=input
BX
Port B configuration
Initial Data
xxxxxxxx
direction: 1=output, 0=input 0->input
CX
Port C configuration
Initial Data
Direction Mask
xxxxxxxxB
Direction Mask
xxxxxxxxB
Direction Mask
67

Advertisement

Table of Contents
loading

Table of Contents