• Please review our updated Terms and Rules here

Kermit-80 for Kaypro -- XP tansfers

Hi Philip,

Yes, it works well and I now have my Kaypro software library complete. I was about to drop you a note wondering if you'd tried this when I saw this post. Anyway, there are some other things I found which might be of interest so I'll get in touch.

Tez
 
I've had to work the last 24h and missed a fair bit here! Good to see it is working.

I sent an email with a serial port sniffer attached - maybe you don't need it now?

Anyway, do you know how to modify kermit? I see on that link a few posts back there is a lot of hex files but no source files. Is there some other way to modify the port settings etc?
 
Hi,

Yes, I'm up and going. Thanks for the sniffer. I'm sure it will come in handy for other vintage comm problems.

As to your question, I'm not sure. I used a couple of hex files from the site mentioned in this thread to get my copy..the main program plus a Kaypro II overlay. Kermit 80 allows you to set speed, parity and the like.

You can have a kermit.ini file in the main directory which can specify settings. I haven't used this yet but the manual says it can be done.

I haven't seen an ASM file for Kermit but I'm sure there must be one around.

Tez
 
Now I remember why I never got kermit working - it is *really* complicated!

Ok, click on the link on page 2 and there are a huge number of files. Which one do you use? Do you use assembly files or compiled ones? I've got the walnut creek archive too and there are a large number of kermit files on that too, but they mostly are .lbr and it takes ages to unarchive each one only to find it doesn't do what you want it to.

I am vaguely tempted to drop port 4 and port 6 code into the Propeller emulation and use the kaypro code you have. But it would be great to be able build a kermit file from scratch.

A generic .ini file sounds a very good idea. It does not need very many settings - just baud rate, two port values and maybe that is it.

So ok, I'm at this site ftp://kermit.columbia.edu/kermit/a/ - which file(s) would you suggest are useful?

Many thanks in advance!
 
Now I remember why I never got kermit working - it is *really* complicated!

Ok, click on the link on page 2 and there are a huge number of files. Which one do you use? Do you use assembly files or compiled ones? I've got the walnut creek archive too and there are a large number of kermit files on that too, but they mostly are .lbr and it takes ages to unarchive each one only to find it doesn't do what you want it to.
.........
So ok, I'm at this site ftp://kermit.columbia.edu/kermit/a/ - which file(s) would you suggest are useful?

Many thanks in advance!

I agree it's a huge list but that smaller list of common models on the top page at http://www.z80.eu/kermit.html told me the Kaypro II hex file was CPVKPR.HEX so that was all I looked for. Once I had that it was plain sailing.

Tez
 
I think the generic one might be one answer. Then you can attach it to the PUNCH and READER devices. I managed to get
PIP PTP:=TEST.TXT

to send a file wirelessly to another room. However, I have run into a snag with READER on the Altair SIMH, as the status port for the punch and reader devices is shared. So if you make status=true when bytes are in the READER buffer, then the PUNCH device can't send out bytes if there are no bytes in the READER buffer. It is a peculiarity of the Altair SIMH and I'm getting some more information on that.

But maybe I will add ports 4 and 6? Then it would be Kaypro compatible! I must say it would be pretty good to be able to transfer files from a kaypro to a propeller cp/m emulation. We just need compatible software. I've got a program xmodem2.com which is xmodem patched so it sends text to the console but data goes in and out of the second serial port.

But I don't have kermit (yet). But you have kermit but not xmodem?
 
But I don't have kermit (yet). But you have kermit but not xmodem?

Yes, I have the xmodem ASM files now but I won't bother to compile them now Kermit is working so well. If you want the cp/m kaypro-version Kermit executable I'm now using just send me an email or PM. I'll send it through.

Tez
 
I'm at work at the moment but someone has pointed out that the combined register for PUNCH and READER may be setting different bits in the byte so it could be possible to seperate the two. I need to reread the manual, but if that is the case then it should be possible to get READER working.

I always liked the idea with kermit that you could PIP over a very small file and use that to build a bigger file. I might cheat and use xmodem instead of pip but if it works with the generic version then this could be useful for other vintage CP/M hardware.
 
......I always liked the idea with kermit that you could PIP over a very small file and use that to build a bigger file....

This is so neat.......I just found out that PIP was originally named ATLATL,
which was the acronym for "Anything, Lord to Anything, Lord" meaning
that you could transfer files from any device to any other device :chat: .

ziloo :mrgreen:
 
Making some progress!

Got the kermit source file in hex and the generic hex overlay. Managed to get them over to the board. Also a program called MLOAD.HEX which is the loader and compiler.
ran LOAD MLOAD
and this created MLOAD.COM which is a better version of LOAD

ram MLOAD KERMIT=KERMIT CPSKER,CPVGEN

and it created KERMIT.COM

Ran KERMIT.
Ran SET PORT CRT

and it set the port as port1. Typed RECEIVE and then went into TERATERM and sent a file. Lots of long pauses - I'm not sure what it is doing but at the end the file had been transferred.

But now I am stuck.

SET PORT PTR

as I understand it should set the port so it reads on the reader device and sends data out of the punch device. I've configured the underlying system so reader and punch send out to my port 2.

I've tested this with two tiny programs:

LD E,65
CALL WRITE_PUNCH
RET ; back to cp/m

WRITE_PUNCH: ; prints letter in E
LD C,4 ; FUNCTION NUMBER
CALL FDOS
RET

and the reader one (the relevant bits)

MAIN:

CALL READ_READER
LD E,A ; value ready to send out
CALL WRITE_CONSOLE ; print the character

RET ; back to cp/m

READ_READER: ; get a value from the reader device
LD C,3
CALL FDOS ; returns value in A
RET

now on my system (altair simh) any call to the bios reader will hang the system until a byte appears. This works above and it hangs until something arrives. I'm not sure if that is the way all CP/M works?

Anyway if I run KERMIT and run SET PORT PTR, what happens is it still inputs from the CRT - but it outputs to the PUNCH. So it half works. I was expecting it to hang while it listened to the port2.

So I'm not sure if this is a kermit problem or an emulation problem. Stat below from within kermit reports the port now changed from CRT to the PTR.

All a little complicated - help would be most appreciated!

A>kermit
Kermit-80 v4.11 configured for Generic CP/M-80 with Generic (Dumb) CRT Terminal typ
e selected

For help, type ? at any point in a command
Kermit-80 0A:>set port ptr
Kermit-80 0A:>stat

