uace0@uhnix2.uh.edu (Michael B. Vederman) (07/25/89)
Here is our document describing access to DC-PORT. Please note that the
document has changed slightly (shows rsconf for 38400) but I do not have the
updated doc on hand.
A five port version is available at this time.
Programs which currently support DC-PORT are MichTron BBS v 3.0. Beckemeyer's
MTC Shell is now having a device handler added to support DC-PORT. The
upgrade to Flash (version 2.0) will have DC-PORT support. FoReM Elite may
possibly be released with support for DC-PORT (Matt is experiencing various
hardware failures preventing a port to the ST). STalker terminal accessory.
Please direct all questions to us, we are more than happy to answer!
- mike
OVERVIEW
========
DC-PORT is a serial expansion cartridge for your Atari ST computer. With
DC-PORT you get two more RS232 serial ports. DC-PORT does not support the
CTS/RTS and RING DETECT lines. If you need these, use the main ST serial
port.
INSTALLATION
============
1) Turn off your computer.
NOTE:
Always turn the POWER switch OFF when inserting or removing DC-PORT.
This will protect the electronic components and prolong the life of
your ATARI ST computer.
2) Plug the edge connector of DC-PORT into the cartridge port.
3) Plug the cable, with female DB25 connector, coming from DC-PORT into
the ST's main serial port. The label on DC-PORT identifies this cable
as: To ST
4) Plug the 3 DC-PORT cables into DC-PORT using the end with RJ12 (phone)
jack connector.
NOTE:
DO NOT attempt to plug your telephone line directly into DC-PORT.
Doing so WILL damage DC-PORT, and void your warranty. DC-PORT is
designed to be used with an RS232 compatible device. The RJ12
connectors are *NOT* designed for direct connection to the telephone line.
5) Connect the male DB25 connectors to any RS232 compatible device, such as
a modem, scanner, printer, another computer, etc.
SPECIFICATIONS
==============
DC-PORT supports the following RS232 lines:
(numbers indicate the RJ12 pin number)
TRANSMIT (1)
RECEIVE (2)
DATA TERMINAL READY [DTR] (3)
NOT USED (4)
CARRIER DETECT (CD) (5)
GROUND (6)
USAGE
=====
To use DC-PORT, you must either be using a DC-PORT compatible program, or
you must have the DC-PORT device handler installed.
The program DCPORT.PRG adds devices to the ST's BIOS corresponding to the
two extra ports. Access to the ports is provided through BIOS compatible
commands.
To INSTALL the DC-PORT handler, copy DCPORT.PRG into the AUTO folder of your
boot disk.
When DCPORT.PRG runs, it will display a bootup message indicating installation
of the handler, as well as a handler version number. Should an upgrade of
hardware require a change in device access, you would need only replace the
DC-PORT handler program.
PROGRAMMING
===========
Programming to communicate using DC-PORT is provided through BIOS compatible
calls. This section details use of these calls for DC-PORT and the regular
serial port.
----
BIOS
----
These subroutines are accessed using the TRAP #13 call.
All examples are calling sequences from 'C'
Numbers in parenthesis indicate the function number
All the examples will use the following declarations:
#define AUX 0x0002 /* main ST serial port, DC-PORT 0 */
#define DCP0 0x8000 /* DC-PORT 0, main ST serial port */
#define DCP1 0x8100 /* DC-PORT 1 */
#define DCP2 0x8200 /* DC-PORT 2 */
#define DCP3 0x8300 /* DC-PORT 3 */
#define DCP4 0x8400 /* DC-PORT 4 */
char input; /* character input */
long status; /* status - where applicable */
int port; /* DC-PORT select */
port = DCP1;
FUNCTIONS
---------
int Bconstat(dev) (1)
int dev;
Return character-device input status, D0.L will be 0x0000 if no
character is available, or 0xffff if (at least one) character is
available from the device.
Example:
if (Bconstat(port))
input = Bconin(port);
NOTE:
For ease of use, you can OR the value of the DC-PORT select with
the AUX: device number. We will use this syntax throughout the
document.
Example (from above):
if (Bconstat(port|AUX))
input = Bconin(port|AUX);
-------------------
int Bconin(dev) (2)
int dev;
dev is the device number as defined above.
Does not return until a character has been input (busy-wait). It returns
the character value in D0.L, with the high word zero.
Example:
input = Bconin(port|AUX);
-------------------
void Bconout(dev,c) (3)
int dev, c;
dev is the device number as defined above.
Output character 'c' to the device. Does not return until the character
has been written.
Example:
Bconout(port|AUX, 'A');
-------------------
long Bcostat(dev) (8)
int dev;
dev is the device number as defined above.
Returns character output status:
-1 Device is ready to send (no waiting on next device-output call).
0 Device is not ready to send.
Example:
status = Bcostat(port|AUX);
-----
XBIOS
-----
These subroutines are accessed using the TRAP #14 call.
All examples are calling sequences from 'C'
Numbers in parenthesis indicate the function number.
Examples are as above.
FUNCTIONS
---------
long Iorec(devno) (14)
int devno;
Returns a pointer to a serial device's input buffer record. dev is one of:
devno Device
----- ------
0x0000 RS232 (ST main serial port, DC-PORT 0)
0x8000 DCP0 (DC-PORT 0, ST main serial port)
0x8100 DCP1 (DC-PORT 1)
0x8200 DCP2 (DC-PORT 2)
0x8300 DCP3 (DC-PORT 3)
0x8400 DCP4 (DC-PORT 4)
The structure of the record is:
struct iorec {
long ibuf; /* pointer to buffer */
int ibufsiz; /* size of the buffer */
int ibufhd; /* head index */
int ibuftl; /* tail index */
int ibuflow; /* low-water mark */
int ibufhi; /* hi-water mark */
};
For RS232, an output buffer record immediately follows the input buffer
record. The format of the output buffer record is identical.
'ibuf' points to the device's buffer. 'ibufsiz' is the buffer's size.
'ibufhi' is the buffer's high-water mark. 'ibuflow' is the buffer's
low-water mark.
If flow control is enabled and the number of characters in the buffer
reaches the high-water mark, the ST requests (according to the flow control
protocol) the sender to stop sending characters. When the number of
characters in the buffer drops below the low-water mark, the ST tells the
sender to resume transmission.
The flow control operation is similar for the RS232 output record.
-------------------
long Rsconf(port|speed, flowctl, ucr, rsr, tsr, scr)
int speed, flowctl, ucr, rsr, tsr, scr;
This function initializes the rs232 port.
SPEED sets the baud rate for the RS232 port as follows:
SPEED BAUD RATE
----- ---------
0 19200
1 9600
2 4800
3 3600 *
4 2400
5 2000
6 1800
7 1200
8 600
9 300
10 200 *
11 150
12 134
13 110
14 75
15 50 *
FLOW sets the flow control as follows:
FLOW TYPE OF FLOW CONTROL
---- --------------------
0 No flow control (default value)
1 XON/XOFF
2 RTS/CTS *
3 Both XON/XOFF and RTS/CTS *
UCR, RSR, TSR, and SCR set the corrsponding 68901 registers. A -1 for
any one of these parameters will not set the register:
Bit in UCR Meaning
---------- -------
0 Not used
1 Parity 1=even parity, 0=odd parity
2 Parity enable; 1=enabled
3,4 Start/Stop bits:
Bit 4 Bit 3 Start bits Stop bits
----- ----- ---------- ---------
0 0 Do not use
0 1 1 1
1 0 1 1.5
1 1 1 2
5,6 Work length:
Bit 6 Bit 5 Word length
----- ----- -----------
0 0 8 bits
0 1 7 bits
1 0 6 bits
1 1 5 bits
7 Must be set to 1
RSR, TSR, and SCR should be set to -1.
NOTE: Selections indicated with a * are only supported in DCPORT0.
-------------------
offgibit(port|mask) (29)
int mask;
This function sets the DTR line on one of the serial ports.
MASK has a value of $EF:
Offgibit(port|$EF)
-------------------
ongibit(port|mask) (30)
int mask;
This function drops the DTR line on one of the serial ports.
MASK has a value of $10:
Ongibit(port|$10)
------
GEMDOS
------
These subroutines are accessed using the TRAP #1 call.
All examples are calling sequences from 'C'
Numbers in parenthesis indicate the function number.
Examples are as above.
FUNCTIONS
---------
Cauxin(dev) (3) NOTE: The standard GEMDOS call has no parameters.
int dev;
dev is as defined above.
Return a character from the specified serial port (dev).
Example:
input = Cauxin(port);
-------------------
Cauxout(chr) (4)
int chr; NOTE: The standard GEMDOS call specifies a char
Write a character to the serial port defined in the upper byte of the
int 'chr.'
Example:
Cauxout(port|'A'); /* with port = 0x0000 it has no effect */
-------------------
long Cauxis() (18)
Returns -1 [nonzero] if char is available from the main ST serial port;
0 otherwise.
-------------------
long Cauxos() (19)
Returns -1 [nonzero] if char is ready to receive a character, 0 if it is
unavailable (for the main ST serial port).
FOR FURTHER ASSISTANCE
======================
If you require further assistance from us, give our support BBS a call. We
will be more than happy to help you with any difficulties which you find.
WARRANTY
========
DC-PORT is guaranteed to be free from material defects for one year from the
date of purchase.
DC-PORT cables are guaranteed to be from material defects for 30 days from
the date of purchase.
Double Click Software will either replace or repair the defective unit, at
the discretion of Double Click Software.
Under no conditions will Double Click Software be responsible for damaged
caused due to neglect. If the seal on DC-PORT is broken, the warranty is
voided immediately.
Double Click Software is not be responsible for any damage to your equipment,
reputation, profit-making ability or mental or physical condition caused by
the use or misuse of our hardware and/or software.
ADDITIONAL INFORMATION
======================
Mailing address:
Double Click Software
P.O. Box 741206
Houston, Texas 77236-1206
Support BBS:
(713)944-0108
------------------------------------------------------------------------------
This manual and its contents are copyright (c) 1989 Double Click Software.
This manual may be distributed freely so long as it is not edited in any form.
------------------------------------------------------------------------------
--
for (;;) : Use ATARINET, send an interactive
do_it(c_programmers); : message such as:
: Tell UH-INFO at UHUPVM1 ATARINET HELP
University Atari Computer Enthusiasts : University of Houston UACE