CTOS Kermit Distribution Notes, January 1993

advertisement
CTOS Kermit Distribution Notes, January 1993
CTOS Kermit is based on an old release of C-Kermit (4.2, March 1985),
before
the naming convensions for C-Kermit changed. It is not at all source
compatible with the current version of C-Kermit (though it is expected
that
a future release will be).
Original Name
Distribution Name
CKCMD.C
CTCMD.C
CKCMD.H
CTCMD.H
CKCONU.C
CTCONU.C
CKCT.RUN
CTCT.HEX
CKCTDIR.C
CTCTDIR.C
CKDEBU.H
CTDEBU.H
CKDIAL.C
CTDIAL.C
CKERMI.DOC
CTKERM.DOC
specifics
CKERMI.H
CTERMI.H
CKFNS.C
CTFNS.C
CKFNS2.C
CTFNS2.C
CKLOGI.C
CTLOGI.C
CKMAIN.C
CTMAIN.C
CKPROT.C
CTPROT.C
CKPROT.W
CTPROT.W
CKUSER.C
CTUSER.C
CKUSER.H
CTUSER.H
CKUSR2.C
CTUSR2.C
CKUSR3.C
CTUSR3.C
CKVT100.C
CTVT10.C
CKWART.C
CTWART.C
CKWART.DOC
CTWART.DOC
CKXCTOS.C
CTXCTO.C
CKZCTOS.C
CTZCTO.C
DIALEX.DOC
CTDIAX.DOC
KERMLIB.FLS
CTLIB.FLS
README.DOC CTAAAA.DOC
SAMGEN.ASM CTSAMG.ASM
WART.RUN CTWART.HEX
Comments
Binary translated to hex (see below)
CTOS-Kermit 2.00 manual, with CTOS
Sample login script
This file
Binary translated to hex
-----(cut here)----/* UNHEX.C - Program to translate a hex file from standard input
* into an 8-bit binary file on standard output.
* Christine M. Gianone, CUCCA, October 1986.
*
* Modified - Evan Arnerich, ITT/FSC, January 1993
*
added arguments for in/out file specs
*/
#include <stdio.h>
/* Include this for EOF symbol */
char a, b;
/* High and low hex nibbles */
/* Main program reads each hex digit pair and outputs the 8-bit byte. */
main(argc, argv) int argc; char *argv[]; {
FILE *in_fp, *out_fp;
if ((in_fp = fopen(argv[1], "r")) == NULL) {
printf("error opening %s\n", argv[1]);
exit(1);
}
if ((out_fp = fopen(argv[2], "w")) == NULL) {
printf("error opening %s\n", argv[2]);
exit(1);
}
while ((a = getc(in_fp)) != EOF) { /* Read first hex digit */
if (a == '\n')
/* Ignore line terminators */
continue;
if ((b = getc(in_fp)) == EOF)
/* Read second hex digit */
break;
putc( ((decode(a) * 16) & 0xF0) + (decode(b) & 0xF), out_fp );
}
fclose(in_fp);
fclose(out_fp);
exit(0);
/* Done */
}
decode(x) char x; {
/* Function to decode a hex
character */
if (x >= '0' && x <= '9')
/* 0-9 is offset by hex 30 */
return (x - 0x30);
else if (x >= 'A' && x <= 'F')
/* A-F offset by hex 37 */
return(x - 0x37);
else {
/* Otherwise, an illegal hex digit
*/
fprintf(stderr,"Input is not in legal hex format\n");
exit(1);
}
}
----(cut here)---January 5, 1988
Welcome to CTOS Kermit. I hope that you can use this. First, a few
words
about the program. Read CKERMI.DOC and this will give you an idea of how
this version works. I have not edited that file, it is the UNIX
distribution
version, but most of what is says still applies.
I used the WART program to generate CKPROT.C, as is intended. However,
CKPROT.C did not compile cleanly, and I wanted some more debug info, so I
directly tweaked the source for CKPROT. If you regen CKPROT.C from WART,
you will probably have to do the same, unless you modify WART.
Please don't take the source code presented here to be a shining example
of
my philosophy of "C" coding. I took the code as it was distributed and
changed it as little as possible to get it working. Even the files
I rewrote (CKZCTOS.C and CKXCTOS.C) were created from the old skeletons.
****PROBLEMS AND LIMITATIONS****
- Server mode is sometimes flaky. If you start up the server and quickly
make a request of it, the server works fairly well. Otherwise, it can
get
stuck and you have to use ACTION-FINISH. However, this may only happen
on NCR operating systems (mine). I heard from a friend who used this
program to talk to a VAX and left CTOS-Kermit in server mode for six
hours
and everything worked fine.
- The Shell command is not implemented.
- Wild cards are not implemented.
- Remote commands are not implemented. These are commands passed to a
remote
system for execution. They are necessarily system dependant. I was
not
sure what OS I wanted to set them up for, so I didn't set them up at
all.
- Command line parameters work, but remember that you have to enter them
in
the CTOS command form via "run file". If a parameter has 2 parts, and
they
are separated by a space, they occupy 2 CTOS parameters. Also, prefix
the
parameter flags with "-" just like you would on a UNIX command line.
- This version has VT101 emulation. I have added support for some VT100
character attribute commands, such as bold and reverse video.
It isn't perfect, but is is good enough to run 'vi' and DEC's All-in-1.
Use 'set terminal vt100' to select this, and 'set terminal none' to
select
TTY. The keyboard is used as follows:
:Cursor keys are implemented
:F1 through F4 are themselves
:F8 is an emergency reset; press this if emulation is screwed up
:F9 toggles the reverse video mode
:F10 toggles CR/LF mode
:Delete is break
:Code (Supershift for you NCR people) is Control
:Code + Shift is used for the VT100 application key pad mode with
the Convergent numeric key pad
:Code + Shift F1 to F4 are F1 to F4 in AKP mode
:Escape is generated by pressing GO twice. GO is the default local
escape (to get back to kermit). If you change this with the
'set escape' command, you will not be able to send escape (0x1b).
Escape is also transmitted on the VT101 keyboard by Control+[, but
this CT keyboard code conflicted with one I used on the AKP, so I
deleted this feature. If you press GO once and then enter '?', it
will
tell you the options.
There are two VT100 object modules possible with the source 'ckvt100.c'.
If
you compile with a define 'NCR=1', it will use the keyboard encoding
table
that NCR used with their OS 4.6 and below. If you omit this define, it
uses
the CT standard encoding table. Link the appropriate one with the rest
of the
objects if you want to change things. At the 'CTOS-Kermit' prompt, type
'show version' and look at the last line to see the keyboard version.
I'm sure that there are a lot more things wrong with this, but this small
list
should get you started! If you find bugs, please let me know. I am
going
to continue to slowly work on this project as time permits.
Joel Dunn
UNC Chapel Hill
Administrative Data Processing
CB #1150
Chapel Hill, NC 27599-1150
919-966-5879
{backbone}!mcnc!ecsvax!joeld.UUCP
{backbone}!mcnc!unc!dunn.UUCP
rjd@unc.BITNET
73200,640 COMPUSERV
-----------------January 22, 1988
The following changes and (hopefully) improvements were made to CTOSKermit
in an effort to bring it up (somewhat) to the current state of
funcionality
of UNIX and MS-DOS Kermit. The CTKERM.DOC file has been somewhat updated
to reflect differences between CTOS and UNIX Kermit, and the changes outlined below.
(1) Commands added:
TAKE
The TAKE command specifies a file name whose contents are
executed as Kermit commands. When all commands in the TAKE file
are executed, control is returned to the file where the TAKE
originiated. 20 levels of TAKE are supported.
POP
POP is used to return from a TAKE file prior to the end of file.
INPUT, REINPUT
Wait a specified period for a string to be received over the comm
line. Result can be tested using the IF command (below).
OUTPUT
Send a specified string out the comm line. Together, the INPUT,
REINPUT, and OUTPUT commands replace the SCRIPT command. Syntax
of all three commands follow MS-DOS Kermit standards.
IF {SUCCESS, FAILURE, COUNT, EQUAL, DEFINED, EXIST}
If the condition is met, the command following the IF clause is
executed. SUCCESS and FAILURE test the results of the last
operation. The IF COUNT is used in conjuction with the COUNT
value in loops. The IF COUNT command decrements the count
variable, and if the result is greater than zero, executes the
following command. A separate count variable is maintained for
each take level. The IF EQUAL compares two strings. Either or
both may reference Kermit variables. The IF DEFINED succeeds if
the variable referenced is non-null. The IF EXIST succeeds if
file named exists.
SET MODEM RACAL
This allows dialing using the DIAL command with the internal
Racal modem used in the US Army's Unisys TACCS and TACCSE
computers.
ASSIGN
Set a Kermit variable to a string value. 26 variables (\\%A
through \\%Z) are supported. Each variable can hold up to
20 characters.
ASK, ASKQ
Prompt the operator for string data to be stored in a Kermit
variable. ASK echos operator input to screen, ASKQ does not.
SHOW MACRO
Display the values stored in all 26 Kermit variables.
DELETE
Delete a file on the local system.
GOTO
Branch to a statement other than that immedialtely following.
Labels are identified as strings preceded by a colon in the
first column of the statement.
HANGUP
Drop DTR so that the modem hangs up the phone line.
New command line argument
A new command line argument (-O) allows kermit commands to be
specified on the command line. Virtually any command can be
entered following the '-O' and are executed after any commands
in the .kermrc file.
(2) The following commands were modified to work better/properly:
SET PARITY, SET FLOW-CONTROL
These now modify the hardware to get the desired effect.
SET END-OF-PACKET
Previously, this command told the other system what we expected
as an end of packet character, but didn't change our out-going
end-of-packet character.
SET TIMEOUT, RETRY
Previously, the timeout and retry values was not adjustable,
causing file file transfer failures when long delays were
encountered.
SHOW
The SHOW command was modified to better display the current
operating paramters.
EXIT
Added an optional argument to the EXIT command. This value
is returned to the operating system when Kermit exits.
REMOTE CMDS
These have been modified to work a little better.
Evan Arnerich / Doug Drury
ITT/FSC
2810 Industrial Parkway
Santa Maria, CA 93455
805-928-4371
Download