Autoreceive is off
Block check type: 1-character
Multi-sector buffering at 64 of a maximum of 64
File COLLISION: RENAME
Debugging off
Current default disk: A
Display file size on DIRECTORY command on
Escape char: Control-\
File Mode default
Flow control off
IBM flag off
Disposition for incomplete files is discard

* * * Press any key to continue * * *


Local echo off
Logging to A:KERMIT.LOG is off
Parity: none
Port in use is: PTR
Printer copy off
RECEIVE packet length 80
RECEIVE start-of-pkt char ^A
SEND packet length 80
SEND start-of-pkt char ^A
Current TACTrap Status/Intercept Character: off
Timer off
Current user number: 0
Terminal display is REGULAR
Terminal emulation is OFF
File warning on
Kermit-80 0A:>


If it is any help this is the source code for the altair SIMH that I am using:

; reader/punch routines use sio port 2
;
; The character is sent from register C to the currently assigned listing
; device. The character is in ASCII with zero parity bit.
list: ; list aliased to punch
; The character is sent from register C to the currently assigned punch
; device. The character is in ASCII with zero parity.
punch: in a,(punstat) ; get punch status
and mout ; mask output bit
jp z,punch ; jump back if not ready for output
ld a,c ; prepare character for output
out (pundata),a ; do it
ret

; The next character is read from the currently assigned reader device into
; register A with zero parity (high-order bit must be zero); an end-of-file
; condition is reported by returning an ASCII CTRL-Z(1AH).
reader: in a,(punstat) ; get reader status
rra ; I bit into carry
jp nc,reader ; jump back if no character available
in a,(pundata) ; read character
ret

********************************
One slightly odd thing I've noticed is the bios order

; bios access constants
bootf defl bios+3*0 ;cold boot function
wbootf defl bios+3*1 ;warm boot function
constf defl bios+3*2 ;console status function
coninf defl bios+3*3 ;console input function
conoutf defl bios+3*4 ;console output function
listf defl bios+3*5 ;list output function
punchf defl bios+3*6 ;punch output function
readerf defl bios+3*7 ;reader input function

and

jp boot ; cold start
wboote: jp wboot ; warm start (reboot)
jp const ; console status
jp conin ; console input
jp conout ; console output
jp list ; list character out
jp punch ; punch character out
jp reader ; read character in
jp home ; move disk head to home
jp seldsk ; select disk drive

in the SIMH but the order I have from the CP/M manual is

; 1. Read console - returns an ascii character
; 2. Write console - Sends an ascii character
; 3. Read reader
; 4. Write punch
; 5. Write list
; 6. Direct console input/output. Send FF to receive character status
; 7. Get I/O status of device
; 8. Set I/O status
; 9. Print buffer. Send entire string starting with address and ending With $
; 10. Read buffer. Send address of buffer and return with filled buffer
; 11. Interrogate console ready (If LSB is 1 then console character is ready)
; 12. Lift disk head and return version number of CP/M
; 13. Reset disk system.
; 14. Select disk. 1=A, 2=B etc

and there is something about mapping list to punch. All a bit confusing.

On the other hand, the bios calls seem correct in assembly - 3 is reader and 4 is punch.

One thing I really don't understand is how kermit could scan the port2 but at the same time be listening to the local keyboard for a ^C or exit command. The console I think has a status byte but reader seems to be trapped in a loop till it gets something. So how would it ever time out?

I've just tested in CP/M

PIP PTP:=TEST.TXT

and that works and

PIP TEST2.TXT=PTR:

and that works too (send some characters from a terminal program and end with ^Z)

So increasingly I think the problem is with KERMIT.

I found this in the Kermit instruction manual

"Kermit-80’s I/O routines must check the port status and go elsewhere if no input is available; this allows for virtual
1.7. Installation of Kermit-80 Page 17
terminal connection, keyboard interruption of stuck transmissions, etc. On systems that fully implement I/O
redirection via the optional CP/M IOBYTE facility, this may be done by switching the IOBYTE definition. On
others, however, IN/OUT instructions explicitly referencing the port device registers must be used."

There are a whole lot of hex files for different machines. What I can't seem to find is the file that made these hex files. If I could find those then I could emulate any sort of machine. But the important thing is the ability to check a port status and go elsewhere if no input. That is only two ports really so maybe this is going to be easier to emulate as a kaypro or something?
 
Last edited:
Thanks for the feedback and encouragement Mike. I began writing things up when I started to get a few machines. As each one is different, I'd often come back to a machine months after not using it only to find I'd forgotten what exactly I'd done with it. This helps me remember but the hope is others doing similar things will find the articles a useful reference also.

Tez
 
Great writeup. You make it all sound so easy! The photos are good too.

I guess sooner or later one has to get inside the source code of kermit. I was hoping not to have to do this, but firstly the downloads are extremely slow with long pauses for no particular reason (compared with xmodem where the data leds are flashing pretty much the whole time). I suspect kermit would work better if it has direct access to the ports rather than going through the bios, and that I think involves not just telling kermit the port numbers for the port but also the port numbers to scan the keyboard. I don't see how it can be listening to both at the same time without a way of checking ports directly.

I'll unark that link above when I get home. Thanks for that one - it is a different source to the links commonly available so maybe it will have the source for each of the machine specific builds (rather than just the hex code).

I'll keep working on kermit!

BTW have you got sbasic on the kaypro? I think I am the only person in the world using sbasic but for me it has the structure of C but the syntax of basic. I've got the transmit side of xmodem working in sbasic, plus a steadily growing program that networks CP/M machines via wireless.
 
Hi Doc,

Thanks.

Yes, I've got S-BASIC but I have not played around with it. I know my MBasic well and I guess I've just stuck with that.

S-BASIC was bundled with the Kaypro II but do you know if it was ever bundled with other machines, or sold on it's own?

Tez
 
Re sbasic, I think it was just a kaypro program. It runs fine on any CP/M machine though. In general, I use mbasic for programs up to about 10 lines and then when they start getting complicated I switch to sbasic. Mainly because subroutines can have names like "UpperCase" rather than numbers "gosub 4000". It makes the program easier to read.

Mbasic does have the one huge advantage of having an interpreter for quick and simple tests plus a compiler. It terms of firing up a computer and writing a program to add two numbers and running it, mbasic on CP/M is faster than *any* modern computer.

