Sunteți pe pagina 1din 6

Operating Manual

MS DOS card drivers


IN.SYS/OUT.SYS
IN3.SYS/OUT3.SYS

Eppendorf
Netheler Hinz GmbH
D-22331 Hamburg
Phone +49 40-5 38 01-0
Fax
+49 40-5 38 01-556
e-mail: eppendorf@eppendorf.com
eppendorf home page:
http://www.eppendorf.com
Printed in Germany
B 3030 900.285-00/0795

eppendorf is a registered brand name

Contents

Card drivers IN.SYS and OUT.SYS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

1.1

Disk contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

1.2

System requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

1.3

Installation

1.4

Functions for the control of the PC ES bus interface card . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

1.4.1

Preparations

1.4.2

Opening the drivers

1.4.3

Writing into the driver OUT.SYS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

1.4.4

Reading from the driver IN.SYS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

1.4.5

Processing the data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

1.4.6

Closing the drivers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

MS DOS card drivers

.................................................................2

...............................................................3
..........................................................3

1 Card drivers IN.SYS and OUT.SYS

1.1 Disk contents


in.sys
out.sys
in3.sys
out3.sys
The drivers IN.SYS and OUT.SYS work with:
IRQ9 and I/O addresses 500H....50FH (AT version)
and
IRQ2 and I/O addresses 500H....50FH (PC version)
The drivers IN3.SYS and OUT3.SYS work with:
IRQ5 and I/O addresses 300H....30FH

Note:

The basic address and the interrupt request (IRQ) have to be set in accordance with the used
version on the PC ES bus interface card!

1.2 System requirements


System requirement for the drivers IN.SYS/OUT.SYS and IN3.SYS/OUT3.SYS:
MS DOS, version 3.3 or higher

1.3 Installation
Copy IN.SYS and OUT.SYS or IN3.SYS and OUT3.SYS into a directory intended for them.
The card drivers have to be entered in the CONFIG.SYS file:
DEVICE=[drive:] [\path] \IN.SYS or IN3.SYS
DEVICE=[drive:] [\path] \OUT.SYS or OUT3.SYS

MS DOS card drivers

1.4 Functions for the control of the PC ES bus interface card


The access to the drivers is effected by means of IOCTL (interrupt 21H, function 44H). The following
subfunctions are supported:

OUT.SYS

IN.SYS

- Initialization

12

- IOCTL output

- Initialization

- IOCTL input

The use of the drivers by C-programs is described in the following, standard lib functions are used:

1.4.1 Preparations
Binding the header file STDIO.H
#include<stdio.h>
Definition of the pointers on a structure of the type FILE:

FILE *netin, *netout;

1.4.2 Opening the drivers


netin
netout
in which case

= fopen ("netzin", "rt");


= fopen ("netzout", "wt")

"netzin"

- string

- internal driver name

"netzout"

- string

- internal driver name

"rt"

- string

- open for reading

"wt"

- string

- open for writing

A zero pointer as a return value indicates an error.

Example:
if ((netin=fopen ("netzin", "rt")) ! = NULL)
{
if ((netout=fopen ("netzout", "wt")) == NULL)
{
printf ("\n error when opening the ES bus output driver");
dummy = fclose (netin);
}
}
else printf ("\n error when opening the ES bus entry driver");

Note:

Mode "t" is not an ANSI standard but a Microsoft extension. In this mode of operation CR/LF
combinations are converted into individual LF characters for Input, and vice versa individual LF
characters are converted into CR/LF-combinations for Output".

MS DOS card drivers

1.4.3 Writing into the driver OUT.SYS


Preparation of the data:
The driver expects the control character CR (carriage return) as the end of a block. Since this character can
be contained in the data block itself, the data block has to be converted into a hex format, i.e. every byte is
converted into two bytes in the range of 0..9, A...F.

Example:

CR

= 0x0d

=>

'0D'

= 0x30, 0x44

'1'

= 0x31

=>

'31'

= 0x33, 0x31

'z'

= 0x7A

=>

'7A'

= 0x37, 0x41

Driver selection

fputc (ch, netout);


in which case

ch

int

character to be output

netout

FILE*

Pointer on FILE structure

Example:
{
char *buffer;

points at the text to be output

int dummy;

receives int return values

Output bytes until the string end marking is found. At this position the standard library function FPUTS
() causes problems if more than 128 characters are to be output.
while (*buffer ! = '\0')
{
dummy = fputc (*buffer++, netout);
}
And subsequently transmit a CRLF so that the module recognizes the end of the message.
dummy = fputc ('\n', netout);
fflush (netout);
}

MS DOS card drivers

1.4.4 Reading from the driver IN.SYS


fgets (buffer, max., netin)
in which case

buffer

char*

Pointer on target memories

maximum

int

Length of the target memory

netin

FILE*

Pointer on FILE structure

Example:
{
static char buffer[MAXBUFF];
/*receives transferred report */
/* leave two bytes as a reserve, because of CR and LF */

if (fgets (buffer, MAXBUFF - 2, netin) ! = NULL)


{
/* process fed report */
}
}

1.4.5 Processing the data


The driver IN.SYS delivers a received data block analogously to OUT.SYS in the hex format. For further use
the block has to be converted back , i.e. two bytes in the range of 0...9, A...F are converted into one byte.

Example

'0D'

= 0x30, 0x44

=>

CR

= 0x0d

'31'

= 0x33, 0x31

=>

'1'

= 0x31

'7A'

= 0x37, 0x41

=>

'z'

= 0x7A

1.4.6 Closing the drivers


{
int dummy;

/* receives int return values */

dummy = fclose (netin);


dummy = fclose (netout);
}

MS DOS card drivers

S-ar putea să vă placă și