Category : Communication (modem) tools and utilities
Archive   : DOSGT114.ZIP
Filename : DOSGATE.DOC

Output of file : DOSGATE.DOC contained in archive : DOSGT114.ZIP
º º
º \ º
º \ º
º \_ Remote operation of MS-DOS º
º º
Copyright (c) 1987,1988,1989

Rich Bono, NM1D
7 Redfield Circle
Derry, New Hampshire 03038

This document describes DOSGATE version 1.14

DOSGATE is a system which allows an industry standard MS-DOS computer
to be controlled via an RS-232 serial port. The port is considered to
be a remote user. The traditional console of the machine is still in
complete control and can supervise and disable/enable the remote user
at will. There is a simple 'Chat' mode that may be entered from the
console to allow 'chatting' with the remote user to give assistance or
instructions. In addition to chat mode, there is a simple terminal
emulator to allow control of a modem or other device connected to the
serial port.

The remote user may be connected directly with an RS-232 terminal,
via a modem over telephone lines, or with a TNC for remote operation
via radio!

The local console may still be used for any software
that normally runs. The remote user is capable of running any
software that does only MS-DOS system calls. Any software that
by-passes MS-DOS and interfaces with the BIOS or directly with the
hardware for I/O will not be usable by the remote user.

This version of DOSGATE is being distributed as SHAREWARE. You are
allowed to use DOSGATE on a trial basis for a limited period of time.
After the trial period, you must register your use of DOSGATE with the
author. Remember, DOSGATE is NOT in the public domain, and as such it
is NOT free software.

If you find DOSGATE helpful in anyway, or you wish to promote
further improvements to DOSGATE, please send an apropriate amount
to the author at the above address. If you send $20.00 or more,
you will be be placed on the update list.

Note: With this version of DOSGATE, Amateur Radio on-the-air users
of DOSGATE are NOT required to send the registration fee.

The author would like to hear from anyone with comments or
suggestions concerning DOSGATE or other projects.

Currently tested with :

Kantronix KAM (version 2.82 through 2.85)
Kantronix KPC-2 (version 2.82 or 2.85)
AEA PK-88 (release 16.May.89)

DOSGATE is implemented as an MS-DOS installable device driver.

Also implemented is a simple terminal emulator which allows one
to communicate with the serial port.

To use the terminal emulator, execute DOSGATE at the DOS
prompt (you will need to rename DOSGATE.SYS to DOSGATE.EXE).

The terminal emulator has one command:

ALT-X - exits the terminal emulator and returns to MS-DOS.

Device driver installation instructions:

DOSGATE has but four runtime commands:

ALT-D will toggle the remote user on and offline. A message
is sent to the console and the remote user to inform about
the change.

ALT-T will toggle the 'terminal' function on/off. A message
is output to confirm the change in mode. This terminal is
only to be used for simple configuration commands to or from
the TNC or modem.

ALT-C will toggle the 'chat' function on/off. A message is
output to both the console and the remote user to inform
about the change. Use this mode to 'talk' to a remote user
that is connected to the system.

ALT-M will toggle the display of 'monitored' packets to the
screen on/off. If the TNC is left in MON ON mode, then monitor
mode will allow the display of information to be displayed
on the screen. Note: This could cause some trouble with
certain TNC's. If you see erratic operation of DOSGATE, try
both turning MON OFF on the TNC, and leave the DOSGATE monitor
mode off.

DOSGATE should be installed as any other MS-DOS device
driver. It also provides for various options.

CONFIG.SYS should contain the line:


This causes the following default options:

Remote user disabled,
Remote user with echo,
1200 baud,
No handshaking,
No Carrier Detect logic
No SET USER= logic

The following options are available at boot time . . .

/R - Remote user enabled at boot time

/E - Disable ECHO of remote users keystrokes
This is useful if the remote users
terminal has local echo.

/2 - Selects COM2 for DOSGATE else COM1 is used

/C - Carrier Detect logic, will do the following when

CD goes TRUE: then execute:
CD goes FALSE: then execute:

Remote user must be enabled!

This allows the programs 'START' and 'END'
to be executed as remote users come and go.
Note: If you don't need these programs,
just copy the DUMMY.COM file to the
name of the programs that are not

/U - Sets the environment variable USER to the ID of
the user from the TNC status message. The
user's input is stored in the USER
environment. Note: FORCES the /C switch on
(see above). Outputs a TRANS to put TNC
into TRANSPARENT mode.