Yes I see what you mean on your blog about arcane command line codes. Especially when the help doesn't show them!

I>unarc

UNARC 1.6 27 Mar 87
CP/M Archive File Extractor

Usage: UNARC [d:]arcfile[.typ] [d:][afn] [N|P|C]

Examples:
B>UNARC A:SAVE.ARK *.* ; List all files in CP/M archive SAVE on drive A
B>UNARC A:SAVE.ARC *.* ; List all files in MS-DOS archive SAVE on drive A
A>UNARC SAVE ; Same as either of above
A>UNARC SAVE *.* N ; Same as above (no screen pauses)
A>UNARC SAVE *.DOC ; List just .DOC files
A>UNARC SAVE READ.ME ; Typeout the file READ.ME
A>UNARC SAVE READ.ME N ; Typeout the file READ.ME (no screen pauses)
A>UNARC SAVE A: ; Extract all files to drive A
A>UNARC SAVE B:*.DOC ; Extract .DOC files to drive B
A>UNARC SAVE C:READ.ME ; Extract file READ.ME to drive C
A>UNARC SAVE PRN.DAT P ; Print the file PRN.DAT (no formatting)
A>UNARC SAVE *.* C ; Check validity of all files in archive

Copyright (C) 1986, 1987 by Robert A. Freed


The actual syntax for unarchiving everything (drive I on the SIMH)
I>UNARC CP411SRC I:*.*

Which I don't see listed above.

Ok, time to go through all the files and see what is there...

Addit: A bit embarrassing this, but I can't work out how to attach files to this new forum. So this is a bit of a long listing, but the key file is CPXTYP.ASM
Code:
; CPXTYP.ASM
;       KERMIT - (Celtic for "FREE")
;
;       This is the CP/M-80 implementation of the Columbia University
;       KERMIT file transfer protocol.
;
;       Version 4.0
;
;       Copyright June 1981,1982,1983,1984,1985
;       Columbia University
;
; Originally written by Bill Catchings of the Columbia University Center for
; Computing Activities, 612 W. 115th St., New York, NY 10025.
;
; Contributions by Frank da Cruz, Daphne Tzoar, Bernie Eiben,
; Bruce Tanner, Nick Bush, Greg Small, Kimmo Laaksonen, Jeff Damens, and many
; others.
;
;       This is the header file for building the system-dependent overlay
;       for KERMIT.  It contains the definitions used to select the target
;       system, and collects (via INCLUDE or LINK directives) the remaining
;       code.  If the target system is one of the supported systems
;       described below, then this is the only file that needs to be
;       edited.
;
; revision history:
;
;edit 34, 10-Jan-1991 by MF. Put in "terminal required" notation for
;	more machines that need terminals.
;edit 33, 9-Jan-1991 by MF. Put in "terminal required" notation for Access
;	Matrix and eliminated an extra "sysfam set FALSE" when torfam set TRUE
;edit 32, 7-Jan-1991 by MF. Added code by Jay. S. Rouman to support the
;	Ampro Little Board (see CPXBBI.ASM).
;	Also put in a couple of missing .printx's
;edit 31, 2-Nov-1990 by MF.  Moved overlay address to 7000H.
;edit 30, 14-Sep-1990 by MF. Added INCOMPLETE-FILE flag for SET
;	INCOMPLETE-FILE
;edit 29, 11-Sep-1990 by MF.  Moved overlay address for version 4.10.
;	to 6C00H.
; edit 28, 1st September 1990 by Russell Lang, [email]rjl@monu1.cc.monash.edu.au[/email]
;	Added support for MicroBee (CPXBEE.ASM).
;
; edit 27, 28-Aug-89 by Mike Freeman, Bonneville Power Administration,
;	P.O. Box 491, Vancouver WA 98666 USA:  add support for Hewlett-
;	Packard HP-125 "Business Assistant" computer using a HP-modified
	;CP/M Version 2.2.
