[comp.sys.cbm] C64 KERMIT

lopes@sdics.ucsd.EDU (alann lopes) (03/15/87)

A few months ago I found a copy of kermit for the
c64. I've used it several times, downloading and
uploading files from UNIX, but I have a problem.

When kermit loads up it tells us that it is in 40
column mode. Can one assume that there is an 80
column mode? Or are they just teasing us?

I acctually have a stupid "bi-80" display (stupid
because most software I have does not work with it)
and kermit will quasi-work, but when I get on UNIX
I don't even see the UNIX-Kermit responses nor can
I do any vi work.  What the hell terminal does this
Kermit emulate?

I have 0 doc for this c64 kermit. If anyone has
the doc I would be grateful if you sent me a copy.

                 thanks in advance

                        alann

ugbowen@sunybcs.UUCP (03/20/87)

In article <315@sdics.ucsd.EDU> lopes@sdics.ucsd.EDU (alann lopes) writes:
>
>When kermit loads up it tells us that it is in 40
>column mode. Can one assume that there is an 80
>column mode? Or are they just teasing us?
 
There is an 80 column mode. Mine defaults to it. It uses the graphics screen
to print the characters, so is not very readable without a monochrome monitor.

>What the hell terminal does this
>Kermit emulate?
 
There is a mode that emulates a vt-52. It's not bad, I've used it quite a
bit, but my Kermit can only go 300 baud. So it's not really worth doing
much work with it.

There is help built right into the program. At the main prompt a '?' (I
think) will give a brief description of all the commands. At any point
in typing a command you can press the '?' to find out all your next options.
For example...just typing a '?' will reviel that there is a SET command.
Now typing 'SET ?' will print all the things you can set, and PARITY is one
of them. Now 'SET PARITY ?' will print all the ways parity can be set, one of
which is EVEN. Now you have 'SET PARITY EVEN' and press return, and your
parity will be set. All the help menus work in this way...but it doesn't
tell you that. It took me a few weeks to figure this out too.

Both setting the 80-column screen and turning the vt-52 emulator on is
done with the SET command (I think). After you get the terminal the way
you want it you can also save the parameters to disk and it will auto-boot
them next time you load up. The command is SAVE or something like that.

Good luck.

                                   Devon Bowen (KA2NRC)
                                   University of Buffalo

********************************************************
csnet:	 ugbowen@buffalo.CSNET
uucp:	 ..!{allegra,decvax,watmath,rocksanne}!sunybcs!ugbowen
BITNET:  ugbowen@sunybcs.BITNET
BBS:     (716) 672-8843 (On-line: Computer Access Center)
Voice:   (716) 836-7358
USnail:  67 Lisbon Ave; Buffalo, NY; 14214
********************************************************

sct@a.UUCP (03/20/87)

In article <315@sdics.ucsd.EDU>, lopes@sdics.ucsd.EDU (alann lopes) writes:
> A few months ago I found a copy of kermit for the
> c64. I've used it several times, downloading and
> uploading files from UNIX, but I have a problem.
> 
> When kermit loads up it tells us that it is in 40
> column mode. Can one assume that there is an 80
> column mode? Or are they just teasing us?
> 

  To change C64-kermit to 80 column display type the following:

	set screen-width 80-columns<cr>

  To revert back to 40 column mode type: set screen-width 40-columns<cr>
The '-' is mandatory.  C64-Kermit emulates a vt52 and works fairly well.
I've used it with 'vi' many times. 

nu099138@ndsuvm1.bitnet.UUCP (03/27/87)

Here is the C64 users guide some of you have been looking for!!!!!
     
     
     
     
     
     
     
     
     
     
                             KERMIT-65 USERS GUIDE
     
                         Commodore 64 Version 1.7(52)
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
                                 Eric Lavitsky
     
                 Center For Computer and Information Services
                              Rutgers University
                            Piscataway, New Jersey
     
                          This Copy Was Produced On:
                        Sunday, 11 August 1985 at 11:54
                             Using Scribe 4(1405)















Introduction                                                             Page 1
     
     
1. Introduction
     
1.1. Overview
     
Authors:    David Dermott, DREA
            Eric Lavitsky, Rutgers University
            Michael Marchiondo, University of New Mexico
            Frank Prindle, Naval Air Development Center
Documentation:
            Eric Lavitsky, Rutgers University
Version:    1.7(52)
Date:       August 1985
     
C-64 Kermit-65 Capabilities At A Glance:
     
  Local operation:                   Yes
  Remote operation:                  Yes
  Transfers text files:              Yes
  Transfers binary files:            Yes
  Wildcard send:                     No
  ^X/^Y interruption:                Yes
  Filename collision avoidance:      Yes
  Can time out:                      Yes
  8th-bit prefixing:                 Yes
  Repeat count prefixing:            No
  Alternate block checks:            No
  Terminal emulation:                Yes
  Communication settings:            Yes
  Transmit BREAK:                    Yes
  IBM communication:                 Yes
  Transaction logging:               No
  Session logging (raw download):    No
  Raw upload:                        No
  Act as server:                     No
  Talk to server:                    Yes
  Advanced commands for servers:     No
  Local file management:             Yes
  Handle file attributes:            No
  Command/init files:                Yes
  Printer control:                   No
     
KERMIT-65  is  a  program that implements the KERMIT file transfer protocol for
the Commodore 64 micro computer system. It is written in 6502 assembly language
and  should  run  on  any C64. KERMIT-65 also Converts your C64 into a powerful
computer terminal. It emulates the popular Digital Equipment  Corporation  VT52
terminal  or  a  simple  glass TTY.  The program handles all conversion of Com-
modore to standard ASCII and can display all 96 standard ASCII characters.
















Page 2                                                    C64 KERMIT User Guide
     
     
1.2. System Requirements
     
What you will need:
     
   - C64 and Disk drive
   - Modem - any will do (300/1200, VIC, RS232)
   - Supermon64.V1 (or any equivalent relocatable monitor)
























































Implementation Notes                                                     Page 3
     
     
2. Implementation Notes
     
2.1. Known Bugs, Restrictions
     
C64 KERMIT-65 is still under development and may have some minor defficiencies.
     
The known bugs and restrictions are as follows:
     
   - The SET BAUD option is not fully implemented. To get speeds under 300
     baud,  you  will  have  to  set the RS232-REGISTERS directly. Special
     patches to the Kernel RS232 routines have been implemented  to  allow
     reliable  operation at 1200 baud. 1800 and 2400 baud have not been so
     patched.
   - If you change the RS232-REGISTERS directly, the change  will  not  be
     reflected in the BAUD, PARITY, or WORD-SIZE parameters.
   - If  a  KERMIT.INI  file is not present on the disk, the parameters in
     memory get garbaged to an unusable state and must be reset by hand.
   - To create a new KERMIT.INI  file  with  the  SAVE  command,  the  old
     KERMIT.INI  file  must  first  be  scratched  with the DISK command :
     (DISK S0:KERMIT.INI).
     
2.2. HINTS
     
If you wish to edit BASIC programs on the mainframe system, you should  convert
them to text files on the C64 before you send them since the BASIC interpreters
store keywords as single character tokens. If the  receiving  system  does  not
handle  eight-bit ASCII or CBM ASCII characters well, KERMIT-65 should have its
FILE-BYTE-SIZE set to SEVEN-BIT. It will send standard seven-bit ASCII  to  the
receiving  KERMIT.  When  KERMIT-65  is receiving from such a system, this will
pick up the seven-bit characters and write out CBM ASCII on the disk file.
     
