Dec 142017
Replaces DOS CTTY Command. Includes support for fossil.
File GATEWAY2.ZIP from The Programmer’s Corner in
Category BBS Files
Replaces DOS CTTY Command. Includes support for fossil.
File Name File Size Zip Size Zip Type
GATEWAY2.DOC 12897 4310 deflated
GATEWAY2.SYS 2598 1473 deflated

Download File GATEWAY2.ZIP Here

Contents of the GATEWAY2.DOC file

******** **** ******** ******** **** *** ***
** ** ** ** ******** ** ** *** *** ** ** *** ***
** ** ** ** ** *** *** ** ** ******
** *** ** ** ** ***** *** * *** ** ** ****
** ** ******** ** ** *** *** *** ******** ***
******** ** ** ** ** ** *********** ** ** ***
****** ** ** ** ******** *** *** ** ** ***

GATEWAY (c) version 2.00 - July 1987 by Hans D. Kellner

Welcome to Gateway and the world of remote communications! This
program has been written as a utility for System Operators (Sysops) of
bulletin boards. It is now possible to run an external program and be
able to control and see the program, even if the program uses the ANSI
control codes. Input is taken from the COM line and system keyboard.
Output is sent to the system screen and out through the COM line.
Several new features have been added to version 2.00 of Gateway. The
most important is the support of a Fossil driver for input/output.
Also, the program is now one file that is installed with command line
arguments. A few other changes have been added which are explained
below. Now enough chatter... go on to the good stuff!


Gateway has been written in assembly language as a DOS character
device driver. When loaded, it only requires a little over 2K of
memory. It may be run on an IBM PC or compatible using PC/MS DOS. If
the Fossil driver option is used the program is less dependent on the
hardware. When the Fossil option is specified all COM input/output
and keyboard input is done through the Fossil. If direct port writes
are used, COM input/output is done with direct read/writes to the 8250
UART chip. Also, keyboard input will be done through BIOS call 16H.
In both options, screen output is done through BIOS call 10H. If
you have installed Gateway with the Fossil option, then a Fossil
driver must be loaded before Gateway may be used. Two drivers that
have been tested with Gateway are X00 by Ray Gwinn and OPUS!COM by Bob
Hartman. Other Fossil drivers may work with Gateway as long as they
implement the same functions. I used Vincent E. Perriello's document,
'Fundamentals of FOSSIL implementation and use', Draft version 3,
March 7, 1987. Gateway determines the UART port address from the
RS_232_BASE table. This is located in the BIOS data area at address
0040:0000. Gateway only does this when the Direct write option has
been specified. Enough tech stuff...


With the release of version 2.00 of Gateway several changes have
been made. The most important addition is the ability to use a Fossil
driver for input/ouput. This makes Gateway very generic. The program
is now one file that is configured with command line arguments. The
support of COM1 through COM4 has been added. Tabs are expanded on the
system screen. Some of the code has been optimized ( but I doubt if
you will notice ). That is all I can think of at the moment...


The Gateway program is implemented as a device driver. It should
be loaded with your CONFIG.SYS file. An example line from a CONFIG
file is shown below :


This example would load Gateway, defaulting to a Fossil driver for
input/output onto COM line 1. The configuration of Gateway may also be
changed with command line arguments. The arguments accepted are listed
below :

-F { Use Fossil driver (default) }
-D { Use Direct port writes }

-1 { Use COM line 1 (default) }
-2 { Use ' ' 2 }
-3 { Use ' ' 3 }
-4 { Use ' ' 4 }

If no arguments are given, Gateway will default to -F -1 (Fossil driver
on COM1). The -F and -D option are mutually exclusive as are the COM
line values. These arguments are included on the line used to load
Gateway. Here are several examples that could be used in your own
Config.sys file :

DEVICE=C:\GATEWAY.SYS -F -2 { Loads Gateway using Fossil }
{ driver for COM line 2 }

DEVICE=B:\SYS\GATEWAY.SYS -4 -F { Loads Gateway using Fossil }
{ driver for COM line 4 }

DEVICE=C:\GATEWAY.SYS -D -2 { Loads Gateway using Direct }
{ port writes on COM line 2 }

DEVICE=GATEWAY.SYS -D -3 { Load Gateway using Direct }
{ port writes on COM line 3 }

The order of the arguments does not matter. Drive and path are also
optional. After Gateway is loaded, it determines what COM line it has
been installed for. It then sets its device name according to the
line chosen. The names for each line are shown below :

