]> cloudbase.mooo.com Git - kermit-80.git/blob - cpkerm.bwr
Bugfix in outmdm (output buffer flush)
[kermit-80.git] / cpkerm.bwr
1 From: Vace Kundakci <VVVCU@CUVMB.columbia.edu>
2 To: Frank da Cruz <fdc@cunixc.cc.columbia.edu>
3 Subject: Something in my rdr
4
5 Dear VVVCU AT CUVMBA
6
7 Yesterday I tried to contact OBSchou@Loughborough.Multics
8 on JANET, for this was the address I found in the file
9 CPAAA TXT on KERMSRV AT CUVMBA. I wanted to report a bug
10 in CP/M kermit and to ask him a question about two source
11 files on KERMSRV. Would you please be so kind to forward
12 this message below to the one who is responsible for the
13 files CP???? ASM on KERMSRV AT CUVMBA. Thanks a lot.
14
15 While assembling a new KERMIT 4.09 for my good old CP/M 3
16 computer I found a bug in the system independent part of
17 the KERMIT source. The routine PAUSIT in the file
18 CPSUTL.ASM doesn't end with a ret. As a result of this the
19 program enters the routine GETFIL and falls trough it every
20 time PAUSIT is executed: the disk drive is activated.
21 This ends in an error when PAUSIT is executed after a
22 wildcard operation.
23 The bug is fixed by placing a ret instruction at the end of
24 the PAUSIT routine.
25
26 After creating a new CPSKER.HEX it appeared, that the file
27 CPSKER.HEX on KERMSRV AT CUVMA used the files CPSPK1.ASM
28 update 12 of 1-feb-88 and CPSPK2.ASM update 5 of 1-feb-88.
29 The file CPSPK1.ASM on KERMSRV AT CUVMA is update 11 of
30 28-jul-87, whereas CPSPK2.ASM is update 4 of 27-oct-87.
31 Would you please be so kind to get the two files updated
32 on KERMSRV ON CUVMA, so I can build an updated version of
33 my KERMIT without the bug in CPSUTL.ASM.
34
35 Thank you in advance! Hans Petri
36
37 WINFPET AT HDETUD1 on EARN
38 /Vace
39 ------
40
41 Date: Sun, 12 Mar 89 03:22:57 EST
42 From: Mark W. Eichin <eichin@athena.mit.edu>
43 Subject: Bug report, CP/M kermit (and other notes)
44 Keywords: CP/M Kermit
45
46 The latest kermit from ~ftp/kermit/a/cp[sx]*.asm has a minor (but
47 visible) bug. In cpspk2.asm, line 341 is
48
49 mvi a,'$' ; dollar terminate string
50 call prtstr
51
52 (these are after the label gofi7g.)
53
54 The problem is that the '$' has to be actually moved into the string
55 to terminate it. Adding the line
56
57 stax d
58
59 between the above two solves the problem.
60
61 The bug manifests itself when doing a "receive": as soon as the remote host
62 sends the filename, it gets displayed on the local screen, followed by
63 arbitrarily large amounts of garbage (whatever code followed the filename
64 buffer up to the first '$', which for me tended to be about 4-5 lines of
65 garbage...)
66
67 On a related note: I have successfully ported kermit to TurboDOS (a CP/M-like
68 operating system written by Software 2000) so that it uses the "T-functions",
69 a set of standard extensions to CP/M, particularly a set of generic serial
70 routines. I have only tested it on my personal system, a custom port of
71 TurboDOS to the Radio Shack Model 4P, but it is likely to work on any TurboDOS
72 system. Are you interested in adding this to your collection? Are there any
73 stylistic constraints you require on submitted code? (I would like to see it
74 included, if only because there have been "people working on" TurboDOS
75 versions, according to your list, for at least 4 years now.)
76
77 Also, I have patches to the Simtel20 PD2:<UNIX-C.CPM>XASM.SHAR[12], an 8080
78 assembler which runs under UNIX, which add a LINK command, that enables it to
79 assemble the entire CP/M Kermit release. I will be submitting them to the
80 Simtel20 people, but I can send them to you as well if you are interested.
81
82 Thanks for providing such a good *FREE* system!
83
84 Mark Eichin
85 <eichin@athena.mit.edu>
86
87
88 ------------------------------
89
90 . From BPA
91 . Postmark:30-Aug-89:09:32:15
92 . To MAILER
93 . Expires:29-Sep-89:09:31:49
94 . Subject: bitnet%"fdccu@cuvma"
95 Re: Problems with CP/M Kermit Version 4.09
96
97 Following is a list of problems and their solutions for CP/M Kermit
98 Version 4.09. Bear in mind that the latest version of CPSPK1.ASM I have is
99 edit (4) and of CPSPK2.ASM is edit (11).
100
101 Problem: When the terminal is in "quiet" mode, initiation of file-transfers
102 causes lots of garbage to appear on the screen which is distracting
103 and which raises havoc with voice output devices.
104 Diagnosis: In the module CPXCOM.ASM, the routine "prtstr" has two flavors:
105 one for machines which cannot display control-characters via BDOS
106 function 9 and one which can display such characters via function 9.
107 In this latter case, only register pair BC is saved around the BDOS
108 call. This is insufficient as BDOS also clobbers register pairs
109 DE and HL during the call. In "quiet" mode, at least one of these
110 pairs is expected to remain constant.
111 Solution: Save register pairs DE and HL around the function 9 BDOS call.
112
113 Problem: When GETting a file, the initialization routine "init" is executed
114 twice. This doesn't harm anything and may not be noticeeable in
115 print but is most annoying when using voice output as "init" types
116 out the Kermit version and screen initialization strings and thus
117 one hears them twice.
118 Solution: In the module CPSPK1.ASM, move the label "read0a" down one line
119 so that the common code for the "receive" and "get" commands starts
120 just *after* the call to "init" is made in "receive" mode.
121
122 Problem: With "auto-receive" set to "off", after a RECEIVE has completed,
123 Kermit waits for Console input; then looks for more data to receive
124 when there is none.
125 Diagnosis: In the module CPSPK1.ASM, when the status of "auto-receive" is
126 checked, the wrong label is branched to if "auto-receive" is OFF.
127 Solution: Change the instruction "jz read5c" to "jz read5b".
128
129 Problem: Files whose filenames are less then 8 characters in length have
130 ASCII zeros ("0") appended to them.
131 Diagnosis: In the module CPSPK2.ASM, after label "gofi7b", where the status
132 of "file-warning" is checked, the code for the appending of "&"
133 characters to filenames if the file already exists on disk has been
134 commented out and new code putting numeric suffixes on filenames
135 in this case has been substituted. In the process, the code for
136 checking for a file's existence has been accidentally commented out.
137 Thus, if "file-warning" is "on", *every* file is assumed to have
138 a duplicate and a numeric suffix is added to each filename. In
139 addition, no warning of this is given on-screen.
140 Solution: (1) Uncomment the code which checks for the existence of each file.
141 (2) Uncomment the code which prints the file-warning error message
142 and put a "lxi d,fnbuf" instruction between the "stax d" shown in
143 CPKERM.BWR and the call to "prtstr" so that routine can print the
144 filename of any file whose existence has been detected.
145
146 Problem: In the files CPXSY2.ASM and CPXSYS.ASM, various conditionals are
147 ignored.
148 Diagnosis: In many places, a semicolon is followed by a form-feed which is
149 immediately followed by an "IF" conditional. My copy of LASM in-
150 terprets the "<FF>IF" as a comment.
151 Solution: Make the "<FF>IF" into "<FF>;<CR>IF".
152
153 With these changes, Kermit-80 performs like a champ.
154 Following are file comparisons showing the changes noted above.
155
156 ************
157 File DISK$USER:[OGRFJMF.KERMIT.CPM]CPXCOM.ASM;1
158 418 push b
159 ******
160 File DISK$USER:[OGRFJMF.KERMIT.CPM.HP125]CPXCOM.ASM;1
161 418 PUSH H
162 419 PUSH D
163 420 push b
164 ************
165 ************
166 File DISK$USER:[OGRFJMF.KERMIT.CPM]CPXCOM.ASM;1
167 422 ret ; all done for good machines
168 ******
169 File DISK$USER:[OGRFJMF.KERMIT.CPM.HP125]CPXCOM.ASM;1
170 424 POP D
171 425 POP H
172 426 ret ; all done for good machines
173 ************
174
175 Number of difference sections found: 2
176 Number of difference records found: 4
177
178 DIFFERENCES /IGNORE=()/MERGED=1/OUTPUT=DISK$USER:[OGRFJMF.KERMIT.CPM.HP125]CPXCO
179 M.DIF;1-
180 DISK$USER:[OGRFJMF.KERMIT.CPM]CPXCOM.ASM;1-
181 DISK$USER:[OGRFJMF.KERMIT.CPM.HP125]CPXCOM.ASM;1
182
183 File 1) DSKE:CPSPK1.ASM[10,50,KERMIT,CPM] created: 1940 26-Aug-89
184 File 2) DSKE:CPSPK1.ASM[10,50,KERMIT,CPM,HP125] created: 2247 27-Aug-89
185
186 1)1 read0a: call init ;clear line, initialise buffers
187 1) lxi d,remnam ;[gnn] save local name here
188 1) mvi a,cmtxt ;[gnn]
189 ****
190 2)1 call init ;clear line, initialise buffers
191 2) read0a: lxi d,remnam ;[gnn] save local name here
192 2) mvi a,cmtxt ;[gnn]
193 **************
194 1)2 jz read5c ; no autoreceives, so drop out
195 1) lxi d,anymes ; load up Press any key to continue
196 ****
197 2)2 jz read5b ; no autoreceives, so drop out
198 2) lxi d,anymes ; load up Press any key to continue
199 **************
200
201 File 1) DSKE:CPSPK2.ASM[10,50,KERMIT,CPM] created: 0829 28-Aug-89
202 File 2) DSKE:CPSPK2.ASM[10,50,KERMIT,CPM,HP125] created: 2259 27-Aug-89
203
204 1)1 ; mvi c,openf ;See if the file exists.
205 1) ; lxi d,fcb
206 1) ; call bdos
207 1) ; cpi 0FFH ;Does it exist?
208 1) ; jz gofil9 ;If not create it.
209 1) ; lxi d,infms5
210 1) ; call error3
211 1) ; lda temp2 ;Get the number of chars in the file nam
212 e.
213 ****
214 2)1 mvi c,openf ;See if the file exists.
215 2) lxi d,fcb
216 2) call bdos
217 2) cpi 0FFH ;Does it exist?
218 2) jz gofil9 ;If not create it.
219 2) lxi d,infms5
220 2) call error3
221 2) ; lda temp2 ;Get the number of chars in the file nam
222 e.
223 **************
224 1)1 call prtstr ; write string to console
225 ****
226 2)1 lxi d,fnbuf ;[MF]Point to string
227 2) call prtstr ; write string to console
228 **************
229
230
231
232
233
234
235
236
237
238
239 I may be reached on BITNET by E-mail to mailer@uwalocke with the subject-line
240 containing the phrase <dec10%"bpa">.
241 -- Mike Freeman; Bonneville Power Administration; Vancouver, Wa;
242 Telephone (206)690-2307 --
243
244 ------------------------------
245
246 Date: Thu, 31 Aug 89 13:07 PST
247 From: <MAILER@UWALOCKE.BITNET>
248 Subject: Re: Inconsistency in CP/M Kermit Version 4.09
249
250 Problem: Comments in the source-files indicate that the routine which
251 processes the "Set Port" command, "prtset" in CPSCOM.ASM, returns
252 the port value in the register pair DE for the system-dependent
253 routine to process. In fact, the value is returned in the HL
254 register pair.
255 Solution: Either (1) put a "xchg" instruction after the "shld port"
256 instruction in "prtset" and modify all port-setting routines which
257 expect the port parameter in HL, e.g., that for those systems using
258 iobyte redirection, to get the value from DE (this would be, I
259 suppose, philosophically correct since this would correspond to
260 the way the baud-rate-setting routine handles things) or
261 (2) change the comments in CPSDAT.ASM and CPXLNK.ASM to show the
262 return value from "prtset" in HL and modify the "sysprt" routines
263 which expect the port value in DE to get it from HL. I chose this
264 approach as it appeared that this would involve less code changes
265 (the only system I saw getting port values from DE was the Lobo).
266 Below are FILCOMs of the appropriate files showing these changes.
267
268 File 1) DSKE:CPSDAT.ASM[10,50,KERMIT,CPM] created: 1925 26-Aug-89
269 File 2) DSKE:CPSDAT.ASM[10,50] created: 1202 31-Aug-89
270
271 1)4 ; called with value from table in DE
272 1) sysscr: jmp $-$ ; screen setup for file transfer
273 ****
274 2)4 ; called with value from table in HL
275 2) sysscr: jmp $-$ ; screen setup for file transfer
276 **************
277
278 File 1) DSKE:CPXLNK.ASM[10,50,KERMIT,CPM] created: 1826 26-Aug-89
279 File 2) DSKE:CPXLNK.ASM[10,50] created: 1157 31-Aug-89
280
281 1)1 ; called with value from table in DE
282 1) jmp sysscr ; screen setup for file transfer
283 ****
284 2)1 ; called with value from table in HL
285 2) jmp sysscr ; screen setup for file transfer
286 **************
287
288 File 1) DSKE:CPXSY2.ASM[10,50,KERMIT,CPM] created: 0743 28-Aug-89
289 File 2) DSKE:CPXSY2.ASM[10,50] created: 1210 31-Aug-89
290
291 1)4 mov a,e ;[hh] get the data port value and store
292 at
293 1) sta outmd3+1 ;[hh] the two places we use...
294 ****
295 2)4 mov a,l ;[hh] get the data port value and store
296 at
297 2) sta outmd3+1 ;[hh] the two places we use...
298 **************
299 1)4 mov a,d ;[hh] now get the baud rate port value
300 1) sta getbd+1 ;[hh] store it in the two places we use.
301 ..
302 ****
303 2)4 mov a,h ;[hh] now get the baud rate port value
304 2) sta getbd+1 ;[hh] store it in the two places we use.
305 ..
306 **************
307
308 E-mail replies may be sent to me via Bitnet at mailer@uwalocke.
309 Please place on the subject line the phrase <dec10%"bpa"> (less the angle-
310 brackets).
311 -- Mike Freeman (routing MORF); Bonneville Power Administration; P.O. Box
312 491; Vancouver, Wa 98666; Telephone (206)690-2307 --
313
314 ------------------------------
315
316 Date: Sat, 25 Nov 89 08:16:41 pst
317 From: holmes@well.sf.ca.us (Tim Holmes)
318 To: jrd@watsun.cc.columbia.edu
319 Subject: Re: Kermit for Epson
320
321 The Epson PX-8, also known as the Geneva, is a CP/M 2.2 machine. It is
322 a portable. It is listed on the list of Kermit versions by machine as
323 Epson Px-8; program version 4.09. This version I have never been able
324 to do anything but get the machine to freeze up. An earlier version,
325 4.05, basically works, but with some problems, such as handshaking
326 and flow control (I think). The PX-4, better known as the HX-40, is
327 a similar computer with an even smaller screen.
328
329 The PX-8 version comes on the "A" tape. By the way, I cannot get the
330 "Generic" kermit versions to work on the HX-40, whereas they basically
331 work on the PX-8.
332
333 Thanks again.
334
335 ------------------------------
336
337 Date: Thu, 1 Mar 90 16:48 PST
338 From: <MAILER@UWALOCKE>
339 Subject: dec10%"BPA" originated mail follows:-
340 To: fdccu@cuvma
341 Original_To: JNET%"fdccu@cuvma"
342
343 . From BPA
344 . Postmark:26-Feb-90:09:36:20
345 . To MAILER
346 . Expires:28-Mar-90:09:35:00
347 . Subject: bitnet%"fdccu@cuvma"
348 Re: Problem with CP/M-80 Kermit
349
350 I have come up with a better, more general solution to the problem
351 involving Kermit's interpretation of characters at the beggining of the CP/M
352 command-line than the one I sent you a few days ago. This more general
353 solution and the description of the problem/diagnosis appear below:
354
355 PROBLEM
356
357 B>A:KERMIT ;SET FI B;SET BL 3;SET TER Q
358 Kermit-80 v4.09 configured for HP-125 Series 100
359
360 For help, type ? at any point in a command
361 Kermit-80 0B:>
362 ?Ambiguous
363 Kermit-80 0B:>SET FI B
364 Kermit-80 0B:>SET BL 3
365 Kermit-80 0B:>SET TER Q
366 B>
367
368 DIAGNOSIS
369
370
371 CP/M begins the buffer containing the tail to the command-line with
372 the count of characters in the buffer, followed by the characters in the
373 command- tail, beginning with the space(s) immediately following the
374 transient program name (in this case, Kermit). Kermit does not ignore
375 leading spaces when reading command input from the CP/M command-line.
376 Kermit therefore interprets the leading space(s) as part of the first
377 command to be executed, leading to the "?Ambiguous" message.
378
379
380 SOLUTION
381
382
383 Rewrite Kermit so that leading spaces in input from the CP/M
384 command-line are ignored. This is done by adding code just prior to
385 label CMINB1 in the module CPSCMD.ASM and adding a label a few lines
386 following the label CMINB1 in the same module. This gives, as a
387 side-effect, the advantage that a leading semicolon is not required
388 before the commands Kermit is to execute from the command-line, so that
389 a command-line like:
390 A>KERMIT SET FILE-MODE ASCII;SET TERMINAL QUIET;SET NO-EXIT
391 executes without errors. A Vax DIFFERENCES output showing the changes
392 in CPSCMD.ASM follows:
393
394
395 ************
396 File DISK$USER:[OGRFJMF]CPSCMD.ASM;1
397 981 cminb1: lxi h,cmccnt ;Increment the char count.
398 ******
399 File DISK$USER:[OGRFJMF]CPSCMD.ASM;2
400 981 lda takflg ;[JMF]See if chars from file or command-
401 line
402 982 ora a ;[JMF]...
403 983 jz cminb1 ;[JMF]No
404 984 ani 1 ;[JMF]Yes, char from command-line?
405 985 jnz cminb1 ;[JMF]No
406 986 cminb0: mvi c,conin ;[JMF]Yes, get a character
407 987 call bdos ;[JMF]...
408 988 cpi 40o ;[JMF]If leading characters are spaces
409 989 jz cminb0 ;[JMF]Ignore them, else
410 990 lxi h,cmccnt ;Increment the char count.
411 991 inr m
412 992 jmp cmin1a ;[JMF]and proceed with command buffer
413 993 cminb1: lxi h,cmccnt ;Increment the char count.
414 ************
415 ************
416 File DISK$USER:[OGRFJMF]CPSCMD.ASM;1
417 985 lhld cmcptr ;Get the pointer into the buffer.
418 986 mov m,a ;Put it in the buffer.
419 ******
420 File DISK$USER:[OGRFJMF]CPSCMD.ASM;2
421 997 cmin1a: lhld cmcptr ;Get the pointer into the buffer.
422 998 mov m,a ;Put it in the buffer.
423 ************
424
425 Number of difference sections found: 2
426 Number of difference records found: 13
427
428 DIFFERENCES /IGNORE=()/MERGED=1/OUTPUT=DISK$USER:[OGRFJMF]CPSCMD.DIF;1-
429 DISK$USER:[OGRFJMF]CPSCMD.ASM;1-
430 DISK$USER:[OGRFJMF]CPSCMD.ASM;2
431
432
433 I can be addressed via E-mail on Bitnet at address
434 MAILER@UWALOCKE. Place the following as the subject of the message:
435 <dec10%"bpa"> (less the angle-brackets). Thanks.
436 Michael Freeman (Routing MORF)
437 Bonneville Power Administration
438 P.O. Box 491
439 Vancouver, WA 98666
440 Telephone (206)690-2307
441
442 ------------------------------
443
444 Date: Mon, 14 May 90 10:26:54 EDT
445 From: rochester!ames!claris!voder!nsc!thoreau.nsc.com!rtodd@columbia.edu
446 (Ron Todd)
447 To: fdc@watsun.cc.columbia.edu
448 Subject: My kermit problem( Kermit-80 to Kermit-32)
449
450 Frank,
451
452 I finally got my Kermit-80 (v4.09) on the Kaypro II to work with our
453 Kermit-32 (v3.1.066) (the problem had to do with the protocol timing out
454 during disk sector writes on the Kaypro). The fix is some where in the
455 combination of sets I am using, I tried your suggestion of turning off the
456 timeouts on the mainframe. The significant sets I am using are:
457
458 Kermit-80
459 set flow on
460
461 Kermit-32
462 set server_time 0
463 set send time 0
464
465 VMS
466 set term/readsync/ttsync
467
468 DEC-Server
469 set session pasthru
470
471 So far I have only tried ascii file transfer but will be testing binary
472 soon, I have a feeling that that should work also. I am mostly using the
473 GET command with Kermit-32 running in server so I may not need to do the
474 "set send time". I am sure I need to use the "set session pasthru" on the
475 server and probably atleast one of the "sync" options on the "set term"
476 of the VMS side.
477
478 Thanks for your help, I'll e-mail the final minimum set to you and also
479 post it to the net as a followup to help anyone else who may be running
480 into the same or similar problems.
481
482 Regards,
483 Ron Todd, K3FR
484
485 ------------------------------
486
487 Subject: Kermit-80 4.09 ported to new system, bug report
488 From: Russell Lang <rjl@monu1.cc.monash.edu.au>
489 Date: Tue, 19 Jun 90 11:04:47 +1000
490 Sender: eln272v@monu1.cc.monash.edu.au
491
492 Frank,
493 I have ported Kermit-80 4.09 to an Australian CP/M computer,
494 the Microbee. I have created a new system dependent file
495 CPXBEE.ASM for this computer.
496 I sent some mail to Bertil Schou, but he informs me that he is
497 no longer maintaining CP/M kermit.
498 Could you please tell me who is currently working on CP/M Kermit?
499
500
501 During the testing of kermit-80 on the Microbee, I found a bug
502 in the system independent part of kermit.
503
504 Bug report for Kermit-80 4.09.
505
506 Problem: When receiving a file with WARNING ON, kermit-80 will avoid
507 overwriting an existing file by creating a unique file name.
508 This unique file will have the attributes of the file being avoided.
509 If the created file is opened with Read-Only attribute, kermit-80 is
510 unable to write to the file, and crashes with the message:
511 BDOS Err on A: File R/O
512
513 Diagnosis: Kermit checks for the existence of a file by attempting
514 to open it. If the file exists, its directory entry is copied
515 into the FCB. Kermit then modifies the file name in the FCB
516 in an attempt to find a unique name. The name in the FCB has
517 the attributes of the previously existing file, so when kermit
518 eventually finds a unique name, it creates a file with the
519 attributes of the most recently opened file!
520
521 Solution:
522 Clear bit 7 (attribute bit) of all file name and type characters
523 before opening/creating file.
524 A Unix context diff for CPSPK2.ASM (4) 27-Oct-87 is at the
525 end of this mail.
526
527
528 --
529 Russell Lang Email: rjl@monu1.cc.monash.edu.au Phone: (03) 565 3460
530 Department of Electrical and Computer Systems Engineering
531 Monash University, Australia
532
533 diff -c cpspk2.asm cpxpk2.asm.new
534 *** cpspk2.asm Tue Jun 19 10:48:54 1990
535 --- cpspk2.asm.new Tue Jun 19 10:52:30 1990
536 ***************
537 *** 299,305
538 ;
539 ; Part 2) open the file (if success, then it exists)
540
541 ! gofi7d: lxi d,fcb
542 mvi c,openf
543 call BDOS
544 inr a ; if 0ffh returned, error (ie does not exist)
545
546 --- 299,315 -----
547 ;
548 ; Part 2) open the file (if success, then it exists)
549
550 ! gofi7d:
551 ! ;zero the attribute bits. [rjl@monu1.cc.monash.edu.au]
552 ! lxi h,fcb+1 ;[rjl]
553 ! mvi c,11 ;[rjl]
554 ! gofi7z: mov a,m ;[rjl]
555 ! ani 07fh ;[rjl]
556 ! mov m,a ;[rjl]
557 ! inx h ;[rjl]
558 ! dcr c ;[rjl]
559 ! jnz gofi7z ;[rjl]
560 ! lxi d,fcb
561 mvi c,openf
562 call BDOS
563 inr a ; if 0ffh returned, error (ie does not exist)
564
565 ------------------------------