2.3. Notes
     
Please note that typing a '^X' (control-x) at anytime during a file transaction
will quit the current transaction, closing the current file. Kermit can also be
forced to 'timeout' by typing a space at any point in the  transaction.  Kermit
will then resend the current packet.
     
2.4. KERMIT Runtime Memory Map
     
Location    Description
--------    ------------------------------------
     
$0801-$83ff Kermit program area (Reserved Area)
$8400-$87ff Video matrix for both 40 and 80 column modes
$8800-$8fff Character set 1 ram for 40 column mode
$9000-$90ff RS-232 output buffer
$9100-$91ff RS-232 input buffer
$9200-$9fff Reserved for future use
$a000-$bfff Hires screen (80 columns)













Page 4                                                    C64 KERMIT User Guide
     
     
2.5. Future Plans
     
The  following  items are under consideration for implementation in future ver-
sions of Kermit. Please mail any comments or suggestions to the authors, or im-
plement it yourself and notify the authors.
     
   1. Disk routines could be changed (Use TALK routines instead of CHRIN)
     
   2. Cursor blink rate in parser must be slowed down
     
   3. For  sending  files, jiffy wait should be a function of current baud
      rate!
     
   4. Implement 4 & 5 with a flag indicating connect or command mode.
     
   5. Ability to pause display in parser (CBM key)
     
   6. Add disk commands:
     
                Kermit-65>SCRATCH file
                Kermit-65>RENAME newfile=oldfile
     
   7. Change status display scheme for transfer:
     
       -----------------------------------------------------------------
     
              Packets: 0                 Status...
              Retries: 0
              Filename: FILENAME.EXT
     
       -----------------------------------------------------------------
     
              Packets: 0                 Status...
              Retries: 0
              Filename: FILENAME.EXT
     
              Additional Data
                      Seq Number              00
                      Number Of Data Chars    00
                      Packet Checksum         00
     
       -----------------------------------------------------------------
     
              etc., etc... something like this anyway - The screen
              shouldn't constantly be cleared and redrawn. All pertinent
              fields should be written once and then updated as
              necessary.
     
              Implement using plot function to move cursor to correct
              position. For Verbose debug, display packet info two lines
              beneath filename.












Implementation Notes                                                     Page 5
     
     
       -----------------------------------------------------------------
     
   8. Ability to change screen colors:
     
                          Kermit-65>SET COLOR nn
     
     
   9. Add capability of selecting default drive and unit number for trans-
      fer.
     
  10. Implement wildcard send - need info on 1541 DOS for this!
     
  11. Disk command parsing should use CMUNQS (unquoted string) parse.


















































Page 6                                                    C64 KERMIT User Guide
     
     
3. Running KERMIT
     
3.1. Booting KERMIT
     
Insert your working KERMIT-65 disk into the 1541 drive label side up.  Type the
following:
     
        LOAD"KERMIT",8 <cr>
        RUN <cr>
     
The screen will come up with the following message:
     
            Commodore 64 Kermit Version 1.7(52)
            40 Column Mode - ? For Help
     
            Kermit-65>
     
     
You are now in the KERMIT-65 parser which is modeled after the COMND parser  of
the  TOPS-20  Operating  System from Digital Equipment Corporation. You may now
type commands to the parser to set options or begin actions.
     