;
; edit 26, 2 December, by OBSchou.  Added code for CP/M-80 Kermit to
;	run on an IBM-PC under Z80MU.  Perverse??  No, its to allow testing
;	of independent code on a PC running CP/M kermit.
;
; edit 25, 27 October, 1987 by OBSchou.  Merged in Sanyo, CompuPro, Genie
;	and TRS Model 4 code, and added four new families.
;	CPXSYO.ASM for the Sanyo, CPXPRO.ASM for the Compupro,
;	CPXTRS.ASM for the TRS-80 Model 4, CPXGNI.ASM for the Genie.
;	Many thanks to G. Smith for these latter two systems.   Also
;	added the WYSE 100 Terminal type to the VDU table.
;
; edit 24, 17 July, 1987 by OBSchou.  Added (hopefully) code from
;	CP/M Kermit 3.5 (WOW) for the Heath 8. (h8quad)  The actual code
;	has been put into the CPXHEA.ASM family file, but I do not actually
;	*KNOW* if this new version works.  Anyone willing to test it out??
;
; edit 23 16 July, 1987 for for Will Rose:
;	edit of 15 Jan 1987 by C W Rose
;	Added code for Micromint SB180 and Ampro 230 terminal.
;
; 	edit of 10 Apr 87 by C W Rose
;	Amended code for pci2651 to handle Telecom Merlin M2215.
;	(8085 at 5 MHz, 2651 USART, port TTY1:, Ampro 230 terminal equivalent).
;	
;	edit of 13 Jul 1987 by C W Rose
;       Added Micromint SB180 with 6/9 MHz. option.
;
; edit 22, 15th July, 1987 by OBSchou for David Moore.  
;	David submitted a paper copy of Kermit 4.05 overlay for a Teletek
;	system:  I have (hopefully) correctly appended his code.  He also
;	send in the code for ADM 22 terminals.
;
; edit 21, 14 July, 1986 by OBSchou for John Shearwood of Birmingham 
;	University.  His edits:
;	edit of Apr 7th, 1987 by JA Shearwood.  Added entry for Cifer Aux port
;	edit of Mar 24 1987 by JA Shearwood, Birmingham.  Added code for Cifer
;	1886 with CP/M Plus
;
;	Also added in code from Chris Miles:
;	edit of 19 May 26, 1987 by C.J.MILES@UMRCC.
;	Kaypro II, Xerox 820 and Big Board II code seperated
;	from CPXSYS.ASM and put in a new family file called
;	CPXBBI.ASM.
;
;	Finally added code from MJ Carter of Nottingham University:
;	edit 16a of 5th Mar 1987 by M J Carter, Nottingham Uni [majoc], to add
;       entry for OEM ScreenTyper (scntpr).  See also CPXFRK.ASM ("fork"),
;       the tail end of CPXLNK.ASM, and the Heath-Zenith family file
;       CPXHEA.ASM (heath, z100, telcon, and scntpr).
;
;	[Note: Martins CPXFRK is another version of CPXSWT.ASM]
;
;
; edit 20, 21 May 1987 by OBSchou for Colin Burns of the Institute 
;	of Neurological Sciences, Glasgow.  Added flag for Hazeltine 1500
;	VDU (h1500)
;
; edit 19, 6th April, 1987 by OBSchou.
;	Added in EQUs for Amstrad 664 and 6128 machines (CPC) and NCR
;	Decsision mate V, bot sets of code submitted by Chris Miles of
;	Manchester University.  NCR code is similar to the PCI2651 code, so
;	NCRDMV chains to CPXTOR.ASM.  CPC cahins to the modified CPXPCW file
;	as submitted by Chris.  *** NOTE *** All Amstrad versions require
;	CP/M 3, so the 664 version must both have the system upgraded to 
;	CP/M 3 and have an aditional RAM pack.  All Amstrad systems require
;	a serial interface.
;
; edit 18, 30 March, 1986. OBSchou.
;	* * * Here Begineth kermit-80 Version 4.09 * * *
;
;	Biggest change is the overlay address has been moved (again) to 6000h
;	and the files have all been diced into families.  M80 (almost) back 
;	in, though I have found some bugs.  Will worry about those later.
;	CPXSYS.ASM (CP4SYS.ASM in V4.05) now is a family file as well.  
;
;	Comments and all that would be much appreciated.
;
;	Bertil Schou,
;	The Computer Centre,
;	Loughborough University of Technology, 
;	Loughborough
;	Leicestershire,  LE11 3TU
;	Great Britain
;
;	tel (0509) 222313
;	E-Mail (Janet) OBSchou at LOUGHBOROUGH.MULTICS
;
;
; edit 17, March 15, by OBSchou to add in support for M80 Macro Assembler.
;       Now its a little messy using the M80 Assembler,asn we have family files
;       and how are we gonna tell M80 what files to use?
;       Sort of Simple: we generate a set of EQUs that only INCLUDE the family
;       file being assembled.  I hope.
;
; edit 16 Dec 1st, 1986 by OBSchou.  Added entry for Amstrad PCW range (PCW)
;	Code in Family file CPXPCW.ASM, submitted by Ian Young of Lattice 
;	Logic Systems.
;
; Edit 15 June 20 1986.  Had to chand org address to 5000h to give room for
;       multi-fcb space for DIR command and other additions in the system
;       indepentent part.  This starts Kermit-80 version 4.08...
;
; Edit 14: March 20, 1986 by OBSchou Loughborough University for 
;       B Robertson, Aberdeen Univ. Computing Centre.
;       Add support for APPLE II with serial cards based on the 6850 ACIA.
;       Mod 380Z support to allow both MDS (5 1/4" discs) and FDS (8" discs)
;       configurations.  Any mistakes on this merge all my fault (OBSchou)
;
; edit 13 22 April, 1986 by OBSchou Loughborough University
;       Changed org address to 4000h to allow for mods to the system
;       independent part for kermit version 4.06
;
; edit 12 5 Febuary, 1986 by OBSchou
;       merged in conditionals for Epson PX8 (px8). Code from Tony Addyman
;       Salford University, England.
;       Added code from other contibutors for Basic Northstar (basicns), 
;       Access-Matrix (access), US Micro Sales s1008 (s1008),
;       Micro Mate (mmate), A.C.E. Discovery (disc).  
;       These I cannot test: please send comments back if these are buggy.
;
; edit 11 29 January 1985 by OBSchou @ multics.lut.ac.uk
;       added in code for 2651 USART for use with CP/M and a VDU
;
; edit 10: 21 November, 1985 by ajcole @ leeds.ai
;       Merged in support for the following:
;       North Star Horizon without SIO-4 (horizon)
;       Comart Communicator (comart)
;       Cromemco TU-ART interface (cmemco)
;       TVI912/920 VDUs (tvi912)
;
; edit 9 24 October by OBSchou.  Merged code from B Robertson from
;       Aberdeen University.  He writes:
;       September 20, 1985 by B Robertson, Aberdeen Univ. Computing Centre.
;       Add support for Research Machines 380Z, North Star Advantage, Acorn
;       BBC with Z80 co-processor and APPLE II with Mountain Computers CPS
;       Multifunction card.
;
; edit 8: 11 October, 1985 by OBSchou
;       tidied up code around Superbrain main/aux port business
;
; edit 7: 11 June, 1985 by O B Schou, Loughborough University of Tech.
;       Loughborough, Leics, England.
;       Added code for Torch (Second processor to BBC-B) and Cifer 1886
;       Hopefully this code will work with Torchpacks, and Cifer 26xx
;       and 28xx series computers.  Edits marked by OBS
;
; edit 6: 9-Feb-85 by CJC
;       Merge Northstar Horizon, Lobo MAX, and Xerox 820 changes:
;       13-Dec-84 Add Northstar Horizon with SIO-4 board, port 5 at 1200 [CSM]
;       13-Jan-85 by Vanya J.Cooper Pima Commun. College Tel: 602-884-6809
;
;pcc001 27-Dec-84       vjc     modules: cp4sys,cp4typ
;       Add conditional for Xerox 820.  I thought at first I could
;       live with the kaypro conditional, but it's enough of a pain
;       that I added it back in.  The clear-to-end-of-screen char
;       is different,  breaking many programs in VT52 mode, and the
;       default escape char control-\, is not at all obvious how
;       to type on the 820 keyboard.  If you muddle through the
;       key translation table, it turns out to be control-comma.
;       Rather than OR xer820 all the occurances of kpII conditionals
;       I added a bbI conditional for all common code for the big
;       board I based machines that is automatically turned on by
;       either kpII or xer820.  This will also make it easier in
;       the future if another flavor of bigboard is added.
;
;pcc010 2-Jan-85        vjc     modules:cp4pkt,cp4typ
;       Control-C during send or recieve clobbers some of the screen
;       and doesn't look nice.  Position the cursor to end of screen
;       before returning to main loop.
;
;pcc013 8-Jan-85        vjc     modules:cp4mit,cp4utl,cp4typ
;       Replace CLOSE command to cancel session logging to SET
;       LOGGING ON/OFF.  This seems to fit in with the command
;       structure better.  Default the log file to KERMIT.LOG
;       incase no previous LOG command.  Logging is also enabled
;       by LOG command, as before.
;
; edit 5: October 13, 1984 by L M Jones, JCC, for New York Botanical Garden
;       Add support for CPT-85xx series of word processors when running CP/M.
;
; edit 4: August 29, 1984 by Bdale Garbee @ CMU
;       Add support for Digicomp Delphi 100 and Netronics Smartvid terminal.
;
; edit 3: July 27, 1984 (CJC)
;       Shuffle files around for easier assembly by both M80 and LASM.
;
; edit 2: June 4, 1984 [Toad Hall]
;       Added Morrow Decision I (the big S100 bus sucker, not the
;       little single motherboard one); added Toad Hall TACTrap to deal
;       with those working through a TAC and its intercept character.
;
; edit 1: May, 1984 (CJC)
;       extracted from CPMBASE.M80 version 3.9; modifications are described
;       in the accompanying .UPD file.
;

