eichin@athena.mit.edu (Mark W. Eichin) (03/11/89)
The question: is there a kermit or [xyz]modem in Z80 assembler, or any version already built that works with the TurboDOS T-functions? The answers: 1) Ken Yap <ken@cs.rochester.edu> pointed me to the ftp directories on cunixc.cc.columbia.edu, which have the master sources for Kermit for EVERYTHING. Well, almost everything. They also have a Public Domain Assembler and Linker for CP/M, which can compile the CP/M Kermit distribution. 2) Frank J. Wancho <WANCHO@WSMR-SIMTEL20.ARMY.MIL> suggested Ron Fowler's "MEX" program, of which an early release can be found in simtel20 PD2:<CPM.MEX>. This several variants of Xmodem, kermit, and others. Frank also pointed out that TMODEM was the name he gave to his own TOPS20 version of MODEM7; I have also seen a UNIX modem program of that name, so it was a common idea, but as Frank pointed out, it is just a name, not a different protocol. 3) Robert Bloom <rbloom@apg-emh1.apg.army.mil> pointed out that both IMP and MEX have overlays for TurboDOS, and that the latest Commercial version of MEX+ v1.65 has a built-in installer that supports TurboDOS. He also mentioned 1800-niteowl as the phone number for Ron Fowler's company. 4) David Goodenough <dg@pallio.UUCP> mentioned QTERM, a program which is written in Z80 assembler (though a custom one) and supports Kermit and X/Y MODEM. It turns out that there are two different versions of TurboDOS support available for MEX - one of them includes an extension module for passing through blocks of data to the Master in a Master-Slave system when the Master has the modem and you are using it from a slave; the other may be simple T-fxn calls, I never got deep enough to tell. Now for the interesting part: I actually have a Kermit running. 1) I got MLOAD from simtel20 PD2:<CPM.STARTER-KIT> (which has lots of other neat stuff too.) 2) I got XASM.SHAR[12] from PD2:<UNIX-C.CPM>. a) It didn't unshar. To fix this: change all ` (backquote, 96 decimal, 060H) to ' (forward quote, 027H). These are all in comments (backquote doesn't mean anything in normal C, and in some mutant versions it means "begin BCD constant", or at least it did a long time ago.) and they interfere with the unpacking (at least under 4.3BSD) because the "sh" of the unshar thinks it has to evaluate them. b) Once it unshared, it didn't quite compile. To fix this, find several occurances of '\' in the files produced and make them '\\'. I don't know why this didn't survive shar'ing, and haven't had the time to check. The shar file has them doubled, but passing them through sh ate one level of quoting. c) It is an effective assembler, except for one thing: it can't build the Kermit distribution. (see below) To fix this, I added the "LINK" operator. I just hacked it in, eventually I'll try to make it cleaner, but that worked. 3) I got kermit/a/cp[sx]*.asm and a few other relevant files (also kermit/aaa*, for the 'readme' stuff.) There wasn't any documentation on how to "just build it", but on reading though some of the files I figured out: a) First, asm80 cpsker. This gives you the system independent cpsker.hex, around 62K of hex file, which is the base. This should be common to most systems; download it, MLOAD it, and if you run it you'll get "not configured for any system". b) Next, asm80 cpxtyp. This builds cpxtyp.hex, around 3K (for me) of hex file, which has the system dependent stuff. To actually get the right content, you have to have set flags in a few places, or i my case add if/endif sets. Stragtegy: pick a system that is "as weird as" yours, then just use it as a template for figuring out what you have to customize. c) download cpxtyp.hex, MLOAD kermit=cpsker.com,cpxtyp and opoof, you have a kermit. Run it, discover that it works in connect mode but spits out continuous streams of "k" in send mode, and try again. :-) [this was a symptom of my screwing up the push/pop pairs around the modem send routines... ddt to the rescue! and it worked.] d) download ROGUE.LBR, unpack it, and relax for a while :-) then delete it, because it takes 30K of a 180K disk and you only have two drives to use. 4) I downloaded a software set that gives me the same software on the UNIX and CP/M side: CP/M Unix LASM asm80 MLOAD ? UNARC arc UUD uudecode UUE uuencode USQ120 usq SQ111 sq LU lar KERMIT ckermit zmac, zdis There is other corresponding software, but all of the above is Public Domain. I also haven't finished searching the archives. (CP/M is, after all, a hobby for me...) I'm still looking for an EMACS... however, SmallC21 is probably my next endeavor. After that, maybe a Z80/CP-M emulator for Unix... My one problem at the moment: while kermit downlaods and uploads fine, when I get or put a file, and it prints the filename on the screen, it immediately follows it with about 5 lines of garbage. It appears to be running beyond the end of a buffer, but it is hard to tell where to start (I checked prtstr, and nothing looked obvious...). Next stop --- ddt. Thank you for your attention, I hope someone else is able to use some of this information. If you want the LINK patches to XASM (asm80) even as they are, I can send them to you. If you run the archive and want them, send me mail and let me know and I'll send them to you when I've cleaned them up. If anything above is wrong, please let me know... Mark Eichin <eichin@athena.mit.edu>