During interactive operation, you may use the ?-prompting  help  feature  ("?")
and  recognition  (ESC)  features  while  typing commands (The ESC character is
presently ^[ - control Left Bracket or the left arrow key).   A  question  mark
typed  at  any point in a command displays the options available at that point;
typing an ESC character causes the current keyword to be completed (or  default
value to be supplied).  If you have not typed sufficient characters to uniquely
specify the keyword or filename (or if there is no default value) then  a  beep
will  be  sounded  and you may continue typing.  Keywords may be abbreviated to
any prefix that is unique.
     
3.2. Commands in KERMIT
     
Commands available in version 1.7 of Kermit-65 are:
     
            BYE         CONNECT     DIRECTORY   DISK        EXIT        FINISH
            GET         QUIT        RECEIVE     RESTORE     SAVE        SEND
            SET         SHOW        STATUS
     
BYE
                This  command  will  cause Kermit-65 to tell a server Kermit at
                the other end of the connection to exit from Kermit and, if ap-
                plicable, terminate its job (or process, etc.).
     
     
                                 KERMIT-65>BYE
     
CONNECT
                The CONNECT command will allow you to connect to a  remote  job
                over the terminal line as a virtual terminal. The format of the
                CONNECT command is:











Running KERMIT                                                           Page 7
     
     
     
     
                               KERMIT-65>CONNECT
     
     
                To  get  back  to  the Kermit parser, type the escape character
                followed  by  a  'C'.  The  default  escape  character  is   ^Y
                (control-Y),  so  to  return to Kermit-65 you would type '^YC'.
                There are other options to the escape character, these  may  be
                seen by typing a '?'  after typing the escape character:
     
                        ONE OF THE FOLLOWING:
                            ? - THIS HELP MESSAGE.
                            B - SEND A BREAK SIGNAL.
                            C - CLOSE THE CONNECTION.
                            S - STATUS OF CONNECTION.
                            0 - SEND A NULL.
                            ESCAPE-CHAR - TRANSMIT THE ESCAPE CHARACTER.
     
DIRECTORY
                The DIRECTORY command  will  return  a  directory  of  the  the
                specified files. The format is:
     
     
                   KERMIT-65>DIRECTORY [file-specification]
     
                For example:
     
                      DIRECTORY         Directory of all files on drive 0
                      DIRECTORY ker*    Directory of files KER*
                      DIRECTORY k?w     Files 3 chars long, beg w/K, end w/W
     
                You  may pause the directory display by typing a space and con-
                tinue it by typing any character.
     
DISK
                The  DISK  command  will allow you to send commands directly to
                the disk drive controller. An empty command field  will  return
                the error status of the disk drive, if any.
     
     
                            KERMIT-65>DISK [string]
     
                For example:
     
                      DISK S0:K*        -- delete K* on drive 0:
                      DISK I0           -- initialize BAM on drive 0:
                      DISK              -- print error status, if any
     
EXIT
                The EXIT command will cause Kermit to return to  BASIC  command
                level. This command is the same as the QUIT command. An example











Page 8                                                    C64 KERMIT User Guide
     
     
                of this command is:
     
     
                                KERMIT-65>EXIT
     
FINISH
                This  command  will  cause Kermit-65 to tell a server Kermit at
                the other end of the connection to  exit  from  Kermit.    When
                Kermit-65 receives the acknowledgement that this is being done,
                Kermit-65 will prompt for another command.
     
     
                               KERMIT-65>FINISH
     
GET
                This  command  can  only be used in 'user' mode.  It will cause
                Kermit-65 to request that the other Kermit (which must be  run-
                ning in server mode) transmit the specifed file to Kermit-65.
     
     
                       KERMIT-65>GET file-specification
     
     
                Where "file-specification" is a valid  file  specification  for
                the system on which the other Kermit is running.
     
QUIT
                This command will cause Kermit-65 to return  to  BASIC  command
                level. This is the same as the EXIT command.
     
     
                                KERMIT-65>QUIT
     
RECEIVE
                The RECEIVE command is used to put Kermit-65 into  remote  mode
                waiting  for  a  single  file transfer transaction.  If no file
                specification is given, Kermit-65 will wait for a file transfer
                initialization  sequence  from  the  other  Kermit.   If a file
                specification is given, that file specification will be used to
                store the received file(s), regardless of what name is supplied
                by the other Kermit.
     
     
                               KERMIT-65>RECEIVE
     
or
     
                     KERMIT-65>RECEIVE file-specification
     
     
                Where "file-specification" is any valid CBM DOS file specifica-
                tion.











Running KERMIT                                                           Page 9
     
     
RESTORE
                The  RESTORE  command is used to restore kermit parameters that
                have been previously saved with the SAVE command.  Kermit  will
                search  the  disk  for  a  file name KERMIT.INI. If the file is
                present on disk, Kermit will load in the  parameters  contained
                therein and restart itself with those parameters.
     
     
                               KERMIT-65>RESTORE
     
SAVE
                The SAVE command will save  the  current  Kermit  settings  and
                parameters  in  a  file  called KERMIT.INI . The parameters may
                later be restored with the RESTORE command.
     
     
                                KERMIT-65>SAVE
     
SEND
                The  SEND  command  will  allow you to send a file to the other
                Kermit.  The command format is:
     
     
                       KERMIT-65>SEND file-specification
     
     
                Where   "file-specification"   is   any  normal  CBM  DOS  file
                specification.
     
SET
                The  SET  command  is used to set various parameters in Kermit.
                The format of the command is:
     
     
                    KERMIT-65>SET <option> <suboption> ...
     
     
                The options available to SET are:
     
                    BAUD                DEBUGGING           EIGHT-BIT-QUOTING
                    ESCAPE              FILE-BYTE-SIZE      FILE-TYPE
                    FILE-WARNING        FLOW-CONTROL        IBM
                    LOCAL-ECHO          PARITY              RECEIVE
                    RS232-REGISTERS     SCREEN-WIDTH        SEND
                    VT52-EMULATION      WORD-SIZE
     
                        A description of the options and suboptions follows.
     
SET BAUD
                The SET BAUD command is used to set the  speed  at  which  com-
                munications will take place.












Page 10                                                   C64 KERMIT User Guide
     
     
                           KERMIT-65>SET BAUD value
     
     
                Where value is from the following table:
     
                                50      75
                                110     150
                                300     1200
                                1800    2400
     
SET DEBUGGING
                The  SET DEBUGGING command is used to set the debug type out on
                the user's terminal.
     
     
                        KERMIT-65>SET DEBUGGING keyword
     
     
                Where keyword is either OFF, TERSE, or VERBOSE.  OFF causes all
                debugging output to be suppressed.  TERSE  directs  a  copy  of
                each  packet  to  the screen printing any control characters as
                '^char'.  VERBOSE prints identifying text for each field in the
                header  and prints the actual data section of the packet in the
                same manner TERSE uses.
     
SET EIGHT-BIT-QUOTING
                This  command  will  turn  on or turn off the eight-bit-quoting
                feature.    If   set   ON,   it   forces   Kermit-65   to   use
                eight-bit-quoting  which may be handy if it must receive a text
                file in which some or all of the characters are not in CBM  AS-
                CII.
     
     
                    KERMIT-65>SET EIGHT-BIT-QUOTING keyword
     
     
                Where keyword is ON or OFF.
     
SET ESCAPE
                This  command  will  set  the  escape character for the CONNECT
                processing.  The command will take the hex value of the charac-
                ter  to  use  as  the  escape character.  This is the character
                which is used to "escape" back to  KERMIT-65  after  using  the
                CONNECT  command.  It defaults to ^Y (hex 19).  It is usually a
                good idea to set this character to something which is not  used
                (or  at  least  not  used  very  much)  on  the system to which
                KERMIT-65 is CONNECTing.
     
     
                   KERMIT-65>SET ESCAPE hex-character-value













Running KERMIT                                                          Page 11
     
     
                Where  hex-character-value  is the ASCII value of the character
                to use as the escape character (in hex).
     
SET FILE-BYTE-SIZE
                This  command  sets  the byte size KERMIT-65 will use for files
                being received or transmitted.  SEVEN-BIT bytes should be  used
                for  ASCII text files which are to be used as text files on the
                CBM DOS system. EIGHT-BIT bytes should be used for binary files
                being transferred to and from the C64.  This allows the file to
                be returned without any changes.
     
     
                       KERMIT-65>SET FILE-BYTE-SIZE size
     
     
                Where size is SEVEN-BIT or EIGHT-BIT.
     
SET FILE-TYPE   This command tells Kermit-65 what type of file is being sent or
                received.  It is important that this parameter is set correctly
                since  it is used to determine the exact file length when send-
                ing files in addition to determining special  processing  which
                may  have  to  be done (i.e.  When receiving a text file, write
                all characters in CBM ASCII.). The format of this command is:
     
     
                         KERMIT-65>SET FILE-TYPE type
     
     
                Where  type  is  ASCII,  BINARY, PETASCI or SCRIPT. BINARY is a
                core image (and is normally transferred in eight-bit mode). AS-
                CII  is  any  file  of ASCII text. PETASCI is a CBM ASCII file.
                SCRIPT is a file produced  by  the  SPEEDSCRIPT  wordprocessor,
                which was published in the Gazzette! Magazine.
     
SET FILE-WARNING
                This command determines what KERMIT-65 will do when it receives
                a  file  with a file name that already exists.  If FILE-WARNING
                is turned ON, KERMIT-65 will not supersede the old file.    In-
                stead  it will create a file with the original file name plus a
                '.0' appended to it.  It will increment  the  'version'  number
                until  it  succeeds  in  creating  a  unique  file  name.    If
                FILE-WARNING is turned OFF (the default), Kermit-65 will super-
                sede the old file.
     
     
                      KERMIT-65>SET FILE-WARNING keyword
     
     
                Where keyword is either ON or OFF.
     
SET FLOW-CONTROL
                The  SET  FLOW-CONTROL  command  will  enable  the selection of











Page 12                                                   C64 KERMIT User Guide
     
     
                XON/XOFF flow control if desired. This  option  is  recommended
                set for communication speeds of 1200 baud or higher.
     
     
                      KERMIT-65>SET FLOW-CONTROL keyword
     
     
                Where keyword is either ON or OFF.
     
SET IBM
                The  SET  IBM  command  allows  KERMIT-65 to be put into a mode
                which will allow  transfers  to  an  IBM  host.    This  causes
                KERMIT-65  to  wait  for  the  IBM  turnaround  character (XON,
                CTRL-Q) before sending any characters to the other Kermit.   It
                also  forces  the parity type to be mark, the word length to be
                seven-bit, turns on local echo  for  the  CONNECT  command  and
                turns off flow-control.
     
     
                           KERMIT-65>SET IBM keyword
     
     
                Where keyword is either ON or OFF.
     
SET LOCAL-ECHO   The SET LOCAL-ECHO command specifies whether characters should
                be  echoed  locally  when  CONNECTing  to  another  system.  If
                LOCAL-ECHO is set to ON, any character typed  on  the  terminal
                will  be  echoed  immediately to the terminal, as well as being
                sent to the other system.  If LOCAL-ECHO is  set  to  OFF  (the
                default), the characters typed on the terminal are only sent to
                the  other  system  (which  would  normally  be   echoing   the
                characters).
     
     
                       KERMIT-65>SET LOCAL-ECHO keyword
     
     
                Where keyword is either ON or OFF.
     
SET PARITY
                This command determines the type of parity to use on the trans-
                mission line.  Kermit normally uses characters which consist of
                eight  data  bits with no parity bit.  For systems or transmis-
                sion media which require a specific  parity  type,  Kermit  can
                send characters as seven data bits plus a parity bit.
     
     
                         KERMIT-65>SET PARITY keyword
     
     
                Where keyword is one of:












Running KERMIT                                                          Page 13
     
     
                   1. NONE (default) - eight data bits and no parity bit.
     
                   2. MARK - seven data bits with the parity  bit  set  to
                      one.
     
                   3. SPACE  -  seven data bits with the parity bit set to
                      zero.
     
                   4. EVEN - seven data bits with the parity  bit  set  to
                      make the overall parity even.
     
                   5. ODD  -  seven  data  bits with the parity bit set to
                      make the overall parity odd.
     
SET RECEIVE
                It  is  possible  to set various parameters associated with the
                receiving of the data from the remote Kermit.  SET RECEIVE will
                enable you to set the various receive parameters.
     
     
                       KERMIT-65>SET RECEIVE <suboption>
     
     
                The suboptions of this SET command are:
     
              EIGHT-BIT-QUOTE-CHAR        END-OF-LINE   PACKET-LENGTH
              PAD-CHAR                    PADDING       QUOTE-CHAR
              TIMEOUT
     
SET RECEIVE EIGHT-BIT-QUOTE-CHAR
                This  command sets the character to be used (when necessary) to
                quote characters which have the eighth bit  (parity  bit)  set.
                This  is  used  to  transfer  eight-bit bytes on a transmission
                medium which only supports seven data bits.  The default  value
                is 26 (ASCII "&").  Eight-bit-quoting will only be used if both
                Kermit's can handle it, and the  tranmission  medium  does  not
                transmit 8 data bits (as indicated by the SET PARITY command).
     
     
                 KERMIT-65>SET RECEIVE EIGHT-BIT-QUOTE-CHAR nn
     
     
                Where nn is the ASCII value of the character (in  hex)  to  use
                for quoting characters which have the eighth bit set.
     
SET RECEIVE END-OF-LINE
                This will set the end of line character that KERMIT-65  expects
                to receive from the remote Kermit.  This is the character which
                terminates a packet.   The  default  value  is  0F  (ASCII  CR,
                CTRL-M).













Page 14                                                   C64 KERMIT User Guide
     
     
                     KERMIT-65>SET RECEIVE END-OF-LINE nn
     
     
                Where nn is the ASCII value of the character to use for the end
                of line character (in hex).
     
SET RECEIVE PACKET-LENGTH
                This will set the receive packet length.  The  value  for  this
                parameter must be between 10 and 96.  Packet lengths outside of
                this range are illegal.  The default value is 5E (94 decimal).
     
     
                    KERMIT-65>SET RECEIVE PACKET-LENGTH nn
     
SET RECEIVE PAD-CHAR
                This  parameter  is the padding character that is expected from
                the remote Kermit.  The parameter must be a hex number  in  the
                range  of  0  to  1F or 7F.  All other values are illegal.  The
                default value is 0 (an ASCII NUL).
     
     
                       KERMIT-65>SET RECEIVE PAD-CHAR nn
     
     
                Where  nn  is  the ASCII value of the character to be used as a
                pad character (in hex).
     
SET RECEIVE PADDING
                This  command  will  set  the number of padding characters that
                will be expected from the other Kermit.  The default  value  is
                0.
     
     
                       KERMIT-65>SET RECEIVE PADDING nn
     
     
                Where nn is the hex number of padding characters to use.
     
SET RECEIVE QUOTE-CHAR
                This  will set the quoting character that KERMIT-65 will expect
                on incoming messages.  This is the character used to quote con-
                trol characters.  The default value is 23 (ASCII "#").
     
     
                      KERMIT-65>SET RECEIVE QUOTE-CHAR nn
     
     
                Where nn is the ASCII value of the quoting character (in hex).
     
SET RECEIVE TIMEOUT
                This  will  set the number of seconds that Kermit will wait for
                acknowledgement before it will retry  sding  or  receiving  the











Running KERMIT                                                          Page 15
     
     
                current  packet (during a RECEIVE or GET). The default value is
                15 seconds.
     
     
                       KERMIT-65>SET RECEIVE TIMEOUT nn
     
     
                Where  nn  is  the number of seconds to wait for a message from
                the remote kermit (in hex).
     
SET RS232-REGISTERS
                This sets the 2 registers for controlling the baud rate, parity
                etc. The 2 registers are treated as a 16 bit hex  integer.  The
                first  2  digits  are the SECOND register and the last 2 digits
                are the FIRST register. If  only  2  digits  are  entered,  the
                second register is cleared. Examples:
     
     
                KERMIT-65>SET  RS232-REGISTERS  0006  (or  SET  RS 06) sets the
                registers to 06,00 for 300 baud, 8 bit, no parity (this is  the
                default)
     
                KERMIT-65>SET  RS232-REGISTERS A026 sets the registers to 26,A0
                for 300 baud, 7 bit, parity mark.
     
                See the C64 reference manual for a complete description of  all
                the bits in the 2 registers.
     
SET SCREEN-WIDTH
                This option will let you choose the working  screen  width  for
                Kermit.  40  columns  is  the default, but many mainframes will
                operate better with an 80 column screen width.  The  80  column
                option  requires no extra hardware. The 80 column screen is im-
                plemented using a hires bit mapped screen and can be viewed  on
                any  TV or monitor. Choosing this option will restart Kermit in
                the selected mode (all options set up to this point will remain
                intact).
     
     
                      KERMIT-65>SET SCREEN-WIDTH keyword
     
     
                Where keyword is either 40-COLUMNS or 80-COLUMNS
     
SET SEND
                It  is  possible  to set various parameters associated with the
                sending of data to the remote Kermit.  SET SEND will enable you
                to  set  the  various SEND parameters.  These parameters should
                not normally be set since, as part of the transfer  initializa-
                tion   process,   the   two   Kermits  exchange  their  RECEIVE
                parameters.  The capability  of  setting  these  parameters  is
                provided  so  that the transfer initialization can be completed











Page 16                                                   C64 KERMIT User Guide
     
     
                even if the default parameters are not correct.
     
     
                        KERMIT-65>SET SEND <suboption>
     
     
                The suboptions of this SET command are:
     
              EIGHT-BIT-QUOTE-CHAR        END-OF-LINE   PACKET-LENGTH
              PAD-CHAR                    PADDING       QUOTE-CHAR
              TIMEOUT
     
SET SEND EIGHT-BIT-QUOTE-CHAR
                This command sets the character to be used (when necessary)  to
                quote  characters  which  have the eighth bit (parity bit) set.
                This is used to transfer  eight-bit  bytes  on  a  transmission
                medium  which only supports seven data bits.  The default value
                is 26 (ASCII "&").  Eight-bit-quoting will only be used if both
                Kermit's  can  handle  it,  and the tranmission medium does not
                transmit 8 data bits (as indicated by the SET PARITY command).
     
     
                  KERMIT-65>SET SEND EIGHT-BIT-QUOTE-CHAR nn
     
     
                Where  nn  is  the ASCII value of the character (in hex) to use
                for quoting characters which have the eighth bit set.
     
SET SEND END-OF-LINE
                This  will  set  the  end of line character that KERMIT-65 will
                send to the remote Kermit.  This is the  character  which  ter-
                minates a packet.  The default value is 0F (ASCII CR, CTRL-M).
     
     
                       KERMIT-65>SET SEND END-OF-LINE nn
     
     
                Where nn is the ASCII value of the character to use for the end
                of line character (in hex).
     
SET SEND PACKET-LENGTH
                This will set the send packet  length.    The  value  for  this
                parameter must be between 10 and 96.  Packet lengths outside of
                this range are illegal.  The default value is 5E (94 decimal).
     
     
                      KERMIT-65>SET SEND PACKET-LENGTH nn
     
SET SEND PAD-CHAR
                This  parameter  is  the  padding character that is sent to the
                remote Kermit.  The parameter must be  an  hex  number  in  the
                range  of  0  to  1F or 7F.  All other values are illegal.  The











Running KERMIT                                                          Page 17
     
     
                default value is 0 (an ASCII NUL).
     
     
                        KERMIT-65>SET SEND PAD-CHAR nn
     
     
                Where  nn  is  the ASCII value of the character to be used as a
                pad character (in hex).
     
SET SEND PADDING
                This  command  will  set  the number of padding characters that
                will be sent to the other Kermit.  The default value is 0.
     
     
                         KERMIT-65>SET SEND PADDING nn
     
     
                Where nn is the hex number of padding characters to use.
     
SET SEND QUOTE-CHAR
                This will set the quoting character that KERMIT-65 will send in
                outgoing messages.  This is the character used to quote control
                characters.  The default value is 23 (ASCII "#").
     
     
                       KERMIT-65>SET SEND QUOTE-CHAR nn
     
     
                Where nn is the ASCII value of the quoting character (in hex).
     
SET SEND TIMEOUT
                Set the time in seconds that  Kermit  will  wait  for  an  ack-
                nowledgement before it will retry sending or receiving the cur-
                rent packet (during a SEND). The default value is 15 seconds.
     
     
                         KERMIT-65>SET SEND TIMEOUT nn
     
                Where nn is the number of seconds to wait for  a  message  from
                the remote kermit (in hex).
     
SET VT52-EMULATION
                This switch determines whether or not Kermit-65 will act like a
                VT52  when  it  is  CONNECTed  to a remote Kermit. The possible
                values for the switch are ON and OFF. The default is ON.
     
     
                       KERMIT-65>SET VT52-EMULATION OFF
     
SET WORD-SIZE
                This option will set the word length for communication.












Page 18                                                   C64 KERMIT User Guide
     
     
                         KERMIT-65>SET WORD-SIZE size
     
     
                Where size is either SEVEN-BIT or EIGHT-BIT
     
SHOW
                The  SHOW command will allow you to show the various parameters
                that are set with the SET command.
     
     
                    KERMIT-65>SHOW <option> <suboption>...
     
     
                The options available to SHOW are:
     
                    ALL                 BAUD                DEBUGGING
                    EIGHT-BIT-QUOTING   ESCAPE              FILE-BYTE-SIZE
                    FILE-TYPE           FILE-WARNING        FLOW-CONTROL
                    IBM                 LOCAL-ECHO          PARITY
                    RECEIVE             RS232-REGISTERS     SEND
                    VT52-EMULATION      WORD-SIZE
     
                        A description of the options and suboptions follows.
     
SHOW ALL
                The SHOW ALL command will cause all of  the  parameters  to  be
                listed.
     
SHOW BAUD
                Shows the current Baud rate.
     
SHOW DEBUGGING
                Display  whether debugging is off, in terse mode, or in verbose
                mode.
     
SHOW EIGHT-BIT-QUOTING
                Shows  whether  or  not Kermit-65 is using eight-bit-quoting on
                file transfers.
     
SHOW ESCAPE
                This  will  display  the  character being used to escape from a
                connection to a remote Kermit.
     
SHOW FILE-BYTE-SIZE
                This command shows whether Kermit is treating seven bits or all
                eight bits as significant when writing to a file.
     
SHOW FILE-TYPE
                Shows what type of file Kermit-65 is reading or writing.
     
SHOW FILE-WARNING
                Shows whether or not Kermit-65 will check if a file  exists  on











Running KERMIT                                                          Page 19
     
     
                receive,  and  try  to  modify the name used for the file if it
                does.
     
SHOW FLOW-CONTROL
                Shows  whether  or not Kermit-65 is using XON/XOFF flow control
                for communication.
     
SHOW IBM
                Shows  whether or not Kermit-65 is being used to talk to an IBM
                mainframe.
     
SHOW LOCAL-ECHO Shows whether or not Kermit-65 will print a copy of  characters
                on  the  screen  which  are  typed  by the user and sent to the
                mainframe during connect processing.
     
SHOW PARITY
                Shows  the  type  of parity being used by Kermit-65 in order to
                talk to the other Kermit.
     
SHOW RECEIVE
                Shows the setting of a particular receive packet parameter. The
                suboptions available are:
     
                EIGHT-BIT-QUOTE-CHAR            END-OF-LINE     PACKET-LENGTH
                PAD-CHAR                        PADDING         QUOTE-CHAR
                TIMEOUT
     
                        These are analogous to the SET  RECEIVE  options  given
above.
     
SHOW RS232-REGISTERS
                Shows the value of the 2 RS232 registers as a single 16 bit hex
                value.
     
SHOW SEND
                Shows the setting of a particular send  packet  parameter.  The
                suboptions available are:
     
                EIGHT-BIT-QUOTE-CHAR            END-OF-LINE     PACKET-LENGTH
                PAD-CHAR                        PADDING         QUOTE-CHAR
                TIMEOUT
     
                        These  are  analogous  to  the  SET  SEND options given
above.
     
SHOW VT52-EMULATION
                Shows whether or not Kermit-65 is acting like a VT52 when talk-
                ing to another Kermit during connect processing.
     
SHOW WORD-SIZE  Shows the current word-length for communication.
     
STATUS











Page 20                                                   C64 KERMIT User Guide
     
     
                The  current  status  of Kermit-65 will be displayed.  This in-
                cludes the  number  of  characters  that  have  been  sent  and
                received  from  the remote Kermit.  Also included is the amount
                of characters which were actual data and the overhead for  both
                send and receive.
     
3.3. INIT Files
     
C64 KERMIT-65 has the ability to load preset parameters from disk automatically
upon startup. When Kermit is first started, it will search the disk for a  file
called 'KERMIT.INI'. This file must contain Kermit parameters in a special for-
mat and order. Such a file is provided in the distribution.  Kermit  will  load
these parameters into memory and use them untill they are changed by the user.
     
The init file provided with the distribution has the following defaults set:
     
  Debugging Is                       TERSE
  Vt52 Emulation Is                  ON
  Ibm-Mode Is                        OFF
  Local-Echo Is                      OFF
  Baud-Rate Is                       1200
  Parity Is                          None
  Word-Size Is                       EIGHT-BIT
  Flow-Control Is                    ON
  Eight-Bit-Quoting Is               OFF
  File-Warning Is                    ON
  Escape Character Is                ^y
  File-Type Mode Is                  ASCII
  File-Byte-Size Is                  SEVEN-BIT
  RS232 Registers =                  $0000
  Receive
    Padding Character Is             ^@
    Amount Of Padding Is             00
    Eight-Bit-Quoting Char Is        &
    End-Of-Line Character Is         ^m
    Packet-Length Is                 5d
    Quote Character Is               #
    Timeout Character Is             04
  Send
    Padding Character Is             ^@
    Amount Of Padding Is             00
    Eight-Bit-Quoting Char Is        &
    End-Of-Line Character Is         ^m
    Packet-Length Is                 5d
    Quote Character Is               #
    Timeout Character Is             04

















KERMIT-65 SYSTEM INSTALLATION GUIDE                                     Page 21
     
     
4. KERMIT-65 SYSTEM INSTALLATION GUIDE
     
4.1. THE FILES
     
The following files should be supplied on the distribution tape:
     
   - C64BOOT.BAS - Initial bootstrap program to load C64KER.HEX
     
   - C64BOOT.C - C program at mainframe to talk to C64BOOT.BAS
     
   - C64BOOT.FOR - FORTRAN program at mainframe to talk to C64BOOT.BAS
     
   - C64DXL.BAS - Hex disk file loader in BASIC
     
   - C64DXL.HEX - Assembled version of Disk Hex load program
     
   - C64DXL.M65 - Source of program to load KERMIT-65 from C64 diskette
     
   - C64KER.BIN  - Assembled version of KERMIT-65 (Eight-bit Binary Object
     code)
     
   - C64KER.HEX - Assembled version of KERMIT-65
     
   - C64KER.INI - Init file for KERMIT-65
     
   - C64KER.M65 - CROSS assembler source for KERMIT-65
     
   - CROSS.MAC - CROSS Microprocessor Assembler (Source)
     
   - CROSS.EXE - CROSS Microprocessor Assembler (Object)
     
4.2. Building KERMIT-65
     
.R CROSS<cr>                    ! Run CROSS Microprocessor Assembler
     
*C64KER.HEX/PTP:KIM=C64KER.M65/M65      ! Generate .HEX file
     
     
This command will produce an ASCII HEX file which can be downline  loaded  onto
the  C64  using C64BOOT. If a listing is desired, one can be produced by adding
",C64KER.LST" after the "/PTP:KIM" in the command  line  to  CROSS.  Note  that
CROSS  tends  to  pad  its' output files with NULLS. You may want to strip them
with the editor of your choice to cut down the files' size (which will also cut
down on the time recquired to transmit the file).



















Page 22                                                   C64 KERMIT User Guide
     
     
4.3. General Procedures and Conventions
     
Before working with KERMIT on the C64 do the following:
     
   1. Make sure all equipment is turned off.
     
   2. Remove all cartridges from your C64 computer.
     
   3. Turn on your disk drive and monitor.
     
   4. Turn on your C64 computer.
     
   5. Turn on your printer.
     
   6. Insert your working disk into the disk drive.
     
   7. Follow the procedures outlined below to bring up KERMIT.
     
4.4. Loading an assembled file
     
The  procedure to bootstrap an assembled KERMIT object file from a mainframe to
the C64 is as follows:
     
1) On the C64, Load and run SUPERMON machine language  monitor  or  equivalent.
Preferably should be in address $C800-$CFFF.
     
2)  Type  in  the  BASIC  program C64BOOT.BAS on the C64. This is a simple file
transfer protocol for receiving '.HEX' files. It is recommended that  the  user
save this program as it may be needed to bootstrap newer versions of KERMIT, or
C64DXL in the future.
     
3) Run C64BOOT.BAS on the C64. The procedure is:
     
        LOAD"C64BOOT.BAS",8
        RUN<cr>
     
        NOW IN DUMB TERMINAL MODE.  PRESS F1 KEY
        TO BEGIN RECEIVING FILE. (MAKE SURE THAT
        HOST IS SET FOR HALF-DUPLEX.)
     
     
     
4) Call and login to the mainframe on which KERMIT-65 resides.
     
5) Compile and execute C64BOOT.FOR. This will be used along with C64BOOT.BAS on
the  C64  to  load  C64DXL.HEX AND C64KER.HEX. Once C64BOOT is executing on the
mainframe, give control back to the C64.
     
6) First download C64DXL.HEX
     
        <F1>
        LOCAL FILENAME? C64DXL.HEX











KERMIT-65 SYSTEM INSTALLATION GUIDE                                     Page 23
     
     
C64BOOT will display status messages about what it is receiving on  the  screen
as well as saving the data on disk.
     
7) Then download C64KER.HEX
     
        <F1>
        LOCAL FILENAME? C64KER.HEX
     
     
C64BOOT  will  display status messages about what it is receiving on the screen
as well as saving the data on disk. WARNING: This file will take lots of  space
(about 205 sectors), so make sure the disk is reasonably empty.
     
8) Then download C64KER.INI
     
        <F1>
        LOCAL FILENAME? C64KER.INI
     
     
9) Logout (if you wish) and exit C64BOOT.BAS
     
10) Type in and save C64DXL.BAS. Run C64DXL.BAS
     
        LOAD"C64DXL.BAS",8
        RUN<cr>
        Name Of File? C64DXL.HEX<cr>
     
 C64DXL will display what it is loading into memory.
     
11)  Save C64DXL. Type the following: (if you haven't already, load Supermon at
C7ED)
     
 SYS 51181 (to enter Supermon)
 .S "C64DXL.C000",08,C000,C2EE<cr>
     
     
12) Start executing C64DXL.
     
 LOAD "C64DXL.C000",8,1<cr>
 SYS 49152<cr>
 Hex Object File Loader
 Object File Name? C64KER.HEX <cr>
     
C64DXL will display what it is loading into memory.
     
13) When done, enter SUPERMON and save the file:
     
 .S "KERMIT",08,0801,xxxx+1<cr>
     
 Where xxxx is the last address diplayed by C64DXL
     
The new version of Kermit is now on disk.











Page 24                                                   C64 KERMIT User Guide
     
     
4.5. Loading a new version of KERMIT-65
     
Once KERMIT-65 is on the users system, it can be used to load new  versions  of
KERMIT-65.   There are two ways of doing this.  One will work in any enviroment
where the initial bootstrap procedure works,  since  it  depends  only  on  the
capability  of  transferring  text  files.    The other method depends upon the
capability of being able to obtain and transfer a binary file.
     
4.6. Loading from a .HEX file
     
1) Use Kermit to transfer C64DXL over to your C64 (If you already have  C64DXL,
skip  to  step 4). C64DXL is a disk hex loader that will take CROSS format .HEX
files on your C64 and load them into memory:
     
        LOAD"KERMIT",8<cr>
        RUN<cr>
        (Do your mainframe Kermit setup here)
        KERMIT-65>GET C64DXL.HEX<cr> (or RECEIVE C64DXL.HEX)
     
2) Type in and save C64DXL.BAS. Run C64DXL.BAS
     
        LOAD"C64DXL.BAS",8
        RUN<cr>
        Name Of File? C64DXL.HEX<cr>
     
 C64DXL will display what it is loading into memory.
     
     
3) Save C64DXL. Type the following:
     
 SYS 51181 (to enter Supermon)
 .S "C64DXL.C000",08,C000,C2EE<cr>
     
     
4) Use Kermit-65 to transfer the new version of itself over.  Make the C64 file
a Text file. WARNING: This file will take LOTS of space (about 205 sectors), so
make sure the disk is reasonably empty.
     
5) Start executing C64DXL.
     
 LOAD "C64DXL.C000",8,1<cr>
 SYS 49152<cr>
 Hex Object File Loader
 Object File Name? C64KER.HEX <cr>
     
C64DXL will display what it is loading into memory.
     
6) When done, enter SUPERMON and save the file:
     
 .S "KERMIT",08,0801,xxxx+1<cr>
     
 Where xxxx is the last address diplayed by C64DXL











KERMIT-65 SYSTEM INSTALLATION GUIDE                                     Page 25
     
     
The new version of Kermit is now on disk.
     
7) If you don't already have a KERMIT.INI file, you should transfer  this  file
over from the mainframe. See the section on init files for more information.
     
4.7. Loading from the binary version
     
There  is  yet another way to Bootstrap a new version of KERMIT onto an C64. If
the user has an older version of KERMIT-65 which supports binary mode transfer,
and  has  access  to a machine with a valid copy of C64KER.BIN, they can simply
transfer C64KER.BIN  using  their  version  of  KERMIT.  Be  sure  to  set  the
File-byte-size  to Eight-bit, and the File-type-mode to Binary before transfer-
ring the file since this is the actual object code.   Also  be  sure  that  the
sending  Kermit is also set for doing a binary transfer.  No special loading or
conversion is needed. If no KERMIT.INI file  is  present,  it  should  also  be
transferred to the C64. See the section on init files for more information.















































Page 26                                                   C64 KERMIT User Guide
     
     
I. Character and Control Code Definitions
     
I.1. Keyboard Layout
     
Because  of  the  unusual layout of the C64 keyboard, the desire to support all
ascii characters, and a personal need to find the ESC and  DEL  keys  in  their
usual positions, the following key substitutions apply (note- ^x is short- hand
for CONTROL-x):
     
        TO SEND         TYPE
        -------         ----
        \               BRITISH-POUND
        ^\              ^BRITISH-POUND
        ^_              ^=
        ^               UP-ARROW
        ^^              ^UP-ARROW
        ^[ (ESC)        ^[ or LEFT ARROW
        _               F1
        |               F2
        `               F3
        ~               F4
        :               F5
        :               F6
        ^H (BS)         F7
        ^T              F8
        DEL (RUB)       Commodore DEL
        ^J (NL)         SHIFT/RETURN or ^J
        ^S (DC3)        ^S or HOME
        ^Q (DC1)        ^Q or CURSOR DOWN
        ^I (TAB)        ^I (ie. No separate TAB key)
     
Note that if the FLOW-CONTROL option has been set, pressing the  COMMODORE  key
will  place  the  terminal  program in a suspended display mode (ie. the cursor
will freeze at it's current position), and ^S will be sent to the host computer
when  the  RS-232 input buffer fills up.  Similarly, pressing the COMMODORE key
will remove the terminal from the suspended display mode and send a ^Q  to  the
host  computer  only if a ^S had previously been sent and the buffer has become
nearly empty.  This enables the COMMODORE key  to  be  used  like  the  SCROLL/
NO-SCROLL  key  on  DEC  terminals.  Suspended display mode is indicated to the
user by the cursor blinking much faster than normal,  an  indication  that  the
COMMODORE  key  must  be  pressed  to resume displaying the received text.  The
program may also send ^S and ^Q to the host computer on it's own from  time  to
time  if  it  detects an impending RS-232 buffer overflow condition - this nor-
mally will only occur while printing a number of short  or  blank  lines  while
scrolling  the  screen up (or down), since 4 to 15 characters are received into
the RS-232 buffer during the time it takes to scroll the whole screen.  In  any
case,  this  automatic flow control is fully synchronized with the flow control
necessitated by the use of the COMMODORE key to suspend and resume the  display
of  received  text.    Depressing  the ^S and ^Q keys (or their substitutes in-
dicated above) unconditionally sends those ASCII characters to the remote  host
computer without any local effect.












Character and Control Code Definitions                                  Page 27
     
     
This terminal program does `not' support flow control in the opposite direction
- receiving ^S from the host computer will not lock the keyboard  or  have  any
other effect, nor will ^Q.
     
     
I.2. GLASS terminal
     
The  GLASS  TTY terminal type prints all characters except ASCII 0-31 and ASCII
127.  Most control codes are ignored.  The following, however, are recognized:
     
        CHARACTER       EFFECT
        ---------       ------
        ^G (BEL)        sounds a beep
        ^H (BS)         cursor backspaces
        ^I (TAB)        cursor moves right to next tab stop
        ^J (NL)         cursor moves down one line with scrolling
        ^M (CR)         cursor moves to start of line
     
     
                   Table I-1:   Control Codes For Glass TTY
     
Tab stops are pre-defined and fixed at every 8 columns beginning with column  0
(ie. 0, 8, 16, 24, ...).
     
I.3. VT-52 Terminal
     
The  VT-52  terminal prints the same characters as the GLASS TTY.  It reacts to
control characters the same as the GLASS,  except  when  ESC  (decimal  27)  is
received.  Kermit will treat the next character received specially; if it isn't
in the following table, KERMIT ignores the character; if it is  in  the  table,
the action is as indicated.
     
        CHARACTER       EFFECT
        ---------       ------
        ^[A             cursor moves up one line
        ^[B             cursor moves down
        ^[C             cursor moves right one char.
        ^[D             cursor moves left one char.
        ^[H             cursor homes
        ^[I             cursor moves up one line with scrolling
        ^[J             clears from cursor to end of screen
        ^[K             clears from cursor to end of line
        ^[Ylc           cursor moves to line l-$20, col c-$20
        ^[Z             sends DEC VT-52 terminal id string
        ^[n             turns off reverse video
        ^[o             turns on reverse video
     
                    Table I-2:   Escape Sequences for VT-52















Page 28                                                   C64 KERMIT User Guide
     
     
VAX UNIX users (Berkeley 4.1bsd) will find that the following "termcap" entries
effectively describe this terminal program for use with the terminal  dependent
UNIX programs (eg. vi, emacs, more, rogue, etc.):
     
  qc|c64|C64|Commodore 64:co#40:li#25:\
          :up=\EA:do=\EB:cl=\EH\EJ:am:bs:\
          :bw:ho=\EH:nd=\EC:so=\Eo:\
          :se=\En:cm=\EY%+ %+ :\
          :ce=\EK:sr=\EI:pt:
     
VAX  VMS  users  can  probably  get  away with the following (although some VMS
programs [eg. edt] require an auxilliary keypad, and  do  not  work  especially
well in 40 column mode):
     
          set term /dev=vt52
          set term /pag=25
          set term /wid=40
     
TOPS-20 users can run "emacs" and the like after the following:
     
          term vt52
          term length 25
          term width 40
          term pause com







































C64BOOT.BAS - BOOTSTRAP PROGRAM FOR C64DXL                              Page 29
     
     
II. C64BOOT.BAS - BOOTSTRAP PROGRAM FOR C64DXL
     
Here is the  download program  for the  C64.  Note  that the  RS-232
channel open statement in  line 10 may need  to be modified for  the
particular host.
     
The mainframe host should have a C64BOOT program to accompany  this
one which runs on  the C64.  C64BOOT is  currently written in  CLU,
and is  available  in  executable  form for  TOPS-20  and  4.2  UNIX
systems.
     
To download a file, load and  run this program on the Commodore  64.
Use the dumb terminal mode  to log in to  the remote host.  Set  the
remote host for half duplex communication (this prevents the  remote
host from echoing the acknowledgements it receives back to the C64).
Then run the download program on the remote host, including the name
of the file you  wish to download  to the C64  on the command  line.
For example, to download the file foo, you would type C64BOOT FOO
     
=============================================================================
     
1 REM FILE CAPTURE PROGRAM; ROBERT LENOIL, AUTHOR.
2 REM WRITTEN DECEMBER 1984. CLEANED UP FOR GENERAL PUBLIC FEBRUARY 1985.
5 PRINT "[CLEAR]NOW IN DUMB TERMINAL MODE.  PRESS F1 KEY";
6 PRINT "TO BEGIN RECEIVING FILE. (MAKE SURE THAT";
7 PRINT "HOST IS SET FOR HALF-DUPLEX.)  PRESS F7"
8 PRINT "KEY TO EXIT PROGRAM."
9 PRINT "----------------------------------------";
10 OPEN 1,2,0,CHR$(38)+CHR$(161) : OPEN 15,8,15
15 GET A$ : IF A$ = CHR$(133) THEN 20
16 IF A$ = CHR$(136) THEN PRINT "QUITTING" : CLOSE 1 : END
18 PRINTA$; : PRINT#1,A$; : GET#1,A$ : GOSUB 150 : PRINTA$; : GOTO 15
20 F$="" : INPUT "LOCAL FILENAME";F$
23 IF F$="" THEN CLOSE 15 : CLOSE 1 : PRINT "QUITTING" : END
25 OPEN 8,8,8,"0:"+F$+",S,W"
30 GOSUB 60 : IF EN$ > "00" THEN CLOSE 8 : GOTO 20
35 GET#1,A$ : IF A$ > "" GOTO 35
40 GOSUB 45 : GOTO 190
45 PRINT#1,"ok" : RETURN :REM "OK" ON REMOTE HOST
47 PRINT#1,"ng" : RETURN :REM "NG" ON REMOTE HOST
60 INPUT#15,EN$,EM$,ET$,ES$ : IF EN$ > "00" THEN PRINT "[RVS ON]"EN$EM$ET$ES$
61 RETURN
150 REM CONVERT ASCII TO PETASCII
155 A = ASC(A$+CHR$(0)) : IF A > 64 AND A < 91 THEN A = A + 128
160 IF A > 96 AND A < 123 THEN A = A - 32
165 IF A=127 THEN A=20
170 A$=CHR$(A) :RETURN
190 L$="" : CK=0
195 GET#1,A$ : IF A$="" THEN 195
197 IF A$=CHR$(13) THEN 200
198 CK = CK + ASC(A$) : L$ = L$ +A$ : PRINT A$; : GOTO 195
200 PRINT : CK$=""











Page 30                                                   C64 KERMIT User Guide
     
     
202 GET#1,A$ : IF A$="" THEN 202
203 IF A$ <> CHR$(13) THEN CK$ = CK$ + A$ : GOTO 202
205 IF CK = ABS(VAL(CK$)) THEN 210
207 PRINT "[RVS ON]CHECKSUM ERROR - SENDING NACK" : GOSUB 47 : GOTO 190
210 PRINT#8,L$ : GOSUB 60 : IF EN$ > "00" THEN STOP :REM (FATAL?) DISK ERROR
215 GOSUB 45 : IF LEFT$(CK$,1) <> "-" THEN 190
220 CLOSE 8 : PRINT F$" DOWNLOADED; RETURNING TO TERMINAL MODE" : GOTO 15
























































C64BOOT.C - MAINFRAME SIDE OF BOOTSTRAP                                 Page 31
     
     
III. C64BOOT.C - MAINFRAME SIDE OF BOOTSTRAP
     
/*  "c64boot.c"  initial download program for Unix systems   *
 * program to download files to C64, modelled on C64BOOT.CLU
 *  sends lines, one at a time, each followed by a checksum.
 * the C64 validates cksum and returns "OK" or "NG".
 * last line cksum sent with leading "-" to signify eof.
 *  Although written on a Unix system, the C code contains
 *  no kernal calls and should be fairly portable.
 *  Written by:  Alastair Mayer, U. of Guelph, 2-Apr-85
 *               ( acdmayer@uoguelph.bitnet )
 */
#include <stdio.h>
#define BUFFMAX 256
#define EOS '\0'
     
main(argc,argv)
int argc;
char *argv[];
:
     
   char received[BUFFMAX],
        line[BUFFMAX];
   char *c;
   int  checksum = 0;
   int eof = 0;
   FILE *fd;
     
   if (argc>1)
      fd = fopen(argv[1],"r");
   if (fd == NULL) :
      fprintf(stderr,"%s: can't open '%s'\n",argv[0],argv[1]);
      exit(-1);
      :
   while (strcmp(received,"OK"))
       scanf("%[?\n]%*c",received);
      /* wait for starting "OK" */
     
   while ( (! eof) || (strcmp(received,"NG")==0)) :
       if (strcmp(received,"OK")==0) :
          line[0] = EOS;  /* clear it first */
          eof = (fscanf(fd,"%[?\n]%*c",line) < 0);
          :
       checksum = 0;
       for (c=line; *c ; c++) :
          putchar(*c);
          checksum += *c;
          :
       putchar('\n');
       if (eof) putchar('-');
       checksum &= 0177;

thw9759@ultb.UUCP (T.H. White) (08/15/89)

I recently got kermit version 2.1 up on my c64 and it seems to be functional
except that I cannot get it to talk correctly with the host. I have tried
to connect to two different ULTRIX systems, SUN systems, and a VAX/VMS
system. None seem to work right. Thhe host seems to get everything that I type
but I don't get everything from the host and often don't see what I type.
I have messed around with every parameter that there is and nothing works.

Is there something there that I am not aware of? I have a vt52 emulator
and magic term, VIP term, all seem to talk to these hosts great. Help please.


						Tim

ray@maxwell.physics.purdue.edu (Ray Moody) (08/29/89)

In article <1149@ultb.UUCP>, thw9759@ultb (T.H. White) writes:
>I recently got kermit version 2.1 up on my c64 and it seems to be functional
>except that I cannot get it to talk correctly with the host.

>Is there something there that I am not aware of? I have a vt52 emulator
>and magic term, VIP term, all seem to talk to these hosts great. Help please.

    Kermit does parity checking and most other terminal programs do
not.  If Kermit does not work for you, but other terminal programs
often do, you probably have a parity problem.

    If Kermit receives a character with bad parity, you will be beeped
at and the character will not be displayed.  (Are you being beeped at?)

    Remember that if you set parity to none, you should set word-size
to eight, otherwise, you should set word-size to seven.  Many other
terminal programs will not support non-standard word-sizes so this
parameter is often overlooked.

								Ray