FALSE	EQU	0
TRUE	EQU	NOT FALSE

;
; Assembler type.  Define the appropriate one TRUE, the rest FALSE.  (We can't
; use ASM, because it cannot handle multiple input files)
mac80	EQU	FALSE		; For assembly via MAC80 cross-assembler.
m80	EQU	FALSE		; For assembly via Microsoft's M80.
lasm	EQU	TRUE		; For assembly via LASM, a public-domain
				; assembler.
;
;       Address at which the overlay should be loaded.  This will not
;       change often (no more than once per version of KERMIT); it should
;       be updated when a new version of KERMIT is released.
;

ovladr	EQU	7000H		; [18] address = 6c00h for Kermit v4.10
				;[MF]...

cpsker	EQU	FALSE		; building the system-dependent part...

; SET some options to FALSE, then SET  them TRUE if needed
iobyt	SET	FALSE		;assume we dont want IOBYTE..
inout	SET	FALSE		;... or IN/OUT code
termin	SET	FALSE		; we are not using a terminal
; Also set the CPU speed to a default 2.0 Mhz
cpuspd	SET	20		; default to 2 Mhz, in case we dont know
; Assume kit is Z80 based, and set z80 false for non z80 systems.
;z80	SET	TRUE

;Which CP/M system hardware are we building KERMIT-80 for?
;One of the following should be TRUE, the rest FALSE:
;
;We have basically three "classes" of systems:

;Systems supporting the IO-redirection via I/O-Byte

bbc	EQU	FALSE		;[9] Acorn BBC model B
;added code by JAS
cifer2  EQU     FALSE		; Cifer 1886 using io byte flipping [OBS]
cifer3  EQU	FALSE		; Cifer 1886 with CP/M Plus [JAS]
				;  (Not IOBYTE but easier to keep together)
cifaux  EQU     FALSE		; One of above Cifers using AUX port else VL port
dmII	EQU	FALSE		;"Generic" KERMIT-80 for DECMATE II.
gener	EQU	FALSE 		;"Generic" Kermit-80, CP/M calls only.
				; (terminal required)
mikko	EQU	FALSE		;"Generic" KERMIT-80 for MikroMikko
robin	EQU	FALSE		;DEC VT180 = Generic + VT100 screen control

;.. \and Systems supporting direct IN / OUT handling of ports
advant	EQU	FALSE		;[10] North Star Advantage
access	EQU	FALSE		; Access Matrix .. uses port J5 [12]
				; (terminal required) [MF]
ampro	EQU	FALSE		; Ampro Little Board (terminal required)
basicns	EQU	FALSE		; Basic Northstar using printer port (CRT req.)
bbII	EQU	FALSE		;BigBoard II (terminal required)
brainm	EQU	FALSE		;Select Superbrain Main port  **[obs]
braina	EQU	FALSE		;Select Superbrain AUX port  **[obs]
comart	EQU	FALSE		;[10] Comart Communicator
				; (terminal required)
compro	EQU	FALSE		;Compupro Interfacer 4 (or 3) [gv]
				; (terminal required) [MF]
cpt85xx	EQU	FALSE		;CPT-85xx word processor w/CPM (set ADM3A TRUE)
cmemco	EQU	FALSE		;[10] Cromemco (TU-ART) (terminal required)
delphi	EQU	FALSE		;Digicomp Delphi 100 (terminal required)
disc	EQU	FALSE		; Action Computer Enterprises "Discovery"
				; Port B on an 83U user board (CRT required)
genie	EQU	FALSE		;Eaca Genie III
h8quad	EQU	FALSE		;[24] Entry for heath-8.  NOT same as H-89
heath   EQU     FALSE		;For Heath/Zenith H89.
kpII	EQU	FALSE		;Kaypro-II
horizon	EQU	FALSE		;[10] North Star Horizon (mother-board)
				; (terminal required)
m2215	EQU	FALSE		; BT Merlin [23] - uses 2651, Terminal rqd
mmate	EQU	FALSE		; PMC - 101 MicroMate (Crt required)
mmdI	EQU	FALSE		;Morrow Micro Decision I (terminal required)
mdI	EQU	FALSE		;Morrow Decision I (the big sucker)
				; (terminal required) [Toad Hall]
ncrdmv	EQU	FALSE		; NCR Desision Mate V. (2651 USART) (Term rqd.)
norths	EQU	FALSE		;[CSM] NorthStar Horizon with HSIO-4 board
				; (terminal required)
