Known bugs and deficiencies in Kermit v4.05 (18 Feb 85) First, the bugs... (just a few): The command parsing routines do not limit or check the length of command lines or file specs, trashing what ever comes after them. Currently because of where the fcb and command buffer are located, this does not usually cause a problem, but could if an extremely long line was typed in, or in the future multiple fcbs defined elsewhere in memory were used. The D command, where supported, will drop the call, but will not terminate CONNECT mode; it should be followed by C to return to command level. This is an obscure one; I haven't verified the hypothesis yet, but it sounds good... While transferring a .LBR file, using FILE-MODE DEFAULT, a bunch of control-Z's got lost from one block in the middle. It turns out that the block in question was the last of a segment; I'm assuming that the algorithm thought it was at the end of file and suppressed the excess control-Z's. DECmate-II in IBM-mode does not see incoming handshake characters and will therefore require the user to manually type a CR for each packet. Now, the deficiencies: The Osborne Kermit doesn't support multi-sector buffering. (It shouldn't be hard to add; the difficulty was that there are some constraints imposed by bank-switching, and I'm not familiar with the memory map). Kermit should probably flush the serial line just before each packet it sends, since this is a half-duplex protocol. This would be most useful when the 8-Kbyte buffer is being written to disk; this may take longer than the typical 15-second timeout. (Kermit recovers correctly, but several extra messages can be retransmitted). Kermit needs a SET FLOW-CONTROL command, which would tell it to recognize and use XON/XOFF during CONNECT mode (file transfer too, but the restricted packet size makes this less necessary). This would help greatly for session logging, to disk and to the printer. "IBM mode" should be separated into its component parts: SET LOCAL-ECHO, SET PARITY, SET TIMER, and SET HANDSHAKE. The SET HANDSHAKE command would allow the user to specify what kind of handshaking should be done on half duplex connections (options like XON, CR, LF, ESC, BELL, NONE). SET IBM could then be implemented as a macro, except Kermit-80 doesn't support macroes. The quality of the VT52 emulation varies greatly between systems, because it relies on the micro having a sufficiently similar set of commands. None of the micros currently support the keypad, which can be critical for running editors such as DEC's EDT. For vi on Unix, getting a termcap entry for your micro will always be better than trying to use the VT52 entry. Wildcard file stepping is extremely slow. It should probably use a buffer for FCB's (16 or 32 or 64 at a time), and refill it when necessary. GET and RECEIVE commands are still synonymous (the documentation notwithstanding) (???) ------------------------------ Date: 8-OCT-1985 16:52:37 From: SYSKERMIT%vax1.central.lancaster.ac.uk@ucl-cs.arpa Subject : Bug report for KERMIT-80 A bug report on CP/M-80 KERMIT sent in by Martin J Carter of Nottingham University. Alan Phillips ---------------------------------------------------------------------------- The piece of code in cmifil() (cp4cmd.asm) which wipes clean the File Control Block (before inserting the name of your choice) manages to put a space character in the extent-number byte; this causes a British Micro Mimi 803 (which I treat as Generic CP/M with default console) to look for extent number 32 of the named file, so that (eg) ERASE cannot see a file which does exist. (I have not yet worked out why DIRECTORY works despite the above.) More perniciously, gofil() in cp4pkt.asm permits overwriting of a file which exists, even if file collision detection has been set ON. The following patches explicitly set the extent number to zero, which causes the file to be found. I've also included amendations for cp4ker.asm, to display the progress of assembly. I found this very necessary when things started blowing up on me at the end of a long assembly. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ cp4cmd.asm: 23a24,30 > ; > ; Edit 5a: 7th May 85, M J Carter [majoc], Nottingham Uni > ; Code in cmifil() put one too many spaces in the FCB; this caused > ; the BDOS of the British Micro Mimi to search for extent no 32, > ; rather than extent 0, so era() always said "can't find file". > ; Putting a null at the point in question ought to fix it. > ; 60c67 < cmdver: db 'CP4CMD.ASM (5) 6-Feb-85$' ; name, edit number, date --- > cmdver: db 'CP4CMD.ASM (5a) 7 May 85$' ; name, edit number, date 464c471,472 < cpi 0CH ;Twelve? --- > ; cpi 0CH ;Twelve? > cpi 0BH ; [majoc 850507] Eleven? 465a474 > mvi m, 0 ; [majoc 850507] Specify extent zero. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ cp4pkt.asm: 23a24,31 > ; edit 6a: 25th September 1985, M J Carter [majoc], Nottingham Uni > ; Code in gofil() amended, for exactly similar reasons to the > ; alteration to cmifil() in cp4cmd.asm. If there is any deep > ; reason why gofil() has to be used instead of a call to > ; comnd(cmofil), I can't see it. The bug (on a British Micro > ; Mimi 803) caused gofil() to overwrite existing files in > ; GET and RECEIVE, even with file warning SET ON. > ; 57c65 < pktver: db 'CP4PKT.ASM (6) 22-Nov-84$' ; name, edit number, date --- > pktver: db 'CP4PKT.ASM (6a) 25 Sep 85$' ; name, edit number, date 1217a1226,1227 > ; Question [majoc 850925]: why could not the filename > ; parsing have been done by comnd, like all the rest? 1231c1241,1242 < cpi 0CH ;Twelve? --- > ; cpi 0CH ;Twelve? > cpi 0BH ; [majoc 850925] Eleven? 1233c1244,1245 < gofil2: lhld datptr ;Get the NAME field. --- > mvi m, 0 ; [majoc 850925] Specify extent zero. > gofil2: lhld datptr ;Get the NAME field. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ cp4ker.asm: 0a1 > .printx * CP4KER.ASM (or nearest offer) * 98a100,101 > > .printx * CP4DEF.ASM * 99a103,104 > > .printx * CP4MIT.ASM * 100a106,107 > > .printx * CP4PKT.ASM * 101a109,110 > > .printx * CP4TT.ASM * 102a112,113 > > .printx * CP4CPM.ASM * 103a115,116 > > .printx * CP4WLD.ASM * 104a118,119 > > .printx * CP4CMD.ASM * 105a121,122 > > .printx * CP4UTL.ASM * 106a124,125 > > .printx * The End * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ------------------------------ Date: 14 Feb 1986 1335-EST From: B.Eiben LCG Ext 617-467-4431 Subject: cp4sys.dif ; The following errors have been noted: ; In CP4TT.ASM the routine conchr: calls outmdm: in CP4SYS.ASM. ; outmdm: destroys the E register contents which are needed by conchr: ; if the echo flag is set (half duplex). ; Either PUSH D before calling outmdm: (and POP D after) or do the ; PUSH D in outmdm: before calling BDOS (then POP D after). ; The former correction would be best since it corrects in the machine ; independent part. Probably hasn't been a problem since most hosts do ; not require half duplex. (Our Honeywell does!!) ; ; In CP4SYS.ASM the following code has omitted "norths" in the IF statement. ; Note that it is in the comment, but not in the IF. See below: ; ; Set the speed for bigboard I or the delphi or the CPT-85xx or Northstar IF bbI OR delphi OR cpt85xx ;------------------------------------------------------------------------------ ; ACCESS-MATRIX ; ; Note - The following differences in CP4SYS.ASM apply to the ; implementation for the Access-Matrix computer. ; In CP4TYP.ASM, set access to TRUE, inout to TRUE, and crt to FALSE ; Use port J5 of the Access ; IF access mnport EQU 40H ;Modem data port A mnprts EQU 42H ;Modem status/conrtol port A output EQU 04H ;Transmit buffer empty input EQU 01H ;Receive data available z80 EQU TRUE ;a good z80, here ENDIF;access IF access defesc EQU '\'-100O ;The default is Control \ -- it's easier B.E. ENDIF;access ; Select initial setting for VT-52 emulation flag. IF access ; Console can emulate VT-52 vtval EQU 1 ENDIF;access ; Add the following to "sysinit:" module IF access lxi d,witmsg ; " with " call prtstr lxi d,ttytyp ; terminal type call prtstr ENDIF;access ; Add to "sysinh:" module IF access lxi d,inhlps ;additional option available call prtstr ENDIF;access ; Add to "inhlps:" module IF access db cr,lf,'B Transmit a BREAK' ENDIF;access ; Add to "sysint:" module IF access cpi 'B' ; send break? jz sendbr ; yes, go do it. return nonskip when through. ENDIF;access ; Add "access" to "sendbr:" module in IF statement ;IF bbI OR bbII OR access ;ENDIF;bbI OR bbII OR access ; Add the following to "sysspd:" module ; Set the speed for the Access IF access mov a,e ;Get the parsed time constant ;The following code is derived from the Access initialization code sta savspd ;Save the time constant mvi a,14h ;Code for 'monitor' to set channel A baudrate call monitor lda savspd ;Get the time constant call monitor ; and send it to the CRT ret savspd: ds 1 monitor: ;Routine to do CRT functions out 90h ;Output the data to the CRT mvi a,1 ;Set DRDY true out 23h mon1: in 0a0h ;Wait for CACK* true rlc jc mon1 in 80h ;Read the input data latch push psw ;Save the input data xra a ;Set DRDY false out 23h mon2: in 0a0h ;Wait for CACK* false rlc jc mon2 pop psw sta 0ee02h ;Save the input data ret ENDIF;access ; Speed tables IF access ;Similar to bbI with different values spdtbl: db 6h ;6 entries db 04h,'1200$', 28h,28h db 04h,'2400$', 14h,14h db 03h,'300$', 0a0h,0a0h db 04h,'4800$', 0ah,0ah db 03h,'600$', 50h,50h db 04h,'9600$', 5,5 sphtbl: db cr,lf,' 300 600 1200 2400 4800 9600$' ENDIF;access IF access OR adm3a OR tvi925 OR vt52 OR vt100 OR smrtvd ; [7] witmsg: db ' with $' ENDIF;access OR adm3a OR tvi925 OR vt52 OR vt100 OR smrtvd ; [7] IF access sysver: db 'Actrix CP/M$' ttytyp: db 'Soroc IQ-120$' outlin: db 1EH,esc,'Y',cr,lf,tab,tab,'$' erascr: db 1EH,esc,'Y$' ;clear screen and home cursor eralin: db cr,esc,'T$' ;clear line curldn: db esc,'=$' ;cursor lead-in string delstr: db bs,' ',bs,bs,'$' ;??adjust for echoing delete ttab: ;table start location ta: db 0BH,'$',0 ;cursor up tb: db 0AH,'$',0 ;cursor down tc: db 0CH,'$',0 ;cursor right td: db 08H,'$',0 ;cursor left te: db esc,'*$',0 ;clear display (homes cursor) tf: db esc,')$',0 ;enter inverse video mode tg: db esc,'($',0 ;exit inverse video mode th: db 01EH,'$',0 ;home cursor ti: db 0BH,'$',0 ;reverse linefeed (insert line) tj: db esc,'Y$',0 ;clear to end of screen tk: db esc,'T$',0 ;clear to end of line ENDIF;access ; End of "access" differences ;------------------------------------------------------------------------------ ; BASIC NORTHSTAR ; To provide Kermit for the basic NorthStar using the printer port, ; in CP4TYP, set basicns to TRUE, inout to TRUE, and crt to TRUE ; and add the following code: IF basicns mnport equ 04 ;printer port data mnprts equ 05 ;printer port status output equ 1 ;transmitter ready input equ 2 ;receiver ready z80 equ FALSE ;not important ENDIF;basicns ; The above provides output via the printer port. Since the speed ; of the printer port can't be set from software, set speed tables to 0. IF basicns sysver: db 'NorthStar using printer port$' ttytyp: db 0 ENDIF;basicns ;------------------------------------------------------------------------------ ; U.S. Micro Sales S-100-8 (out of business) ; Can use the same approach as for the basic NorthStar except set ; crt to FALSE and: IF S-100-8 mnport equ 00 ;printer port data mnprts equ 01 ;printer port status output equ 4 ;transmitter ready input equ 2 ;receiver ready z80 equ FALSE ;not important ENDIF;S-100-8 ; Terminal codes same as for Access with exception of sysver. IF S-100-8 sysver: db 'U. S. MicroSales using printer port' ttytyp: db 'Soroc IQ-120$' outlin: db 1EH,esc,'Y',cr,lf,tab,tab,'$' erascr: db 1EH,esc,'Y$' ;clear screen and home cursor eralin: db cr,esc,'T$' ;clear line curldn: db esc,'=$' ;cursor lead-in string delstr: db bs,' ',bs,bs,'$' ;??adjust for echoing delete ttab: ;table start location ta: db 0BH,'$',0 ;cursor up tb: db 0AH,'$',0 ;cursor down tc: db 0CH,'$',0 ;cursor right td: db 08H,'$',0 ;cursor left te: db esc,'*$',0 ;clear display (homes cursor) tf: db esc,')$',0 ;enter inverse video mode tg: db esc,'($',0 ;exit inverse video mode th: db 01EH,'$',0 ;home cursor ti: db 0BH,'$',0 ;reverse linefeed (insert line) tj: db esc,'Y$',0 ;clear to end of screen tk: db esc,'T$',0 ;clear to end of line ENDIF;S-100-8 ;------------------------------------------------------------------------------ ; PMC MICROMATE ; The following applies to the implementation for Personal Micro Computers ; PMC-101 MicroMate. ; In CP4TYP.ASM, set mmate to TRUE, inout to TRUE, and crt to TRUE (Don't know ; what terminal might be used.) IF mmate .printx * Assembling KERMIT-80 for the PMC MicroMate * ENDIF IF mmate mnport EQU 89H ;MODEM data port mnprts EQU 8BH ;MODEM status/control port output EQU 04H ;Transmit buffer empty, ready to send input EQU 01H ;Receive data available baudrt EQU 93H ;MODEM baud rate port ; NOTE! - also used for console z80 EQU TRUE ENDIF;mmate sysinh: IF mmate lxi d,inhlps ; we got options... call prtstr ; print them. ENDIF;mmate ret inhlps: IF mmate db cr,lf,'B Transmit a BREAK' ENDIF;mmate sysint: ani 137O ; convert lower case to upper, for testing... IF mmate cpi 'B' ; send break? jz sendbr ; yes, go do it. return nonskip when through. ENDIF;mmate ; Add mmate to bbI break routine IF bbI OR bbII OR mmate ;[cjc] send break on Kaypro and bbII sendbr: ; Same code as bbI and bbII ret ; done. ENDIF;bbI OR bbII OR mmate ; MicroMate added to use same delay routine IF bbI OR bbII OR cpt85xx OR heath OR lobo OR mmate ENDIF;bbI OR bbII OR cpt85xx OR heath OR lobo OR mmate sysspd: IF bbI OR delphi OR cpt85xx OR norths OR mmate mov a,e ; get the parsed value out baudrt ; Tell the baud rate generator. ret ENDIF;bbI OR delphi OR cpt85xx OR norths OR mmate IF mmate spdtbl: db 10h ;16 entries db 03h,'110$', 0e2h,0e2h db 04h,'1200$', 0e7h,0e7h db 05h,'134.5$', 0e3h,0e3h db 03h,'150$', 0e4h,0e4h db 04h,'1800$', 0e8h,0e8h db 05h,'19200$', 0efh,0efh db 04h,'2000$', 0e9h,0e9h db 04h,'2400$', 0eah,0eah db 03h,'300$', 0e5h,0e5h db 04h,'3600$', 0ebh,0ebh db 04h,'4800$', 0ech,0ech db 02h,'50$', 0e0h,0e0h db 03h,'600$', 0e6h,0e6h db 04h,'7200$', 0edh,0edh db 02h,'75$', 0e1h,0e1h db 04h,'9600$', 0eeh,0eeh sphtbl: db cr,lf,' 50 75 110 134.5 150 300 600 1200' db cr,lf,' 1800 2000 2400 3600 4800 7200 9600 19200$' ENDIF;mmate IF mmate sysver: db 'PMC Micromate using port I/O$' ENDIF;mmate ; ;------------------------------------------------------------------------------ ; A. C. E. DISCOVERY ; This implementation is for the Action Computer Enterprise, Inc. "Discovery" ; multi user computer. It uses port B on an 83U user board. ; ; In CP4TYP.asm set disc to TRUE, inout to TRUE, and crt to TRUE ; ; Make the following changes or additions in CP4SYS.ASM: ; IF disc sysver: db 'Discovery using 83U board port B$' ENDIF;disc IF disc mnport EQU 05 ;Discovery 83U port B data mnprts EQU 04 ;Discovery 83U port B status/command output EQU 04 ;Transmit buffer empty input EQU 01 ;Receiver ready z80 EQU TRUE ENDIF;disc sysinit: ;Initialization sequence for Discovery 83U port B ;Sets port to 9600 baud, 8 data bits, 1 stop bit, no parity IF disc mvi a,12 ;Register 12 out mnprts mvi a,11 ;Low byte of time constant for 9600 out mnprts mvi a,13 ;Register 13 out mnprts mvi a,0 ;High byte of time constant for 9600 out mnprts mvi a,14 ;Register 14 out mnprts mvi a,3 ;Enable baud rate generator out mnprts mvi a,11 ;Register 11 out mnprts mvi a,52h ;No Xtal, tclk=rclk=/trxc out=br gen out mnprts mvi a,4 ;Register 4 out mnprts mvi a,44h ;16x clock, 1 stop, no parity out mnprts mvi a,3 ;Register 3 out mnprts mvi a,71h ;rx 8 bit/ch, autoenable, rx enable out mnprts mvi a,5 ;Register 5 out mnprts mvi a,0eah ;tx 8 bit/ch, tx enable, rts out mnprts ENDIF;disc sysinh: IF OR disc lxi d,inhlps ; we got options... call prtstr ; print them. ENDIF;disc ret inhlps: IF disc db cr,lf,'B Transmit a 300ms BREAK' db cr,lf,'L Transmit a 5 second BREAK' ENDIF;disc sysint: ani 137O ; convert lower case to upper, for testing... IF disc cpi 'B' ;Send short break? jz sendbr cpi 'L' ;Send long break? jz sendlbr ENDIF;disc IF disc ; This is almost an exact copy of the bbI sendbr routine. ; Modifications to include a long break have been made. ; ; Officially, a "break" is 300 milliseconds of "space" (idle line is ; "mark"). (or maybe 200 milliseconds; I forget.) The timing isn't ; usually that critical, but we'll make an attempt, at least. Sending ; too long a break can cause some modems to hang up. sendlbr: push d ;save d, this may not be necessary, but safe mvi d,17 ;do short break 17 times (approx. 5 sec.) jmp sndbr1 sendbr: push d mvi d,1 ;On short break, do only once ; First, make sure the transmitter is really empty. (The SIO sets ; "transmitter buffer empty" when it can accept another character; ; the previous character is still being shifted onto the line. ; Another status bit, "all done", is set to indicate that the ; transmitter is really idle. sndbr1: mvi a,1 ; select Read Register 1 out mnprts in mnprts ; read the contents ani 1 ; test "all done" flag jz sndbr1 ; loop until it's nonzero. ; ; Next, set the "send break" bit to start the transmitter spacing. mvi a,5 ; select Write Register 5 out mnprts mvi a,0FAH ; Tx enable, 8 bit Tx character, Send Break, out mnprts ; DTR and RTS on. ; ; Now, delay for 30*d hundredths of a second sendbr2: mvi a,30 ; delay count call delay ; The following has been added to allow doing .03 delay d times dcr d ; decrement # of times to do loop jnz sendbr2 ; if not done, do again pop d ; reload d ; ; Time's up. Put transmitter back in normal state (data byte is the ; same as the one in siotbl: for Write Register 5) and return. mvi a,5 ; select Write Register 5 out mnprts mvi a,0EAH ; Tx enable, 8 bit Tx character, out mnprts ; DTR and RTS on. ret ; done. endif;disc sysspd: IF disc ; Assuming that parsing of value from speed table puts low order ; byte of time constant in the e register and high byte in d. mvi a,12 ;Register 12 out mnprts mov a,e ;Low order byte of time constant out mnprts mvi a,13 ;Register 13 out mnprts mov a,d ;High order byte of time constant out mnprts mvi a,14 ;Register 14 out mnprts mvi a,3 ;Enable baud rate generator out mnprts mvi a,11 ;Register 11 out mnprts mvi a,52h ;no Xtal, tclk=rclk=/trxc out=br gen out mnprts ret ENDIF;disc IF disc ; Similar to mikko table but with different time constant values spdtbl: db 9h ;9 entries db 03h,'110$' dw 1134 db 04h,'1200$' dw 102h db 03h,'150$' dw 831 db 04h,'2400$' dw 50 db 03h,'300$' dw 415 db 04h,'4800$' dw 24 db 03h,'600$' dw 206 db 02h,'75$' dw 1665 db 04h,'9600$' dw 11 sphtbl: db cr,lf,' 75 110 150 300 600 1200 2400 4800 9600$' ENDIF;disc ;------------------------------------------------------------------------------ ------------------------------ Date: 16-APR-1986 08:56:22 From: SYSKERMIT%vax1.central.lancaster.ac.uk@cs.ucl.ac.uk Subject: Notes on Kermit-80 work in progress over here Here's a note from Bertil on what he's done/is doing/will do on CP/M Kermit. I hope to get the modded files to you as soon as I can (on disc) when Bertil has fixed a nasty bug he's just found. Alan -------------------------------- To: syskermit@lancaster.central.vax1 From: OBSchou@UK.AC.LUT.MULTICS Date: Monday, 24 March 1986 14:47 gmt Subject: Kermit Bugs etc Alan, here is a copy of the Bug report you/Frank sent, with comments as to what I intend to do/have done/will not do. I have also added the mods requested from other sources. Not all the mods suggested will be in line with the code the person who is doing the overlay job, but I guess that if this version is based on 4.05 Kermit, then I can add the code to his lot when he is finished. Firstly, the info from you/Frank: >The .BWR file follows. Meanwhile, I've got a local volunteer to do the >modem-overlay job. Things will go a lot smoother if we don't have to ship >the stuff back & forth over the ocean... - Frank >Known bugs and deficiencies in Kermit v4.05 (18 Feb 85) >First, the bugs... (just a few): > The command parsing routines do not limit or check the length of >command lines or file specs, trashing what ever comes after them. >Currently because of where the fcb and command buffer are located, this >does not usually cause a problem, but could if an extremely long line was >typed in, or in the future multiple fcbs defined elsewhere in memory >were used. [Hm... not too sure how to sort this, but it I place it low on my list. I personally have not used ultra long lines, so I dont have that problem. If it looks faily easy to do, I will fix it, otherwise I won't. (!)] > The D command, where supported, will drop the call, but will >not terminate CONNECT mode; it should be followed by C to return >to command level. [Hope to frig this one, in that if a "D" was selected, then a "C" will be substitued after dropping the call, and the escape character routine run again. Bit messy, and a better (longer term) solution would be to shift the "Drop the line" funtion to the system independent code, with links to CP4SYS to do the real work.] > This is an obscure one; I haven't verified the hypothesis yet, but >it sounds good... While transferring a .LBR file, using FILE-MODE DEFAULT, >a bunch of control-Z's got lost from one block in the middle. It turns >out that the block in question was the last of a segment; I'm assuming >that the algorithm thought it was at the end of file and suppressed the >excess control-Z's. [I thought .LBR files were really binary in nature, so I would have sent the file as binary. However, I only use LBR to extract bits of files, and then not often. Try using SET FILE BINARY, and see what that does. I place this low on my list. One solution is to check if the file type to be sent is LBR, in which case, do a quick SET FILE BINARY before sending it. This could be extended to .COM files as well, but there are a whole bunch of "Binary" type files. For example, BAS probrams may or may not be tokenised, ie Binary. Checking the file extention is not something I would want to add] >DECmate-II in IBM-mode does not see incoming handshake characters and will >therefore require the user to manually type a CR for each packet. [Will do my best, but I dont have an IBM toi play with. Could the fella who wrote the original code check this?] >Now, the deficiencies: >The Osborne Kermit doesn't support multi-sector buffering. (It shouldn't >be hard to add; the difficulty was that there are some constraints imposed >by bank-switching, and I'm not familiar with the memory map). [Osborne bank switches the lower 16k of ram out to access IO devices.. rot its cotton socks. There are two solutions to this one: 1) As is now, where the controlling software driving the ports is placed above 4000h, or 2) make the system dependent overlay start at 4000h or more. Hope to do this with 4.06, as there will be a lot of code added to the indep. part of Kermit. Setting the overlay at 4000h will allow much more space to the independent part for newer code without having to re-issue all the .HEX files, etc.] >Kermit should probably flush the serial line just before each packet it >sends, since this is a half-duplex protocol. This would be most useful >when the 8-Kbyte buffer is being written to disk; this may take longer >than the typical 15-second timeout. (Kermit recovers correctly, but >several extra messages can be retransmitted). [Will do.] >Kermit needs a SET FLOW-CONTROL command, which would tell it to recognize >and use XON/XOFF during CONNECT mode (file transfer too, but the restricted >packet size makes this less necessary). This would help greatly for session >logging, to disk and to the printer. [Agreed. Will see what I can do. I want to use the XON/XOFF facility for use with slow pinters: see below.] >"IBM mode" should be separated into its component parts: SET LOCAL-ECHO, >SET PARITY, SET TIMER, and SET HANDSHAKE. The SET HANDSHAKE command would >allow the user to specify what kind of handshaking should be done on half >duplex connections (options like XON, CR, LF, ESC, BELL, NONE). [As above, the "Handshake" could be any number of characters, including XON/XOFF. See also my suggestion for printers below] >SET IBM could then be implemented as a macro, except Kermit-80 doesn't support >macroes. [Still have not got an IBM to play with, but macros would be nice. Would probably add a lot of code, and may be messy. An .INI file may sort a lot of problems, though] >The quality of the VT52 emulation varies greatly between systems, because >it relies on the micro having a sufficiently similar set of commands. >None of the micros currently support the keypad, which can be critical for >running editors such as DEC's EDT. For vi on Unix, getting a termcap >entry for your micro will always be better than trying to use the VT52 >entry. [Hm. Would like Kermit to do all the VT52 stuff.. see below] >Wildcard file stepping is extremely slow. It should probably use a buffer >for FCB's (16 or 32 or 64 at a time), and refill it when >necessary. [Dont really understand how to get over this problem, though I would like to see is speeded up. I reserve other comments until I understand how to sort it.] >GET and RECEIVE commands are still synonymous (the documentation >notwithstanding) (???) [Yes, and why are they? Have had some problems with receive, in that a CR to try and get the remote side to respond results in retries zipping up to 15 at record speed.. it may be related. I dont consider this urgent, but given time I would like to get it fixed.] [Now for some of the fixed code: the lot from Martin has been added. Deleting a file did not work on any machine I tried; I thought it was finger trouble most of the time, with me wanting to drop out of kermit for further inverstigation. Nice to know there was a bug! ] [Access-Matrix, NS Horizon with ports on board, S-100-8 PCM Micromate and ACE Discovery now added to the TYP and SYS files. Could the donor check the resultant code?] >Frank - > A bug report on CP/M-80 KERMIT sent in by Martin J Carter of Nottingham >University. > Alan Phillips ---------------------------------------------------------------------------- >The piece of code in cmifil() (cp4cmd.asm) which wipes clean the File Control >Block (before inserting the name of your choice) manages to put a space >character in the extent-number byte; this causes a British Micro Mimi 803 >(which I treat as Generic CP/M with default console) to look for extent >number 32 of the named file, so that (eg) ERASE cannot see a file which does >exist. (I have not yet worked out why DIRECTORY works despite the above.) >More perniciously, gofil() in cp4pkt.asm permits overwriting of a file which >exists, even if file collision detection has been set ON. The >following patches explicitly set the extent number to zero, which causes >the file to be found. > I've also included amendations for cp4ker.asm, to display the >progress of assembly. I found this very necessary when things started >blowing up on me at the end of a long assembly. [Should be in the files I sent to Lancaster, thence on to Columbia] Now for the things I want to add: Proper (or at least better) printer control. A lot of printers (well dot-matrix ones) wait until they get a CR or LF then print a complete line, often preventing or ignoring whatever the computer sends in the mean time. As there is no printer status facility from CP/M, (Unles you use one of the "Consoles" as a printer and flip the io byte bit pattern ). I suggest a buffer which is used if SET PRINTER ON is used. The buffer collects characters to a CR (LF?), then XOFFs to the host. Hang around just to make sure the Host has stopped sending, then print the line to the printer. Finally, adjust the buffer(s), XON till next CR or LF. A SET START-OF-PACKET CHAR routine required: Not difficult to add, as the SET ESCAPE routine could be the basis of the new routine. Some systems, eg ICL kit, hates Control-A. SQUIRT to send files WITHOUT the user needing a CR at the end of each line. This requires XON/XOFF or other handshaking. I want it as I have a routine on our Honeywell/Prime that grabs data without error checking. Useful 'cause it gives me access to the fast line printers. Also could be used to SQUIRT a text file into an editor on a target machine. Saves a lot of CR-ing for large files. REMOTE HOST commands.. but this is not on my High Priority list. VT 52 emulation: fix code not to rely on clear end of line etc/ Assume Kermit does all fancy stuff, and assume cls, cursor positioning, (absolute and 1 position up/down/left/right) are available. This may interfere with the XMODEM overlays someone is working on, so I would prefer to leave it until that is done. D to also close the connection. Make the overlay address >= 4000h. This is to allow Osborne kermit to work better. I know that the system dependent stuff should be independent (!) from the indep. stuff, but it won't take too long to fill up the "spare" 2 kbytes or so to the indep. files. Finally, I have split the CP4SYS.ASM file into two, just after the Break and Delay routines. I know some people might not like this, so I have stuck them back together again, with the LINK command commented out. The two files I have called CP4SYS.ASM (code up to Break and delay), and CP4SY2.ASM (from Break and delay). Anyone wanting to add code might find it easier to use two files. I do; managing 150-odd Kbytes is tedious and disk- filling while editing. "Any comment gratefully received" Bertil Schou, Loughborough University, England. E-Mail: OBSchou on UK.AC.LUT.MULTICS. (Janet) ------------------------------ Date: Thu 17 Apr 86 09:18:35-EST From: Frank da Cruz Subject: Re: Notes on Kermit-80 work in progress over here To: SYSKERMIT%vax1.central.lancaster.ac.uk@CS.UCL.AC.UK In-Reply-To: Message from "SYSKERMIT%vax1.central.lancaster.ac.uk@cs.ucl.ac.uk" of Wed 16 Apr 86 08:56:22-EST Thanks for the long message about CP/M Kermit, and also for the diskette, which arrived yesterday. I just have a couple comment's on Bertil's comments. The DECmate-II fix requires some very DECmate-specific code. The problem turns out to be that the DECmate's firmware (or whatever) simply will not pass a control-Q (the IBM system's handshake character) through to the program. I'm not even sure a fix is possible. Multi-sector buffering is a problem with some systems, particularly the Kaypro, whose disks are very slow -- the time it takes to write 16K of data to the disk exceeds the timeout/retry limit, and the transfer fails after the first 16K. Need to make this size user settable and/or smaller for selected systems, like the Kaypro. It wasn't clear from Bertil's message whether he understood the difference between flow control and handshake. XON/XOFF flow control is full duplex, handshake is half duplex. XON handshake means "I won't transmit my next packet until I receive an XON from the host". The IBM mainframe puts an XON at the end of each packet it sends, to grant the micro permission to transmit. The micro does not have to send an XON (and probably shouldn't). The carriage return at the end of the micro's packet grants the IBM mainframe permission to transmit its next packet. The problem with wildcards (as I understand it) is that they are done by issuing a "get first" system call, followed by as many "get next" systems calls as are necessary to find all the matching files. Unfortunately, CP/M stores the state of the search internally in such a way that no intervening system calls may be done without wiping out this information. Therefore, the FCBs have to be "preloaded". In early versions, we preloaded "n" of them (where n was some number like 16 or 32). But this restriction was unreasonable, so to get around it the code was changed to do a full search each time, resulting in n(n+1)/2 directory lookups to find file number n, which is awful. The solution would be (a) some combination of full search and preloading (load 16 FCB's at a time?), or (b) forget about the FCB's and just build a list of filenames, which take up a lot less memory anyway, and then get the FCB's individually for each file as needed. If "RECEIVE name" is really doing what "GET name" is supposed to do, it should be fixed. "RECEIVE name" means "wait for a file to arrive, and when it does, store it under the given name. We don't really need a SQUIRT command. What we really need is the transmit command to be fixed to operate as it should. A complete description of a properly done TRANSMIT command can be found in the DEC-20 Kermit documentation. Briefly, here's what it does: it sends the first line, and then it waits for a specified "prompt" from the host before sending the next line. The default prompt is linefeed, but a command is available to set it to any string. Prevailing parity, duplex, handshake, flow-control, etc, are used. A method is provided for manual intervention -- CR sends the next line (in case the prompt doesn't come, or is garbled), ^P sends the previous line, ^R resends the current line. About CP4SYS.ASM -- the BEST thing to do with this horrible file is to break it up into completely separate files for each system supported. This has been on the list of things to do for years, and will certainly ease the transition to overlays. Many thanks! - Frank ------------------------------ Date: 23 JUN 86 08:11-AST From: LANGE%DACTH51.BITNET@wiscvm.wisc.edu Subject: Bug report KERMIT-80 Message-Id: <8606230245.aa07090@VGR.BRL.ARPA> The following error has been noted: It concerns the piece of code starting at label "staspd" (in cp4mit.asm) which is to show the current line speed. The current baud rate value is taken from location "speed" and compared with a corresponding entry into table "spdtab" (linked to "spdtbl" in cp4sys.asm). Unfortunately only an 8-bit comparison is done although this is a 16-bit value. This practice made some trouble as I used the 1st byte of this 16-bit value as a time constant for a Z80-CTC and the 2nd part as prescaler information to cover the total range from 50 up to 19200 Baud. So it happened that the first value (the CTC time constant) was not unique in the table and that it was necessary to check the 2nd byte to identify the correct baud rate. It appears a good programming practice to use a 16-bit comparison where you handle 16-bit values. Jan G. Loeschner (Technical University of Aachen, West Germany) ================================================================== ; Show the current line speed (if known). staspd: lxi d,spdst call prtstr lda speed ;Get current speed. mov c,a ;[JGL] (C) = LSB of speed factor lda speed+1 ;[JGL] Get 2nd part of current speed. mov b,a ;[JGL] (B) = MSB of speed factor lxi h,spdust ;Assume undefined. cpi 0FFH ;Is it? jz stat73 ;Yes. lhld spdtab ;Start scanning keyword table. mov d,m ; get count of entries inx h ; advance over it. stat70: mov e,m ;[JGL] Get string length. inr e ;[JGL] Account for $. inx h shld temp1 ;Save string pointer. stat71: inx h ;Loop over string. dcr e ;[JGL] jnz stat71 mov a,m ;[JGL] Get speed value (1st part) inx h ;[JGL] Skip LSB of speed factor. cmp c ;[JGL] Match? jnz stat711 ;[JGL] No. mov a,m ;[JGL] Get speed value (2nd part). cmp b ;[JGL] Match? jz stat72 ;[JGL] Yes -- a 16 bit match. stat711:inx h ;[JGL] Bump to next keyword. dcr d ; decrement entry count jnz stat70 ; if more left, check them. lxi h,spdust ; can't find it. say it's undefined. jmp stat73 ; print the message. stat72: lhld temp1 ;Restore saved string pointer. stat73: xchg ;Set into DE for display. jmp prtstr ; print it, and return. ================================================================== ------------------------------ Date: Mon, 17 Nov 86 11:35 N From: Subject: Error in CP4KER.DOC Keywords: CP/M Kermit Dear Kermit-eers, There are two tiny little errors in the file CP4KER.DOC. A small 8080-assembler program is listed which should downline-load the Kermit-hex-files from a DEC20-system to a CP/M-microcomputer. line 015A shows: jm 170 This should be: jc 170 line 0167 shows: jm 170 This should be: jc 170 Change the above lines and it really works! A happy Kermit-eer, .KeesdeGroot (DEGROOT@HWALHW50) ------------------------------ 26-Jan-87 10:12:49-EST,2008;000000000001 Return-Path: Received: from MARLBORO.DEC.COM by CU20B.COLUMBIA.EDU with TCP; Mon 26 Jan 87 10:12:44-EST Date: 26 Jan 1987 1009-EST From: EIBEN@MARLBORO.DEC.COM To: sy.fdc@cu20b Subject: [LCG.KERMIT: CP/M Kermit] Message-ID: <"MS11(5206)+GLXLIB5(0)" 12274009845.14.249.11078 at MARLBORO.DEC.COM> The "unknown" KERMITEER - - - - - - - Begin message from: LCG.KERMIT Sender: LCG.KERMIT Date: 26 Jan 1987 0926-EST From: LCG.KERMIT To: EIBEN Cc: Subject: CP/M Kermit I recently downloaded the current copy of CP4SYS.ASM and noted that in revision note 29 there is a reference to an UNKNOWN KERMITEER. That person is me and I would appreciate it if you would pass that information to the appropriate persons at Columbia. It is not that I want credit but if there is a problem with the additions that I have suggested, they should know who to contact. I recently implemented Kermit for a TRS80 Model 4 running the Montezuma CP/M. I was never able to find anyone at Radio Shack that could tell me what UART that machine uses. (Most people I contacted didn't even know what a UART is and couldn't understand why I would need such information.) However, I was able to deduce the port assignments. With that information, I was able to build a minimal Kermit. I set INOUT to TRUE, CRT to TRUE (I think that the machine emulates a Televideo 912), set the help tables for SET PORT and SET BAUD to zero. The following equates are needed. mnport EQU 0EBH mnprts EQU 0EAH output EQU 40H input EQU 80H z80 EQU TRUE sysver needs to be assigned a pertinent character string and the default escape character, defesc, should be set to some other character. I didn't do the latter and the user had to reset it with the SET DEF command as there is some problem with using a backslash on his keyboard. Robert LaFara Naval Avionics Center Indianapolis, IN 46219 317-353-7750 ======== - - - - - - - End forwarded message -------- ------------------------------ Date: Sun, 08 Feb 1987 16:04 PST From: JAJZ801@CALSTATE.BITNET Subject: Building CPM-80 Kermit from Hex To: SY.FDC@CU20B.ARPA The other day I needed to build the CPM-80 Kermit program from the Hex files (Xerox 820 system) and had neither the MLOAD program or the instructions with me. After perusing the CPM manuals for the standard utilities I came up with the following procedure which seemed to work. Upon return to look at the documentation, I found that my particular method was not mentioned. Was I lucky ? PIP KERMIT.HEX=CP4KER.HEX[I],CP4820.HEX[H] LOAD KERMIT.HEX The [I] on CP4KER.HEX specifies intel hex format but to ignore "00" records (the end-of-file, execution address). The [H] just informs about the Hex file (process the eof). It seemed to produce a single HEX file with only one EOF record valid to LOAD and executed OK (did a wildcard receive from an IBM PC running PROCOMM). ------------------------------ Date: Tue, 31 Mar 87 08:33:05 EST From: John C Klensin Subject: CP/M-80 kermit for the Epson PX-8 Keywords: CP/M-80 Kermit, Epson PX-8 As a general warning, while this version works quite well downloading files to the RAM disk, it seems to hang up and get into trouble when used with Epson's external 3 1/2 inch diskette unit. When files of more than moderate size are downloaded, the first 15Kb or so are transferred without difficulty, then the number of retries suddenly goes 'way up, becoming about 1:1 with the number of packets. It finally grinds entirely to a halt. These problems are speed independent (they occur at 1200 baud, and they occur at 19.2Kbaud in about the same place). And they do NOT occur when the default "disk" is the A: ram disk, only with the external diskette drive. Fixes or suggestions would, of course, be welcome. ------------------------------