/Bxx - selects baud rate (defaults to 1200 baud)

/B96 - 9600 baud
/B48 - 4800 baud
/B24 - 2400 baud
/B12 - 1200 baud
/B60 - 600 baud
/B30 - 300 baud
/B11 - 110 baud

/H - Enables hardware handshaking - Must have DSR & CTS
to be able to transmit to remote

/A - Absorb LF's that follow CR's to remote.
this is useful if the remote users terminal
automatically does a CR/LF upon receiving a CR.

/P - Enables Packet radio specific options

Remote user enabled at boot time
Remote user Echo disabled
Absorb LF's following CR's to remote
Enable hardware handshaking
Carrier detect logic enabled
SET USER= logic enabled

for example:

DEVICE=DOSGATE.SYS /R /E - Start remote user enabled, and
absorb (disable) ECHO to the
remote user.

DEVICE=DOSGATE.SYS /P - Start DOSGATE for packet radio

DOSGATE should be the only device driver installed for the CON:
device. This means DO NOT install an ANSI.SYS device driver at
the same time.

Note: At this time, DOSGATE does not support ANSI escape sequences
to the local console. ANSI escape sequence support is planned for
a later version (Be sure and register if you desire this). Escape
sequences will work on a remote terminal if it understands them.

When used as a terminal emulator DOSGATE allows the choice of baud
rate to be used.

ie: DOSGATE /b96 - This would start the terminal emulator using
9600 baud over COM1.

Note: To use the DOSGATE program as a simple terminal emulator, you
must rename DOSGATE.SYS to DOSGATE.EXE. Or you may copy DOSGATE.SYS
to some other name with the .EXE extention (such as DG.EXE).

Environment variables are used to assist MS-DOS programs executing
in the DOSGATE environment. The currently defined evironment is:

USER - Set by DOSGATE driver to the ID of the user.
Used by DOSMAIL functions and START.

DRIVES - Used by END.EXE, must be set by AUTOEXEC.BAT

MSG - The disk drive and subdirectory in which the DOSMAIL
and USER.LOG files are stored. Must be set by
AUTOEXEC.BAT. Used by DOSMAIL functions and

SYSTEM - The name of the system. Used by DOSMAIL. Must be

SYSOP - Used by TALK.EXE to inform the remote user of the
name of the person running this DOSGATE node.

The additional programs, "START.EXE", "END.EXE", "DISC.EXE" are
used for helping with managing the user in DOSGATE.

With this version:

Note: Don't try and run START or END unless DOSGATE is
installed, if you do, your system will crash or hang!

START - Can be invoked (see above) automatically.

START will:

1: Open the file 'user.log' in the directory
specified by the environment 'MSG', and write
the contents of the environment 'USER' to that file.

2: Reset the drives listed in the DRIVES environment
variable (see END below for more information).

3: Enable output to the remote user.

4: Look for a file called "WELCOME.DOC" and
output it to the user. This can be to give the
user instructions when he first connects.

5: Invoke 'READ /c' to report if the user has any mail.

6: Invoke the file BEGIN.EXE or BEGIN.BAT if it exists
in the same directory as the START.EXE file.

END - Can be invoked (see above) automatically.