pci2651	EQU	FALSE		; CP/M with 2651 USART.  Needs VDU. [11]
rm380zm	EQU	FALSE		;[14] Research Machines 380Z MDS (5.25" discs)
rm380zf	EQU	FALSE		;[14] Research Machines 380Z FDS (8" discs)
s1008	EQU	FALSE		; US Micro Sales s1008 (Terminal required)
sb6	EQU	FALSE		; SB180 6/9 MHz cpu speed conditionals -
sb9	EQU	FALSE		;   set one of these to TRUE, - it will
				;   automatically set sb180 TRUE
				; (terminal reqd for Sb-180 systems)
scntpr  EQU     FALSE		; [majoc 870305] For OEM ScreenTyper
sanyo	EQU	FALSE 		;For sanyo mbc-1100 series
telcon	EQU	FALSE		;For TELCON Zorba portable
teletek	EQU	FALSE		; Teletek SYSTEMASTER (terminal rqd)
trs80lb	EQU	FALSE		;For Lifeboat 2.25C CP/M Display
trs80pt	EQU	FALSE		;For Pickles + Trout CP/M Display
trsm4	EQU	FALSE		;TRS80 Model 4 under Montezuma Micro CPM 2.2
vector	EQU	FALSE		;For Vector Graphics.
xer820	EQU	FALSE		;[pcc001] Xerox 820
z100    EQU     FALSE		;For Z-100 under CP/M-85.

;.. and Systems doing neither...
apmmdm	EQU	FALSE		;jb Micromodem II in slot 2
ap6551	EQU	FALSE		;jb apple with 6551 ACIA in serial interface
ap6850	EQU	FALSE		;[14] Apple with 6850 ACIA in serial interface
				;[14] e.g PACT, SSM AIO, Aristocard
apcps	EQU	FALSE		;[9] Apple with CP multifunction card
cpc	EQU	FALSE		; Amstrad CPC CP/M Plus computers
cpm3	EQU	FALSE		;"Generic" Kermit-80 for CP/M 3.0 (CP/M Plus)
				; (terminal required)
lobo	EQU	FALSE		;Lobo Max-80
osi	EQU	FALSE		;For Ohio Scientific.
osbrn1	EQU	FALSE		;For Osborne 1
pcw	EQU	FALSE		; Amstrad PCW 8256/8512 computers
px8	EQU	FALSE		;[12] For Epson PX-8
torch	EQU	FALSE		;[obs] Torch does comms via Beeb as IO processor
z80mu	EQU	FALSE		; CP/M-80 Kermit under z80mu emulator on PC
hp125	EQU	FALSE		;[MF]HP-125 Business Assistant, 8-bit data
				; path thru Data Comm 1, 7-bit data path
				; thru Data Comm 2 (requires 8th-bit quoting
				; for binary transfers on Data Comm 2)
				; set VT52 TRUE
mbee	EQU	FALSE		; Microbee Systems - Microbee 

;.. and for Micros, like the MDI, which have "terminals of choice", you must
;select one of these in addition to selecting the micro itself.
;Also select a terminal for "gener" and "cpm3": use "crt" for the TRUE generic.
crt	EQU	FALSE		;Basic CRT, no cursor positioning
adm3a	EQU	FALSE		;Adm3a Display (or CPT built-in display)
adm22	EQU	FALSE		;ADM 22 terminal
h1500	EQU	FALSE		;Hazeltine 1500
smrtvd	EQU	FALSE		;Netronics Smartvid terminal.
soroq	EQU	FALSE		;Soroq IQ-120.. this a guess [OBS]
am230	EQU	FALSE		;Ampro 230 [13]
tvi912	EQU	FALSE		;[10] TVI912/920
tvi925	EQU	FALSE		;TVI925 Display
				; (works for Freedom 100 also)  [Toad Hall]
vt52	EQU	FALSE		;VT52 or equivalent (or H19)
vt100	EQU	FALSE		;VT100 or equivalent
wyse	EQU	FALSE		;Wyse 100 terminal
;
; Several systems are basically the same, with very slight variations,
;	so use common code.  List these sysems below
;
cifer	EQU	cifer2 OR cifer3	; DO NOT TOUCH THIS LINE
brain	EQU	brainm OR braina	;For Intertec SuperBrain. **[obs]
;
; flag 380Z system if either selected
;
rm380z	EQU rm380zm OR rm380zf ;[14]
;
trs80	EQU	trs80lb	OR trs80pt ; if either, flag TRS-80 system.
bbI	EQU	kpII OR	xer820	;[pcc001] flag for bigboard I
sb180	EQU	sb6 OR sb9	; Micromint SB180 (BYTE Oct 85)
;
; flag apple system if either selected
;
apple	EQU	apmmdm OR ap6551 OR ap6850 OR apcps
;
; also set termin(al) TRUE if any terminal selected (crt included)
termin	SET	crt OR adm3a OR adm22 OR h1500 OR smrtvd OR am230
termin	SET	termin OR tvi912 OR tvi925 OR vt52 OR vt100
termin	SET	termin OR wyse OR soroq

; Now set iobyt or inout TRUE for those systems doing so
; IOBYTE systems...
IF robin OR dmII OR gener OR mikko OR cifer2 OR bbc;[**obs]
iobyt	SET	TRUE		;Short conditional for above
ENDIF;robin OR dmII OR gener OR cifer2 OR bbc

; INOUT systems...
IF brain OR vector OR sanyo or compro
inout	SET	TRUE		;Short conditional for above
ENDIF;brain OR vector OR sanyo OR compro

IF heath OR h8quad OR z100 OR trs80 OR telcon OR bbI
inout	SET	TRUE		;Short conditional for above
ENDIF;heath OR h8quad OR z100 OR trs80 OR telcon OR bbI

IF bbII	OR mmdI	OR mdI OR delphi OR cpt85xx OR norths	;running out of room
inout	SET	TRUE		;Short conditional for above
ENDIF;bbII OR mmdI OR mdI OR delphi OR cpt85xx OR norths

IF advant OR rm380z OR comart OR horizon OR cmemco	;[9] [10] more room here
inout	SET	TRUE		;Short conditional for above
ENDIF;advant OR rm380z OR comart OR horizon OR cmemco

IF pci2651 OR m2215 OR sb180 OR ncrdmv OR teletek;[11] and even more room
inout	SET	TRUE		;Short conditional for above
ENDIF	;pci2651 OR m2215 OR sb180 OR ncrdmv OR teletek [11]

IF access OR basicns OR	s1008 OR mmate OR disc ; [12]
inout	SET	TRUE		;Short conditional for above
ENDIF ; access OR basicns OR s1008 OR mmate OR disc [12]

IF genie OR trsm4 OR ampro
inout	SET	TRUE		;Short conditional for above
ENDIF ; genie OR trsm4 OR ampro


; Toad Hall TAC Trap:  If you're going through a TAC, it will
; cough on its Intercept Character (usually a @ (* - 40H)).  Sending it
; twice forces the TAC to recognize it as a valid ASCII character,
; and it'll send only one on to the host.  If you've SET the TACTrap
; to OFF, it will be a null character, and nothing will happen.  If you
; set it on, it will be your selected TAC intercept character (or will
; default to the common intercept char, '@'.
; If you never expect to have to work through such a beastie, just set
; TAC to false and forget all this mess.  [Toad Hall]

tac	EQU	FALSE		; gonna work through a TAC?
tacval	EQU	'@'             ;Typical TAC intercept character

; Processor speed in units of 100KHz
; for bbII, kpII, cpt85xx, advance, apple,bbc,px8 & rm380z timing loop [12]
; We have to set these before CPXCOM to make sure we update the CPU speed.

; The following systems I have no idea of cpu speed. Can anyone oblige??
;	robin, dmII, mikko, vector, heath, h8quad, z100, scntpr
;	trs80 (both), telcon, mmdI, mdI, delphi, ncrdmv,
;	cromemco, teletek, osi, lobo

IF z80mu
cpuspd	SET	2		; a PC is about 200khz Z80 equivalent
ENDIF; z80mu

IF apple OR cpt85xx OR px8 OR heath OR h8quad ;[9] [12] What rate is heath?
cpuspd	SET	20		; Apple Softcard, CPT-85xx: 2.0 MHz
				; ('cause of integral video?)
ENDIF; apple OR cpt85xx OR px8 OR heath OR h8quad [12]

IF kpII	OR xer820 OR scntpr OR osbrn1 ;[9] What speed is scntpr??
cpuspd	SET	25		; original Kaypro II,Xerox 820: 2.5 MHz
ENDIF;kpII OR xer820 OR scntpr OR osbrn1

IF PCW or CPC
cpuspd	SET	33 		; all 4MHz but insterted wait states
				; reduce to an effective 3.3 MHz.
ENDIF	;pcw OR cpc

IF brain OR advant OR bbII OR torch OR z100 OR genie OR trsm4
cpuspd	SET	40		; 4.0 MHz CPU
ENDIF; brain OR advant OR bbII OR torch OR z100 OR genie OR trsm4

IF cifer OR rm380z OR comart OR horizon OR norths
cpuspd	SET	40		; 4.0 MHz CPU
ENDIF; cifer OR rm380z OR comart OR horizon OR norths

IF disc	OR mmate OR s1008 OR access OR basicns ;[29] This is a guess.. Most are 4Mhz
cpuspd	SET	40		; 4.0 MHz CPU
ENDIF	;disc OR mmate OR s1008 OR access OR basicns [29]

IF m2215
cpuspd	SET	50		; BT Merlin Rair Black Box is 8085 at 5 Mhz
ENDIF	;m2215

IF bbc or sb6
cpuspd	SET	60		; BBC or SB-180 with 6Mhz Z80/61480
ENDIF;bbc OR sb6

IF sb9
cpuspd	SET	90		; SB-180 with 9 Mhz clock
ENDIF;sb9

IF hp125 OR telcon
cpuspd	SET	40		;[MF]HP125 or TELCON
ENDIF;hp125 OR telcon 

IF mbee
cpuspd	SET	33		; Microbee has 3.375MHz Z80
ENDIF; mbee

; Set Z80 flag FALSE for non Z80 or unknown CPU systems
IF	FALSE			; assume all systems are not z80 based
;z80	SET	FALSE
ENDIF	;FALSE

; Now, lets see what family we are assembling for.  Reset all 
;	family file to FALSE

torfam  SET     FALSE		; not Torch family file
ciffam	SET	FALSE		; not Cifer kit
appfam	SET 	FALSE		; not Apples
norfam	SET	FALSE		; not North Star kit
pcwfam	SET	FALSE		; not Amstrad PCW kit
bbifam	SET	FALSE		; not the BBI family
heafam	SET	FALSE		; not Heath, Z100, telcon,or screentyper
sbfam	SET	FALSE		; not an SB180 system
merfam	SET 	FALSE		; not a BT Merlin system
sanfam	SET	FALSE		; not a Sanyo
comfam	SET	FALSE		; not a compupro
genfam	SET	FALSE		; not a genie
trsfam	SET	FALSE		; not a trs-80 Model 4
z80fam	SET	FALSE		; not z80mu system
beefam	SET	FALSE		; not a Microbee system
sysfam	SET	TRUE		; ... but assume the worst, and its in
				; the CPXSYS.ASM file


IF      (torch OR pci2651 OR ncrdmv OR brain)   ;[15]
torfam  SET     TRUE            ; we are to use the Torch family file
.printx * torfam set TRUE *
;(Yeah, I know, there are more than Torch systems in it)
ENDIF	;(torch OR pci2651 OR ncrdmv OR brain) [15]

IF      (cifer)
ciffam	SET	TRUE		; we are to use the cifer family file
.printx * ciffam set TRUE *
ENDIF	;cifer

IF      apple   ;[15]
appfam	SET 	TRUE		; apples
.printx * appfam set TRUE *
ENDIF   ;apple [15]

IF      (horizon OR basicns OR norths OR advant OR comart) ;[15]
norfam	SET	TRUE		; north star kit
.printx * norfam set TRUE *
ENDIF   ;(horizon OR basicns OR norths OR advant OR comart) [15]

IF      (pcw OR cpc)	;[15]
pcwfam	SET	TRUE		; Amstrad PCW kit
.printx * pcwfam set TRUE *
ENDIF   ;pcw OR cpc [15]

IF      (kpII OR xer820 OR bbII OR ampro)
bbifam	SET	TRUE		; The Bigboard, Kaypro, Xerox and Ampro family
.printx * bbifam set TRUE *
ENDIF	;(kpII or xer820 OR bbII OR ampro)

IF (heath OR h8quad OR telcon OR z100 OR scntpr)
heafam	SET	TRUE		; Doing Heath, z100, telcon, or screentyper
.printx * heafam set TRUE *
ENDIF   ;(heath OR h8quad OR telcon OR z100 OR scntpr)

IF sb180
sbfam	SET	TRUE		; doing an SB180 system
.printx * sbfam set TRUE *
ENDIF	; sb180

IF m2215
merfam	SET 	TRUE		; doing a BT Merlin system
.printx * merfam set TRUE *
ENDIF	; m2215

IF sanyo
sanfam	SET 	TRUE		; doing a Sanyo MBC-1100 system
.printx * sanfam set TRUE *
ENDIF	; sanyo

IF compro
comfam	SET 	TRUE		; doing a Compupro system
.printx * comfam set TRUE *
ENDIF	; compro

IF genie
genfam	SET 	TRUE		; doing a Genie system
.printx * genfam set TRUE *
ENDIF	; genie

IF trsm4
trsfam	SET 	TRUE		; doing a TRS-80 M4 system
.printx * trsfam set TRUE *
ENDIF	; trs4m

IF z80mu
z80fam	SET 	TRUE		; doing a z80mu emulation
.printx * z80fam set TRUE *
ENDIF	; z80mu

IF mbee
beefam	SET	TRUE		; doing a Microbee system
.printx * beefam set TRUE *
ENDIF	; mbee

; Now, if none of the above, then its the older CPXSYS.ASM file we want

IF (torfam OR ciffam OR appfam OR norfam OR sanfam OR comfam) AND sysfam
sysfam	SET	FALSE		; Were not doing the CPXSYS.ASM file
.printx * sysfam set FALSE *
ENDIF	; (torfam OR ciffam OR appfam OR norfam OR sanfam OR comfam) AND sysfam

IF (pcwfam OR bbifam OR heafam OR sbfam OR merfam) AND sysfam
sysfam	SET	FALSE		; Were not doing the CPXSYS.ASM file
.printx * sysfam set FALSE *
ENDIF	; (pcwfam OR bbifam OR heafam OR sbfam OR merfam) AND sysfam

IF (genfam OR trsfam OR z80fam OR beefam) AND sysfam
sysfam	SET	FALSE		; Were not doing the CPXSYS.ASM file
.printx * sysfam set FALSE *
ENDIF	; (genfam OR trsfam OR z80fam OR mbeefam) AND sysfam

IF sysfam
.printx * sysfam set TRUE *
ENDIF

IF lasm
	LINK	CPSDEF		; Use the system independent declares
ENDIF;lasm  [Toad Hall]

; If we're still here, must be M80 or MAC80.  Collect the rest of
; the sources.
.sfcond


        INCLUDE CPSDEF.ASM      ; common definitions
        INCLUDE CPXLNK.ASM      ; linkage area description
	INCLUDE	CPXCOM.ASM	; include common code
        INCLUDE CPXSWT.ASM      ; this wont do much, but will announce machine

IF      torfam                  ;[15]
        INCLUDE CPXTOR.ASM      ; we are assembling for Torch, Cifer etc
ENDIF   ;torfam                 [15]

IF	ciffam
	INCLUDE	CPXCIF.ASM	; we are assembling for a Cifer
ENDIF	;ciffam

IF      appfam                  ;[15]
        INCLUDE CPXAPP.ASM      ; we are assembling for an apple
ENDIF   ;appfam                 [15]

IF      norfam                  ;[15]
        INCLUDE CPXNOR.ASM      ; we are assembling a NortStar machine
ENDIF   ;norfam                 [15]

IF      pcwfam                  ;[15]
        INCLUDE CPXPCW.ASM      ; we are assembling for the Amstrad PCW machine
ENDIF   ;pcwfam                 [15]

IF      bbifam
        INCLUDE CPXBBI.ASM	; assembling for BigBoard, Kaypro, Xerox
				; & Ampro Little Board
ENDIF   ;bbifam

IF      sysfam                  ;[15]
        INCLUDE CPXSYS.ASM      ; system-dependent code and tables (Part 1)
        INCLUDE CPXSY2.ASM      ; system-dependent code and tables (Part 2)
ENDIF   ;sysfam                 [15]

IF	heafam
	INCLUDE CPXHEA.ASM
ENDIF	;heafam

IF	m2215
	INCLUDE	CPXMRL.ASM
ENDIF	;m2215

IF	sbfam
	INCLUDE	CPXSB.ASM
ENDIF	;sbfam

IF	sanfam
	INCLUDE	CPXSYO.ASM
ENDIF	;sanfam

IF	comfam
	INCLUDE	CPXPRO.ASM
ENDIF	;comfam

IF	genfam
	INCLUDE	CPXGNI.ASM
ENDIF	;genfam

IF	trsfam
	INCLUDE	CPXTM4.ASM
ENDIF	;trsfam

IF	z80fam
	INCLUDE	CPXZ80.ASM
ENDIF	;z80fam

IF	beefam
	INCLUDE CPXBEE.ASM
ENDIF	;beefam

IF termin			; any terminal selected?
        INCLUDE CPXVDU.ASM      ;[15] Just in case we need a VDU...
ENDIF	;termin
        END
 
Last edited:
Not wanting to hijack this fine Kermit-80 thread, but my recent research into S-Basic revealed "its manual was rather poor, giving few examples of code. Plus, S-Basic arrived late - CBasic had a foothold". I don't have the source of that review at the moment.

I may give S-Basic a go though on my Kaypro II. I've got a few software projects in mind...

Philip
 
I've got the sbasic manual plus code examples plus some slight edits to clarify things. I tried posting it here but it is 3x too long for this forum. But I don't seem to be able to get attachments to work on this new forum. I'll keep working on that problem. I'd post a screenshot of where it stops working but I can't post attachments like screenshots either...

Go advanced
Manage attachments
Click “Add Files”
Select files (opens fileview window). Select the file. It appears in the list.
Click Upload Files and nothing happens.

I'll try in a different browser...

No I can't get it to work in Opera or Firefox. Firefox won't upload. Opera does upload but won't add the file to the list so you can't drag it into the attachment area. I'll try IE...

IE uploads but doesn't add to the list, like Opera.

Hmm, it might just be quicker to send me an email moxhamj@internode.on.net and I'll send it the old fashioned way.


Re Kermit, made some progress but this is a complicated suite of programs. In the CPXTYP.ASM program there is a comment

;We have basically three "classes" of systems:
;Systems supporting the IO-redirection via I/O-Byte
;.. \and Systems supporting direct IN / OUT handling of ports
;.. and Systems doing neither...

The one that I think is most useful is ;.. \and Systems supporting direct IN / OUT handling of ports

And in that group is the kaypro which is good. So this is going to be similar to the kaypro.

But if you set
kpII EQU FALSE ;Kaypro-II

to TRUE it changes a few things further down the program like the speed. But the actual port settings are not in this program. So some other program is obviously looking for this flag and doing the actual settings. I'm not sure what that program would be. I think I need to find the 'master' assembly program - the one that will probably have lots of 'include' statements.
 
Last edited:
Back
Top