GATE1 { COM line 1 }
GATE2 { COM line 2 }
GATE3 { COM line 3 }
GATE4 { COM line 4 }

Simple and original convention, eh? This allows you to install more
than one copy of Gateway for separate COM lines. A note for PCjr
owners. The external serial port should be addressed as COM1 when the
Internal Modem is not installed. When installed, the Internal Modem
is addressed as COM1 and the external serial port as COM2.

Once loaded, the driver may be activated in two possible ways.
The first method uses the DOS command CTTY. This command changes the
standard input and output console. An explanation of it may be found
in your DOS manual. This command is executed from the DOS prompt. A
few example activations of Gateway are shown below :

C>CTTY GATE1 { Make Gateway COM1 the standard }
{ console driver. }

A>CTTY GATE3 { Same as above except for a }
{ COM3 version of Gateway. }

This will cause all standard i/o to be directed through Gateway.
Notice that the name after the CTTY command is the device name of the
Gateway program. When finished using Gateway, enter the following
command at the prompt :


When this is entered, DOS will restore the screen and keyboard as the
standard input and output devices.

The second method for using the driver involves using the DOS i/o
re-direction symbols. These are explained in the DOS manual. With
this method, the driver is only activated during the execution of the
program being re-directed. An example :


When this command is entered at the DOS prompt, several things take
place. First, DOS determines that all input and output will come from
Gateway (COM2). Then, the second Command processor (COMMAND.COM) is
loaded. Any input or output will now be sent through the Gateway
driver. The Sysop will also be able to see output and can enter input
from the keyboard. When the user 'EXIT's ( or Sysop ) the second, DOS will revert back to the screen and keyboard as the
input/output devices.

Gateway may be used for other applications. Combine Gateway with
a communication program and its 'Drop to DOS' feature. Leave the
program in 'Host' mode, then access your computer remotely. Now Drop
or exit to DOS. A batch file you have created then runs a second and re-directs its i/o with Gateway (example above). You
now have control of your computer!


Only programs that use standard DOS input/output calls may be
re-directed with Gateway. Programs that use BIOS i/o calls or direct
screen writes will not have their i/o re-directed.

Gateway will correctly display ANSI control codes on the Sysop's
screen. The user will receive the codes untouched. Not all the ANSI
codes have been implemented though. The ones not recognized by Gateway
are the following :

DSR - Device Status Report
CPR - Cursor Position Report
SM - Set Mode
RM - Reset Mode
KKR - Keyboard Key Reassignment

A note to programmers who plan to write programs for external BBS
use. Gateway will only re-direct output sent through DOS standard
input/output calls. I would suggest using the ANSI control codes and
the standard i/o calls. This way your program may effectively be used
with Gateway.

Some programs don't work with the re-direction symbols but work
perfectly fine with the CTTY command. Experimentation is the key to

Gateway has been tested on the OPUS Computer-Based Conversation
System, by Wynn Wagner III. It has also been used with several of the
popular communications programs in conjunction with their exit/jump
to DOS commands. It has been run successfully on an IBM PCjr, XT, AT,
and compatibles.

PCjr owners using the direct write option should note the port
assignment convention. The external serial port should be addressed
as COM1 when the Internal Modem is not installed. When installed,
the Internal Modem is addressed as COM1 and the external serial port
as COM2.

The driver should not be activated when there isn't a carrier on
the other end of the modem. If it is, a loop back occurs and any
character output is echoed by the modem and taken as input. If this
occurs turn the modem off. If the modem does not echo characters, or
is made not to,then the driver can be used when no carrier is present.


This program is Public Domain! It may be used freely by anyone
who does not profit from its use. If you profit from MY program
then please send me $5.00 in American currency. You may contact me
at the location noted at the end of this document. Please feel free
to pass Gateway along to others, but you may not sell it. If you wish
to include my program with your software, please contact me first.
This document must be included with the program file (GATEWAY.SYS)
when distributed.


This program is provided as is. You may use it at your own risk.
There is no warranty of any kind or any form covering this program.
The author may in no way be held liable for any damage of any form in
connection or arising from the quality and/or use of this program
and any associated files included with it.


Current versions of Gateway may be downloaded from :

Corwin's Keep OPUS
(FidoNet 114/13)
300-1200-2400 Baud

File requests are accepted. If you wish to contact me, address
mail to Hans Kellner through 114/13. I regularly read the MEADOW
conference mail. You may enter messages there or through NetMail.

Good Luck!

 December 14, 2017  Add comments

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>