1
0
mirror of synced 2026-01-12 00:42:56 +00:00
Interlisp.medley/library/Kermit.tedit

44 lines
21 KiB
Plaintext
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

1
Lisp Library Modules, Medley Release 1.0, KERMIT and MODEM
1
Lisp Library Modules, Medley Release 1.0, KERMIT and MODEM
KERMIT and MODEM
1
KERMIT and MODEM
1
KERMIT AND MODEM
6
Kermit and Modem are utilities for transferring files between computers using ordinary RS232(RS232 NIL NIL NIL NIL 143) and modem connections.
The file KERMIT.LCOM contains both the Kermit and Modem protocols. Once loaded, it provides a means of transferring files(TRANSFERRING% FILES NIL transferring% files NIL NIL 143) between a Xerox workstation and any other computer that supports either Kermit or Modem, and to which Lisp is able to open a Chat connection.
Of these two file transfer protocols, Kermit is preferred. Modem is much less flexible than Kermit, and cannot be used on RS232 connections requiring parity or flow control. Modem was developed primarily to support file transfers to and from microcomputers running the CP/M operating system. Modem implementations are available for Tops-20, VAX/UNIX, and VAX/VMS. Kermit, on the other hand, was designed for file transfers between computers of many types, and there exist implementations of the Kermit protocol on machines ranging in size from eight-bit microcomputers to large IBM mainframes.
For a detailed discussion and tutorial on Kermit, see Kermit: A File Transfer Protocol by Frank Da Cruz, Digital Press, 1987.
Requirements
1
The machine must run Kermit or Modem, and you need the means of reaching it, typically via Chat over an RS232 or a network connection.
You also need the following .LCOM files to run this module successfully:
ÿÿïf ÿKERMIT, KERMITMENU
ÿÿïf ÿCHAT
and either the RS232C or TCP-IP protocols, or the built-in NS or PUP protocols.
Installation
1
Load KERMIT.LCOM and the required .LCOM modules from the library.
Establishing a Connection(ESTABLISHING% A% CONNECTION NIL Establishing% a% Connection NIL NIL 143)
1
The first step in using Kermit or Modem is to establish a Chat connection with a desired host. You may use any sort of Chat connection (e.g., NS, TCP, PUP, or RS232). See the Chat module in this manual.
If you are using an RS232 connection, and plan to transfer files with the Modem protocol, do not establish a connection that requires parity to be used; establish the connection with eight bits per character and no parity (see the RS232 module in this manual). Disable flow control (XOn/XOff) when using Modem.
When you have established a Chat connection to a remote host, log in (if necessary) and start the remote host's Kermit or Modem program. The details of running these programs differ slightly between implementations; you should obtain documentation specific to the version of Kermit or Modem running on the remote host.
Kermit(KERMIT NIL Kermit NIL NIL 144)
1
Remote Kermit in Server Mode(REMOTE% KERMIT% IN% SERVER% MODE NIL Remote% Kermit% in% Server% Mode NIL NIL 144)
Most mainframe implementations of Kermit have a server mode(SERVER% MODE NIL server% mode NIL NIL 144). This mode causes the remote Kermit to listen for either send or receive requests without your having to type additional commands to the remote Kermit. If the version of Kermit you are using on the remote host does support server mode, give the server mode command to place the program in this mode. In most implementations of Kermit, server mode is entered by your typing SERVER to the Kermit prompt:
Kermit>SERVER
Remote Kermit Not in Server Mode(REMOTE% KERMIT% NOT% IN% SERVER% MODE NIL Remote% Kermit% not% in% Server% Mode NIL NIL 144)
If the remote Kermit does not support server mode, you must issue individual send and receive requests for each file you transfer. To send a file to a remote Kermit, issue the RECEIVE command to the remote Kermit. To receive a file from a remote Kermit, issue the SEND command to the remote Kermit. In most cases, these commands are followed by the name of the file to be sent or received.
For example:
Kermit> RECEIVE FILENAME
or
Kermit> SEND FILENAME
If you are transferring files between two Xerox workstations connected by an RS232 connection, call (CHAT 'RS232) on each machine to establish the connection. Currently, Lisp Kermit does not support a server mode, so you must issue a receive request on one machine, followed by a send request on the other (see below).
After you have started the remote Kermit program, you need to start the local Lisp Kermit program. Lisp provides both functional and interactive interfaces for Kermit (and Modem).
Local Kermit
To start the local side of the Kermit file transfer, use the KERMIT.SEND or KERMIT.RECEIVE functions:
(KERMIT.SEND(KERMIT.SEND (function) NIL NIL NIL 144) LOCALFILE REMOTEFILE WINDOW TYPE) [Function]
LOCALFILE is the name of the file being sent to the remote Kermit.
REMOTEFILE is the name under which the file should be stored remotely. In most implementations of Kermit, this name overrides any name you specified in the remote receive command.
WINDOW is a pointer to the Chat window over which the transfer takes place. If WINDOW is NIL, the value of CHATWINDOW (the first Chat window to be opened) is used in its place.
TYPE is the type of the file. It should be set to either TEXT or BINARY.
(KERMIT.RECEIVE(KERMIT.RECEIVE (function) NIL NIL NIL 145) REMOTEFILE LOCALFILE WINDOW TYPE) [Function]
LOCALFILE is the local name of the file to be received from the remote Kermit.
REMOTEFILE is the name of the file on the remote machine.
WINDOW is a pointer to the Chat window over which the transfer takes place. If WINDOW is NIL, the value of CHATWINDOW (the first Chat window to be opened) is used in its place.
TYPE is the type of the file. It should be set to either TEXT or BINARY.
While the file transfer is in progress, the associated Chat window is blank, and cumulative packet counts and other messages are displayed in a one-line prompt window above the Chat window.
Modem(MODEM NIL Modem NIL NIL 145)
1
To transfer files with the Modem protocol, you must run the Modem program on the remote machine. Modem does not support a server mode. Typically, you run the program once per file transferred, with instructions in the command line to indicate whether the file is being sent or received. There are a number of versions of the Modem protocol. On some systems, you run the program called Modem; on other systems, the program is called UModem or XModem.
On UNIX, for instance, to send a text file to a Xerox workstation, you would type:
%XMODEM -ST FILENAME
On Tops-20, you would type:
@MODEM SA FILENAME
Note: % and @ are host system prompts.
As with Kermit, after you have started the remote side of the file transfer, you must start the local (Lisp) side. To do this, use either of the functions MODEM.SEND or MODEM.RECEIVE:
(MODEM.SEND(MODEM.SEND (function) NIL NIL NIL 145) LOCALFILE WINDOW TYPE EOLCONVENTION) [Function]
LOCALFILE is the name of the file to send to the remote Modem program.
WINDOW is the Chat window over which the transfer takes place.
TYPE is the file type, either TEXT or BINARY.
EOLCONVENTION is the end-of-line convention used by the operating system on which the remote Modem program is running. EOLCONVENTION should be one of CR, LF, or CRLF. Typically, UNIX and VMS require LF, Tops-20 requires CRLF, and other Xerox machines require CR.
(MODEM.RECEIVE(MODEM.RECEIVE (function) NIL NIL NIL 145) LOCALFILE WINDOW TYPE EOLCONVENTION) [Function]
LOCALFILE is the name of the file to receive from the remote Modem program.
WINDOW is the Chat window over which the transfer takes place.
TYPE is the file type, either TEXT or BINARY.
EOLCONVENTION is the end-of-line convention used by the operating system on which the remote Modem program is running (see above).
Interactive File Transfers With Kermit or Modem(INTERACTIVE% FILE% TRANSFERS% WITH% KERMIT% OR% MODEM NIL Interactive% File% Transfers% With% Kermit% or% Modem NIL NIL 146)
1
A more convenient user interface for Kermit and Modem is available via the module KERMITMENU.LCOM. It provides a menu-oriented interface for issuing Kermit or Modem commands. To obtain the menu interface, press the middle mouse button in a live Chat window. The standard middle-button Chat menu contains an entry labeled "Kermit" near its top. If you select this entry, a Kermit menu(KERMIT% MENU NIL Kermit% menu NIL NIL 146) appears at the top of the associated Chat window(CHAT% WINDOW NIL Chat% window NIL NIL 146):
']ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþû¿ÿÿ÷ÿíßÿÿÿ<C3BF>ÿÿþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþûÿÿÿ¿ìŸÿÿÿwþýÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþúøéÉÇÜœyqÉÿw8xéåÇÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþø÷fÕ÷¿Ý[¶nÕÿžîýþæÙ»ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþûpoÕ÷¿½[·`ÕÿîýþîÝÏÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþûwïÕ÷¿½[·oÕÿvþýþîÝ÷ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþû·oÕ÷·}[¶nÕÿvîݾîÙ»ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþû¸ïÕ÷Ï}ÜyqÕÿ<C395>>~îåÇÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿýÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿãÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþÀÀÀÀÀ0`0ÃÀ6`ÀÀÀà0`Æ6À`À`Ç8ÎmœÀmœÀ
¿`Ãmm¶ÀͶÀí¶`Áßm¶}Ÿg>Ào>À6`ÀØm°a˜g0g0
Ç<><ÏbÀÆÀí³`ÀÀÀ`À ÀÀÀÀÿÿÿÀÀÿÿÿÀÀÀ`ÿÿ÷ÀÇÀ`]ÿÿ÷À0Á€`[ÿÿÿ@0Á•ç<E280A2>ÎQþqç0WÎ"vQ‡ìÁœfÙq¶Ûm°O¶í·@RI$Á™æÝŸa¶Ûo€W†í·@RI<Á˜a¶Ûl[¾í·@I Á™æÙ<C3A6>a¶qç°]Æí·‘‡À0ÿÿÿÀÀÿÿÿÀÀÿÿÿÀÀÀÀÀÀ$@iÆ1<$"@Æ" @À<>Æo3Û9€"dˆ0$ÎzF01éNÆ6Ã1m€"…À% "I@ ‰$ DÆ6Ï1|"f0$É"O00‰<Æ6Û1`" $)"HÀ‰ DÇœo1=€<dˆ$Î"G3<1C>FÀÀÀÀÀÀÀÀØ@Ç€ Ø"@ÆÀÀ  @ÆÎ<C38E>çÙÌzFS€Çm¶ÍŒÛl"IQÆßm¶ÏŒÛà"O!ÆØm¶Ì Û"HQÆOmœgŒÙì"G#Q€À ÀÀÀÀÀÀÀ6 Ƕà 9Ä<ÆÀ ÀE$ Æ6qí¼s§ðÛÇ óg=ìç˜A$ ǶØÍ¶Ûí¶`ÛmŒ6Ûm¶Í¶ØAÄ8Æ6øÏ6ø<B
¶ÛfÛoŒ6Ù϶ͶÀA$ Æ6ÀÇ6À ¢
¶ÛfÛl 6ÙÌ6ͶÀE$ Æ6xf<{£íž`Ûg‡œØ‡¶læØ9 À0À 0ÀÀÀÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþ
The entries on the top line of the menu are action commands:
SEND Starts sending a file to the remote Kermit or Modem program. The remote program must be prepared to receive the file.
RECEIVE Starts receiving a file from the remote Kermit or Modem program. The remote program must already be attempting to send the file.
BYE Closes (severs) the connection.
EXIT Closes the window containing the menu, but does not close the connection.
TRANSFER MODE Controls whether files are transferred using Kermit or Modem. You may set the state of this entry by selecting either of the Kermit or Modem labels with the mouse. The current transfer mode choice is displayed inverted in the menu.
LOCAL FILE Holds the name of the local file being sent or received. You may set the contents of this field by selecting the LOCAL FILE label and typing the name.
REMOTE FILE Holds the name of the remote file being stored or retrieved. You may set the contents of this field by selecting the REMOTE FILE label and typing the name. The Modem protocol does not use the contents of this field.
FILE TYPE Controls whether files are sent in binary or text (ASCII) mode. To set this field, select the FILE TYPE label and choose an entry from the menu that appears.
END-OF-LINE CONVENTION Sets the end-of-line convention being used by the remote Modem program (it is not used when files are transferred in Binary mode or with the Kermit protocol). The contents of this field must match the conventions of the operating system on which the remote Modem program is running. To set this field, select the END-OF-LINE CONVENTION label, and choose an entry from the menu that appears.
Limitations
1
Transfer files between two Xerox machines using the Kermit protocol.
Modem cannot be used on RS232 connections requiring parity or flow control.
[This page intentionally left blank]
(LIST ((PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC "" "") STARTINGPAGE# 143) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD RIGHT) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY HELVETICA OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO (ARABIC "" "")) (270 15 288 36) NIL) (HEADING NIL (HEADINGTYPE FOOTINGR) (54 27 558 36) NIL) (TEXT NIL NIL (54 54 504 702) NIL))) (PAGE NIL (PAPERSIZE NIL) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD LEFT) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO NIL) (54 15 288 36) NIL) (HEADING NIL (HEADINGTYPE FOOTINGV) (54 27 558 36) NIL) (HEADING NIL (HEADINGTYPE VERSOHEAD) (54 762 558 36) NIL) (TEXT NIL NIL (54 54 504 684) NIL))) (PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC "" "")) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD RIGHT) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY HELVETICA OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO (ARABIC "" "")) (270 15 288 36) NIL) (HEADING NIL (HEADINGTYPE FOOTINGR) (54 27 558 36) NIL) (HEADING NIL (HEADINGTYPE RECTOHEAD) (54 762 558 36) NIL) (TEXT NIL NIL (54 54 504 684) NIL)))))6Ìà
ÀÌT3H`à
àT2HHàl2llàà,HHà
5Ìà
ÀÌ2HHàà2HHà
à2H`à
à-$$àT-àT2lxàx,HHà
,HHà,HHà-àT-T-øäìTFøø PAGEHEADING VERSOHEADFøø PAGEHEADING RECTOHEADEøø PAGEHEADINGFOOTINGVEøø PAGEHEADINGFOOTINGR
TITAN
 HELVETICA  HELVETICA
CLASSICCLASSIC
TITAN
CLASSIC
 HELVETICA HELVETICAMODERN
MODERNMODERNMODERN
 HRULE.GETFNMODERN

; HRULE.GETFNMODERN

; HRULE.GETFNMODERN

 HRULE.GETFNMODERN

  HRULE.GETFNMODERN \IM.INDEX.GETFN  f9IM.INDEX.GETFN<00>V6 '
 HRULE.GETFNMODERN 
(  O   HRULE.GETFNMODERN 
  IIM.INDEX.GETFNMODERN  HRULE.GETFNMODERN 
Î8? IM.INDEX.GETFNMODERN  HRULE.GETFNMODERN 
SIM.INDEX.GETFN
;+IM.INDEX.GETFNx
]IM.INDEX.GETFN
±R}


d
Ð

=   (IM.INDEX.GETFNCLASSIC
   ;
¬J
=6+IM.INDEX.GETFNCLASSIC
   G
0J
=6¿ IM.INDEX.GETFNMODERN  HRULE.GETFNMODERN 
ÈT  <00>

 'IM.INDEX.GETFNCLASSIC
#  ?:
l
#$ *IM.INDEX.GETFNMODERN

#
 D:
u /}IM.INDEX.GETFNMODERN  HRULE.GETFNMODERN 
R"+IM.INDEX.GETFN1+IM.INDEX.GETFN
Ú BMOBJ.GETFN3MODERN


=xƒ!K
ë
s
 w Y ` 7<6
    HRULE.GETFNMODERN EL%
6B™zº