1: END will look in the environment for the
'DRIVES' parameter. This is used to set each
drive to its ROOT ('\') directory, and also to
leave the machine with the default drive set as
indicated. This is used to insure that the
next user will come into DOSGATE at the same
place each time, and not where the last user
left off. Note: The current directory is also set
to it's root.

DRIVES should be set in AUTOEXEC.BAT as follows:


This would set each drive (A:, B:, C:, and D:) to its
root directory, and also set the default drive to
C: (the first drive specified will be the default

2: END will invoke the file STOP.EXE or STOP.BAT if it
exists in the same directory as the END.EXE file.

3: Disable output to the remote user.

DISC - Must be invoked manually.

At this time, DISC will

wait 3 seconds,
issue 3 control-C's,
wait 3 seconds.
issue 'DISC' [CR],
issue 'TRANS' [CR]

This is to place the TNC in command mode, issue
a disconnect request, then place the TNC back into
TRANSPARENT mode until the disconnect is done.
The user may use this command to have DOSGATE initiate
the disconnect.

The DOSMAIL system:

SEND.exe - 'Sends' mail to the designated party, if receiver of
mail is not specified, the sender is
prompted. The sender ID is from the
environment USER. If USER is not
available from the environment, then
the sender is prompted for his ID. The
user can then specify a subject, and
then enter his message. Send
terminates with a CTRL-Z or /EX at the
begining of a line. The mail is stored
in the MSG subdirectory in the file
xx.MSG, where xx is the number of the
message in HEX.

ie: SEND NM1D - To send a message to NM1D.

READ.exe - 'Reads' mail send to the current user. The current
user is defined by the environment USER. If
USER is not found or specified on the command
line, then the invoker is asked to supply the
required ID. If there is any mail waiting for
the user, it is presented to the user, one
message at a time. At the end of each message
the user is given the chance to delete
the message. Optionally, 'READ /c' will
check the MSG directory for a mail file to the
current USER, or if USER is not found, the
invoker is prompted for an ID.

ie: READ - To read mail addressed to the
environment USER.

READ /c - To check for mail addressed to the
environment USER.

READ NM1D - To read possible mail for NM1D.

READ 21 - To read message number 21.

LIST.exe - 'Lists' all (*.msg) files stored in the environment
MSG directory (INDEX.MSG). This is to allow
the user to see what pending mail files exits.

LIST - To list all mail TO, FROM,
the current user, or to ALL

LIST NM1D - To list all mail for NM1D

LIST ALL - To list mail addressed to ALL

LIST /FNM1D - To list all mail (F)rom NM1D

LIST /TNM1D - To list all mail (T)o NM1D

LIST /SDOSGATE - To list all mail that has the
word 'DOSGATE' in the subject

If the 'sysop' desires some other functions to be performed
when a user first connects to DOSGATE, just create your own
program to perform the desired actions, it can replace the
current START.EXE (.EXE, or .COM). The END (.EXE, or .COM)
program is called when a user disconnects. This may also be
replaced. If the 'sysop' desires nothing to be done for
connect/disconnect, and will not be using mail, then the 'CD'
logic may be disabled. If the 'sysop' desires connect
action, but nothing upon disconnect, then simply replace the
END program with one that does nothing (ie: copy DUMMY.COM to

TALK.exe - Allows the remote user to attempt to contact the
sysop for keyboard-to-keyboard communication.
The sysop is informed of the ID of the remote
user. Either can abort the 'talk' session by
sending a CTRL-Z.

Compatibility with DOSGATE:

The general rules for programs that can be run under DOSGATE are
fairly simple, not keeping to the rules may simply cause confused
users, or could cause the system to HANG!

1 - Any program that affects the serial port that DOSGATE is using
for the remote user will probably cause the computer to hang!
DOSGATE is using the serial port with interupts ON, and will probably
not tolerate other programs touching the serial port hardware.

2 - Any program that does not do its I/O through DOS calls will
probably by-pass the remote user. This means that the remote user
will probably be able to start such a program, and all may appear
normal on the local console, but the computer may appear dead as
far as the remote user is concerned.

3 - Any program that issues ANSI escape sequences may work for the
remote user (if his terminal supports the proper escape sequences),
but (with the current version of DOSGATE) will not work correctly on
the local console (another reason to register with the author).

4 - Programs that output massive amounts of data may run slow.
Remember that any data that is output to the remote user is limited
in speed by the serial port, (1200 baud is about 120 characters per
second, this means that is will probably take more than 16 seconds
to output 1 screen worth of data).

5 - At this time, if the remote user sends too much data to DOSGATE
and the current program cannot keep up with the user, some data may
be lost. There are future plans for input handshaking (XON/XOFF or
hardware handshaking). There is output hardware handshaking (CTS).
Basically, if the user remembers to enter a RETURN character every
80 characters or so, there should be no problem.

6 - It is NOT recommended that BATCH (.BAT) file be used under DOSGATE.
This is because BATCH files will not be ended by a control-C, but upon
receiving a control-C, they prompt the user to determine if the batch
file should be ended. This operation will not allow the DOSGATE
utilities (START, and END) to operate properly.

Special notes for TNC users:

There are various TNC parameters that are very important for
succesful use of DOSGATE. DOSGATE is not very smart as far as the
TNC is concerned. This is not an accident or an afterthought!
Since DOSGATE performs FEW TNC COMMANDS then it should be compatible
with virtually ALL TNCs that have a few minor qualifications.


1 - Have its RS-232 Data Carrier Detect (DCD, pin 8) go
true when a user connects, and go false when a
user disconnects. This also means the your
RS-232 cable must include the DCD line. Most
cables designed for a modem have all the nessary
lines (also important is the CTS and DSR line).

2 - Be set stay in 'command' mode when the user
connects. The TNC *MUST* output
*** CONNECTED to callsigns CR.
For Kantronix TNCs the following parameters
are important (other TNC's must set equivilent
NOMODE ON (stay in command mode upon connect)
NEWMODE OFF (don't go to command mode on disconnect)
COMMAND $03 (character to place TNC into command mode)
CMDTIME 1 (wait for 1 second delay before COMMAND)
BBSMSG ON (special format of some messages)
8BITCONV ON (8 bit characters)
RING OFF (no Bell when user connects)

The following settings are also desirable:

CHECK 10 - Or some other value (not 0)
MON OFF (can be MON ON if desire monitor mode)
CSTAMP OFF (may be ON if no problems show)
DAYTIME xxxxxxxxxxxx (set to correct time)

3 - Be set to allow only ONE user to connect at a time on
ONE stream.
USERS 1 (note: KAM & KPC4 set 'USERS 0' to
be sure only one user at a
time can connect)

4 - Issue a '*** CONNECTED to CALL' message terminated with
a Carriage Return when the user first connects. Where
CALL is the id of the user who connects. The syntax of
this message is crutial to the operation of the user id
logic of DOSGATE. Every space and the case of the
characters (up to the CALL) is very important. If
DOSGATE does not find this message when a user logs in
it will not function properly.
Carrier Detect must go TRUE before the CR.
Note: The connect message can be either one of the
following two messages:

Data after the callsign is OK and will be part of the
environment USER= string.

5 - Go into transparent mode when the command TRANS is issued
followed by a return.

6 - Be set for hardware handshaking. At this time, DOSGATE
only supports hardware handshaking. This does not mean
that DOS's XOFF handshaking will not work.

DOSGATE hints:

DOSGATE does not perform any machine protection. This means
that if a remote user decides to erase a file or format your hard disk
he WILL be able to do so!!! Unless you take steps to insure that he
is unable to perform these dasterdly deeds! If you can trust ALL
remote users, then you need not be concerned with this. Although(!),
if you are allowing the general public access to your machine, then
you may want to do the following:

Create 'Hidden' directories which contain programs or data
that you don't want the casual user to stumble across.

Set the Read Only attribute on any files that you don't want to
be easily erased.

Do NOT keep a copy of your format (or any similarly dangerous
software) ANYWHERE on your machine.

Use CED (or another similar DOS extention) to allow you to
remove or rename internal DOS commands so that the remote user
cannot DELete files, set the PATH, or look at environment
variables. I use CED and map commands that I don't want the
user to perform to a non existant command, this way when the
user types the command DEL *.*, instead of the prompt "are you
sure? ", he is greeted with the message "Invalid command or
file name"! After trying a few destructive commands, the user
gives up, thinking that they have all been removed!

Keep only software that you desire to gain access to on the
machine. This way, if a user does destroy something, it will
not be anything important.

You also may NOT want to leave any compilers around! This
will keep a *smart* user from connecting to your machine
and writing a simple program while online to destroy the
contents of your disks!!!


1.10 Changed START, END, to enable and disable the output to
the remote user. Also changed the DOSGATE driver to accept
commands from START and END. This removes the extra prompts
that the user sees when first connecting. START2, and END2
support is also removed for this reason.

1.11 Changed DOSGATE driver to issue a TRANS command to put the
TNC into transparent mode when a user connects. This is to
allow DOSGATE to function with TNC's that don't output the
connected message before going into command mode. Now MUST
have TNC set to NOMODE ON, CONMODE can now be left as

1.12 Changed DOSGATE driver to accept output commands, and changed
END to send 3 CTRL-C's to put TNC back in command mode. This
was to support AEA-PK88, which did NOT go back into command
mode when NEWMODE was ON (NEWMODE was ignored when NOMODE was
ON in the AEA). Added monitor command (ALT-M) which, allows
the display of monitored packets to be displayed on the screen
when a user is not connected.

1.13 Added code to cause prompt to reappear after ALT-command to
DOSGATE driver. This also satisfied read and cured problem
with having to hit a key after entering a command.

1.14 Changed default settings of internal user_chk, to allow
non-packet environments to work. Changed START to check for
READ.EXE before executing READ /c.

MS-DOS is a trademark of Microsoft Corporation

  3 Responses to “Category : Communication (modem) tools and utilities
Archive   : DOSGT114.ZIP
Filename : DOSGATE.DOC

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: