[comp.sys.apollo] /com/crp kermit

GELINASJ@CMR001.BITNET (01/15/90)

      After some blind hacking, i have managed to get a working KERMIT
under SR10.1, BSD4.3. But i have a few problems left to solve and would
like the help of an old time AEGIS programmer or two.
Please contact me by email if you can help.
Here are the problems, followed by short extracts of the code itself.

 Problem 1: When used with /com/crp, KERMIT cannot find what kind of
                terminal is used. I solved that by adding an else clause.

 Problem 2: When used with /com/crp, KERMIT cannot program the function
                keys F1 and F8 ( ?crp -- ***illegal code ****).

 Problem 3: KERMIT and EMT can no longer display what the mainframe
            (CP-6) sends at 9600 bauds. But i got KERMIT receiving files
            from an IBM PC AT at 19200 bauds (boy! it this fast!).

On the whole, though, i am satisfied with this KERMIT since it accepts
wildcards and can be stopped (this did not work before).

----------------------------------------------
char *ckxv = "Apollo Aegis tty I/O, 4C(023), 13 Feb 87";
/* C-Kermit interrupt, terminal control & i/o functions  */
/* by:    Neal Holtz, (holtz%cascade.carleton.cdn@ubc.csnet)
          CASCADE, Carleton University, Ottawa, Canada
 from the Unix 4.2 version originally by:
 Author: Frank da Cruz (SY.FDC@CU20B),
----------------------------------------------
/* undocumented declarations stolen from  (/sys/source/emt/emt.pas) */
/* for CRP mbx functions */
          /* Identify stream as crp mailbox */
#define      spm_$crp_mbx       (char)(0x04)
          /* Issue a pad_$def_pfk */
#define      spm_$pad_def_pfk   (char)(0x05)
-----------------------------------------------
/*  C O N R A W -- Put console in one of two flavours of "raw" mode */
!!!         mbx_func(spm_$pad_def_pfk,"F1  ER 1C; ER 43");  /* define function k
eys */
!!!         mbx_func(spm_$pad_def_pfk,"F8  ER 1C; ER 42");
            break;
-----------------------------------------------
/*  C O N R E S  --  Restore the console terminal  */
!!!          mbx_func(spm_$pad_def_pfk,"F1  ");  /* reset function keys */
!!!          mbx_func(spm_$pad_def_pfk,"F8  ");
-----------------------------------------------
/*  C O N T Y P E  -- determine what kind of console we have */
    if( is_sio(stream_$stdin) )
        console_type = con_sio;
!!!    else if( is_mbx(stream_$stdin) )
        console_type = con_mbx;
!!! else                                /* added to make kermit */
!!!     console_type = con_mbx;         /* work with crp j.g. jan 90 */
-----------------------------------------------

Jacques Ge'linas    bitnet: gelinasj@cmr001
                  internet: gelinasj%cmr001.bitnet@cunyvm.cuny.edu

dbfunk@ICAEN.UIOWA.EDU (David B Funk) (01/16/90)

In posting <900115.03113295.062479@CMR.CP6> Jacques Ge'linas <gelinasj%cmr001.bitnet@cunyvm.cuny.edu> says:

>       After some blind hacking, i have managed to get a working KERMIT
> under SR10.1, BSD4.3. But i have a few problems left to solve and would
> like the help of an old time AEGIS programmer or two.
> Please contact me by email if you can help.
> Here are the problems, followed by short extracts of the code itself.
> 
>  Problem 1: When used with /com/crp, KERMIT cannot find what kind of
>                 terminal is used. I solved that by adding an else clause.
> 
>  Problem 2: When used with /com/crp, KERMIT cannot program the function
>                 keys F1 and F8 ( ?crp -- ***illegal code ****).
> 
>  Problem 3: KERMIT and EMT can no longer display what the mainframe
>             (CP-6) sends at 9600 bauds. But i got KERMIT receiving files
>             from an IBM PC AT at 19200 bauds (boy! it this fast!).
> ...

  Problem #1 & #2 are related. The problem is pointed to by the line of code:

> /* undocumented declarations stolen from  (/sys/source/emt/emt.pas) */
> /* for CRP mbx functions */
>          /* Identify stream as crp mailbox */

The author used some undocumented sr9.x system calls & features to perform
some fancy tricks. These were very nice and made for usefull functions.
(I should know, I used the same ones in my Pascal Kermit under sr9.7).
The problem is, of course, that these were unreleased systems calls and
Apollo was under no obligation to support them. (Right Rose? ;=)
At sr10 these were abandon (thank goodness) and a new cleaner set of
Domain/OS system calls (tty_$) replaced all the various bits and pieces
that were used in "emt" and pirated for that version of Kermit.
  So the bottom line is those chunks of code are broken at sr10.x and
will need to be revised or abandoned. Actually the new sr10 calls are
quite nice and remove the need to determine the type of input stream
to pick the correct kludge for. Look at "/sys/ins/tty.ins.pas" and
"/sys/source/emt/emt.pas" on a sr10 machine.

  Problem #3 is probably due to a bug in the sr10.1 Apollo serial line
handler for /sau7 & /sau8 machines that can cause character loss. If you are
running at high baud rate (=> 9600 buad) and using Xon-Xoff flow control,
the input handler doesn't always send out the Xoff fast enough. The
result is buffer over-run and character loss. This is supposed to
be fixed in sr10.2 (I haven't had a chance to test it out yet).

Dave Funk