[comp.sys.handhelds] Kermit-32 bug fix

lennartb@lne.kth.se (Lennart Boerjeson @ KTH/LNE, The Royal Inst. of Tech.) (04/08/90)

So many people have asked me about this that I better post it...


I have traced Nicholas Saevenlid's troubles with HP48<->Vax Kermit transfer
to a bug in our version (3.2.077) of Kermit-32. The protocol spec says:
.
.
.
7. QBIN   (verbatim) The printable ASCII character  I  want  to  use  to  quote
          characters  which have the 8th bit set, for transmitting binary files
          when the parity bit cannot be used for data.    Since  this  kind  of
          quoting  increases  both  processor  and transmission overhead, it is
          normally to be avoided.  If used, the quote character must be in  the
          range  ASCII 33-62 ("!" through ">") or 96-126 ("`" through "~"), but
          different from the control-quoting character.  This field  is  inter-
          preted as follows:
 
          Y   I agree to 8-bit quoting if you request it (I don't need it).
          N   I will not do 8-bit quoting (I don't know how).
          &   (or  any  other character in the range 33-62 or 96-126) I need to
              do 8-bit quoting using this character (it will  be  done  if  the
              other  Kermit  puts  a Y in this field, or responds with the same
              prefix character, such as &).  The  recommended  8th-bit  quoting
              prefix character is "&".
          Anything Else : 8-bit quoting will not be done.
 
          Note that this scheme allows either side to initiate the request, and
          the order does not matter.  For instance, a micro  capable  of  8-bit
          communication  will  normally  put  a  "Y"  in  this  field whereas a
          mainframe that uses parity will always put an "&".    No  matter  who
          sends  first,  this  combination  will  result in election of 8th-bit
          quoting.
.
.
.
Kermit-32 REQUIRES 'Y', 'N' or any character in the range 33-62 or 96-126,
anything else results in "Protocol Error". This must be a bug, as the spec
says "anything else ..."

The bug is in the module KERMSG, line 206 ff:
------
    IF ( NOT ((.SEND_8QUOTE_CHR GEQ %O'041' AND .SEND_8QUOTE_CHR LEQ %O'076') OR (.SEND_8QUOTE_CHR
	GEQ %O'140' AND .SEND_8QUOTE_CHR LEQ %O'176') OR (.SEND_8QUOTE_CHR EQL %C'N') OR (
	.SEND_8QUOTE_CHR EQL %C'Y'))) OR .SEND_8QUOTE_CHR EQL .SEND_QUOTE_CHR OR .SEND_8QUOTE_CHR
	EQL .RCV_QUOTE_CHR
    THEN
	BEGIN
	KRM_ERROR (KER_PROTOERR);
	RETURN KER_PROTOERR;
	END;
------
Change the last begin-end block to:
------
	BEGIN
	SEND_8QUOTE_CHR = %C'N';
	END;
------

I'm off for a one-week holiday right now, so don't expect any answers to
further questions until after easter...

!++
! Lennart Boerjeson, System Manager
! School of Electrical Engineering
! Royal Institute of Technology
! S-100 44 Stockholm, Sweden
! tel: int+46-8-7907814
! Internet: lennartb@lne.kth.se
!--
!++
! Lennart Boerjeson, System Manager
! School of Electrical Engineering
! Royal Institute of Technology
! S-100 44 Stockholm, Sweden
! tel: int+46-8-7907814
! Internet: lennartb@lne.kth.se
!--