четверг, 2 июня 2022 г. в 01:41:56 UTC+3, Андрей Никитин:
I tried to adapt the kermit program in UZI180.
The program code is in the repository https://github.com/nikitinprior/Kermit_UZI180
The attempt was once again unsuccessful.
The program is working. The remote server sees it, but the exchange does not occur.
I hope there are knowledgeable people on the net who can help in solving this problem. I hope so.
Andrey Nikitin
I was able to change the source code of the unix kermit version 3.0(1) 11/5/84 program to compile with gcc. With the help of conditional compilation, I added more modern code for working with the serial port based on termios. kermit compiled with one
warning and produced an executable.
As a second computer, I used an old 386SX with a COHERENT unix-like operating system. To compile the program, K&R style code was added, since the compiler of the COHERENT operating system does not support the ANSI style of describing function prototypes.
The program compiled successfully on the COHERENT operating system without any warning message. The termios interface was also used to set up serial lines.
As a result, I was able to transfer files from MacOS MacBook Pro to 386SX with COHERENT. Normally binary and text files are transferred. To test the program, I used ckermit on the MacBook Pro and 386SX side, and kermit version 3.0 on the opposite side.
In all cases, sending and receiving files was completed successfully.
I compiled the same source file with the kermit.c program using the Hitech C v3.09 compiler for CP/M for the UZI-180 operating system. In this case, the older BCD-style RS-232 line configuration code was used with the included file sgtty.h, since termios
functions are not implemented in the UZI-180 operating system. The source code compiled without a single warning message, but failed to transfer files from the MacBook Pro to the P112 microcomputer, and vice versa.
The kermit version 3.0 program is quite simple and its source code is divided into several parts. Only a few functions depend on how the serial lines are configured. To make it easier to work with the program code, I created one common file from three
original files, since my program compiles only for UNIX.
The successful operation of the program in MacOS and COHERENT gives me the right to believe that the kermit protocol works fine.
Problems arise when setting up a serial line in the sgtty.h style on the UZI-180 side.
Most likely, it is not possible to switch the serial line to RAW mode, and when transmitting packets using the kermit protocol, they are distorted beyond recognition. When sending a file from MacOS to UZI-180, the receiving side does not recognize the
sent packets at all. In the opposite direction, they come in a distorted form and are not perceived by the receiving party. After 10 attempts have been exhausted, both programs exit with a message about an unsuccessful attempt to send and receive the
file.
I'm not at all familiar with how the operating system kernel works with serial lines. Unfortunately, I do not have the opportunity to test the program on any old operating system with the sgtty.h interface and make sure that it works. All the code for
these functions remained in its original form, and this suggests that the source of the problem is the UZI-180. The kernel source code seems to allow serial lines to be converted to RAW mode. It is clear that this part of the UZI-180 either contains
errors or is not finished.
Not being a system programmer, it is difficult for me to determine the cause of the malfunction and eliminate it.
Unfortunately UZI-180 only works on P112 microcomputer. There aren't many of them. And those who have them either lack the necessary knowledge, or have no interest in a unix-like operating system.
Maybe there are some old school programmers out there who remember how it should work and looking at the serial line driver source code will be able to tell what's wrong and how to fix it.
After restoring the source code of the Hitech C v3.09 compiler for CP/M, it became possible to make it native to UZI-180. The presence of the make program allows you to develop programs in C and Z80 assembly directly on this microcomputer in a fairly
friendly environment.
Despite the existing problems, I hope to overcome them sooner or later. Source code is easier to edit on modern computers. It is faster and more convenient to compile the source code using a cross compiler created from the restored code. It remains to
implement a more or less convenient way to transfer code or programs from a modern computer to the UZI-180.
There is already a kermit version 3.0 program for this. It remains to make it work properly. I naively hope for help from outside. Sometimes miracles do happen.
Andrey Nikitin
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)