diff options
author | Leo C | 2015-12-04 20:51:23 +0100 |
---|---|---|
committer | Leo C | 2015-12-04 20:51:23 +0100 |
commit | c25f6a44a6e2266617af2f326fa5dc0c4864035f (patch) | |
tree | b3d38bb05472639181acf1dfdc1eeec229a1d814 | |
download | kermit-80-c25f6a44a6e2266617af2f326fa5dc0c4864035f.zip |
Import of "Kermit 80 for CP/M-80 and CP/M-85" from http://www.columbia.edu/kermit/ftp/archives/cpm80.tar.gzoriginal-source
-rw-r--r-- | cpaaaa.txt | 195 | ||||
-rw-r--r-- | cpk409.ann | 354 | ||||
-rw-r--r-- | cpk411.ann | 90 | ||||
-rw-r--r-- | cpkerm.bw2 | 131 | ||||
-rw-r--r-- | cpkerm.bw3 | bin | 0 -> 2860 bytes | |||
-rw-r--r-- | cpkerm.bw4 | 50 | ||||
-rw-r--r-- | cpkerm.bwr | 565 | ||||
-rw-r--r-- | cpkerm.mss | 2616 | ||||
-rw-r--r-- | cpkerm.pdf | bin | 0 -> 88043 bytes | |||
-rw-r--r-- | cpkerm.ps | 6971 | ||||
-rw-r--r-- | cpkerm.txt | 2463 | ||||
-rw-r--r-- | cpkfet.ddt | 61 | ||||
-rw-r--r-- | cpkfet.msg | 24 | ||||
-rw-r--r-- | cpkhdr.mss | 156 | ||||
-rw-r--r-- | cpkhex.bas | 88 | ||||
-rw-r--r-- | cpscmd.asm | 1140 | ||||
-rw-r--r-- | cpscom.asm | 1371 | ||||
-rw-r--r-- | cpscpm.asm | 932 | ||||
-rw-r--r-- | cpsdat.asm | 648 | ||||
-rw-r--r-- | cpsdef.asm | 287 | ||||
-rw-r--r-- | cpsker.asm | 315 | ||||
-rw-r--r-- | cpsker.hex | 1589 | ||||
-rw-r--r-- | cpsmit.asm | 834 | ||||
-rw-r--r-- | cpspk1.asm | 1904 | ||||
-rw-r--r-- | cpspk2.asm | 1336 | ||||
-rw-r--r-- | cpsrem.asm | 1149 | ||||
-rw-r--r-- | cpsser.asm | 44 | ||||
-rw-r--r-- | cpstt.asm | 862 | ||||
-rw-r--r-- | cpsutl.asm | 1227 | ||||
-rw-r--r-- | cpswld.asm | 222 | ||||
-rw-r--r-- | cpva65.hex | 65 | ||||
-rw-r--r-- | cpvacc.hex | 64 | ||||
-rw-r--r-- | cpvadv.hex | 71 | ||||
-rw-r--r-- | cpvamp.hex | 72 | ||||
-rw-r--r-- | cpvapl.hex | 75 | ||||
-rw-r--r-- | cpvapm.hex | 79 | ||||
-rw-r--r-- | cpvbb2.hex | 71 | ||||
-rw-r--r-- | cpvbbc.hex | 83 | ||||
-rw-r--r-- | cpvbee.hex | 134 | ||||
-rw-r--r-- | cpvbns.hex | 53 | ||||
-rw-r--r-- | cpvbra.hex | 81 | ||||
-rw-r--r-- | cpvbrm.hex | 82 | ||||
-rw-r--r-- | cpvca2.hex | 86 | ||||
-rw-r--r-- | cpvca3.hex | 84 | ||||
-rw-r--r-- | cpvci3.hex | 86 | ||||
-rw-r--r-- | cpvcif.hex | 88 | ||||
-rw-r--r-- | cpvcom.hex | 57 | ||||
-rw-r--r-- | cpvcp3.hex | 52 | ||||
-rw-r--r-- | cpvcpc.hex | 134 | ||||
-rw-r--r-- | cpvcps.hex | 82 | ||||
-rw-r--r-- | cpvcpt.hex | 87 | ||||
-rw-r--r-- | cpvcro.hex | 59 | ||||
-rw-r--r-- | cpvdel.hex | 68 | ||||
-rw-r--r-- | cpvdis.hex | 73 | ||||
-rw-r--r-- | cpvdm2.hex | 70 | ||||
-rw-r--r-- | cpvdmv.hex | 72 | ||||
-rw-r--r-- | cpvgen.hex | 62 | ||||
-rw-r--r-- | cpvgni.hex | 82 | ||||
-rw-r--r-- | cpvh89.hex | 90 | ||||
-rw-r--r-- | cpvh8q.hex | 69 | ||||
-rw-r--r-- | cpvhor.hex | 57 | ||||
-rw-r--r-- | cpvhp1.hex | 80 | ||||
-rw-r--r-- | cpvhp1.txt | 99 | ||||
-rw-r--r-- | cpvkpr.hex | 86 | ||||
-rw-r--r-- | cpvlbo.hex | 90 | ||||
-rw-r--r-- | cpvmdi.hex | 68 | ||||
-rw-r--r-- | cpvmik.hex | 78 | ||||
-rw-r--r-- | cpvmm.hex | 72 | ||||
-rw-r--r-- | cpvmrl.hex | 58 | ||||
-rw-r--r-- | cpvns.hex | 60 | ||||
-rw-r--r-- | cpvosb.hex | 69 | ||||
-rw-r--r-- | cpvosi.hex | 48 | ||||
-rw-r--r-- | cpvpci.hex | 73 | ||||
-rw-r--r-- | cpvpcw.hex | 137 | ||||
-rw-r--r-- | cpvpro.hex | 80 | ||||
-rw-r--r-- | cpvpx8.hex | 82 | ||||
-rw-r--r-- | cpvpx8.hlp | 23 | ||||
-rw-r--r-- | cpvrmf.hex | 71 | ||||
-rw-r--r-- | cpvrmm.hex | 71 | ||||
-rw-r--r-- | cpvrob.hex | 77 | ||||
-rw-r--r-- | cpvsan.hex | 62 | ||||
-rw-r--r-- | cpvsb6.hex | 96 | ||||
-rw-r--r-- | cpvsb9.hex | 94 | ||||
-rw-r--r-- | cpvscn.hex | 86 | ||||
-rw-r--r-- | cpvtel.hex | 82 | ||||
-rw-r--r-- | cpvtet.hex | 61 | ||||
-rw-r--r-- | cpvtlb.hex | 65 | ||||
-rw-r--r-- | cpvtm4.hex | 81 | ||||
-rw-r--r-- | cpvtpt.hex | 65 | ||||
-rw-r--r-- | cpvtrc.hex | 103 | ||||
-rw-r--r-- | cpvud.hex | 52 | ||||
-rw-r--r-- | cpvusm.hex | 53 | ||||
-rw-r--r-- | cpvvec.hex | 60 | ||||
-rw-r--r-- | cpvxer.hex | 86 | ||||
-rw-r--r-- | cpvz00.hex | 61 | ||||
-rw-r--r-- | cpvz80.hex | 52 | ||||
-rw-r--r-- | cpxapp.asm | 749 | ||||
-rw-r--r-- | cpxbbi.asm | 618 | ||||
-rw-r--r-- | cpxbee.asm | 996 | ||||
-rw-r--r-- | cpxcif.asm | 746 | ||||
-rw-r--r-- | cpxcom.asm | 486 | ||||
-rw-r--r-- | cpxgni.asm | 440 | ||||
-rw-r--r-- | cpxhea.asm | 921 | ||||
-rw-r--r-- | cpxlnk.asm | 206 | ||||
-rw-r--r-- | cpxmrl.asm | 454 | ||||
-rw-r--r-- | cpxnor.asm | 587 | ||||
-rw-r--r-- | cpxpcw.asm | 912 | ||||
-rw-r--r-- | cpxpro.asm | 561 | ||||
-rw-r--r-- | cpxsb.asm | 696 | ||||
-rw-r--r-- | cpxswt.asm | 294 | ||||
-rw-r--r-- | cpxsy2.asm | 1364 | ||||
-rw-r--r-- | cpxsyo.asm | 389 | ||||
-rw-r--r-- | cpxsys.asm | 1386 | ||||
-rw-r--r-- | cpxtm4.asm | 490 | ||||
-rw-r--r-- | cpxtor.asm | 1229 | ||||
-rw-r--r-- | cpxtyp.asm | 722 | ||||
-rw-r--r-- | cpxvdu.asm | 462 | ||||
-rw-r--r-- | cpxz80.asm | 350 | ||||
-rw-r--r-- | cpzspa.txt | 92 | ||||
-rw-r--r-- | lasm.hex | 353 | ||||
-rw-r--r-- | lasm.txt | 149 | ||||
-rw-r--r-- | m80unv.mac | bin | 0 -> 5177 bytes | |||
-rw-r--r-- | m80v6.doc | bin | 0 -> 374 bytes | |||
-rw-r--r-- | m80v7.doc | bin | 0 -> 1521 bytes | |||
-rw-r--r-- | m80v7.msg | bin | 0 -> 2314 bytes | |||
-rw-r--r-- | mac80.cmd | bin | 0 -> 24 bytes | |||
-rw-r--r-- | mac80.doc | bin | 0 -> 878 bytes | |||
-rw-r--r-- | mac80.mac | 412 | ||||
-rw-r--r-- | mac80a.mac | 2731 | ||||
-rw-r--r-- | mload.asm | 1493 | ||||
-rw-r--r-- | mload.hex | 173 | ||||
-rw-r--r-- | mload.txt | 138 |
132 files changed, 53192 insertions, 0 deletions
diff --git a/cpaaaa.txt b/cpaaaa.txt new file mode 100644 index 0000000..2d48bc4 --- /dev/null +++ b/cpaaaa.txt @@ -0,0 +1,195 @@ +CPAAAA.HLP 23 April 1991 + + +Version 4.11 of Kermit-80 is a development of the previous release 4.09, +changed to add more features. Much of the system-dependent code is as it +was in Version 4.09. The names of the files for Version 4.11 follow a fixed +convention. They all have the form + + CPaxxx.bbb + +In these names: + + "a" is one of + + A for general information + K for documentation and beware files + S for system independent files + X for system-dependent source files + V for system-dependent hex files + + "xxx" is used to identify unique files used + + "bbb" is the file extention, usually one of: + + ASM for source files + HEX for pre-assembled modules or completeprograms (eg + LASM.HEX is the assembler) + HLP for help files + BWR for beware files + ANN for notes + TXT for pure text files + DOC as for TXT + MSS SCRIBE sources files (for document files.) + +CPKFET.* is a bootstrapping procedure that can be used if you have no other +way to download the new files. + +Version 4.11 may be assembled and linked with LASM and MLOAD, respectively, +or it may be assembled with the M80 assembler. + +It is also possible to assemble the source files on an IBM PC or clone using +the Z80MU CP/M V2.2 and Z80 emulator, itself running the LASM or M80 +assembler. (Using Z80MU is very useful if your target systems does not have +enough disk space for all the source files.) + +CP/M Kermit Version 4.11 is built from the sources in the same manner as was +CP/M Kermit Version 4.09. LASM and MLOAD may be found in the Kermit +distribution. + +The M80 assembler is a Microsoft product, and you have to pay good money for +it. + +**Note** The overlay address has been moved to 7000H to make room for the +added code in this version of CP/M Kermit. + +Currently, the code for a number of systems has been upgraded from version +4.09. The particular system is indicated in filenames by the "xxx" part: +codes currently in use are: + +APP Apple II with Z80 card + - with Micromodem in slot 2 + - with 6551 and 6850 UARTs + - with CP Multifunction card + +BBI Kaypro, Bigboard, Xerox 820 and Ampro Little Board systems + +CIF Cifer 1886 using the VL: or AL ports as TTY:Line. (Use &set + to set ttyi: and ttyo: to the VL: or AL:port) Choice of + CP/M V2.2 or 3.0 ("PLUS") + +HEA Heath systms (Heath 8 with quad IO interface board) + Telcon ZORBA + +PCW Amstrad PCW 8256 and 8152 as well as CP/M-plus on CPC 6128 + +NOR Northstar Advantage + Northstar Horizon (Several: labels in CPXTYP are: + BASICNS + NORTHS + HORIZON + Comart Communicator. This is included as it is somewhat + similar to the Northstar Horizon. + +TOR Superbrain (Main and Aux port versions.. assumes MicroMods + add-ons) + Torch systems (runs ok on Unicorn-5 under CP/M) + Ithaca Intersystems series machines using the VIO card. (PCI + 2651 USARTS) + NCR DecisionMate V systems + +as well as another half dozen single system only family files. The total +list of systems supported so far is: + + +System supported in CP/M-80 Kermit V4.11 (and growing!) +Label .HEX File For system +============================================================================ +ACCESS CPVACC Access Matrix +ADVANT CPVADV Northstar Advantage +AMPRO CPVAMP Ampro Little Board (terminal required) +AP6551 CPVAPL Apple II, Z80 Softcard, 6551 ACIA in serial Interface +AP6850 CPVA65 Apple II, Z80 Softcard, 6850 ACIA in Serial Interface +APMMDM CPVAPM Apple II, Z80 Softcard, Micromodem II in slot 2 +APCPS CPVCPS Apple II, Z80 Softcard, with CPS multifunction card +BASICNS CPVBNS Northstar Horizon (terminal required) +BBC CPVBBC Acorn "BBC" computer with Acorn Z80 second processor +BBII CPVBB2 BigBoard II (terminal required) +MBEE CPVBEE Microbee Systems Ltd Microbee (56K, 64K, 128K & 256K) +BRAINM CPVBRM Intertec Superbrain using the main port +BRAINA CPVBRA Intertec Superbrain using the Aux port +CIFER2 CPVCIF Cifer 1886 using the VL: Serial port and CP/M V2.2 +CIFER3 CPVCI3 Cifer 1886 using the VL: Serial port and CP/M V3.0 +CIFER2 CPVCA2 Cifer 1886 using the AUX: Serial port and CP/M V2.2 +CIFER3 CPVCA3 Cifer 1886 using the AUX: Serial port and CP/M V3.0 +CMEMCO CPVCRO Cromemco with TU-ART card. Terminal required) +COMART CPVCOM Comart Communicator (terminal required) +COMPRO CPVPRO Compupro with Interfacer 4 (or 3). Terminal required. +CPC CPVCPC Amstrad CPC 664 and 6128 and CP/M 3 +CPM3 CPVCP3 "Generic": CP/M 3.0 (CP/M Plus) systems (terminal req'd) +CPT85XX CPVCPT CPT-85xx wordprocessor with CP/M +DELPHI CPVDEL Digicomp Delphi 100 (terminal required) +DISC CPVDIS Action Computer Enterprises "Discovery" (terminal req'd) +DMII CPVDM2 DECmate II with CP/M option +GENER CPVGEN "Generic": CPM 2.2 systems with IOBYTE (terminal req'd) +GENIE CPVGNI Video Genie +H8QUAD CPVH8Q Heath-8 with Quad 8 i/o board +HEATH CPVH89 Heath/Zenith H89 +HORIZON CPVHOR Northstar Horizon (terminal required) +HP125 CPVHP1 Hewlett-Packard HP-125 Business Assistant +KPII CPVKPR Kaypro-II (and 4; probably supports all Kaypro systems) +LOBO CPVLBO Lobo Max-80 +M2215 CPVMRL British Telecom Merlin/Rair Black Box (terminal required) +MDI CPVMDI Morrow Decision I (terminal required) +MIKKO CPVMIK MikroMikko +MMATE CPVMM PMC 101 Micromate (terminal required) +MMDI CPVUD Morrow Micro Decision I (terminal required) +NCRDMV CPVDMV NCR Decision Mate V. (Terminal required?) +NORTHS CPVNS Northstar Horizon with HSIO-4 card (terminal req'd) +OSBRN1 CPVOSB Osborne 1 +OSI CPVOSI Ohio Scientific +PCI2651 CPVPCI Ithaca Intersystems with VI0 card (terminal required) +PCW CPVPCW Amstrad PCW 8256/8512 with serial interface +PX8 CPVPX8 Epson PX-8 +RM380ZM CPVRMM Research Machines 380Z with MDS (5.25" discs) +RM380ZF CPVRMF Research Machines 380Z with FDS (8" discs) +ROBIN CPVROB DEC VT180 +S1008 CPVUSM US Microsales S-100-8 (terminal required) +SANYO CPVSAN Sanyo MBC-1100 +SB6 CPVSB6 Micromint SB-180 with 6Mhz CPU (terminal required) +SB9 CPVSB9 Micromint SB-180 with 9Mhz CPU (terminal required) +SCNTPR CPVSCN Screentyper +TELCON CPVTEL TELCON Zorba portable +TELETEK CPVTET Teletek Systemaster (terminal required) +TORCH CPVTRC Torch computers BBC-B with Z80 second processors +TRS80LB CPVTLB TRS-80 model II with Lifeboat 2.25C CP/M Display +TRS80PT CPVTPT TRS-80 model II with Pickles + Trout CP/M Display +TRSM4 CPVTM4 TRS-80 model IV +VECTOR CPVVEC Vector Graphics +XER820 CPVXER Xerox 820 +Z100 CPVZ00 Z-100 under CP/M-85 +Z80MU CPVZ80 Z80MU development system on a PC + + +Terminals supported in CP/M-80 Kermit V4.11 (and growing!) +Label Terminal +======================================================================== +CRT Does not do cursor addressing +ADM3A Lear Seigler ADM 3A +ADM22 Lear Seigler ADM 22 +AM230 Ampro 230 +H1500 Hazeltine 1500 +SMRTVD Netronics Smartvid +SOROQ Soroq IQ-120 +TVI912 Televideo 912 +TVI925 Televideo 925 or Freedom 100 +VT52 Dec VT52 or equivalent (H19) +VT100 Dec VT100 or equivalent +WYSE Wyse 100 + +More systems and families are always coming in, so this list and the source +files are all likely to change sometime in the near future. + +Any comment, suggestions etc send them in. I will not guarentee that your +suggestions will be implemented, but maybe.... + +Cheers ES 73's/88's, Mike Freeman K7UIJ +Bonneville Power Administration +P.O. Box 491 +Vancouver, WA 98666 +(206)690-2307 +301 N.E. 107th Street +Vancouver, WA 98685 USA +(206)574-8221 + +E-Mail: freeman@watsun.cc.columbia.edu on Internet diff --git a/cpk409.ann b/cpk409.ann new file mode 100644 index 0000000..4c9def0 --- /dev/null +++ b/cpk409.ann @@ -0,0 +1,354 @@ +Following is the announcement of CP/M-80 Kermit version 4.09, the first +new release of CP/M Kermit since 4.05 since February 1985. + +Kermit files may be obtained over networks and by mail order. On the +Internetwork, use FTP to log in to host CU20B, CU20B.COLUMBIA.EDU, or +CU20B.CC.COLUMBIA.EDU (a DECSYSTEM-20), as user ANONYMOUS, using any password, +and GET (or MULTIPLE GET, or MGET) the desired files from logical device KER:, +e.g. MGET KER:CP*.* for the new CP/M files. You can also get Kermit files over +BITNET/EARN; to get started send a message with text HELP to KERMSRV, the +Kermit file server, at host CUVMA. For detailed instructions, read the file +KER:AANETW.HLP (AANETW HLP on KERMSRV). To order by mail, request a complete +list of Kermit versions and an order form from Kermit Distribution, Columbia +University Center for Computing Activities, 612 West 115th Street, New York, NY +10025 USA. + +Date: 8 Jan 88 0:00:00 +From: Bertil Schou, Loughborough University, UK +Via: SYSKERMIT%vax1.central.lancaster.ac.uk@NSS.Cs.Ucl.AC.UK +Subject: Announcing Version 4.09 of Kermit-80 for CP/M-80 +Keywords: CP/M-80 Kermit 4.09 + +After an incredibly long gestation period, here is hopefully an updated +version of Kermit-80 V4.05. Kermit-80 V4.08 is issued for testing purposes +only. Version 4.09 is the release issue of version 4.08. I still, however, +want any feedback about problems generated in this revision, or others +desperately want fixing. + +Superficially, there is little real change in operation of Kermit-80, version +4.05, but there have been some major jobs tackled like trapping BDOS calls and +multiple FCB buffering... + +New bits for this version include: + SET {SEND/RECEIVE} START-OF-PACKET character + SET DIRECTORY-FILE-SIZE (Shows or hides file sizes on + DIRectory displays) + SET TERMINAL to OFF, VT52, DUMB, EXTERNAL, QUIET, REGULAR. + SET USER to set other user spaces + RECEIVE to collect a file from a remote SENDer + GET to collect a file from a remote SERVER + SEND {local filename} {remote filename} + TAKE to take command files from disk (including other take files!) + FCOPY Copy CP/M files from within Kermit (no wildcard) + TYPE Type a file to the console from within Kermit + PRINT Print a file to the printer from within Kermit + - Updated TRANSMIT command that waits for a string of characters + from the host (default is CR). + - Command line commands, eg: + KERMIT ;SET FILE BINARY;SEND FOO.BAR + - Automatic TAKE KERMIT.INI on default disk on + loading KERMIT-80 (useful for SET BAUD etc.) + - Much improved speed on DIRECTORY + - Automatic CLOSE-ing of a terminal connection if the line is + DROP-ped (currently only for an Apple, and Torch has a dummy + test for cntrl-] D in connect state) + - Improved printer handling. + +On the negative side, only LASM and Microsoft M80 assemblers can be used to +assemble the source files. I personally see no point in being able to support +several assemblers if LASM can do the job, but then again, I have not used the +MAC80 cross assembler... Comments on assembler compatabilities, please! + +All source files have been renamed, and there are a few additions. All source +files are named in the form CPaxxx.ASM, where: + + a=A for general information + a=S for system independent source files and hex file + a=X for system dependent source files + a=V for system-dependent hex files + +The system dependent code has changed a litle too, hopefully bringing the +CPXSYS.ASM (formerly CP4SYS.ASM) file a bit more toward a manageable size. +There is now the possibility for FAMILIES of systems, like APPLE and NorthStar +(also Comart), which contains code for computers of a single type. I have +immediately gone against all this by creating a family with the code for +Torches, Cifers, Ithacas and Superbrains (this because we have these systems +here at Loughborough.) + +Bertil Schou. + +[Ed. - Many thanks, Bertil! And also to Alan Phillips and Steve Jenkins at +Lancaster University for sending this new version to us via transoceanic +magnetic tape, and to the many others in the UK who contributed to this new +release. This version supports all the systems supported by version 4.05, +with the exception of the HP-125, and with the addition of many more, for a +total of something like 52 systems. The new files have been installed in +KER:CP*.*, and the old ones moved (on CU20B, anyway) to KO:CP*.*. CP/M +users, please get this new version and try it out, so we can make sure it's +safe to distribute. And this is also the time to plead ONCE AGAIN for +volunteers to distribute CP/M Kermit on 5.25-inch diskette for different +kinds of systems, and also in "universal" 8-inch diskette format. Please +come forward if you can do it, or know of a user group that can!] + + +CPKERM.MSG 08 Jan 1988 +********** + +After an incredibly long gestation peroid, here is hopefully an +updated version of Kermit-80 V4.05. Kermit-80 V4.08 is issued for +testing purposes only. Version 4.09 is the release issue of +version 4.08. I still, however, want any feedback about problems +generated in this revision, or others desperately want fixing. + +Superficially, there is little real change in operation of +Kermit-80, version 4.05, but there have been some major jobs +tackled like trapping BDOS calls and multiple FCB buffering... + +New bits for this version include: + SET {SEND/RECEIVE} START-OF-PACKET character + SET DIRECTORY-FILE-SIZE (Shows or hides file sizes on + DIRectory displays) + SET TERMINAL to OFF, VT52, DUMB, EXTERNAL, QUIET, + REGULAR. External is for those wanting to write + their own drivers, DUMB passes only printing + characters and sone control characters (eg CR/LF). + QUIET/REGULAR permits brief/verbose screen + displays during transfers. + SET USER to set other user spaces + RECEIVE to collect a file from a remote SENDer + GET to collect a file from a remote SERVER + SEND {local filename} {remote filename} + TAKE to take command files from disk (including other + takes files!) + FCOPY Copy CP/M files from within Kermit (no wildcard) + TYPE Type a file to the console from within Kermit + PRINT Print a file to the printer from within Kermit + - updated TRANSMIT command that waits for a string + of characters from the host (default is CR) + - Command line commands, eg: + KERMIT ;SET FILE BINARY;SEND FOO.BAR + - automatic TAKE KERMIT.INI on default disk on + loading KERMIT-80 (useful for SET BAUD etc.) + - much improved speed on DIRECTORY + - automatic CLOSE-ing of a terminal connection if + the line is DROP-ped (currently only for an Apple, + and Torch has a dummy test for cntrl-] D in + connect state) + - improved printer handling. (Kermit-80 sends an + XOFF to the host if the characters are comming in + faster than they are printed. This does not work + in this version, as another option, SET FLOW- + CONTROL has not been fully implemented - also, I + did not have a printer to test this out on a + Torch...) + +On the negative side, only LASM and Microsoft M80 assemblers can +be used to assemble the source files. I personally see no pont in +being able to support several assemblers if LASM can do the job, +but then again, I have not used the MAC80 cross assembler... +Comments on assembler compatabilities, please! + +All source files have been renamed, and there are a few +additions. All source files are named in the form: + + + + + + + +CPaxxx.ASM + +where: + + a=A for general information + a=S for system independent source files and hex file + a=X for system dependent source files + a=V for system-dependent hex files + +The system dependent code has changed a litle too, hopefully +bringing the CPXSYS.ASM (formerly CP4SYS.ASM) file a bit more +toward a manageable size. There is now the possibility for +FAMILIES of systems, like APPLE and NorthStar (also Comart), +which contains code for computers of a single type. I have +immediately gone against all this by creating a family with the +code for Torches, Cifers, Ithacas and Superbrains. (This because +we have these systems here at Loughborough) + +CPXSYS.ASM is the "left over" systems not having a family to go +to (poor things), but is very much smaller than the original +CP4SYS.ASM. + +All VDU and terminal information is now held in CPXVDU.ASM. This +is really the last section in the older CP4SYS.ASM file. + +A quick "schematic" of what happens at assembly time... (assuming +LASM is being used) + +LASM CPXTYP... this then assembles the following: + +CPXTYP + | + v +CPSDEF + | + v +CPXLNK + | + v +CPXCOM (Common code for most systems) + | + v +CPXSWT-------+----------+-----------+-----------+---- File selector + | | | | | + v v v v CPXTOR CPXAPP CPXNOR CPX??? one of + | | | | | several + | | | | | Families + +<----------+----------+-----------+-----------+---- + | + v +CPXVDU (if a terminal is required) + | + | + v +<END of assembly> + + + +Users should be aware of the change both to the linking + + + + + + +information and start of the overlay address. Since Version 4.05, +four new entries have been added to the overlay table. First of +all, family (offset +6), which is a two byte poiter to a text +string in the family file. The remainder are two byte pointers +(in the usual JMP 0 format) to a print status routne, (lptstat +offset 20h), an optional VDU driver, and a reverse entry back to +the system independent BDOS routines (which does a lot more than +simply pass on the BDOS request to BDOS) + +There have also been some bugs fixed in some of the system +dependent code, so you would be wise pulling all the source files +across. + +The overlay address is now 6000h, and will probably change before +this revision is complete. The speeding up of multiple file +handling takes its toll on memory, as there are now 64-ish FCBs +buffered. This speeds up the DIRECTORY command no end. + +With the overlay address at 6000h there is still a lot of space +free for more things to be added, so unless there is a big hash +made to Kermit, this will not change. + +Most of the Version 4.05 documentation still holds for this +version of kermit-80. Note however the changes in the number of +system dependent files used, and the use of FAMILY files. + +The new commands are (hopefully) self-explanatory. The TAKE +command requires files TAKE-n to be pure ASCII text, with a +control-z as the end of file marker. Most editors will probably +do this for you. + +LASM and Microsoft M80 assembles are the only ones supported. I +suggest LASM be used by default for all further development work, +though I DO know that there are others requestin M80 +comaptability. + +How to get V4.09 onto your system. +********************************** +If you alread have a Kermit running on your system, you should be +able to pull the CPSKER.HEX and suitable system file to yopur +system, then MLOAD the two together. If you dont have kermit, +see if you cannot get a copy from somewhere - it saves a lot of +frustrating work. Failing that, refer to the REAL manuals! + +If you want to assemble the sources from scratch, pull all +CPS*.ASM files, and CPX(TYP LNK COM SWT).ASM files, and +CPXVDU.ASM if you use a terminal. You will have to pluck +either CPXSYS./ASM or another family file. You will also need +loads of disk space. If you run short, but have a handy IBM PC +or clone with a Mbyte or two free, use the public domain Z80 +emulator Z80MU to develop the .HEX files required. Also aquire a +copy of LASM. Use LASM it to assemble CPSKER and CPXTYP after +editing CPXTYP and selecting a suitable system. This generates +CPSKER.HEX and CPXTYP.HEX. + +MLOAD the two .HEX files together, eg: + +MLOAD NEWKER=CPSKER,CPXTYP + +After this, you will hopefully have a runnable copy of KERMIT-80 + + + + + + +Version 4.09 on your system. + +Disclaimer: No responsibilty can be assumed by anyone as to the +suitabilty etc.etc. In otherwords, you are the one responsible +for your implentation of Kermit-80, any version. I will give help +where I can, but no guaranttes will be given. Note that not all +systems and facilities have been tested (thats why you are +getting involved!) so make sure you have a copy of 4.05 Kermit +before trying this one! + +Things yet to be done - lots! + +There have been moves trying to add other independent modules for +other terminal emulators other than the VT52. Demands for SERVER, +REMOTE HOST..., file compression, better TRANSMIT, % of file sent +and/or Kbytes sent/received as part of the display diring +transfers, a lot of cosmetic tidying up as well as even more +systems to be added. CP/M-80 is a slowly dying DOS, and I feel +inclined to leave some bits out, like SERVER (how many use really +large Winchesters in CP/M-80 systems, and want true servers?). +Does anyone have a burning desire for these facilities? And if +so, will YOU be willing to take on the job of implementing them? + +If you have any comments, please E-mail them to OBSchou (me) at +Loughborough. If you really must, try (0509) 222313, but I share +a phone, so use the phone only if you cannot mail me. + +Best of luck, + +Bertil Schou. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cpk411.ann b/cpk411.ann new file mode 100644 index 0000000..92df86e --- /dev/null +++ b/cpk411.ann @@ -0,0 +1,90 @@ +Date: 24-May-1991 + +Announcing: CP/M Kermit Version 4.11 + +Just to prove that the CP/M world still exists, here is CP/M Kermit -80 +Version 4.11. + +Features added since version 4.09 include: + +o SET COLLISION {BACKUP/DISCARD/OVERWRITE/RENAME} +o SET INCOMPLETE-FILES {DISCARD/KEEP} +O Many REMOTE commands, including some REMOTE SET commands +o RENAME command to rename CP/M files from within Kermit-80 +o SET RECEIVE/SEND PACKET-LENGTH nn (nn <= 94) +o SET AUTORECEIVE ON now implies that Kermit-80 ALWAYS tries to + receive more files when a RECEIVE transaction has completed. The + user can abort with ^C. +o QUIT is now a synonym for EXIT. +o STAY is now a synonym for SET NO-EXIT. +o CONNECT, RECEIVE and SEND may be abbreviated to C, R and S, + respectively. +o Processing of commands from a file via a TAKE command may now be + aborted by entering a Control-C at the console. +o The TYPE and PRINT commands are now immediately aborted if a + Control-C is entered at the console. If a Control-X is entered at + the console, typeout/printout of the current file is aborted and + typeout/printout of the next file, if any, begins. These actions + also occur if any other key has been pressed to halt typeout/printout + and Control-C or Control-X is pressed. Pressing any other key resumes + the typeout/printout. +o Many bug fixes +o Kermit-80 Version 4.11 now supports the Microbee family of + computers (56K, 64K, 128K and 256K) manufactured by + Microbee Systems, Ltd, of Australia. +o Kermit-80 now supports the Ampro Little Board system. + +Technical changes: + +o An "I" packet is now tried before the request for files is sent + in a GET command +o The overlay address is now 7000H +o The overlay (CPXLNK.ASM) has an added INCFLG variable to handle + INCOMPLETE-FILES status +o The COPY, TYPE and PRINT commands now use the large buffer + (8K bytes default size) for file I/O + +Syntax hints: + +In REMOTE commands such as REMOTE COPY, REMOTE MESSAGE, REMOTE RENAME, +REMOTE WHO etc., where two arguments are required, the syntax is as for Vax +VMS Kermit, i.e., +REMOTE <command> <argument 1> +Prompt: <argument 2> +For example: +REMOTE COPY <old-file> +New file: <new-file> + +The REMOTE LOGIN command has three arguments, of which the last two are +prompted for an entered on new lines. Arguments are optional. + +In commands such as REMOTE SET FILE BLOCK-SIZE which take a numeric +argument, Kermit-80 does not check the argument for validity. Whatever is +typed is what the host sees. + +The FCOPY command has been renamed to COPY. + +The syntax for the RENAME command is as for the COPY command, that is: +RENAME <old-filespec> <new-filespec> + +More rigorous checking for wildcards is now done by both of these +commands. + +The STRING command has been renamed to OUTPUT. + +SET BAUD-RATE is now SET SPEED. + +The option SET FILE DEFAULT has ben re-enabled. Use a TAKE-file to set the +initial file-mode to ASCII or BINARY. + +Building Kermit-80 ver. 4.11: + +Kermit-80 ver. 4.11 is built using the same procedure as for ver. 4.09. + + +Many thanks to those who have contributed bug fixes, and, in particular, +to Mr. Russell Lang of Monash University, Australia, for contributing +a bug-fix and the family file for the Microbee systems and to Mr. +Jay S. Rouman of Mt. Pleasant, MI for contributing the code for the Ampro +Little Board. Thanks are also due to Lance Tagliapietra of the University +of Wisconsin at Platteville for finding several bugs. diff --git a/cpkerm.bw2 b/cpkerm.bw2 new file mode 100644 index 0000000..ae3d6de --- /dev/null +++ b/cpkerm.bw2 @@ -0,0 +1,131 @@ +Re: Problems with CP/M Kermit Version 4.09 + +Following is a list of problems and their solutions for CP/M Kermit +Version 4.09. Bear in mind that the latest version of CPSPK1.ASM I have is +edit (11) and of CPSPK2.ASM is edit (4). + +Problem: When the terminal is in "quiet" mode, initiation of file-transfers + causes lots of garbage to appear on the screen which is distracting + and which raises havoc with voice output devices. +Diagnosis: In the module CPXCOM.ASM, the routine "prtstr" has two flavors: + one for machines which cannot display control-characters via BDOS + function 9 and one which can display such characters via function 9. + In this latter case, only register pair BC is saved around the BDOS + call. This is insufficient as BDOS also clobbers register pairs + DE and HL during the call. In "quiet" mode, at least one of these + pairs is expected to remain constant. +Solution: Save register pairs DE and HL around the function 9 BDOS call. + +Problem: When GETting a file, the initialization routine "init" is executed + twice. This doesn't harm anything and may not be noticeeable in + print but is most annoying when using voice output as "init" types + out the Kermit version and screen initialization strings and thus + one hears them twice. +Solution: In the module CPSPK1.ASM, move the label "read0a" down one line + so that the common code for the "receive" and "get" commands starts + just *after* the call to "init" is made in "receive" mode. + +Problem: With "auto-receive" set to "off", after a RECEIVE has completed, + Kermit waits for Console input; then looks for more data to receive + when there is none. +Diagnosis: In the module CPSPK1.ASM, when the status of "auto-receive" is + checked, the wrong label is branched to if "auto-receive" is OFF. +Solution: Change the instruction "jz read5c" to "jz read5b". + +Problem: Files whose filenames are less then 8 characters in length have + ASCII zeros ("0") appended to them. +Diagnosis: In the module CPSPK2.ASM, after label "gofi7b", where the status + of "file-warning" is checked, the code for the appending of "&" + characters to filenames if the file already exists on disk has been + commented out and new code putting numeric suffixes on filenames + in this case has been substituted. In the process, the code for + checking for a file's existence has been accidentally commented out. + Thus, if "file-warning" is "on", *every* file is assumed to have + a duplicate and a numeric suffix is added to each filename. In + addition, no warning of this is given on-screen. +Solution: (1) Uncomment the code which checks for the existence of each file. + (2) Uncomment the code which prints the file-warning error message + and put a "lxi d,fnbuf" instruction between the "stax d" shown in + CPKERM.BWR and the call to "prtstr" so that routine can print the + filename of any file whose existence has been detected. + + +With these changes, Kermit-80 performs like a champ. +Following are file comparisons showing the changes noted above. + +************ +File DISK$USER:[OGRFJMF.KERMIT.CPM]CPXCOM.ASM;1 + 418 push b +****** +File DISK$USER:[OGRFJMF.KERMIT.CPM.HP125]CPXCOM.ASM;1 + 418 PUSH H + 419 PUSH D + 420 push b +************ +************ +File DISK$USER:[OGRFJMF.KERMIT.CPM]CPXCOM.ASM;1 + 422 ret ; all done for good machines +****** +File DISK$USER:[OGRFJMF.KERMIT.CPM.HP125]CPXCOM.ASM;1 + 424 POP D + 425 POP H + 426 ret ; all done for good machines +************ + +Number of difference sections found: 2 +Number of difference records found: 4 + +DIFFERENCES /IGNORE=()/MERGED=1/OUTPUT=DISK$USER:[OGRFJMF.KERMIT.CPM.HP125]CPXCOM.DIF;1- + DISK$USER:[OGRFJMF.KERMIT.CPM]CPXCOM.ASM;1- + DISK$USER:[OGRFJMF.KERMIT.CPM.HP125]CPXCOM.ASM;1 + +File 1) DSKE:CPSPK1.ASM[10,50,KERMIT,CPM] created: 1940 26-Aug-89 +File 2) DSKE:CPSPK1.ASM[10,50,KERMIT,CPM,HP125] created: 2247 27-Aug-89 + +1)1 read0a: call init ;clear line, initialise buffers +1) lxi d,remnam ;[gnn] save local name here +1) mvi a,cmtxt ;[gnn] +**** +2)1 call init ;clear line, initialise buffers +2) read0a: lxi d,remnam ;[gnn] save local name here +2) mvi a,cmtxt ;[gnn] +************** +1)2 jz read5c ; no autoreceives, so drop out +1) lxi d,anymes ; load up Press any key to continue +**** +2)2 jz read5b ; no autoreceives, so drop out +2) lxi d,anymes ; load up Press any key to continue +************** + +File 1) DSKE:CPSPK2.ASM[10,50,KERMIT,CPM] created: 0829 28-Aug-89 +File 2) DSKE:CPSPK2.ASM[10,50,KERMIT,CPM,HP125] created: 2259 27-Aug-89 + +1)1 ; mvi c,openf ;See if the file exists. +1) ; lxi d,fcb +1) ; call bdos +1) ; cpi 0FFH ;Does it exist? +1) ; jz gofil9 ;If not create it. +1) ; lxi d,infms5 +1) ; call error3 +1) ; lda temp2 ;Get the number of chars in the file name. +**** +2)1 mvi c,openf ;See if the file exists. +2) lxi d,fcb +2) call bdos +2) cpi 0FFH ;Does it exist? +2) jz gofil9 ;If not create it. +2) lxi d,infms5 +2) call error3 +2) ; lda temp2 ;Get the number of chars in the file name. +************** +1)1 call prtstr ; write string to console +**** +2)1 lxi d,fnbuf ;[MF]Point to string +2) call prtstr ; write string to console +************** + + +I may be reached on BITNET by E-mail to mailer@uwalocke with the subject-line +containing the phrase <dec10%"bpa">. +-- Mike Freeman; Bonneville Power Administration; Vancouver, Wa; +Telephone (206)690-2307 -- diff --git a/cpkerm.bw3 b/cpkerm.bw3 Binary files differnew file mode 100644 index 0000000..dc144e2 --- /dev/null +++ b/cpkerm.bw3 diff --git a/cpkerm.bw4 b/cpkerm.bw4 new file mode 100644 index 0000000..9d7c7ff --- /dev/null +++ b/cpkerm.bw4 @@ -0,0 +1,50 @@ +Date: Tue, 14 May 91 11:46:47 EDT +From: Mike Freeman <freeman@watsun.cc.columbia.edu> +To: info-cpm@wsmr-simtel20.army.mil, fdc +Subject: Kermit-80 Version 4.11 + +Dear Mr. Mills: + In a recent Info-cpm digest, in article <26697@hydra.gatech.EDU>, +you asked how to get Kermit-80 version 4.11. going. Lance +Tagliapietra's answer was a good one. You also might want to get +cpaaaa.hlp from watsun's ~kermit/a/ directory; this gives the machines +that Kermit-80 currently supports along with the filenames of the Intel +hex files for those machines. As Mr. Tagliapietra says, you probably +won't have to rebuild the system-independent part of Kermit-80. If your +CP/M machine is one of those currently supported by Kermit-80, you need +only get the system-dependent hex file and combine them with MLOAD, DDT, +DDTZ or whatever (MLOAD and DDTZ are my preferences since they don't +require you to calculate image length for a CP/M SAVE). If your system +is not supported, pick up cpxtyp.asm, cpxcom.asm, cpxlnk.asm and +cpxswt.asm. Currently, systems are organized into "families", as, for +example, Amstrad machines. If you were going to recompile Amstrad +Kermit's system-dependent file, you'd also get cpxpcw.asm. Some systems +(as, for example, the HP-125) are in the files cpxsys.asm and +cpxsy2.asm, which you'd get. In any case, if your system isn't +supported, get a "family" file that's close or create one yourself. If +your system doesn't have a built-in terminal, you'll also need +cpxvdu.asm (which contains terminal drivers). Set the appropriate +switch in cpxtyp.asm to true (or put one in for your system if it isn't +supported), set a terminal-switch to TRUE (or select Generic CRT if +nothing's listed for your terminal or put your terminal's codes into a +family file or cpxvdu.asm), get LASM or M80 and compile away. L80 can be +used to link the system-dependent file but you must be sure to do a +/P:7000 as the first part of the L80 command tail so the REL-file has +the proper absolute address. You still need MLOAD, DDT, DDTZ or +whatever to combine the files, so why not get LASM and use it, too. +Hope this message along with Mr. Tagliapietra's message helps you. Feel +free to ask either him or me any Kermit-80 queries you'd like. + By the way, I think you'll like Kermit-80 4.11. It's got support +for many REMOTE commands (advanced server commands). It's only drawback +is that it doesn't support repeat-prefixing or extended-length packets +yet -- get QTERM version 43E (along with my bug fix for it) to get those +features. + Cheers! + -- Mike Freeman K7UIJ -- + 301 N.E. 107th Street + Vancouver, WA 98685 + (206)574-8221 (home) + (206)690-2307 (work) +P.S. If your system isn't supported, you'll also need to (a) create a +family switch in cpxtyp.asm or (b) set sysfam TRUE and put your code in +cpxsys.asm/cpxsy2.asm. Then compile and link. -- Mike Freeman K7UIJ -- diff --git a/cpkerm.bwr b/cpkerm.bwr new file mode 100644 index 0000000..538cea4 --- /dev/null +++ b/cpkerm.bwr @@ -0,0 +1,565 @@ +From: Vace Kundakci <VVVCU@CUVMB.columbia.edu> +To: Frank da Cruz <fdc@cunixc.cc.columbia.edu> +Subject: Something in my rdr + +Dear VVVCU AT CUVMBA + +Yesterday I tried to contact OBSchou@Loughborough.Multics +on JANET, for this was the address I found in the file +CPAAA TXT on KERMSRV AT CUVMBA. I wanted to report a bug +in CP/M kermit and to ask him a question about two source +files on KERMSRV. Would you please be so kind to forward +this message below to the one who is responsible for the +files CP???? ASM on KERMSRV AT CUVMBA. Thanks a lot. + +While assembling a new KERMIT 4.09 for my good old CP/M 3 +computer I found a bug in the system independent part of +the KERMIT source. The routine PAUSIT in the file +CPSUTL.ASM doesn't end with a ret. As a result of this the +program enters the routine GETFIL and falls trough it every +time PAUSIT is executed: the disk drive is activated. +This ends in an error when PAUSIT is executed after a +wildcard operation. +The bug is fixed by placing a ret instruction at the end of +the PAUSIT routine. + +After creating a new CPSKER.HEX it appeared, that the file +CPSKER.HEX on KERMSRV AT CUVMA used the files CPSPK1.ASM +update 12 of 1-feb-88 and CPSPK2.ASM update 5 of 1-feb-88. +The file CPSPK1.ASM on KERMSRV AT CUVMA is update 11 of +28-jul-87, whereas CPSPK2.ASM is update 4 of 27-oct-87. +Would you please be so kind to get the two files updated +on KERMSRV ON CUVMA, so I can build an updated version of +my KERMIT without the bug in CPSUTL.ASM. + +Thank you in advance! Hans Petri + +WINFPET AT HDETUD1 on EARN +/Vace +------ + +Date: Sun, 12 Mar 89 03:22:57 EST +From: Mark W. Eichin <eichin@athena.mit.edu> +Subject: Bug report, CP/M kermit (and other notes) +Keywords: CP/M Kermit + +The latest kermit from ~ftp/kermit/a/cp[sx]*.asm has a minor (but +visible) bug. In cpspk2.asm, line 341 is + + mvi a,'$' ; dollar terminate string + call prtstr + +(these are after the label gofi7g.) + +The problem is that the '$' has to be actually moved into the string +to terminate it. Adding the line + + stax d + +between the above two solves the problem. + +The bug manifests itself when doing a "receive": as soon as the remote host +sends the filename, it gets displayed on the local screen, followed by +arbitrarily large amounts of garbage (whatever code followed the filename +buffer up to the first '$', which for me tended to be about 4-5 lines of +garbage...) + +On a related note: I have successfully ported kermit to TurboDOS (a CP/M-like +operating system written by Software 2000) so that it uses the "T-functions", +a set of standard extensions to CP/M, particularly a set of generic serial +routines. I have only tested it on my personal system, a custom port of +TurboDOS to the Radio Shack Model 4P, but it is likely to work on any TurboDOS +system. Are you interested in adding this to your collection? Are there any +stylistic constraints you require on submitted code? (I would like to see it +included, if only because there have been "people working on" TurboDOS +versions, according to your list, for at least 4 years now.) + +Also, I have patches to the Simtel20 PD2:<UNIX-C.CPM>XASM.SHAR[12], an 8080 +assembler which runs under UNIX, which add a LINK command, that enables it to +assemble the entire CP/M Kermit release. I will be submitting them to the +Simtel20 people, but I can send them to you as well if you are interested. + +Thanks for providing such a good *FREE* system! + + Mark Eichin + <eichin@athena.mit.edu> + + +------------------------------ + +. From BPA +. Postmark:30-Aug-89:09:32:15 +. To MAILER +. Expires:29-Sep-89:09:31:49 +. Subject: bitnet%"fdccu@cuvma" +Re: Problems with CP/M Kermit Version 4.09 + +Following is a list of problems and their solutions for CP/M Kermit +Version 4.09. Bear in mind that the latest version of CPSPK1.ASM I have is +edit (4) and of CPSPK2.ASM is edit (11). + +Problem: When the terminal is in "quiet" mode, initiation of file-transfers + causes lots of garbage to appear on the screen which is distracting + and which raises havoc with voice output devices. +Diagnosis: In the module CPXCOM.ASM, the routine "prtstr" has two flavors: + one for machines which cannot display control-characters via BDOS + function 9 and one which can display such characters via function 9. + In this latter case, only register pair BC is saved around the BDOS + call. This is insufficient as BDOS also clobbers register pairs + DE and HL during the call. In "quiet" mode, at least one of these + pairs is expected to remain constant. +Solution: Save register pairs DE and HL around the function 9 BDOS call. + +Problem: When GETting a file, the initialization routine "init" is executed + twice. This doesn't harm anything and may not be noticeeable in + print but is most annoying when using voice output as "init" types + out the Kermit version and screen initialization strings and thus + one hears them twice. +Solution: In the module CPSPK1.ASM, move the label "read0a" down one line + so that the common code for the "receive" and "get" commands starts + just *after* the call to "init" is made in "receive" mode. + +Problem: With "auto-receive" set to "off", after a RECEIVE has completed, + Kermit waits for Console input; then looks for more data to receive + when there is none. +Diagnosis: In the module CPSPK1.ASM, when the status of "auto-receive" is + checked, the wrong label is branched to if "auto-receive" is OFF. +Solution: Change the instruction "jz read5c" to "jz read5b". + +Problem: Files whose filenames are less then 8 characters in length have + ASCII zeros ("0") appended to them. +Diagnosis: In the module CPSPK2.ASM, after label "gofi7b", where the status + of "file-warning" is checked, the code for the appending of "&" + characters to filenames if the file already exists on disk has been + commented out and new code putting numeric suffixes on filenames + in this case has been substituted. In the process, the code for + checking for a file's existence has been accidentally commented out. + Thus, if "file-warning" is "on", *every* file is assumed to have + a duplicate and a numeric suffix is added to each filename. In + addition, no warning of this is given on-screen. +Solution: (1) Uncomment the code which checks for the existence of each file. + (2) Uncomment the code which prints the file-warning error message + and put a "lxi d,fnbuf" instruction between the "stax d" shown in + CPKERM.BWR and the call to "prtstr" so that routine can print the + filename of any file whose existence has been detected. + +Problem: In the files CPXSY2.ASM and CPXSYS.ASM, various conditionals are + ignored. +Diagnosis: In many places, a semicolon is followed by a form-feed which is + immediately followed by an "IF" conditional. My copy of LASM in- + terprets the "<FF>IF" as a comment. +Solution: Make the "<FF>IF" into "<FF>;<CR>IF". + +With these changes, Kermit-80 performs like a champ. +Following are file comparisons showing the changes noted above. + +************ +File DISK$USER:[OGRFJMF.KERMIT.CPM]CPXCOM.ASM;1 + 418 push b +****** +File DISK$USER:[OGRFJMF.KERMIT.CPM.HP125]CPXCOM.ASM;1 + 418 PUSH H + 419 PUSH D + 420 push b +************ +************ +File DISK$USER:[OGRFJMF.KERMIT.CPM]CPXCOM.ASM;1 + 422 ret ; all done for good machines +****** +File DISK$USER:[OGRFJMF.KERMIT.CPM.HP125]CPXCOM.ASM;1 + 424 POP D + 425 POP H + 426 ret ; all done for good machines +************ + +Number of difference sections found: 2 +Number of difference records found: 4 + +DIFFERENCES /IGNORE=()/MERGED=1/OUTPUT=DISK$USER:[OGRFJMF.KERMIT.CPM.HP125]CPXCO +M.DIF;1- + DISK$USER:[OGRFJMF.KERMIT.CPM]CPXCOM.ASM;1- + DISK$USER:[OGRFJMF.KERMIT.CPM.HP125]CPXCOM.ASM;1 + +File 1) DSKE:CPSPK1.ASM[10,50,KERMIT,CPM] created: 1940 26-Aug-89 +File 2) DSKE:CPSPK1.ASM[10,50,KERMIT,CPM,HP125] created: 2247 27-Aug-89 + +1)1 read0a: call init ;clear line, initialise buffers +1) lxi d,remnam ;[gnn] save local name here +1) mvi a,cmtxt ;[gnn] +**** +2)1 call init ;clear line, initialise buffers +2) read0a: lxi d,remnam ;[gnn] save local name here +2) mvi a,cmtxt ;[gnn] +************** +1)2 jz read5c ; no autoreceives, so drop out +1) lxi d,anymes ; load up Press any key to continue +**** +2)2 jz read5b ; no autoreceives, so drop out +2) lxi d,anymes ; load up Press any key to continue +************** + +File 1) DSKE:CPSPK2.ASM[10,50,KERMIT,CPM] created: 0829 28-Aug-89 +File 2) DSKE:CPSPK2.ASM[10,50,KERMIT,CPM,HP125] created: 2259 27-Aug-89 + +1)1 ; mvi c,openf ;See if the file exists. +1) ; lxi d,fcb +1) ; call bdos +1) ; cpi 0FFH ;Does it exist? +1) ; jz gofil9 ;If not create it. +1) ; lxi d,infms5 +1) ; call error3 +1) ; lda temp2 ;Get the number of chars in the file nam +e. +**** +2)1 mvi c,openf ;See if the file exists. +2) lxi d,fcb +2) call bdos +2) cpi 0FFH ;Does it exist? +2) jz gofil9 ;If not create it. +2) lxi d,infms5 +2) call error3 +2) ; lda temp2 ;Get the number of chars in the file nam +e. +************** +1)1 call prtstr ; write string to console +**** +2)1 lxi d,fnbuf ;[MF]Point to string +2) call prtstr ; write string to console +************** + + + + + + + + + + +I may be reached on BITNET by E-mail to mailer@uwalocke with the subject-line +containing the phrase <dec10%"bpa">. +-- Mike Freeman; Bonneville Power Administration; Vancouver, Wa; +Telephone (206)690-2307 -- + +------------------------------ + +Date: Thu, 31 Aug 89 13:07 PST +From: <MAILER@UWALOCKE.BITNET> +Subject: Re: Inconsistency in CP/M Kermit Version 4.09 + +Problem: Comments in the source-files indicate that the routine which + processes the "Set Port" command, "prtset" in CPSCOM.ASM, returns + the port value in the register pair DE for the system-dependent + routine to process. In fact, the value is returned in the HL + register pair. +Solution: Either (1) put a "xchg" instruction after the "shld port" + instruction in "prtset" and modify all port-setting routines which + expect the port parameter in HL, e.g., that for those systems using + iobyte redirection, to get the value from DE (this would be, I + suppose, philosophically correct since this would correspond to + the way the baud-rate-setting routine handles things) or + (2) change the comments in CPSDAT.ASM and CPXLNK.ASM to show the + return value from "prtset" in HL and modify the "sysprt" routines + which expect the port value in DE to get it from HL. I chose this + approach as it appeared that this would involve less code changes + (the only system I saw getting port values from DE was the Lobo). + Below are FILCOMs of the appropriate files showing these changes. + +File 1) DSKE:CPSDAT.ASM[10,50,KERMIT,CPM] created: 1925 26-Aug-89 +File 2) DSKE:CPSDAT.ASM[10,50] created: 1202 31-Aug-89 + +1)4 ; called with value from table in DE +1) sysscr: jmp $-$ ; screen setup for file transfer +**** +2)4 ; called with value from table in HL +2) sysscr: jmp $-$ ; screen setup for file transfer +************** + +File 1) DSKE:CPXLNK.ASM[10,50,KERMIT,CPM] created: 1826 26-Aug-89 +File 2) DSKE:CPXLNK.ASM[10,50] created: 1157 31-Aug-89 + +1)1 ; called with value from table in DE +1) jmp sysscr ; screen setup for file transfer +**** +2)1 ; called with value from table in HL +2) jmp sysscr ; screen setup for file transfer +************** + +File 1) DSKE:CPXSY2.ASM[10,50,KERMIT,CPM] created: 0743 28-Aug-89 +File 2) DSKE:CPXSY2.ASM[10,50] created: 1210 31-Aug-89 + +1)4 mov a,e ;[hh] get the data port value and store +at +1) sta outmd3+1 ;[hh] the two places we use... +**** +2)4 mov a,l ;[hh] get the data port value and store +at +2) sta outmd3+1 ;[hh] the two places we use... +************** +1)4 mov a,d ;[hh] now get the baud rate port value +1) sta getbd+1 ;[hh] store it in the two places we use. +.. +**** +2)4 mov a,h ;[hh] now get the baud rate port value +2) sta getbd+1 ;[hh] store it in the two places we use. +.. +************** + +E-mail replies may be sent to me via Bitnet at mailer@uwalocke. +Please place on the subject line the phrase <dec10%"bpa"> (less the angle- +brackets). +-- Mike Freeman (routing MORF); Bonneville Power Administration; P.O. Box +491; Vancouver, Wa 98666; Telephone (206)690-2307 -- + +------------------------------ + +Date: Sat, 25 Nov 89 08:16:41 pst +From: holmes@well.sf.ca.us (Tim Holmes) +To: jrd@watsun.cc.columbia.edu +Subject: Re: Kermit for Epson + +The Epson PX-8, also known as the Geneva, is a CP/M 2.2 machine. It is +a portable. It is listed on the list of Kermit versions by machine as +Epson Px-8; program version 4.09. This version I have never been able +to do anything but get the machine to freeze up. An earlier version, +4.05, basically works, but with some problems, such as handshaking +and flow control (I think). The PX-4, better known as the HX-40, is +a similar computer with an even smaller screen. + +The PX-8 version comes on the "A" tape. By the way, I cannot get the +"Generic" kermit versions to work on the HX-40, whereas they basically +work on the PX-8. + +Thanks again. + +------------------------------ + +Date: Thu, 1 Mar 90 16:48 PST +From: <MAILER@UWALOCKE> +Subject: dec10%"BPA" originated mail follows:- +To: fdccu@cuvma +Original_To: JNET%"fdccu@cuvma" + +. From BPA +. Postmark:26-Feb-90:09:36:20 +. To MAILER +. Expires:28-Mar-90:09:35:00 +. Subject: bitnet%"fdccu@cuvma" +Re: Problem with CP/M-80 Kermit + + I have come up with a better, more general solution to the problem +involving Kermit's interpretation of characters at the beggining of the CP/M +command-line than the one I sent you a few days ago. This more general +solution and the description of the problem/diagnosis appear below: + + PROBLEM + +B>A:KERMIT ;SET FI B;SET BL 3;SET TER Q +Kermit-80 v4.09 configured for HP-125 Series 100 + +For help, type ? at any point in a command +Kermit-80 0B:> +?Ambiguous +Kermit-80 0B:>SET FI B +Kermit-80 0B:>SET BL 3 +Kermit-80 0B:>SET TER Q +B> + + DIAGNOSIS + + + CP/M begins the buffer containing the tail to the command-line with +the count of characters in the buffer, followed by the characters in the +command- tail, beginning with the space(s) immediately following the +transient program name (in this case, Kermit). Kermit does not ignore +leading spaces when reading command input from the CP/M command-line. +Kermit therefore interprets the leading space(s) as part of the first +command to be executed, leading to the "?Ambiguous" message. + + + SOLUTION + + + Rewrite Kermit so that leading spaces in input from the CP/M +command-line are ignored. This is done by adding code just prior to +label CMINB1 in the module CPSCMD.ASM and adding a label a few lines +following the label CMINB1 in the same module. This gives, as a +side-effect, the advantage that a leading semicolon is not required +before the commands Kermit is to execute from the command-line, so that +a command-line like: +A>KERMIT SET FILE-MODE ASCII;SET TERMINAL QUIET;SET NO-EXIT +executes without errors. A Vax DIFFERENCES output showing the changes +in CPSCMD.ASM follows: + + +************ +File DISK$USER:[OGRFJMF]CPSCMD.ASM;1 + 981 cminb1: lxi h,cmccnt ;Increment the char count. +****** +File DISK$USER:[OGRFJMF]CPSCMD.ASM;2 + 981 lda takflg ;[JMF]See if chars from file or command- +line + 982 ora a ;[JMF]... + 983 jz cminb1 ;[JMF]No + 984 ani 1 ;[JMF]Yes, char from command-line? + 985 jnz cminb1 ;[JMF]No + 986 cminb0: mvi c,conin ;[JMF]Yes, get a character + 987 call bdos ;[JMF]... + 988 cpi 40o ;[JMF]If leading characters are spaces + 989 jz cminb0 ;[JMF]Ignore them, else + 990 lxi h,cmccnt ;Increment the char count. + 991 inr m + 992 jmp cmin1a ;[JMF]and proceed with command buffer + 993 cminb1: lxi h,cmccnt ;Increment the char count. +************ +************ +File DISK$USER:[OGRFJMF]CPSCMD.ASM;1 + 985 lhld cmcptr ;Get the pointer into the buffer. + 986 mov m,a ;Put it in the buffer. +****** +File DISK$USER:[OGRFJMF]CPSCMD.ASM;2 + 997 cmin1a: lhld cmcptr ;Get the pointer into the buffer. + 998 mov m,a ;Put it in the buffer. +************ + +Number of difference sections found: 2 +Number of difference records found: 13 + +DIFFERENCES /IGNORE=()/MERGED=1/OUTPUT=DISK$USER:[OGRFJMF]CPSCMD.DIF;1- + DISK$USER:[OGRFJMF]CPSCMD.ASM;1- + DISK$USER:[OGRFJMF]CPSCMD.ASM;2 + + + I can be addressed via E-mail on Bitnet at address +MAILER@UWALOCKE. Place the following as the subject of the message: +<dec10%"bpa"> (less the angle-brackets). Thanks. +Michael Freeman (Routing MORF) +Bonneville Power Administration +P.O. Box 491 +Vancouver, WA 98666 +Telephone (206)690-2307 + +------------------------------ + +Date: Mon, 14 May 90 10:26:54 EDT +From: rochester!ames!claris!voder!nsc!thoreau.nsc.com!rtodd@columbia.edu + (Ron Todd) +To: fdc@watsun.cc.columbia.edu +Subject: My kermit problem( Kermit-80 to Kermit-32) + +Frank, + + I finally got my Kermit-80 (v4.09) on the Kaypro II to work with our +Kermit-32 (v3.1.066) (the problem had to do with the protocol timing out +during disk sector writes on the Kaypro). The fix is some where in the +combination of sets I am using, I tried your suggestion of turning off the +timeouts on the mainframe. The significant sets I am using are: + +Kermit-80 + set flow on + +Kermit-32 + set server_time 0 + set send time 0 + +VMS + set term/readsync/ttsync + +DEC-Server + set session pasthru + + So far I have only tried ascii file transfer but will be testing binary +soon, I have a feeling that that should work also. I am mostly using the +GET command with Kermit-32 running in server so I may not need to do the +"set send time". I am sure I need to use the "set session pasthru" on the +server and probably atleast one of the "sync" options on the "set term" +of the VMS side. + + Thanks for your help, I'll e-mail the final minimum set to you and also +post it to the net as a followup to help anyone else who may be running +into the same or similar problems. + +Regards, + Ron Todd, K3FR + +------------------------------ + +Subject: Kermit-80 4.09 ported to new system, bug report +From: Russell Lang <rjl@monu1.cc.monash.edu.au> +Date: Tue, 19 Jun 90 11:04:47 +1000 +Sender: eln272v@monu1.cc.monash.edu.au + +Frank, + I have ported Kermit-80 4.09 to an Australian CP/M computer, + the Microbee. I have created a new system dependent file + CPXBEE.ASM for this computer. + I sent some mail to Bertil Schou, but he informs me that he is + no longer maintaining CP/M kermit. + Could you please tell me who is currently working on CP/M Kermit? + + + During the testing of kermit-80 on the Microbee, I found a bug + in the system independent part of kermit. + +Bug report for Kermit-80 4.09. + +Problem: When receiving a file with WARNING ON, kermit-80 will avoid + overwriting an existing file by creating a unique file name. + This unique file will have the attributes of the file being avoided. + If the created file is opened with Read-Only attribute, kermit-80 is + unable to write to the file, and crashes with the message: + BDOS Err on A: File R/O + +Diagnosis: Kermit checks for the existence of a file by attempting + to open it. If the file exists, its directory entry is copied + into the FCB. Kermit then modifies the file name in the FCB + in an attempt to find a unique name. The name in the FCB has + the attributes of the previously existing file, so when kermit + eventually finds a unique name, it creates a file with the + attributes of the most recently opened file! + +Solution: + Clear bit 7 (attribute bit) of all file name and type characters + before opening/creating file. + A Unix context diff for CPSPK2.ASM (4) 27-Oct-87 is at the + end of this mail. + + +-- +Russell Lang Email: rjl@monu1.cc.monash.edu.au Phone: (03) 565 3460 +Department of Electrical and Computer Systems Engineering +Monash University, Australia + +diff -c cpspk2.asm cpxpk2.asm.new +*** cpspk2.asm Tue Jun 19 10:48:54 1990 +--- cpspk2.asm.new Tue Jun 19 10:52:30 1990 +*************** +*** 299,305 + ; + ; Part 2) open the file (if success, then it exists) + +! gofi7d: lxi d,fcb + mvi c,openf + call BDOS + inr a ; if 0ffh returned, error (ie does not exist) + +--- 299,315 ----- + ; + ; Part 2) open the file (if success, then it exists) + +! gofi7d: +! ;zero the attribute bits. [rjl@monu1.cc.monash.edu.au] +! lxi h,fcb+1 ;[rjl] +! mvi c,11 ;[rjl] +! gofi7z: mov a,m ;[rjl] +! ani 07fh ;[rjl] +! mov m,a ;[rjl] +! inx h ;[rjl] +! dcr c ;[rjl] +! jnz gofi7z ;[rjl] +! lxi d,fcb + mvi c,openf + call BDOS + inr a ; if 0ffh returned, error (ie does not exist) + +------------------------------ diff --git a/cpkerm.mss b/cpkerm.mss new file mode 100644 index 0000000..2318208 --- /dev/null +++ b/cpkerm.mss @@ -0,0 +1,2616 @@ +@Part(CPKERM,root="kuser") +@string(-cpmversion="@q<4.11>") +@Chapter<CP/M-80 KERMIT> +@index<CP/M-80 Kermit> + +@case(device,file="********@* +This document is formatted as an ordinary, plain text ASCII disk file. +Typeset copies are available in the Kermit User Guide from Columbia +University. Changes should be made to CPKERM.MSS.@*********") + +@Begin<Description,Leftmargin +12,Indent -12,spread 1> +@i(Program:)@\Mike Freeman, Bonneville Power Administration, Vancouver, WA, +USA, with contributions from many others. + +@i(Language:)@\8080 Assembler, LASM, M80, or MAC80 + +@i(Version:)@\@value(-cpmversion) + +@i(Date:)@\April 1, 1991 + +@i(Documentation:)@ @ Christine Gianone, Columbia University, with +contributions from many others. + +@end<Description> +@label<-k80> + +@i<KERMIT-80 Capabilities At A Glance:> +@begin<format,leftmargin +2> +@tabclear()@tabset(3.5inches,4.0inches) +Local operation:@\Yes +Remote operation:@\Partial, Auto-receive only +Login scipts:@\Yes, limited +Transfer text files:@\Yes +Transfer binary files:@\Yes +Wildcard send:@\Yes +File transfer interruption:@\Yes +Filename collision avoidance:@\Yes +Can time out:@\Yes +8th-bit prefixing:@\Yes +Repeat count prefixing:@\No +Alternate block checks:@\Yes +Terminal emulation:@\Yes, VT52 and others +Communication settings:@\Yes +Support for dial-out modems:@\No +Transmit BREAK:@\Yes; most versions +IBM communication:@\Yes +Transaction logging:@\No +Debug logging:@\No +Session logging:@\Yes +Raw file transmit:@\Yes +Act as server:@\No +Talk to server:@\Yes +Advanced commands for servers:@\Yes +Command/init files:@\Yes +Command macros:@\No +Local file management:@\Yes +Handle file attributes:@\No +Long packets:@\No +International Character Sets:@\No +Sliding Windows:@\No +Printer control:@\Yes, limited +@end<format> + +@Section<Credits> + +CP/M Kermit is the first of all the Kermit programs. It was originally +written by Bill Catchings of Columbia University in 1981. Over the years, +contributions have been added by many people, including +Charles Carvalho (ACC), +Bernie Eiben (DEC), Nick Bush (Stevens Institute of Technology), +John Bray (University of Tennessee), Bruce Tanner (Cerritos College), +Greg Small (University of California at Berkeley), +Kimmo Laaksonen (Helskini University of Technology), +Brian Robertson (Aberdeen University), A.J. Cole (Leeds University), +John Shearwood (Birmingham University), +Tony Addyman (Salford University), Godfrey Nix and Martin Carter +(Nottingham University), Ian Young (Edinburgh University), Chris Miles +(Manchester University), Richard Russell, Dave Roberts, +and many, many others. + +Version 4.11 is the work of Mike Freeman of the Bonneville Power +Administration in Vancouver, WA, USA, with assistance from Russell Lang of +Monash University in Australia, Jay S Rouman of Mt Pleasant MI, and others. + +@section<What's New> + +Features added since version 4.09 include: +@begin<itemize> +SET COLLISION {BACKUP/DISCARD/OVERWRITE/RENAME} + +SET INCOMPLETE-FILES {DISCARD/KEEP} + +Many REMOTE commands, including some REMOTE SET commands + +RENAME command to rename CP/M files from within Kermit-80 + +SET RECEIVE/SEND PACKET-LENGTH nn (nn <= 94) + +SET AUTORECEIVE ON now implies that Kermit-80 ALWAYS tries to +receive more files when a RECEIVE transaction has completed. The +user can cancel with ^C. + +QUIT is now a synonym for EXIT. + +STAY is now a synonym for SET NO-EXIT. + +CONNECT, RECEIVE and SEND may be abbreviated to C, R and S, +respectively. + +Cancellation of TAKE, TYPE, and PRINT commands from the keyboard. + +Many bug fixes. + +Kermit-80 Version 4.11 now supports the Microbee family of +computers (56K, 64K, 128K and 256K) manufactured by +Microbee Systems, Ltd, of Australia. + +Kermit-80 now supports the Ampro Little Board system. +@end<itemize> + +@section<Overview of Kermit Operation> + +Use the SET command to establish necessary communication parameters like +SPEED and PARITY. Use the CONNECT to establish a terminal connection to +the remote computer. If you are dialing out with a modem, type the necessary +dialing commands to the modem first. The dialing process can be automated +to some extent using a TAKE command file containing INPUT, OUTPUT, and PAUSE +commands. Then log in to the remote computer or service and conduct a session. + +To transfer a text file, start the Kermit program on the remote computer and +tell it to SEND the desired file (if uploading) or to RECEIVE (if +downloading). "Escape back" to CP/M Kermit, usually by typing Ctrl-] (hold +down the Control key and press the right bracket key) and then type the letter +C. At the CP/M Kermit prompt type RECEIVE (if you gave a SEND command to the +remote Kermit) or SEND @i<filename> (if you gave a receive command to the +remote Kermit). + +To transfer a binary file, give the command SET FILE TYPE BINARY to the remote +Kermit and SET FILE-MODE BINARY to CP/M Kermit before issuing any SEND or +RECEIVE commands. + +Multiple files of the same type (text or binary) can be transferred in a +single operation using "wildcard notation" (including special characters like +asterisk in the filename). + +When file transfer is complete, CONNECT back to the remote computer, +use the EXIT command to exit from the remote Kermit program, finish your work +on the remote computer, log out from it, escape back to CP/M Kermit again, +and EXIT from CP/M Kermit. + +The remote Kermit may also be put into "server mode" to simplify these +operations. Give the SERVER command to the remote Kermit, escape back to CP/M +Kermit, and then issue SEND commands to send files (upload), GET @i<filename> +commands to receive (download) files, REMOTE commands to request various other +services (like directory listings) from the remote Kermit. When you are done, +give a BYE command to terminate your remote session, or a FINISH command to +tell the remote Kermit to return to its prompt so you can CONNECT back and +conduct further business. + +That's all there is to it. + +@Section<Summary of CP/M> + +There are essentially two versions of CP/M - Versions 2.2 +and 3.0 (sometimes also called CP/M PLUS.) + +CP/M-80 Version 2@q<.>2 is run in +a single 64 Kbyte "page", usually the largest amount of memory on +Z80 or 8080 systems. The BIOS (Basic input/output system), +BDOS (Basic Disk Operating System) and CCP (Command console processor) +all share memory with any transient program the user may wish to run. +Some basic commands are +available through the CCP, like DIR, ERA etc,while others are loaded +from disk into the transient program area and run as a program, +like PIP or STAT. + +CP/M Version 3@q<.>0 (or CP/M PLUS) effectively removes the requirement +of having the CCP and BDOS along with a chunk of the BIOS code being +resident in the single 64k byte page of memory. This allows even more +space for programs in the TPA, but still a little less than the maximum +of 64k. It is substantially different from CP/M version 2@q<.>2, with +lots of added features. Kermit-80 uses very few additional version +3@q<.>0 features, and only where absolutely necessary. + +CP/M file specifications are of +the form @q(DEV:XXXXXXXX.YYY), where +@begin<description> + @q(DEV:)@\is a @i<device name>, +normally the A:@ or B:@ floppy. If omitted, the device name defaults +to your connected diskette. + +@q(XXXXXXXX)@\is a @i<filename> of up to 8 characters. + +@q(YYY)@\is the @i<file type>, up to 3 characters. + @end<description> + File names and file types may contain letters, digits, and some +special characters, including dash, dollar sign, and underscore, but +no imbedded spaces. Upper and lower case letters are equivalent. + + "Wildcard" file-@|group specifications are permitted in file names +and file types (but not device names) within certain contexts; a "@q(*)" +matches a whole field, a "@q(?)" matches a single character, including +space. Examples: "@q(*.F??)" specifies all files whose @i<types> start +with F and are 1, 2, or 3 characters long; "@q(F?.*)" specifies all +files whose names start with F and are no more than two characters +long (before the trailing spaces). + +The five CP/M commands are: + @Begin<Description> +DIR @i<file>@\Lists the the names of the specified files. The +default file specification is "*.*". Example: @w<"@q(DIR B:*.FOR)">. + +ERA @i<file>@\Erases (deletes) the specified file(s); wildcards allowed. + +REN @i<new> @i<old>@\Changes the name of a file from @i<old> to +@i<new>, e.g.@* +@w<"@q(REN NEW.FOR=OLD.FOR)">. + +SAVE@\Saves the specified number of memory blocks into a file. +(Not on CP/M Plus systems) + +TYPE @i<file>@\Types the specified file on the screen, e.g. +@w<"@q(TYPE FOO.TXT)">. + @End<Description> +The most important programs are: + @Begin<Description> +STAT@\Gives statistics on disk usage; sets and displays IOBYTE. +(Not on CP/M Plus systems) + +PIP@\@u<P>eripheral @u<I>nterchange @u<P>rogram. Copies files. In +response to the "@q(*)" prompt, give a command of the form + @example<disk:outfile=disk:infile> + Wildcards ("@q(*)" for a whole field or "@q(?)" for a letter) can be used. +Examples: "@q(A:=B:*.*)" to copy a whole disk, "@q(A:=B:*.FOR)" to copy all +the Fortran programs from disk B to disk A. If the disk specification +is omitted, your "connected" disk is assumed. Command line arguments +are also accepted, e.g. "@q(PIP A:=B:*.*)". + +@End<Description> + +There are equivalent commands for CP/M Version 3.0, but are not loaded into +memory in the same way as for CP/M Version 2.2. +For further information on CP/M, consult your microcomputer manual or +a CP/M handbook. + +@Section<Kermit-80 Description> + +Since Kermit-80 runs on a standalone micro, it is always in control of the +screen -- it is always in "@i<local>@index<Local> mode". It includes a +terminal emulator for establishing a connection to a remote computer or +service, and during file transfer, it keeps the screen updated with the +file name and the packet number, whether sending or receiving. + +@index<Timeout> Kermit-80 is capable of an imprecise or "fuzzy" timeout on an +input request, and can break deadlocks automatically. In most cases, this is +not important, because the Kermit program on the other side is most likely +able to handle the timeouts. The timeouts done by Kermit-80 are fuzzy because +they depend on the speed of the processor and other factors that can vary from +system to system. + +If, despite the timeout capability, the transmission appears to be stuck (and +you can tell that this has happened if the screen fails to change for a while) +you can type carriage return to have the micro do what it would have done on a +@Index[Timeout] timeout, namely NAK@Index[NAK] the expected packet to +cause theforeign host to send it again (or, if the micro is sending, to +retransmit the last packet). Micro/@|micro or micro/@|IBM-@|mainframe +transfers could require this kind of manual intervention. + +File transfers may be interrupted in several ways. +@begin<description> +@Index[Control-C] +Control-C@\This will return you to Kermit-80 command level immediately, so that +you can connect back to the remote system, or take any other desired action. + +@Index[Control-X] +Control-X@\When sending a file, this will terminate the sending of the current +file with a signal to the KERMIT on the other side to discard what it got so +far. If there are more files to be sent, KERMIT-80 will go on to the next one. +When receiving a file, KERMIT-80 will send a signal to the remote KERMIT to +stop sending this file. If the remote KERMIT understands this signal (not all +implementations of KERMIT do), it will comply, otherwise the file will keep +coming. In any case, the remote KERMIT will go on to the next file in the +group, if any. + +@Index[Control-Z] +Control-Z@\Like Control-X, except if a file group is being transmitted, this +will stop the transmission of the entire group. If only a single file is being +transmitted, it works exactly like Control-X. + +@Index[Carriage Return] +@Index[CR] +Carriage Return@\If you type a carriage return Kermit-80 will resend the +current packet. You may do this repeatedly, up to the packet retry limit +(somewhere between 5 and 16 times) for a particular packet. +@end<description> + +@heading<Kermit-80 Commands> + +Kermit-80 is an interactive program. It issues a prompt, you type a command. +The process repeats until you give the EXIT command to leave the program. + +Commands consist of keywords, filenames, and numbers. Keywords may be +abbreviated to minumum unique length. "?" may be typed to request a menu of +the available options for the current field at any point in a command. ESC +may be typed at any point in a command to fill out the current keyword or +filename; if sufficient characters have not been typed to identify the current +field uniquely, Kermit-80 will sound a beep and allow you to continue from +that point. Here are Kermit-80's commands: +@begin<description,leftmargin +8,indent -8> +@Index[Break] +BREAK@\Send a BREAK condition to the remote computer. This is only possible +if your system is capable of sending breaks. It is intended to be used with +PAUSE, OUTPUT, etc and the TAKE command to do wierd and wonderful things, like +automatic logging on to a remote host. + +@Index[Bye] +BYE@\When talking to a remote Kermit Server, this command shuts down +the server and logs it out, and also exits from Kermit-80 to CP/M command +level. + +@Index[Virtual Terminal]@Index[Escape Character]@Index[Connect] +CONNECT@\Establish a terminal connection to the computer, service, or device +that is +connected to the serial port, i.e.@ pass all typein to the serial port and +display all input from the serial port on the screen. Also, emulate a DEC VT52 +to allow cursor control, screen clearing, etc., if VT52-EMULATION is ON (see +below), in which case you should also set your terminal type on the remote host +to VT52. (Some versions emulate other terminals.) The CONNECT command may +be abbreviated by the single letter C. + +@\Warning: VT52 emulation is only successful if your system or its +attached terminal can do the same sort of functions as a genuine +VT52. Things to beware of are cursor addressing, clear to end of page +and end of line, clear screen, home cursor, and clear-and-home +functions. The useability of VT52 emulation depends entirely on +how many of the VT52 functions can be emulated by your micro or terminal. + +@\The escape character differs from micro to micro; when you issue +the CONNECT command, the micro will print a message telling you how +to get back. The escape sequence is generally an uncommonly-@|used +control character, like CTRL-backslash or CTRL-rightbracket, followed +by a single letter "command": +@begin<description,spread 0,leftmargin +4, indent -4> +C@\Close Connection, return to @q(Kermit-80>) command level. + +S@\Display Status of connection, but maintain remote connection. + +@q<?>@\List available single-character commands. + +0@\(zero) Send a null (0) character. + +B@\Send a BREAK signal. Most systems provide this function. + +D@\Drop the line. Used on the Apple with modem. Automatically +closes the connection after dropping the line. The TORCH system +acknowledges this command but does nothing. + +P@\Toggle printer on or off. Allows you to copy whatever goes +to the screen to the printer. + +S@\Temporarily suspend logging to the log file. + +Q@\Restart logging to the log file + +@q<^]>@\(or whatever - a second copy of the escape character) Send the +escape character itself to the remote host. + @end<description> + +@Index[Copy] +@Index[File Copying] +COPY @i<source> @i<destination> +@\Copy a named file to another file, either on the same drive or another +drive. + +@Index[Directory] +DIRECTORY@\This provides a directory listing of the specified files. +If no files are +specified, all files on the default disk are listed. File sizes, in K, are +included. You may interrupt the listing at any time by typing any character. +The listing (even if interrupted) concludes with a display of the amount of +free storage left on the disk. You can inhibit the display of file sizes by +SET DIRECTORY OFF. + +@Index[Erase] +ERASE @i<filespec>@\This executes the CP/M ERA command on the specified +file(s). The names of the files being erased are not displayed. + +@Index[Exit] +EXIT@\Quit back to CP/M. The return is made by a JMP 0 (Warmstart). QUIT +is a synonym for EXIT. + +@Index[FINISH]FINISH@\Like LOGOUT, but shuts down the remote server without +logging it out. Leaves you at Kermit-80 command level; subsequent CONNECT +commands will put you back at host system command level. + +@Index[GET]GET @i<filespec> [@i<local_filespec>] +@\When Kermit-80 is talking to a Kermit Server on +the host, you should use the GET command to request the server to send +files to you, for example: +@example<get hlp:k*.hlp> +You may specify a local filename if you want to save the remote file +under a different filename. +Limitation: If you request an alternate block check type using the SET BLOCK +command, the GET command will not communicate it to the remote server. If you +want to have type 2 or 3 block checks done when getting files from the server, +you have to issue the appropriate SET BLOCK command to the remote KERMIT before +putting it in server mode. + +@Index[Help]HELP@\List all these commands, with a short description +on what the commands do. A question mark will do the same. If you have +already typed a command but do not know what the parameters are, type a +space (to indicate the end of the command) and a question mark. You will +be informed of what Kermit can expect at that stage. + +@Index[Input]INPUT @i<seconds> @i<text>@\Setup a text line and time delay +for your CP/M system to expect from the host, then wait up to the given number +of seconds (approximately) for text to be sent to your CP/M-80 system. + +@Index[LOG]LOG @i<filespec>@\When CONNECTed to a foreign host as a terminal, +log the terminal session to the specified diskette file. This functionality +depends to some extent on the remote host's ability to do +@Index[XON/XOFF]XON/XOFF flow control, and does not guarantee a complete +transcript (after all, that's what the KERMIT protocol is for). The log file +is closed when the connection is closed by typing the escape character followed +by the single-@|character command "C". + +@Index[Append] +@\It is possible to temporarily suspend logging during connect +state. Typing an escape sequence can turn file logging on +(<escape-character> R for Resume) or off (<escape-character> Q for quiet). + +@\Re-entering connect state will re-open the previously opened +log file and append to that file. + +@Index[LOGOUT]LOGOUT@\Like BYE, but leaves you at Kermit-80 command level. + +@index<OUTPUT>OUTPUT @i<text>@\Send the text to the remote computer as if +you had typed it. + +@Index[Pause]PAUSE @i<seconds>@\If this command is issued your CP/M +system will wait a while before proceeding with another command. +This is intended for use in TAKE commands, where you may want to pause +for a while before proceeding with the rest of the TAKE file. The +actual delay is very variable between systems, and values should +be determined on a trial and error basis. + +@Index[Print]PRINT@\Print a file to the console and printer. Output to +the printer is buffered by the Kermit-maintained printer buffer. +This routine is identical to TYPE but characters are echoed to the printer +as well as to the screen. Suspending and canceling output is as +described in TYPE. + +QUIT@\Synonym for EXIT. + +@Index[RECEIVE]@Index[File-Warning] +RECEIVE @i<filespec>@\Receive file(s) from the remote +Kermit, and save them under the names provided in the file headers +supplied by the remote host. If a local filespec is given, the file is +saved under the given filename. If the names aren't legal, use as +many legal characters from +the name as possible (see the description of SET FILE-WARNING below). If +there's a conflict, and FILE-WARNING is ON, warn the user and try to build a +unique name for the file by adding "@q<&>" characters to the name. RECEIVE +can be abbreviated to the single letter R. + +@index<REMOTE>REMOTE @i<command>@\Send a command to a remote Kermit server. +The results are sent back to your CP/M screen. When two arguments are +required and specify less than two in the command, you will be prompted for +the missing arguments. REMOTE commands include: +@begin<description,leftmargin +4, indent -4> +REMOTE CD [directory]@\Ask the remote server to change its default directory. +If no directory is specified, the server changes to its login directory. + +REMOTE COPY file1 file2@\Ask the remote server to copy file1 to file2. + +REMOTE RENAME file1 file2@\Ask the remote server to rename file1 to file2. + +REMOTE DELETE filespec@\Ask the remote server to delete the named file or +files. + +REMOTE DIRECTORY [filespec]@\Ask the remote server to display a directory +listing of the given files or, if the filespec is omitted, all the files in +the current device or directory. + +REMOTE DISK-USAGE@\Ask the remote server to display information about its +disk usage (such as free or used space). + +REMOTE ERASE filespec@\Same as REMOTE DELETE. + +REMOTE FINISH@\Same as FINISH. + +REMOTE HELP@\Ask the remote server to display a list of the commands it +can respond to. + +REMOTE HOST command@\Ask the remote server to have its operating system +execute the given command. + +REMOTE KERMIT command@\Ask the remote server to execute the given Kermit +command, given in the server Kermit's command syntax. + +REMOTE LOGIN user password@\Log in to a remote Kermit server which has been +set up to require a username and password. + +REMOTE MESSAGE text@\Send the text to the remote server for display on its +screen (useful with MS-DOS Kermit servers). + +REMOTE SET parameter value@\Ask the remote server to set the given parameter +to the given value, for example REMOTE SET FILE TYPE BINARY. Type REMOTE SET +? to see a list of the REMOTE SET options. + +REMOTE SPACE@\Same as REMOTE DISK-USAGE. + +REMOTE STATUS@\Ask the remote server to provide a status report. + +REMOTE TYPE file@\Ask the remote server to display the named file on +the micro's screen. + +REMOTE WHO [user]@\Ask the remote server for a list of users who are logged +in, or if a user is specified, for a report on the named user. +@end<description> + +RENAME file1 file2@\Rename local CP/M file1 to file2. + +@Index[SEND]SEND @i<filespec>@\Send file(s) specified by @i<filespec> to +the remote Kermit. The @i<filespec> may contain CP/M wildcards. SEND may +be abbreviated to the single letter S. + +@Index[SET]SET @i<parameter> [@i<value>]@\Set the specified parameter to +the specified value. Possible parameter settings: + +@begin<description,leftmargin +8,indent -8> + +@Index[Autoreceive]AUTORECEIVE@\ON (or OFF). Allows several files to be +received without having to type RECEIVE on the receiving machine. The routine +simply looks for activity on the serial line, and if so fudges a RECEIVE +command. The packet sent by the sender will be lost. + +@Index[Block Check]BLOCK-CHECK-TYPE @i<option> +@\The options are: +@begin<description,spread 0,leftmargin +8,indent -8> +1-CHARACTER-CHECKSUM@\Normal, default, standard 6-bit checksum. + +2-CHARACTER-CHECKSUM@\A 12-bit checksum encoded as two characters. + +3-CHARACTER-CRC-CCITT@\A 16-bit CCITT-format Cyclic Redundancy Check, encoded +as 3 characters. + +@end<description> + +@Index[Buffer size]BUFFER-SIZE @i<value>@\This allows you to set a buffer +size during transfer of data. On some systems it takes so long that the +remote end times out while the local system is reading or writing to disk. +The size is the number of 128 disk sectors (nominal) and can be from 1 +(128 bytes) to 64 (8 kbytes). + +@\CP/M-80 filenames will still be mapped to uppercase characters. + +@index<COLLISION>COLLISION value@\What to do when a file arrives that has +the same name as an existing file. BACKUP means to rename the existing file. +DISCARD means to discard and reject the incoming file. OVERWRITE means to +overwrite the existing file. RENAME means to rename the existing file. + +@Index[Debug]DEBUG@\ON (or OFF). Enables/disables displaying of packets +on the screen during file transfer. Not performed if the QUIET option +has been set for the terminal (SET TERMINAL QUIET) + +@Index[Default Disk]DEFAULT-DISK @i<drive letter> +@\This allows you to set the default +disk as source and destination +of file transfers. In addition, issuing this command causes you to switch to +the specified disk and log it in, write-@|enabled. +The colon must be included in the disk name (A:). +The selected disk appears +in your KERMIT-80 prompt, for instance @example[Kermit-80 14A:>] + +@Index[Directory file size]DIRECTORY-FILE-SIZE ON (or OFF). + +@\By setting DIRECTORY-FILE-SIZE OFF you can get an abreviated listing of your +disk drive. File sizes are not calculated, and five files are shown on +a line. Setting this option ON will show file sizes of each file. + +@\Both options will list the free space remaining. + +@Index[Escape Character]ESCAPE@\Change the escape character for +virtual terminal connections. Kermit-80 will prompt you for the new +escape character, which you enter literally. + +@Index[File-mode]FILE-MODE @i<option> +@\Tells KERMIT-80 what kind of file it +is sending, so that KERMIT can correctly determine the end +of the file. SET FILE BINARY means to send all the +128-@|byte blocks (ie logical CP/M sectors) +of the file, including the last block in its entirety; SET +FILE ASCII is used for text files, and transmission stops when the first +Control-Z is encountered anywhere in the file (this is the CP/M convention for +marking the end of a text file). + +@\SET FILE-MODE DEFAULT tells Kermit to attempt to determine the file type by +examining the file being transmitted. If a Control-Z appears before the +last block of the file, it is assumed to be BINARY; if, when the first +Control-Z is encountered, the remainder of the file contains only control-Z's, +it is assumed to be a text file. Unfortunately, not all programs fill the +remainder of the last record of a text file with Control-Z's, +so this algorithm is not always successful. + +@\If binary transmission is used on a text file, or a compressed file +(eg a .DQC file) some extraneous characters (up to 127 of them) +may appear at the end of the file on the target system. + +@\If ASCII transmission is used on a binary file, any 8th bits set will +be stripped and a warning sent to the console. When the first control-Z +is encountered, the file is assumed to be at the end, even if it is not. + +@Index[Flow Control]FLOW-CONTROL ON (or OFF) +@\Sets XON/XOFF flow control on or off. If set ON the host is expected +to respond to an XOFF or XON sent by Kermit-80. If set off, +no flow control is assumed and any XON/XOFF is ignored. + +@Index[IBM]IBM ON (or OFF)@\Allow the transfer of files to and from an IBM +mainframe computer. This makes Kermit-80 wait for the IBM turnaround character +(XON), ignore parity on input, add appropriate parity to output, and use local +echoing during CONNECT. As distributed, KERMIT-80 uses MARK parity for IBM +communication. If you don't give this command, IBM mode is OFF. Since IBM +VM/CMS KERMIT does not have timeout capability, SET IBM ON also turns on the +"fuzzy timer" automatically. + +@Index[Local-Echo]LOCAL-ECHO ON (or OFF)@\When you CONNECT to a remote +host, you must set LOCAL-@|ECHO ON if the host is half duplex, OFF if +full duplex. OFF by default. + +@Index[Logging]LOGGING ON (or OFF)@\Cease or resume logging whenever +connect mode is entered. This is really only applicable after a LOG +command is no longer required. + +@Index[No-exit]NO-EXIT@\This command is applicable only for Kermit initiated +with a command tail. For example, if Kermit was initiated by: + +@\KERMIT ;SEND HELLO;NO-EXIT + +@\Kermit would first seek out and execute the KERMIT.INI file (if present), +then send file HELLO to a remote system. Usually Kermit would exit back +to CP/M, but NO-EXIT over-rides this. STAY is a synonym for NO-EXIT. + +@\Note the leading semicolon. This clears leading spaces from the first +command. + +@Index[OUTPUT]OUTPUT @i<text-line>@\Send a line of text to the remote computer +(or modem). This simply copies the string to the correct line, and assumes all +appropriate parameters have been set to be used, e.g. speed, parity etc. +It is intended for use in TAKE command files. + +@Index[Parity]PARITY @i<option> +@\Sets parity for outgoing characters to one of the +following: NONE, SPACE, MARK, EVEN, or ODD. On input, if parity is NONE, then +the 8th bit is kept (as data), otherwise it is stripped and ignored. The +parity setting applies to both terminal connection and file transfer. +If you set parity to anything other than none, KERMIT-80 will attempt to use +@Index<Eighth-Bit Prefix> +"8th bit prefixing" to transfer binary files. If the other KERMIT is also +capable of 8th bit prefixing, then binary files can be transferred +successfully; if not, the 8th bit of each data byte will be lost (you will see +a warning on your screen if this happens). + +@Index[Port]PORT @i<port name> +@\Allows you to switch between different communication ports. +This command is not available on all systems. +Type @q<SET PORT ?> for a list of valid options for your system. (Note: +If your system does not support several ports, this command will +return a "Not implemented" error if you try to set a port.) + +@Index[PRINTER]PRINTER@\ON (or OFF) +@\Turns copying of CONNECT session to printer on and off. It is also +possible to toggle the printer on/off from the connect state, by +typing <escape character> followed by P. + +@Index[Set Receive]RECEIVE @i<parameter> [@i<value>] +@\Set a RECEIVE parameter. + +@begin<description, Spread 0, leftmargin +8,indent -8> + +@Index[Pad character] +PAD-CHAR@\Set the PAD character to use while receiving files. +Currently a dummy, as for SET SEND PAD-CHAR. + +@Index[Set padding]PADDING [value] +@\Set the number of PAD characters to use while receiving files. +Same as SET SEND PADDING. + +@Index[Set Start of packet] +START-OF-PACKET [value] +@\Set the default start of Packet character for receiving files. Apply the +same rules and considerations as for SET SEND START-OF-PACKET. + +PACKET-LENGTH number@\Tell the other Kermit the longest packet length CP/M +Kermit is willing to receive during file transfer. The maximum length is 94, +which is also the default length. + +@end<description> + +@Index[Set Send]SEND @i<parameter> [@i<value>] +@\Set a SEND parameter. +@begin<description, spread 0, leftmargin +8,indent -8> + +@Index[Pad character] +PAD-CHAR@\Set the Pad character to be used while sending files. +It is currently a dummy entry, and does not do anything. + +@Index[Set Padding] +PADDING [value] +@\Set the number of PAD-CHARS to be used while sending files. This +too does nothing. + +@Index[Set Start of packet] +START-OF-PACKET@\Set the default start of packet character to +another character than control-A. This may be necessary on systems +(including intervening networks) that trap control-A characters. Choose +a control character not otherwise used, ie not carriage return (13D, ODH), +line feed (10D, OAN), tabs (09D, 09H), backspace (08H), and bell (07H) +or any other used between you and your remote system. + +@end<description> + +@Index[Baud]SPEED @i<value> +@\Change the baud rate of the communications port. This +command only works on some systems. @i<value> is the numeric baud rate +(300, 9600, etc.) desired. Type SET SPEED followed by a question mark +for a list of supported baud rates. +On systems that do not support this command, you must set the port +baud rate from CP/M or other setup mechanism outside of KERMIT-80. + +@Index[TacTrap]TACTRAP@\Set the TAC intercept character. If you are attached +to a TAC it will swallow the intercept character (commercial AT sign by +default) so Kermit sends it twice. With this command you can set the +intercept character (ie the one to send twice) to another character. + +@Index[VT52 Emulation] +@Index[Terminal Emulation] +@Index[External Terminal Emulation] +TERMINAL @i<option> +@\Select one of the following terminal characteristics: + +@begin<description,spread 0.5,leftmargin +8,indent -8> + +OFF@\sets emulation off, and its up to the attached terminal to +respond to escape sequences sent from the remote host system. + +DUMB@\Like off, but carriage return and line feed characters are +the only control characters accepted. All other control characters are +simply ignored. (Really a "Glass TTY"). + +EXTERNAL@\Emulation is provided for by a routine in the system dependent +part of Kermit. Attempting to set this option without having and +externally supplied routine will returna "Not Implemented" error. + +OFF@\All characters are passed directly to the terminal without any +interpretation by Kermit. + +VT52@\When connected as a terminal +to a foreign host, the micro emulates a VT52. +VT52 emulation is set by default, except on micros +that already have terminal functionality built in, such as the DEC VT180 and +DECmate (these act as @index<VT100 Emulation>VT100-@|series terminals). Some +systems emulate other terminals, like the ADM3A; see table @ref<-cpmterms>. + +QUIET@\Do not display any file transfer information onto the console. +This mode is useful if you console takes a long time to update the display. +Only the file name is displayed. DEBUGging information is not displayed +even if selected. + +REGULAR@\Inverse of QUIET. All packets etc displayed, as ususal. +@end<description> + +@Index[TIMER]TIMER ON (or OFF)@\Enable or disable the "fuzzy timer". The timer +is off by default, because in the normal case KERMIT-80 is communicating with a +mainframe KERMIT that has its own timer. Mainframe KERMIT timers tend to be +more precise or adaptable to changing conditions. You should SET TIMER ON if +you are communicating with a KERMIT that does not have a timer. You should SET +TIMER OFF if you are communicating over a network with long delays. + +@Index[USER]USER @i<user-number> +@\Sets another user number to be active. +Acceptable user numbers are 0 to 31, though it is recommended to use +user numbers 0 to 15 only. +This is really only useful for Winchester Systems with high disk capacities. + +@Index[Warning]WARNING ON (or OFF)@\Warn user of filename conflicts when +receiving files from remote host, and attempt to generate a unique name by +adding "@q<&>" characters to the given name. ON by default, which is +equivalent to SET COLLISION RENAME. +@end<description> + +@Index[Show]SHOW@\Display all settable parameters. You will get a page or so +of the status af all parameters that can be set using the SET command. + +@Index[Status]STATUS@\The same function as Show. + +STAY@\Equivalent to SET NO-EXIT. + +@Index[Take]TAKE @i<filespec>@\Take characters and commands from the +specified file as if they were entered from the keyboard. +This is useful if you want to set up a batch job. A command +file can send, get, receive, set functions +etc automatically. A TAKE command can be interrupted with ^C. + +@\An automatic "TAKE KERMIT.INI" is executed from the default drive +when Kermit-80 is loaded. This can be used to set defaults of band rate, +parity, filetype, default drive etc. + +@\If KERMIT.INI does not exist, control is given directly to the user. + +@Index[TRANSMIT]TRANSMIT @i<filespec> @i<turnaround>@\Send the specified file +to the system on +the other end of the connection as though it were being typed at the terminal, +one line at a time. Each line sent is terminated with a carriage return, and +any line feeds are stripped from the file sent. +After each line has been sent Kermit waits for a character string +from the host (eg a acrriage return). If not specified, a carriage +return is assumed. No KERMIT protocol is involved. +An asterisk (star) is sent to the console for every line sent, to indicate +how the transfer is progressing. +This is useful for sending files to systems that don't have a +KERMIT program. During transmission, you may type one of these +single-@|character commands: +@begin<description,spread 0,leftmargin +4, indent -4> +Control-C@\Cease transmission, and drop into terminal emulation mode. + +CR@\(carriage return) Re-transmit the previous line. +@end<description> + +@Index[Type]TYPE filespec@\Type a local CP/M file or files on the CP/M screen. +A Control-C +will cancel the command and return to the Kermit prompt. A Ctrl-X will cancel +the current file and go on to the next one, if any. +Typing any other character +while the file is being displayed will suspend +the output. Another character will resume output. + +@Index[VERSION]VERSION@\Show the name, edit number, and edit date of several of +the modules that make up Kermit-80. + +@end<description> + +@section<Kermit-80 Flavors> +@Comment(begin<description, leftmargin -8, indent +2>) + +Many of the systems supported use an external terminal, rather than a built-in +console. Kermit may be further customized for these systems by defining +(at assembly time) the terminal type to be used. +If the terminal type is unknown or does not match any of the existing +terminal options, the generic "CRT" option may be selected. In this case, +Kermit cannot do fancy screen control during file transfer; it simply types the +file names, packet numbers, and messages in sequence across and down the +screen. This works best if you can put your micro or terminal in "autowrap" +mode; otherwise the packet numbers will pile up in the rightmost column; the +filenames and messages will always appear on a new line, however. +If no specific terminal has been selected, Kermit cannot do VT52 emulation; +it can act +as a "dumb terminal" (sometimes called a "glass TTY"), or else its own built in +terminal firmware provides cursor control functions independent of the Kermit +program. + +@subsection<Generic Kermit-80> +@index<Generic Kermit-80>@index<8080> "Generic Kermit-80" is an implementation +of Kermit that should run on any 8080-@|compatible CP/M 2.2 system with no +modification +at all, or perhaps only a minor one. Unlike other Kermit-80 implementations, +it contains no system-@|dependent manipulation of the serial port. +All I/O is done with standard CP/M BIOS@index<BIOS> calls, and I/O redirection +is done using the CP/M IOBYTE function, which, according to the Digital +Research @i<CP/M Operating System Manual>, is an optional feature of any +particular CP/M implementation. If your system does not provide the IOBYTE +function, Generic Kermit-80 will not work; furthermore, not all systems that +implement IOBYTE do so in the same way. +The SET PORT command may be used to select the devices to be used for input +and output. Table @ref<-cpmports> lists the options to the SET PORT command +and their effects. + +@begin<table,use example,centered> +@bar() +@blankspace(1) +@ux(SET PORT @i<xxx>) @ux(input from) @ux(output to) + CRT CRT: CRT: + PTR PTR: PTP: + TTY TTY: TTY: + UC1 UC1: UC1: + UR1 UR1: UP1: + UR2 UR2: UP2: +@caption<Kermit-80 SET PORT Options> +@tag<-cpmports> +@bar() +@end<table> + +The default is SET PORT PTR. +In all cases, the console (CON:) and list (LST:) devices used are those +selected when Kermit is started. + + The reason all Kermit-80 implementations aren't +generic is that a good deal of speed is sacrificed by getting all services from +the operating system. While a specific implementation of Kermit-80 may be able +to operate at 4800, 9600, or even 56 Kilo baud, +generic Kermit will fail to work +on some systems at speeds in excess of 1200 baud. In addition, many features +of Kermit require more specific knowledge of the hardware involved. Generic +Kermit cannot send a BREAK signal, or change the baud rate, for example. + +@subsection<CP/M 3 Kermit> + +CP/M-3 Kermit (also known as CP/M-Plus Kermit) is a version of generic +Kermit-80, and should run on most CP/M-3 (CP/M-Plus) systems. It uses the +auxilliary port (AUX:) to communicate to the remote Kermit. The SET BAUD +and SET PORT commands are not supported; nor can a BREAK be sent. +Like generic Kermit-80, a terminal may be selected at assembly time. + +@subsection<System-Specific Versions> + +There are also many versions of Kermit-80 tailored to specific systems. +Most of these operate uniformly, but some of them take advantage (or suffer +limitations) of the specific system. Here are some of the special features +for particular systems: + +@begin<description, leftmargin +4, indent -4> +@ux<Amstrad>: -- Two versions: + +@begin<description, leftmargin +4, indent -4> +PCW 8256@\The PCW 8256/8512 with the serial inerafce attached. + +CPC 6128@\The 664 with add on memory and 6128 are both supported. +Both systems must run CP/M Plus, so the 664 will need an add on RAM pack +and CP/M upgrade. A high speed transfer rate of 38k baud can be used +between Amstrad computers. +@end<description> + +@ux<ACCESS>:@\Access Matrix computer using port J5. Supports SET +BAUD-RATE for rates of 300-9600 baud. + +@ux<Apple II> -- four variations: +@begin<description,leftmargin +4,indent -4> +APMMDM:@\Apple with Z80 Softcard and Micromodem II in slot 2 +Dialout capability provided in connect command; user is prompted for +phone number if carrier is not present. During connect mode, +@q(^]D) drops carrier. BYE command also causes carrier to be dropped. + +AP6551:@\Apple with Z80 Softcard, and one of several 6551-based +communication cards; the slot number is a compile-time parameter +(default is slot 2). SET BAUD-RATE supported; speeds are 110-19200 +baud. + +APCPS:@\Apple with Z80 Softcard and CP Multi-Function Card. The slot +number is again a compile-time parameter. SET BAUD-RATE is supported +for baud rates from 50 baud to 19200 baud. + +AP6850:@\Apple II with Z80 Softcard and a 6850-based USART in slot 2-the +slot being a compile-time parameter. SET BAUD-RATE is not supported. +@end<description> + +@ux<BBC>:@\Acorn Computers BBC Computer with Acorn Z80 second +processor running CP/M-80. Supports SET BAUD-RATE and can send breaks. + +@ux<BigBoard II>:@\Uses serial port A. To use port B, change mnport, mnprts, +and baudrt and reassemble. Can generate BREAK. SET SPEED supported; +speeds are 300-38400 baud. + +@begin<multiple> +@ux<Cifer>:@\Originally coded for Cifer 1886 using the VL: port set +as TTYI: and TTYO: but works successfully on 18xx and 28xx +series machines. + +There are now two versions, each with two variations: Either running +CP/M Version 2.2 or 3.0, and either using the VL: or AUX: ports. The VL: +port version can only use seven bits of data, so parity prefixing is +required for binary file transfers. This restriction is removed by +using the AUX: port. For those interested, the problem is due to the +interprocessor link between the video and CPU (!) boards. The VL: port +is on the video board, and the AUX: port on the CPU board, +and the inter processor link can only transfer seven bits of data. + +Supports SET SPEED, and can generate breaks on +some models with a BREAK key. +@end<multiple> + +@ux<Comart>:@\Comart Communicator-Similar to Northstar +equipment. Can generate BREAK. + +@ux<Compupro>:@\Based on Kermit 3.x, and has been merged into V4.09 + +@ux<CPT-85xx word processors>:@\Can generate BREAK. SET SPEED supported; +speeds are 50-9600 baud. + +@ux<Cromemco>:@\Cromemco computers with TU-ART card. Supports SET +BAUD-RATE (110-9600 baud). + +@ux<DEC DECmate II word processor (with Z80 card)>:@\Can generate BREAK. + +@ux<DEC VT180 (Robin)>:@\Three output ports, referred to as COMMUNICATIONS, +GENERAL, and PRINTER. Can generate BREAK. + +@ux<Digicomp Delphi 100>:@\SET SPEED supported; speeds are 50-19200 baud. + +@ux<Discovery>:@\Action Computer Enterprises "Discovery" Multi-user +Computer. Uses Port B on an 83U user board. Supports SET SPEED +for 50-19200 baud. Can generate BREAK. + +@ux<Epson>:@\Epson PX-8 with LCD display. Although it is quite different +in displaying of Packet Information, it works as any other CP/M-80 Kermit. +Supports SET SPEED and can generate BREAK. + +@ux<Generic Kermit>:@\Two versions, one for CP/M version 2@q<.>2 and +version 3. These systems use IOBYTE flipping (V2@q<.>2) and the AUX: +device to communicate to the serial line. You may have to SET PORT xxx +before the version 2@q<.>2 will work, as Kermit needs to know what device +is the serial line. + +@ux<Genie>:@\Eaca Video Genie. + +@ux<Heath>: Three Versions: +@begin<description,leftmargin +4,indent -4> +H8QUAD@\for Heath-8 systems with the quad io board. This system has been +derived from V3.x code. Note that this version will not run "as is" on H89 +systems. + +H89@\For Heath-89 machines suports baud rates from 50 to 56,000 baud. + +Z100@\For Z-100 running CP/M-85. This version does not support +setting of baud rates. + +@end<description> + +@ux<Intertec Superbrain>: Two Versions: +@begin<description,leftmargin +4,indent -4> +BRAINA@\For superbrain using AUX port. Breaks and SET BAUD both supported + +BRAINM@\As above, but using the MAIN port. +@end<description> + +@ux<Ithaca>:@\Ithaca Intersystems based computer using the VIO card for +all IO to the outside world. The system is strictly speaking a +home-brew variant of the Ithaca machine, using an S100 cardcage +without a front panel. It uses the Extended BIOS by EuroMicro of London. +However, I see no reason for this version not running on a genuine +Ithaca Intersystems machine. There are patches needed to the EuroMicro +BIOS to make this version work. + +@ux<Kaypro:>@\Should work on most Kaypro models, as well as some related +systems (Ferguson BigBoard I, Xerox 820). For the newer Kaypros with multiple +ports, Kermit uses the one labeled "serial data"; it cannot use the serial +printer or internal modem ports (but it should be possible to modify the values +for mnport, mnprts, and baudrt to do this). Can generate BREAK. SET SPEED +supported; speeds are 50-19200 baud. + +@ux<Lobo>:@\Lobo MAX-80. Supports SET SPEED and can generate BREAKS. + +@ux<Merlin>:@\British Telecom Merlin M2215 (also Rair Black Box, possibly +also the ICL PC?). Requires a terminal. + +@ux<Microbee>:@\Microbee Systems computer made in Australia. Works on +Microbee 56K (Series 2 APC), 64K (Computer in a Book), 128K (Dynamic), and +256K (256TC). Can generate BREAK. SET BAUD-RATE supported; speeds are +75-9600. All serial I/O is via software, not hardware. Simultaneous transmit +and receive possible on all speeds except 75/1200, 1200/75, 4800, and 9600. + +@ux<Micromate>:@\PMC 101 Micromate. Supports SET SPEED and can +generate BREAK. + +@ux<Micromint>: Two versions +@begin<description, leftmargin +4, indent -4> +S6@\The Ciarcia/Micromint sb-180 board with a 6Mhz procoessor. System +requires a terminal. + +S9@\As above, but with a 9Mhz processor. +@end<description> + +@ux<NCR>:@\Decisionmate 5. Uses the 2651 and is largely +the same as the Ithaca Intersystems machine implementation. + + +@ux<Northstar>: -- There are four versions available: +@begin<description,leftmargin +4,indent -4> +NORTHS:@\Northstar Horizon with HS10-4 board. Supports SET SPEED +and SET PORT. + +HORIZON:@\Northstar Horizon using the serial ports on the Mother +board. Can generate BREAK. + +BASICNS:@\Basic Northstar Horizon using the printer port. +Can generate BREAK. + +ADVANT:@\Northstar Advantage. Supports SET SPEED and can +generate BREAK. Traps Control-0 in the system filter. +@end<description> + +@ux<Morrow Decision I>:@\Uses the Multi-I/O board. Port 1 is the console, port +3 is the communications line. SET SPEED supported; speeds are 75-56000 +baud. + +@ux<Morrow Micro Decision I>:@\ + +@ux<Nokia MicroMikko>:@\ +Will not echo control-O (which locks keyboard). SET SPEED +supported; speeds are 75-9600 baud. + +@ux<Ohio Scientific>:@\Doesn't have screen control. + +@ux<Osborne 1>:@\Uses serial line, not internal modem. Left-arrow +key generates +<DEL> ("delete" or "rubout" character) during connect mode. SET SPEED +supported; speeds are 300 and 1200 baud. Now supports multi-sector buffering. + +@ux<Research Machines>: Two Versions: +@begin<description,leftmargin +4,indent -4> +RM380ZM:@\380Z and 5.25" disks supports SET BAUD.RATE + +RM380ZF:@\380Z and 8" disks, otherwise as above. +@end<description> + +@ux<Sanyo>:@\Sanyo MBC-1100. This version derived from Kermit V3.x + +@ux<ScreenTyper>:@\Details unkown. + +@ux<TRS-80>: Three versions: +@begin<description,leftmargin +4,indent -4> +TRS80LB:@\TRS-80 with Lifeboat CP/M + +TRS80PT:@\TRS-80 with Pickles and Trout CP/M + +TRSM4:@\TRS-80 Model 4 with Montezuma CP/M +@end<description> + +@ux<Teletek>:@\Teletek Systemaster. Supports SET BAUD. + +@ux<Telcon>:@\TELCON ZOBRA portable computer. + +@ux<Torch>:@\Torch Unicorn 5 initially, but the code runs on other +Z80 based CP/N (as in Nut!) systems. It uses the BBC Computer as a +"Base processor", and is similar to the BBC version. The base processors +RS423 port is used rather than any built in Modem. +(UK telecoms legislation effectively makes modem control software +tricky business...). Two potential versions exist-one using cursor +positioning codes for a MCP and CCCP ROM combination of revision less +than 1.00, the other version uses the additional facility MCP/CCCP +versions greater than 1. Supports SET SPEED and can generate BREAKs. + +@\Note that binary files must be transferred using SET PARITY to anything +other than NONE! Parity is neither generated nor checked. + +@ux<US Micro Sales>:@\S-100-8 based computer. + +@ux<Vector Graphics>:@\Vector + +@ux<Xerox>:@\Xerox 820. + +@ux<Z80MU>:@\Development Kermit on a PC running the Z80MU Z80 and CP/M 2@q<.>2 +development system. Allows development of the system independent modules +to be done on an IBM PC or clone. Also allows the generation of new .HEX +files, that may then be KERMITed to the target system. Note: Not all +the BDOS or BIOS routines are supported, so avoid "unusual" BIOS/BDOS calls. +(For example, DIR from within Kermit will fail as one of the BIOS routines +returning disk parameters is not supported.) +@end<description> + +@section<Installation of Kermit-80> + +Kermit-80 was written originally for the Intertec SuperBrain in +lowest-@|common-@|denominator @Index[8080] 8080 code with the standard +assembler, ASM (single source module, no macros, no advanced instructions), so +that it could be assembled on any CP/M-80 system (the 8080 assembler is +distributed as a standard part of CP/M-80, whereas the fancier Z80@Index[Z80] +or macro assemblers are normally commercial products). It has since been +modified to run on many other systems as well. Kermit-80 should be able to run +on any 8080-, 8085- or Z80-@|based microcomputer under @Index[CP/M] CP/M with +appropriate minor changes to reflect the port I/O and screen control for the +system (see below). + +The proliferation of new systems supported by Kermit-80 made the program grow +so large and complicated that it had to be broken up into system-@|independent +and system-@|dependent modules, as of version 4 (this was done by Charles +Carvalho of ACC). Each module is composed of multiple files. This has reduced +the time and disk space necessary for assembly; Kermit-80 may once again be +assembled on a CP/M system with roughly 250Kbytes of space. The majority of +the code does not need to be reassembled to support a new system. +Unfortunately, it can no longer be assembled with ASM, since ASM does not +support multiple input files. To allow it to be assembled on any CP/M system, +the public-domain assembler LASM is included in the distribution kit. Kermit-80 +may also be assembled with Microsoft's M80 (not supplied). In theory, any 8080 +assembler supporting the INCLUDE directive ought to work, as well. + +All versions of Kermit-80 are assembled from the same set of sources, with +system dependencies taken care of by assembly-@|time conditionals within the +system-@|dependent module (eventually, the system-@|dependent module will +itself be broken up into multiple files, one for each system). The most +important system dependencies are terminal emulation (when CONNECTed to the +remote host) and screen handling, which are dependent on the individual micro's +escape codes (these features are table driven and easily modified for other +CP/M systems), and the lowest level I/O routines for the serial communications +port. The port routines are best done only with BDOS calls, but some systems +do not allow this, primarily because the BDOS routines strip the parity bit +during port I/O, and the parity bit is used for data when transmitting binary +files. + +Kermit-80's I/O routines must check the port status and go elsewhere if no +input is available; this allows for virtual 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. + +@index<Timeout> +CP/M-80 KERMIT versions 3.8 and later include a "fuzzy timer" that allows a +timeout to occur after an interval ranging from 5 to 20 seconds (depending upon +the speed of the processor and the operating system routines) during which +expected input does not appear at the port. In this case, retransmission +occurs automatically. In any case, you may type a carriage return during +transmission to simulate a timeout when the transfer appears to be stuck. + +@subsection<Organization of Kermit-80> +Kermit-80 consists of two modules, each of which is generated from multiple +source files. The first module contains the system-@|independent code; +the second module is configured for a particular system and merged with +the system-@|independent module to produce a customized Kermit-80. + +The distribution kit contains: +@begin<itemize,spread 0> +the system-@|independent module, @q<CPSKER.HEX>; + +the system-@|dependent modules, @q<CPV*.HEX> (see table @ref<-cpmsystems1> +and @ref<-cpmsystems2>); + +the source files, @q(CPS*.ASM) and @q(CPX*.ASM), + +the public-domain CP/M assembler, @q<LASM.*>, + +the public-domain CP/M load/patch utility, @q<MLOAD.*> +@end<itemize> + +@Comment(NewPage<> added for local manual) +@begin<table,use verbatim,leftmargin +0> +@bar() +@blankspace(1) +@u(Symbol Filename System) +@blankspace(0.25) +ACCESS CPVACC @r<Access Matrix> +ADVANT CPVADV @r<Northstar Advantage> +AP6551 CPVAPL @r<Apple II, Z80 Softcard, 6551 ACIA in serial interface> +AP6850 CPVA65 @r<Apple II, Z80 Softcard, 6850 ACIA in Serial Iiterface> +APMMDM CPVAPM @r<Apple II, Z80 Softcard, Micromodem II in slot 2> +APCPS CPVCPS @r<Apple II, Z80 Softcard, with CPS multifunction card> +BASICNS CPVBNS @r<Northstar Horizon (terminal required)> +BBC CPVBBC @r<Acorn "BBC" computer with Acorn Z80 second processor> +BBII CPVBB2 @r<BigBoard II (terminal required)> +BRAINM CPVBRM @r<Intertec Superbrain using the main port> +BRAINA CPVBRA @r<Intertec Superbrain using the Aux port> +CIFER2 CPVCIF @r<Cifer 1886 using the VL: Serial port and CP/M V2.2> +CIFER3 CPVCI3 @r<Cifer 1886 using the VL: Serial port and CP/M V3.0> +CIFER2 CPVCA2 @r<Cifer 1886 using the AUX: Serial port and CP/M V2.2> +CIFER3 CPVCA3 @r<Cifer 1886 using the AUX: Serial port and CP/M V3.0> +CMEMCO CPVCRO @r<Cromemco with TU-ART card. Terminal required)> +COMART CPVCOM @r<Comart Communicator (terminal required)> +COMPRO CPVPRO @r<Compupro with Interfacer 4 (or 3). Terminal required.> +CPC CPVCPC @r<Amstrad CPC 664 and 6128 and CP/M 3> +CPM3 CPVCP3 @r<"Generic": CP/M 3.0 (CP/M Plus) systems (terminal req'd)> +CPT85XX CPVCPT @r<CPT-85xx wordprocessor with CP/M> +DELPHI CPVDEL @r<Digicomp Delphi 100 (terminal required)> +DISC CPVDIS @r<Action Computer Enterprises "Discovery" (terminal req'd)> +DMII CPVDM2 @r<DECmate II with CP/M option> +GENER CPVGEN @r<"Generic": CPM 2.2 systems with IOBYTE (terminal req'd)> +GENIE CPVGNI @r<Video Genie> +H8QUAD CPVH8Q @r<Heath-8 with Quad 8 i/o board> +HEATH CPVH89 @r<Heath/Zenith H89> +HORIZON CPVHOR @r<Northstar Horizon (terminal required)> +KPII CPVKPR @r<Kaypro-II (and 4; probably supports all Kaypro systems)> +LOBO CPVLBO @r<Lobo Max-80> +@begin<text,facecode R,above 1> +"symbol" is the symbol used to select the target system, in @q<CPVTYP.ASM>; + +"filename" is the name under which the module is supplied in the distribution. +@end<text> +@caption<Systems supported by Kermit-80 (Part 1)> +@bar() +@tag<-cpmsystems1> +@end<table> + + +@Comment(NewPage<> added for local manual) +@begin<table,use verbatim,leftmargin +0> +@bar() +@blankspace(1) +@u(Symbol Filename System) +@blankspace(0.25) +M2215 CPVMRL @r<British Telecom Merlin/Rair Black Box (terminal required)> +MBEE CPVBEE @r<Microbee> +MDI CPVMDI @r<Morrow Decision I (terminal required)> +MIKKO CPVMIK @r<MikroMikko> +MMATE CPVMM @r<PMC 101 Micromate (terminal required)> +MMDI CPVUD @r<Morrow Micro Decision I (terminal required)> +NCRDMV CPVDMV @r<NCR Decision Mate V. (Terminal required?)> +NORTHS CPVNS @r<Northstar Horizon with HSIO-4 card (terminal req'd)> +OSBRN1 CPVOSB @r<Osborne 1> +OSI CPVOSI @r<Ohio Scientific> +PCI2651 CPVPCI @r<Ithaca Intersystems with VI0 card (terminal required)> +PCW CPVPCW @r<Amstrad PCW 8256/8512 with serial interface> +PX8 CPVPX8 @r<Epson PX-8> +RM380ZM CPVRMM @r<Research Machines 380Z with MDS (5.25" discs)> +RM380ZF CPVRMF @r<Research Machines 380Z with FDS (8" discs)> +ROBIN CPVROB @r<DEC VT180> +S1008 CPVUSM @r<US Microsales S-100-8 (terminal required)> +SANYO CPVSAN @r<Sanyo MBC-1100> +SB6 CPVSB6 @r<Micromint SB-180 with 6Mhz CPU (terminal required)> +SB9 CPVSB9 @r<Micromint SB-180 with 9Mhz CPU (terminal required)> +SCNTPR CPVSCN @r<Screentyper> +TELCON CPVTEL @r<TELCON Zobra portable> +TELETEK CPVTET @r<Teletek Systemaster> +TORCH CPVTRC @r<Torch computers BBC-B with Z80 second processors> +TRS80LB CPVTLB @r<TRS-80 model II with Lifeboat 2.25C CP/M Display> +TRS80PT CPVTPT @r<TRS-80 model II with Pickles + Trout CP/M Display> +TRSM4 CPVTM4 @r<TRS-80 model IV> +VECTOR CPVVEC @r<Vector Graphics> +XER820 CPVXER @r<Xerox 820> +Z100 CPVZ00 @r<Z-100 under CP/M-85> +Z80MU CPVZ80 @r<Z80MU development system on a PC> +@begin<text,facecode R,above 1> +"symbol" is the symbol used to select the target system, in @q<CPXTYP.ASM>; + +"filename" is the name under which the module is supplied in the distribution. +@end<text> +@caption<Systems supported by Kermit-80 (Part 2)> +@bar() +@tag<-cpmsystems2> +@end<table> + +@Comment(NewPage added for local manual) +@NewPage() +@begin<table,use verbatim,leftmargin +0> +@bar() +@blankspace(1) +@u(Symbol Terminal type) +@blankspace(0.25) +CRT @r<Dumb terminal type. Does not do cursor addressing> +ADM3A @r<Lear Seigler ADM 3A> +ADM22 @r<Lear Seigler ADM 22> +AM230 @r<Ampro 230> +H1500 @r<Hazeltine 1500> +SMRTVD @r<Netronics Smartvid> +SOROQ @r<Soroq IQ-120> +TVI912 @r<Televideo 912> +TVI925 @r<Televideo 925 or Freedom 100> +VT52 @r<Dec VT52 or equivalent (H19)> +VT100 @r<Dec VT100 or equivalent> +WYSE @r<Wyse 100> +@begin<text,facecode R,above 1> +"symbol" is the symbol used to select the target system, in @q<CPXTYP.ASM>; + +"Terminal type" is the type of terminal "symbol" selects. +@end<text> +@caption<Terminals supported by Kermit-80> +@bar() +@tag<-cpmterminals> +@end<table> +@Comment(NewPage<> removed again) + +@Comment<for Installation of kermit-80> + +@subsection<Downloading Kermit-80> + +You'll need either a pre-configured @q<.COM> file or the system-@|independent +module, @q<CPSKER>, in binary (@q<.COM>) or hex (@q<.HEX>) format and the +system-@|dependent overlay for your system (from Tables @ref<-cpmsystems1> and +@ref<-cpmsystems2>). If +your system is not listed in the table, get the generic CP/M 2@q(.)2 Kermit or +the generic CP/M 3 Kermit. If you already have a version of Kermit on your +micro and you want to install a new version, simply use your present version to +get the new files. Transfer the files to your system and skip ahead to +"merging the modules". + +If you do not have a copy of Kermit on your micro, and you cannot borrow a +Kermit floppy but you do have access to a mainframe computer with a copy of the +Kermit-80 distribution, you should read this section. + +@Index[Bootstrapping CP/M Kermit]@index<Downloading> + There are several ways to get CP/M Kermit from a host system to your micro. +The easiest is to "download" the necessary "hex" files into your micro's +memory and then save them on the disk. If you have a terminal emulator program +on your micro which can save a copy of the session to disk, connect to your +host, and type the necessary files. Exit from the emulator, saving the +session log, and edit the session log to extract the hex files. Skip ahead to +"merging the files". + +The following is a procedure which, though far from foolproof, should allow you +to get a version of Kermit to your CP/M based micro. It depends upon the host +prompt, or at least the first character of the host prompt, being some +character that cannot appear in a hex file (the valid characters for hex files +are the digits 0-9, the upper case letters A-F, the colon ``@q<:>'', carriage +return, and line feed). As soon the prompt character is encountered, the +transfer will terminate. If your host does not issue a prompt that will +accommodate this scheme, you can achieve the same effect by adding an atsign +``@@'' to the very end of the hex file before sending it from the host. The +program below looks for an atsign (the normal DEC-20 prompt, hex 40). +DECSYSTEM-10 users would look for a dot, hex 2E; VAX/VMS or UNIX users would +look for a dollar sign, hex 24; UNIX C-Shell users would look for a percent +sign, hex 26. + +@Begin <Enumerate> +For CP/M 2@q<.>2 systems, connect to a floppy disk with plenty of free space. +Run DDT and type in the following (the comments should not be typed in; +they are there just to tell you what's happening): (Note that this wont work +for CP/M Plus or 3@q<.>0 systems!) +@Begin<figure, use Example, leftmargin +0> +@bar() +@blankspace(0.25) +-a100 ;Begin assembling code at 100 +0100 LXI H,2FE ;Where to store in memory +0103 SHLD 200 ;Keep pointer there +0106 MVI E,D ;Get a CR +0108 MVI C,4 ;Output to PUNCH (send to HOST) +010A CALL 5 +010D MVI C,3 ;Input from READER (read from HOST) +010F CALL 5 +0112 ANI 7F ;Strip parity bit +0114 PUSH PSW ;Save a and flags +0115 MOV E,A ;Move char to E for echo +0116 MVI C,2 ;Output to screen +0118 CALL 5 +011B POP PSW ;Restore A and flags +011C CPI 40 ;(or 4E,24,26,etc) System prompt? +011E JZ 127 ;Yes, have whole file in memory +0121 CALL 17A ;No, store another byte +0124 JMP 10D ;Read another byte +0127 MVI A,1A ;Get a Control-Z (CP/M EOF mark) +0129 CALL 17A ;Store it in memory +012C LXI H,300 ;Get memory pointer +012F SHLD 202 ;Store as DMA pointer +0132 LDA 201 ;Get 'HI' byte of memory pointer +0135 STA 200 ;and store it as 'LO' one +0138 XRA A +0139 STA 201 ;Zero 'HI' byte (slow *256) +013C MVI C,16 ;Make NEW file +013E LXI D,5C ;With FCB1 +0141 CALL 5 +0144 CALL 15E ;Write 128 bytes (sector) +0147 CALL 15E ;Write another sector +014A LXI H,FFFF ;Get a 16-bit Minus One +014D XCHG ;into DE +014E LHLD 200 ;Get 256-byte counter +0151 DAD D ;Decrement +0152 SHLD 200 ;and store back +0155 MVI A,2 ;Check if +0157 CMP L ; 256-byte counter down to offset +0158 JZ 183 ;Yes, we're done +015B JMP 144 ;Keep writing.. +015E LHLD 202 ;Get file-pointer +0161 XCHG ;into DE +0162 MVI C,1A ;Set DMA-address +0164 CALL 5 +0167 MVI C,15 ;Write sector (128 bytes) +0169 LXI D,5C ;using FCB1 +016C CALL 5 +016F LHLD 202 ;Get file-pointer +0172 LXI D,80 ;128-bytes +0175 DAD D ;added to file-pointer +0176 SHLD 202 ;and save +0179 RET ;and return +017A LHLD 200 ;Get Memory-pointer +017D MOV M,A ;Store character +017E INX H ;Increment Pointer +017F SHLD 200 ;and save +0182 RET ;and return +0183 MVI C,10 ;CLOSE file +0185 LXI D,5C ;using FCB1 +0188 CALL 5 +018B JMP 0 ;Force WARM BOOT +0179 +-^C ;(Type Control-C) Return to CP/M +A>SAVE 1 FETCH.COM ;Save program, we need to run it twice. +@caption<Bootstrap program for Kermit-80 and CP/M Version 2.2> +@bar() +@tag<-cpmboot> +@end<Figure> +Alternatively, an assembler source file for this program is distributed +with CP/M Kermit as @q<CPKFET.ASM>. You might prefer to type the assembler +version in and assemble and load it (ASM CPKFET, LOAD CPKFET, or MASM CPKFET, +MLOAD CPKFET), to let the assembler and loader catch any typing errors. + +Connect to your host using a terminal or a terminal emulation program. Ensure +that your host does not have your terminal in "page mode" (does not pause +at the end of each screenful). + +Tell the host to display the first hex file (the system-independent module) +at your terminal, e.g. give a command like @q<TYPE CPSKER.HEX>, @i<@u(without) +a terminating carriage return>. + +Return to your micro by switching the cable from the terminal to the micro, +or by terminating the micro's terminal program. + +Make sure your IOBYTE is set so that @q<RDR:> and @q<PUN:> correspond to the +I/O port that is connected to the host (this would normally be the case +unless you have done something special to change things). + +Load the program you entered in the first step with DDT, and use it to capture +the first hex file: +@Begin<Example,Free> +DDT FETCH.COM +-icpsker.hex ;Setup FCB for file CPSKER.HEX +-g100,179 ;Execute the program. +@End<Example> +Now there should be a file @q<CPSKER.HEX> on your connected disk. + +Return to the host, and tell it to display the second hex file (the +system-@|dependent module for your configuration). Again, do not type the +terminating carriage return. + +Return to your micro, and run the capture program again: +@Begin<Example,Free> +DDT FETCH.COM +-icpxovl.hex ;Setup FCB to create CPXOVL.HEX +-g100,179 ;Execute the program. +@End<Example> +Now there should be a file @q<CPXOVL.HEX> on your connected disk. Replace +@q<CPXOVL.HEX> in this example with the appropriate overlay file for your +system. +@end<enumerate> +Merging the files: +@begin<enumerate> +For purposes of illustration, we will assume the system-@|dependent overlay is +called "cpxovl@q<.>hex". The two hex files may be combined with MLOAD or DDT. +If you already have a running Kermit, you can transfer @q<MLOAD.HEX> to your +system and create @q<MLOAD.COM> by running LOAD. If you're bootstrapping +Kermit, you could transfer @q<MLOAD.HEX> to your system the same way you got +the other two @q<.HEX> files, but it's probably simpler to use DDT to get +Kermit running, and get MLOAD later if you need it. + +Using MLOAD, the two pieces may be easily merged: +@begin<example> +A>@ux(mload kerm411=cpsker,cpxovl) +@i[(Some messages about program size, etc...)] +A> +@end<example> + +If you don't have MLOAD running, it's a bit more complex: +@begin<example> +A>@ux<ddt cpsker.hex> +NEXT PC +3500 0100 +-@ux<icpxovl.hex> +-@ux<r> +NEXT PC +xxxx 0000 +-@ux<^C> +A>@ux<save @i(dd) kerm411.com> +@end<example> +The page count ("dd") used in the SAVE command is calculated from the last +address ("xxxx") given by DDT in response to the R command: drop the last two +digits and add 1 if they were not zero, then convert from hexadecimal (base 16) +to decimal (base 10): 684F becomes 69 hex, which is 105 decimal (5 times +16 plus 9) -- but 6700 becomes 67 hex, or 103 decimal (consult an +introductory computing book if you don't understand number base conversion). + +If you are using the Z80MU CP/M and Z80 development toolkit on an IBM PC +or clone, then follow the same instructions as for a genuine CP/M system. +When you have loaded your file, you will have to ship the .COM or two +.HEX files to the target CP/M system. (Possibly using a previous +issue of Kermit?) + + +Note that CP/M hex files have checksums on each line. If there were any +transmission errors during the downloading process, MLOAD or DDT will notice a +bad checksum and will report an error (something like "Illegal Format"). If +you get any errors during loading, either fix the hex file locally with an +editor, or repeat the transfer. + +@End<Enumerate> + +You now should have a running version of Kermit-80, called @q<KERM411.COM>. + +Test your new Kermit by running it. If it gives you a prompt, it might be +OK. (don't delete your old one yet...). Instead of a prompt, you could get +one of two messages indicating that the configuration information is invalid: +@example<?Kermit has not been configured for a target system> +or +@example<?Consistency check on configuration failed> +Of course, neither of these messages should appear if you're building Kermit +from the distribution kit. The first message indicates that the overlay was +not found where the system-@|independent module expected to find it, probably +because the overlay address is incorrect; the second indicates that the version +of CPXLNK used in the system-@|dependent module is incompatible with the +system-@|independent module. + +Once you are satisfied that KERMIT40 works correctly, you should rename your +old @q<KERMIT.COM> to something else, like @q<OKERMIT.COM>, and rename +@q<KERMIT40.COM> to @q(KERMIT.COM). + +@subsection<Assembling Kermit-80 from the sources> + +Kermit-80 is built in two pieces from the following files: +@begin<description,spread 0> +@i(The system-independent files:) + +@q<@ @ CPSKER.ASM>@\header file + +@q<@ @ CPSDEF.ASM>@\definitions for both KERMIT and KERSYS + +@q<@ @ CPSMIT.ASM>@\initialization, main loop, miscellaneous commands +(BYE, EXIT, LOG, SET, SHOW, STATUS, and VERSION) + +@q<@ @ CPSCOM.ASM>@\second part of commands, status and set file + +@q<@ @ CPSPK1.ASM>@\part 1 of the KERMIT protocol handler +(SEND, RECEIVE, LOGOUT,and FINISH commands) + +@q<@ @ CPSPK2.ASM>@\part 2 of the KERMIT protocol handler + +@q<@ @ CPSREM.ASM>@\REMOTE routines (FINISH, BYE and LOGOUT in CPXPK*.ASM) + +@q<@ @ CPSSER.ASM>@\SERVER routines (for the future) + +@q<@ @ CPSTT.ASM>@\the transparent commands (TRANSMIT, CONNECT) + +@q<@ @ CPSCPM.ASM>@\CP/M commands (DIR, ERA, USER, TYPE, PRINT, COPY) + +@q<@ @ CPSWLD.ASM>@\the wildcard handler + +@q<@ @ CPSCMD.ASM>@\the command parser + +@q<@ @ CPSUTL.ASM>@\utility routines and data + +@q<@ @ CPSDAT.ASM>@\data space and the overlay definitions + +@q<@ @ CPXLNK.ASM>@\linkage area description + +@blankspace(1) +@i(The system-dependent files:) + +@q<@ @ CPXTYP.ASM>@\system selection + +@q<@ @ CPXLNK.ASM>@\system overlay specification and jump table + +@q<@ @ CPXCOM.ASM>@\common routines for all systems + +@q<@ @ CPXSWT.ASM>@\system selector or switcher + +@blankspace(1) +One of: + +@q<@ @ CPXSYS.ASM>@\family file for some system-specific code + +@q<@ @ CPXTOR.ASM>@\family file for Torch, Superbrain, PCI2651 etc + +@q<@ @ CPXNOR.ASM>@\family file for Northstar and Comart machines + +@q<@ @ CPXMRL.ASM>@\family file for British Telecom Merlin/Rair Black Box + +@q<@ @ CPXSB.ASM>@\family file for Micromint SB-180 systems + +@q<@ @ CPXCIF.ASM>@\family file for Cifer systems + +@q<@ @ CPXHEA.ASM>@\family file for Heath/Zenith systems + +@q<@ @ CPXAPP.ASM>@\family file for Apple II systems + +@q<@ @ CPXPCW.ASM>@\family file for Amstrad PCW 8256/8512 machines + +@q<@ @ CPXBBI.ASM>@\family file for BigBoard, Kaypro and Xerox 820 systems + +@q<@ @ CPXBEE.ASM>@\Microbee + +@q<@ @ CPXSYO.ASM>@\family file for Sanyo MBS-1100 systems + +@q<@ @ CPXTM4.ASM>@\family file for Tandy Model 4 with CP/M systems + +@q<@ @ CPXGNI.ASM>@\family file for Video Genie systems + +@q<@ @ CPXPRO.ASM>@\family file for Compupro systems + +@q<@ @ CPXZ80.ASM>@\family file for the Z80MU development system + +@blankspace(1) +and if you use a terminal, + +@q<@ @ CPXVDU.ASM>@\display codes for VDUs etc. Not always required +@end(description) +The system-@|independent module contains all of the system-@|independent files +except for @q(CPXLNK.ASM), which is assembled into the system-@|dependent +module to provide the structures needed to connect the two modules. As +distributed, the system-@|independent module is named @q(CPSKER.HEX). If you +have a copy of @q(CPSKER.HEX), you do not need to reassemble the +system-@|independent module to configure Kermit for your system. + +The system-@|dependent module consists of @Q(CPXTYP.ASM), @Q(CPSDEF.ASM), +@Q(CPXLNK.ASM), @q(CPXSWT.ASM), @q(CPSCOM.ASM), one of the family files +@Q(CPXSYS.ASM), @q(CPXTOR.ASM), @q(CPXMRL.ASM), @q(CPXSB.ASM), @q(CPXCIF.ASM), +@q(CPXHEA.ASM), @q(CPXBBI.ASM), @q(CPXTM4.ASM), @q(CPXGNI.ASM), @q(CPXNOR.ASM), +@q(CPXAPP.ASM), @q(CPXPCW.ASM), or @q(CPXPRO.ASM), and possibly @q(CPXVDU.ASM), +if your system uses a terminal for the console. One copy of the +system-@|dependent module is supplied already assembled for each supported +system; the filename may be obtained from tables @ref<-cpmsystems1> and +@ref<-cpmsystems2>. If a terminal is required for a system, a CRT (glass TTY +device) has been selected. + +After assembling the two pieces separately, they are combined with DDT or +MLOAD into a system-@|specific Kermit. + +If you want to rebuild the system-@|independent module, the only change you +may need to make is to select the assembler to be used, in @Q(CPSKER.ASM). +Define one of MAC80, M80, or LASM to TRUE to select it as the assembler; +the others should be defined FALSE. + +Assuming you have the Microsoft Macro Assembler package (M80/L80), you'll +need to do the following: +@begin<example> +A>@ux(m80 cpsker=cpsker.asm) +A>@ux(l80 /p:100,cpsker,cpsker/n/e) +@end<example> +This will produce @Q(CPSKER.COM). + +If you are using LASM instead, do this: +@example(A>@ux<lasm cpsker>) +LASM will generate @Q(CPSKER.HEX) and @Q(CPSKER.PRN). LASM allows options to +be specified in the same way as the standard assembler, ASM, so the command +@example[A>@ux(lasm cpsker.abz)] +will read the source files from drive A, send the @q(.HEX) file to drive B, +and suppress the listing file. + +If you are using the Z80MU development system on an IBM PC or clone, then +assemble your files using either LASM and MLOAD or M80 and L80, as if you +were using a genuine CP/M-80 system. Note that you will still have the +problem of transferring your assembled files to the target CP/M system. + +If you want to generate a system-@|dependent overlay for a particular system, +or want to change the terminal supported, you'll need to check three areas in +@Q(CPXTYP.ASM): + +First, the overlay start ADDRESS. The symbol "ovladr" is EQUated to the +address of "LNKFLG" in the system-@|independent module, as the starting address +of the overlay (7000H for version @value(-cpmversion)). You'll need to know +this value if you're building the overlay with M80/L80. You won't normally +need to change this value. + +Second, the assembler being used. Again, define one of MAC80, M80, and LASM +to be TRUE to select it, and define the others to be FALSE. The two modules +(system-@|independent and system-@|dependent) do not need to be built with the +same assembler. + +Third, the system configuration. Locate your system in tables +@ref<-cpmsystems1> and @ref<-cpmsystems2>, then define the appropriate symbol +TRUE, and the rest FALSE. If the system comes with a builtin console terminal, +define all the terminal switches FALSE. If the system uses an external +terminal as the console, locate the terminal in table @ref<-cpmterms> and +define the appropriate symbol TRUE, and the remainder FALSE. If the terminal +is not listed in table @ref<-cpmterms>, use the CRT switch; in this case, VT52 +emulation is not supported. + +In addition, there are a few general and system-@|specific symbols which may +be altered to fit your system: +@begin<description> +APSLOT@\For Apple with 6551 ACIA, defines the slot number of the serial card + +CPUSPD@\Processor speed in units of 100KHz (currently used only for bbII and + kpII for timing loops) + +TAC@\For users connecting through ARPAnet TACs: set to TRUE if you wish the +default TACTRAP status to be ON. (This may be overridden with the SET TACTRAP +command). If you're not connecting through a TAC, set tac to FALSE and ignore +tacval. + +TACVAL@\For ARPANET TAC users: defines the default TAC intercept character +(may be overridden with the SET TACTRAP command). +@end<description> + +If you are just assembling an existing configuration, you'll need to edit +@Q(CPXTYP.ASM) only. If you are adding support for a new system, you should +not modify @Q(CPSDEF.ASM) or @Q(CPXLNK.ASM); if you do, you'll have to change +the system-@|independent module also. Eventually, @Q(CPXSYS.ASM) will be split +into separate files, each of which will generate one or more related systems. +When this happens, you'll want to pick the one closest to your system to use as +a starting point. + +After editing @q<CPXTYP.ASM> as necessary, assemble and link the overlay as +follows: +@begin<itemize> +With M80 (where "xxxx" is the hex value of ovladr from @q<CPXLNK.ASM>): +@begin<example> +A>@ux<m80 cpxtyp=cpxtyp.asm> +A>@ux<l80 /p:xxxx,cpxtyp,cpxtyp/n/x/e> +@end<example> + +With LASM: +@begin<example> +A>@ux<lasm cpxtyp> +@end<example> +@end<itemize> + +With an IBM PC or clone using the Z80MU softwrae, follow the instructions +as if you were using a real CP/M system. + +The overlay (@q(CPXTYP.HEX)) may then be merged with the system-@|independent +module as described above (creating a runnable Kermit from the distribution +kit). + +If you are using the Z80MU +development system on a PC, and already have a running +Kermit-80 v3.9 or later, you can merge the two @q<.HEX> files into a @q<.COM> +file with LINK80 (TOPS 10/20), MLOAD (Z80MU), L80 (Z80MU), and +transfer the new @q<.COM> file to your micro with Kermit: +@begin<itemize> +Z80MU on a PC and MLOAD: +@begin<example> +@@@ux<MLOAD KERNEW=CPSKER,CPXTYP> +@end<example> + +Z80MU on a PC and C80: +@begin<example> +@@@ux<L80 /P:xxxx,CPXTYP,CPXTYP/N/X/E> +@end<example> +@end<itemize> +producing @Q(KERNEW.COM). + +@begin<table,leftmargin +0,use format> +@tabclear()@tabset(1.5in) +@bar() +@blankspace(1) +@u(Symbol)@\@ux<Terminal description> +crt@\Basic CRT, no cursor positioning +adm3a@\ADM3A Display or lookalike +adm22@\ADM22 Display or lookalike +am230@\Ampro 230 +h1500@\Hazeltine 1500 +smrtvd@\Netronics Smartvid-80 +soroq@\Soroq IQ-120 +tvi912@\TVI 912 +tvi925@\TVI 925, Freedom 100 +vt52@\VT 52 or VT52 emulator such as Heath H19, H29, etc. +vt100@\VT 100 or emulator (most ANSI terminals should work) +wyse@\Wyse 100 +@caption<Terminals known to Kermit-80> +@tag<-cpmterms> +@bar() +@end<table> + +@section<Adding Support For A New System> +Kermit-80 is built from a common set of source files; the system-@|dependent +module makes heavy use of conditional assembly (this complication will be +removed in future releases). The system dependencies arise from attempts to +answer some questions: +@begin<enumerate> +@i<What kind of terminal is to be supported?> +@blankspace(1) +For many micros, the console is an integral part of the system, but +others can use an external terminal. In either case, the commands +to manipulate the screen (position the cursor, erase the screen, etc) +must be defined. + +@i<How is the serial line accessed?> +@blankspace(1) +For systems supporting the IOBYTE function, this is straightforward; the +symbol "IOBYT" is defined TRUE. If the serial line is accessed with IN and OUT +instructions, it may be possible to use the simple I/O routines provided. In +this case, the symbol "INOUT" is defined TRUE, the MNPORT and MNPRTS are +defined to be the data and control addresses, respectively, and bit masks for +testing for "input data available" and "output buffer empty" must be defined. +If the interface is strange, leave IOBYT and INOUT set to FALSE, and provide +the I/O routines. + +@i<What initialization is necessary?> +@blankspace(1) +You may wish to set the baud rate or configure the serial line at +startup. Examples for a number of devices are present. + +@i<What special features are to be supported?> +@blankspace(1) +You may want to provide the capability to select one of several serial lines +with the SET PORT command, or to change the speed of the serial line with the +SET SPEED command. To do this, you'll need to build a command table, using +the systems already supported as examples. The ability to send a BREAK signal +is desirable. Again, examples for several different interfaces (ACIA, SIO, +etc) are present. + +@i<Do you want to design an external terminal type?> +@blankspace(1) +There is a jump entry in the overlay file to allow users to add their +own termainl emulator. If you write the code for such an emulator, +you must load this jump address with the address of your emulator, and +SET TERMINAL EXTERNAL from within Kermit. All characters will be passed +to this routine during connect mode. +@end<enumerate> + +@section<Notes on New Features in Kermit-80 Version 4> + +@begin<itemize> +@i(Debugging aids:) +SET DEBUG ON will add two fields to the SEND/RECEIVE display, labelled "Spack" +and "Rpack". These display the last packet sent and received. Of course, this +slows down the transfer, especially if the console is an external terminal. +SET DEBUG OFF removes these fields. The VERSION command displays the name, +edit number, and edit date of several of the modules that make up Kermit. + +@index<ARPAnet>@index<TAC> @index<Attention Character> +@index<Intercept Character> +@i(TAC support:) ARPAnet TACs (and many other communication devices such as +terminal concentrators, modems, port contention units, network PADs, etc) use a +printing character (like "@@") as an intercept character, to allow commands to +be issued to the TAC, or modem, etc. In order to send this character to the +host, it must be typed twice. The command "SET TAC CHARACTER" to Kermit +enables the "TACtrap" and asks the user to specify the TAC intercept character. +This character will be automatically doubled when it appears in Kermit protocol +messages (sent by the SEND or RECEIVE commands) or when it appears in a file +being sent with the TRANSMIT command. It is not automatically doubled when +typed by the user in CONNECT mode. "SET TAC ON" enables the TACtrap but does +not change the TAC intercept character, which is initially "@@". "SET TAC OFF" +disables the TACtrap. + +@i(File buffering:) +Previous versions of Kermit-80 buffered only one sector (128 bytes) at a time +during file transfer operations. This version buffers 16Kbytes at a time, +reducing the number of times the floppy drive must be spun up and down, and +increasing the effective throughput of the link. If the disk transfer rate is +too slow, however, the remote Kermit may time out and retransmit packets. This +will show up on the screen in the "Retries:" field; if this occurs after disk +activity, you may want to increase the timeout value on the remote Kermit, +SET BUFFER <new value> while in Kermit,or +reassemble Kermit with a smaller value for MAXSEC (in @Q(CPSDEF.ASM)) +This buffer is also used by the TRANSMIT command; the log file +enabled by the LOG command is still written a sector at a time. +@end<itemize> + +@Comment<for Assembling Kermit-80) + +@section<Specification for Kermit-80 System Dependent Modules> + +This section is intended for people wanting to implement their own +versions of Kermit-80 for computers not already defined. + +The system independent code communicates to routines for a specific +system through a set of tables. These tables are defined in +CPXLNK.ASM, and should not be modified between revisions of Kermit. If +an entry is added or deleted, then the whole of Kermit-80 +needs reassembling. Make sure that the changes to CPXLNK.ASM are +duplicated in CPSUTL.ASM, which has the system independent +equivalent of CPXLNK.ASM. + +The following entries/definitions apply to revision 4.09. There +have been three additional entries since revision 4.05. + +The table is split into three sectors; The first section defines +two byte "words" giving 16 bits of interface data; The second set is a +set of jumps to various functions, and finally the third set +a set of pure data bytes. + + +@subsection(Interface Data.) + +@begin<description, spread 0, indent -8> + +@ux<LNKFLG>@\Must be first entry in overlay at overlay address. Is a two +byte address giving the size of the linkage table. This is used to +check for consistency of overlay's +@blankspace(1) + +@ux<ENTSIZE>@\Length of entry table, also used for consistency checking after +the overlay. Currently 6 +@blankspace(1) + +@ux<SYSEDT>@\The address of a dollar-terminated string giving the overlay +revision level and date. Points to a string like: +CPXSYS.ASM(33) 4-JUN-1986$ +@blankspace(1) + +@ux<FAMILY>@\The address of a dollar-terminated string giving the Family overlay +revision level and date. If the system is in CPXSYS.ASM rather than a +particular Family overlay, it is simply a pointer to $ +@end<description> +@blankspace(1) + +@subsection(Jump Table.) +This is split into three main sectors- +@blankspace(1) + +@begin(enumerate) +Input/Output routines + +Screen formatting routines + +other system dependent routines +@end<enumerate> + + +@begin<description, spread 0, indent -14> +@blankspace(1) +@ux<SELMDM> + +@i<Parameters>@\None + +@i<Returns>@\None + +@i<Description>@\selects the modem port. Most systems do nothing and +simply return. HL,DE and BC registers preserved. + +@blankspace(1) +@ux<OUTMDM> + +@i<Parameters>@\None + +@i<Returns>@\None + +@i<Description>@\Output the character in E register to the communications +line. BC,DE,HL registers preserved. + +@blankspace(1) +@ux<INPMDM> + +@i<Parameters>@\None + +@i<Returns>@\Accumulator either 0 or character from comms line if available + +@i<Description>@\Check modem for character and if so, return it in A. +HL,DE,BC registers preserved, flags +and accumulator lost. + +@blankspace(1) +@ux<FLSMDM> + +@i<Parameters>@\None + +@i<Returns>@\None + +@i<Description>@\Clear any pending characters in the input buffer from the +modem. No registers are preserved. + + +@blankspace(1) +@ux<SELCON> + +@i<Parameters>@\None + +@i<Returns>@\None + +@i<Description>@\Select the console. This is a null subroutine for most +systems, but for IOBYTE systems selects the console. + +@blankspace(1) +@ux<OUTCON> + +@i<Parameters>@\Character in E + +@i<Returns>@\None + +@i<Description>@\Send the character in E to the console. Any quirks of +system responding in an odd manner should be handled. No +registers preserved. + + +@blankspace(1) +@ux<INPCON> + +@i<Parameters>@\None + +@i<Returns>@\Zero or character in A. + +@i<Description>@\Get a character from the console or return a null if +no character to be read. No registers are preserved. + + +@blankspace(1) +@ux<OUTLPT> + +@i<Parameters>@\Character in E + +@i<Returns>@\None + +@i<Description>@\Send the character in E to the printer. The console is +selected. Only DE registers are preserved + + +@blankspace(1) +@ux<LPTSTAT> + +@i<Parameters>@\None + +@i<Returns>@\00H or 0FFH in A register + +@i<Description>@\Test the printer to see if it is ready to receive a +character to be printed. If a 00H is returned then the printer is +ready to receive a character. + + +@blankspace(1) +@ux<EXTTER> + +@i<Parameters>@\Character to be sent to the user supplied terminal emulator +in the E register + +@i<Returns>@\None + +@i<Description>@\If the user has supplied a terminal emulator in the overlay +code, EXTTER will be a JMP <non zero address>. If SET TERMINAL EXTERNAL +has been set, all caharcters will be passed verbatim to this terminal +emulator. If there is no external emulator, this code will never be called. +The user should reset terminal conditions on initialisation of both + the system and before CONNECT. All registers should be preserved. + + +@blankspace(1) +@ux<XBDOS> + +@i<Parameters>@\Any required for calling BDOS + +@i<Returns>@\Any expected from the called BDOS routine + +@i<Description>@\This is an alternative entry to BDOS. This entry will also +check the printer status etc. For full details see the code for the +BDOS trap in CPSUTL.ASM. +@blankspace(1) +2b) +@blankspace(1) +@ux<CLRLIN> + +@i<Parameters>@\None + +@i<Returns>@\None + +@i<Description>@\Clear the current line on the terminal + + + +@blankspace(1) +@ux<CLRSPC> + +@i<Parameters>@\None + +@i<Returns>@\None + +@i<Description>@\Erase the current position (after a backspace) + + + +@blankspace(1) +@ux<DELCHR> + +@i<Parameters>@\None + +@i<Returns>@\None + +@i<Description>@\Make delete (7FH) look like a backspace. Some systems +do a backspace, space, backspace automatically others have to simulate it + +@blankspace(1) +@ux<CLRTOP> + +@i<Parameters>@\None + +@i<Returns>@\None + +@i<Description>@\Clear the screen and place the cursor at the top LH corner + + + +@blankspace(1) +@ux<SCREND> + +@i<Parameters>@\None + +@i<Returns>@\None + +@i<Description>@\Place the cursor on the line for the Kermit-80 prompt +after a file transfer. (Usually line 13) + + + +@blankspace(1) +@ux<SCRERR> + +@i<Parameters>@\None + +@i<Returns>@\None + +@i<Description>@\Move cursor to the error message field on the +file transfer format screen + + + +@blankspace(1) +@ux<SCRFLN> + +@i<Parameters>@\None + +@i<Returns>@\None + +@i<Description>@\Move the cursor to the filename field + + + +@blankspace(1) +@ux<SCRNP> + +@i<Parameters>@\None + +@i<Returns>@\None + +@i<Description>@\Move the cursor to the packet count field + + + +@blankspace(1) +@ux<SCRNRT> + +@i<Parameters>@\None + +@i<Returns>@\None + +@i<Description>@\Move cursor to the retry count field + + + +@blankspace(1) +@ux<SCRST> + +@i<Parameters>@\None + +@i<Returns>@\None + +@i<Description>@\Move cursor to the status field + + + +@blankspace(1) +@ux<RPPOS> + +@i<Parameters>@\None + +@i<Returns>@\None + +@i<Description>@\Move to the receive packet field (debugging use) + + + +@blankspace(1) +@ux<SPPOS> + +@i<Parameters>@\None + +@i<Returns>@\None + +@i<Description>@\Move to the send packet field (for debugging use) +@blankspace(1) +2c) +@blankspace(1) +@ux<SYSINIT> + +@i<Parameters>@\None + +@i<Returns>@\None + +@i<Description>@\Initialize the system specific items. No registers +are preserved. Any initialization is done once only when Kermit-80 +is first loaded. + + + +@blankspace(1) +@ux<SYSEXIT> + +@i<Parameters>@\None + +@i<Returns>@\None + +@i<Description>@\Program termination. De-initialize anything +in preparation for a return to CP/M + + + +@blankspace(1) +@ux<SYSCON> + +@i<Parameters>@\None + +@i<Returns>@\None + +@i<Description>@\Initialize anything before entering the connect state. + + + +@blankspace(1) +@ux<SYSCLS> + +@i<Parameters>@\None + +@i<Returns>@\None + +@i<Description>@\System dependent close routine when exiting connect state + + + +@blankspace(1) +@ux<SYSINH> + +@i<Parameters>@\None + +@i<Returns>@\None + +@i<Description>@\Help routine to test for any extensions to the escape menu +during the connect state. If a system has any special feature it +can use during connect mode, then it can be tested as +<escape-character>xxx. This entry is a string for printing +to the console for an <escape-character>? Often used for +generating breaks or controlling a modem. + + + +@blankspace(1) +@ux<SYSINT> + +@i<Parameters>@\None + +@i<Returns>@\None + +@i<Description>@\This is a test-and-jump on receipt of an escape +sequence not understood by Kermit-80. If the character in A is +not recognized by your version of Kermit=80, do a rskip + + + +@blankspace(1) +@ux<SYSFLT> + +@i<Parameters>@\Character in E + +@i<Returns>@\Character in E. Either a 00H or anything else in A + +@i<Description>@\Test the character in E. If it may not be printed to +the console, set A to zero. All other registers preserved. + +@\NB <XON>,<XOFF>,<DEL>,<NULL> are always rejected. + + +@blankspace(1) +@ux<SYSBYE> + +@i<Parameters>@\None + +@i<Returns>@\None + +@i<Description>@\System dependent processing for the BYE command. (eg hang +up the phone) + + + +@blankspace(1) +@ux<SYSSPD> + +@i<Parameters>@\Value from table in DE + +@i<Returns>@\None + +@i<Description>@\The system dependent code for baud rate change. DE +contains the two byte value from the baud rate table. This value is +also stored in "SPEED" + + + +@blankspace(1) +@ux<SYSPRT> + +@i<Parameters>@\Value in DE + +@i<Returns>@\None + +@i<Description>@\The system dependent code for setting the port. +The parameters are passed in DE, which are obtained from the port tables + + + +@blankspace(1) +@ux<SYSSCR> + +@i<Parameters>@\String pointer in DE + +@i<Returns>@\None + +@i<Description>@\Setup the screen display for file transfer. The Kermit +version string is pointed to by DE. If the terminal is not capable of +cursor addressing (eg dumb glass TTY) then only the screen is cleared +and the version string is printed. + + + +@blankspace(1) +@ux<CSRPOS> + +@i<Parameters>@\Row number in B, column number in C + +@i<Returns>@\None + +@i<Description>@\Move the cursor to row B, column C where B=1,C=1 is top +LH corner of screen. The routine should first end a "cursor +position" leading string (up to four characters) then use the +parameters given to complete the versions cursor position function + + + +@blankspace(1) +@ux<SYSSPC> + +@i<Parameters>@\None + +@i<Returns>@\K bytes free in HL + +@i<Description>@\Get the amount of free disk space on the selected disk +drive. This could be in the system independent code. Automatically +detects CP/M V2.2 or V3.0. No registers saved. + + + +@blankspace(1) +@ux<MOVER> + +@i<Parameters>@\Source Pointer in HL + +@\Destination Pointer in DE + +@\Byte count in BC + +@i<Returns>@\None + +@i<Description>@\Move (BC) bytes from (HL) to (DE) Z80 based systems +do an LDIR, while 8080 systems do it as a loop. All registers destroyed + +@blankspace(1) +@ux<PRTSTR> + +@i<Parameters>@\$ terminated string pointed to by DE + +@i<Returns>@\None + +@i<Description>@\Print the string onto the console. +@blankspace(1) +3) +@blankspace(1) +@tabclear() +@tabset(2 inches, 1.0 inches, 1.0 inches) + +@blankspace(1) +@ux<PTTAB>@\WORD@\Points to VT52 equivalent escape sequences. + +@blankspace(1) +@ux<SPDTAB>@\WORD@\Address of baud-rate command table, or 0 if table does +not exist + +@blankspace(1) +@ux<SPDHLP>@\WORD@\Address of baud-rate help table, or 0 if SET SPEED +is not supported. + +@blankspace(1) +@ux<PRTTAB>@\WORD@\Address of port command table or 0 if SET PORT is not supported. + +@blankspace(1) +@ux<PRTHLP>@\WORD@\Address of port help table or 0 if SET PORT is not supported + +@blankspace(1) +@ux<TIMOUT>@\BYTE@\FUZZY-TIMER. Set to value suitable to your +system (depends largely on CPU speed) + +@blankspace(1) +@ux<VTFLG>@\BYTE@\VT52 emulation flag. Set to 0 if terminal +emulates a VT52, 01 if emulation is required, or 0FFH if emulations not +possible (eg for "CRT") + +@blankspace(1) +@ux<ESCCHR>@\BYTE@\default escape character-usually control-] but +sometimes control-\ + +@blankspace(1) +@ux<SPEED>@\WORD@\Storage space for baud-rate. Set to 0FFFFH as baud +rates are initially unknown. Note that the STATUS routine only looks at the +first (least significant) byte. + +@blankspace(1) +@ux<PORT>@\WORD@\Storage space for port. Set to 0FFFFH as ports may +not be implemented, and is initially unknown + +@blankspace(1) +@ux<PRNFLG>@\BYTE@\Printer copy flag-if O no copy. Anything else => +copy to printer + +@blankspace(1) +@ux<DBGFLG>@\BYTE@\Debugging flag. If O then no debugging to be done. +(ie writing of debugging info during a file transfer) + +@blankspace(1) +@ux<ECOFLG>@\BYTE@\Local ECHO flag (default is off) + +@blankspace(1) +@ux<FLWFLG>@\BYTE@\File warning flag. If set to 1 will not +overwrite files already existing on disk with some-named files +being transferred + +@blankspace(1) +@ux<IBMFLG>@\BYTE@\IBM system is the host-assume IBM file transfers etc + +@blankspace(1) +@ux<CPMFLG>@\BYTE@\Flag indicating type of CP/M files to be transferred. +Default setting - DEFAULT + +@blankspace(1) +@ux<PARITY>@\BYTE@\Type of parity in use + +@\ 0 = Even parity + +@\ 3 = Mark parity + +@\ 6 = No parity (8th bit is data) + +@\ 9 = Odd parity + +@\12 = Space parity + +@blankspace(1) +@ux<SPSIZ>@\BYTE@\Size of send packet + +@blankspace(1) +@ux<RPSIZ>@\BYTE@\Size of receive packet + +@blankspace(1) +@ux<STIME>@\BYTE@\Send timer (time-out) + +@blankspace(1) +@ux<RTIME>@\BYTE@\Receive timer (time-out) + +@blankspace(1) +@ux<SPAD>@\BYTE@\Send Padding (default=0) + +@blankspace(1) +@ux<RPAD>@\BYTE@\Receive Padding (default=0) + +@blankspace(1) +@ux<SPADCH>@\BYTE@\Send Padding character (default=NULL) + +@blankspace(1) +@ux<RPADCH>@\BYTE@\Receive Padding character (default=NULC) + +@blankspace(1) +@ux<SEOL>@\BYTE@\Send EOL character (default=CR) + +@blankspace(1) +@ux<REOL>@\BYTE@\Receive EOL character (default=CR) + +@blankspace(1) +@ux<SQUOTE>@\BYTE@\Send quote character (default=#) + +@blankspace(1) +@ux<RQUOTE>@\BYTE@\Receive quote character (default=#) + +@blankspace(1) +@ux<CHKTYP>@\BYTE@\Ascii value of checktype + +@\31H="1"=checktype1 (6bits) + +@\32H="2"=checktype2 (12bits) + +@\33H="3"=CCITT checksum (CRC) + +@\Default is 31H("1") + +@blankspace(1) +@ux<TACFLG>@\BYTE@\If set to on (non zero) send the TACCHR twice. This is +for ARPA TAC users, where the TAC swallows one "wakeup" character. If +sent twice the TAC will pas one on and go back to normal mode. + +@blankspace(1) +@ux<TACCHR>@\BYTE@\Desired TAC character. It is ignored if TAC trapping +is turned off. Value to send twice if TAC interception is set on. +Default=0, but set to commercial AT if the conditional assembly flag TAC +is set true + +@blankspace(1) +@ux<BUFADR>@\WORD@\Address of Multi-Sector buffering for I/O + +@blankspace(1) +@ux<BUFSEC>@\BYTE@\The number of bytes the big buffers can hold. +Default is 1. (0=256 sectors). + +@blankspace(1) +@ux<FFUSSY>@\BYTE@\Indicates if funny characters may be used in CP/M +file names (eg @q{<>.,;?#[]}) If zero, allow anything. Default is nonzero. + +@blankspace(1) +@ux<BMAX> +@\SPACE:(2bytes) Highest block number on selected disk drive + +@blankspace(1) +@ux<BMASK>@\SPACE:(1byte) (Records/block)-1 + +@blankspace(1) +@ux<BSHIFTF>@\SPACE:(1byte) Number of shifts to multiply by rec.block + +@blankspace(1) +@ux<NNAMS>@\SPACE:(1byte) Counter for file-names per line + +@end<description> + + + +@section<Future Work> + +Work that needs to be done in future releases includes: +@begin<itemize> +Merge in support for additional CP/M-80 systems, particularly those for +which support was recently added to the monolithic v3.x source. + +Break up @q<CPXSYS> into discrete source files, one for each system. +These source files should serve as simple models for adding support for +new systems to Kermit-80 -- only the very basic screen definitions, flags, +i/o primitives, initializations, and so forth should appear in each +system-@|dependent file. + +Addition of missing features -- compression of repeated characters during +packet transmission, transmission of file attributes (particularly size, so +that "percent done" can be displayed for both incoming and outbound files), +command macros, more advanced login scripts, remote operation and server mode, +etc etc. Any offers?? +@end<itemize> diff --git a/cpkerm.pdf b/cpkerm.pdf Binary files differnew file mode 100644 index 0000000..d41b13c --- /dev/null +++ b/cpkerm.pdf diff --git a/cpkerm.ps b/cpkerm.ps new file mode 100644 index 0000000..a4b33b6 --- /dev/null +++ b/cpkerm.ps @@ -0,0 +1,6971 @@ +%!PS-Adobe-2.0 +%%Title: cpkhdr.mss +%%DocumentFonts: (atend) +%%Creator: Frank da Cruz,718W,0000, and Scribe 7(1700) +%%CreationDate: 25 May 1991 14:10 +%%Pages: (atend) +%%EndComments +% PostScript Prelude for Scribe. +/BS {/SV save def 0.0 792.0 translate .01 -.01 scale} bind def +/ES {showpage SV restore} bind def +/SC {setrgbcolor} bind def +/FMTX matrix def +/RDF {WFT SLT 0.0 eq + {SSZ 0.0 0.0 SSZ neg 0.0 0.0 FMTX astore} + {SSZ 0.0 SLT neg sin SLT cos div SSZ mul SSZ neg 0.0 0.0 FMTX astore} + ifelse makefont setfont} bind def +/SLT 0.0 def +/SI { /SLT exch cvr def RDF} bind def +/WFT /Courier findfont def +/SF { /WFT exch findfont def RDF} bind def +/SSZ 1000.0 def +/SS { /SSZ exch 100.0 mul def RDF} bind def +/AF { /WFT exch findfont def /SSZ exch 100.0 mul def RDF} bind def +/MT /moveto load def +/XM {currentpoint exch pop moveto} bind def +/UL {gsave newpath moveto dup 2.0 div 0.0 exch rmoveto + setlinewidth 0.0 rlineto stroke grestore} bind def +/LH {gsave newpath moveto setlinewidth + 0.0 rlineto + gsave stroke grestore} bind def +/LV {gsave newpath moveto setlinewidth + 0.0 exch rlineto + gsave stroke grestore} bind def +/BX {gsave newpath moveto setlinewidth + exch + dup 0.0 rlineto + exch 0.0 exch neg rlineto + neg 0.0 rlineto + closepath + gsave stroke grestore} bind def +/BX1 {grestore} bind def +/BX2 {setlinewidth 1 setgray stroke grestore} bind def +/PB {/PV save def newpath translate + 100.0 -100.0 scale pop /showpage {} def} bind def +/PE {PV restore} bind def +/GB {/PV save def newpath translate rotate + div dup scale 100.0 -100.0 scale /showpage {} def} bind def +/GE {PV restore} bind def +/FB {dict dup /FontMapDict exch def begin} bind def +/FM {cvn exch cvn exch def} bind def +/FE {end /original-findfont /findfont load def /findfont + {dup FontMapDict exch known{FontMapDict exch get} if + original-findfont} def} bind def +/BC {gsave moveto dup 0 exch rlineto exch 0 rlineto neg 0 exch rlineto closepath clip} bind def +/EC /grestore load def +/SH /show load def +/MX {exch show 0.0 rmoveto} bind def +/W {0 32 4 -1 roll widthshow} bind def +/WX {0 32 5 -1 roll widthshow 0.0 rmoveto} bind def +/RC {100.0 -100.0 scale +612.0 0.0 translate +-90.0 rotate +.01 -.01 scale} bind def +/URC {100.0 -100.0 scale +90.0 rotate +-612.0 0.0 translate +.01 -.01 scale} bind def +/RCC {100.0 -100.0 scale +0.0 -792.0 translate 90.0 rotate +.01 -.01 scale} bind def +/URCC {100.0 -100.0 scale +-90.0 rotate 0.0 792.0 translate +.01 -.01 scale} bind def +%%EndProlog +%%Page: 0 1 +BS +0 SI +15 /Times-Bold AF +15510 28325 MT +(CP/M-80 KERMIT VERSION 4.11 USER GUIDE)SH +10 /Times-Roman AF +29402 32237 MT +(C. Gianone)SH +20860 34629 MT +(Columbia University Center for Computing Activities)SH +25862 35825 MT +(New York, New York 10027)SH +/Times-Italic SF +28777 39413 MT +(April 23, 1991)SH +/Times-Roman SF +26610 44197 MT +(Copyright \050C\051 1981,1991)SH +20111 45393 MT +(Trustees of Columbia University in the City of New York)SH +/Times-Italic SF +18429 47785 MT +(Permission is granted to any individual or institution to use, copy,)SH +18178 48981 MT +(or redistribute this document so long as it is not sold for profit, and)SH +23291 50177 MT +(provided this copyright notice is retained.)SH +ES +%%Page: 1 2 +BS +0 SI +12 /Times-Bold AF +8280 4404 MT +(1. CP/M-80 KERMIT)SH +10 /Times-Italic AF +52275 XM +(Page 1)SH +46800 50 8280 5709 UL +16 /Times-Bold AF +8280 8272 MT +(1. CP/M-80 KERMIT)SH +10 /Times-Italic AF +8280 10566 MT +(Program:)SH +/Times-Roman SF +14280 XM +(Mike Freeman, Bonneville Power Administration, Vancouver, WA, USA,) +139 W( with contributions from)138 W +14280 11671 MT +(many others.)SH +/Times-Italic SF +8280 13881 MT +(Language:)SH +/Times-Roman SF +14280 XM +(8080 Assembler, LASM, M80, or MAC80)SH +/Times-Italic SF +8280 16091 MT +(Version:)SH +/Courier SF +14280 XM +(4.11)SH +/Times-Italic SF +8280 18301 MT +(Date:)SH +/Times-Roman SF +14280 XM +(April 1, 1991)SH +/Times-Italic SF +8280 20511 MT +(Documentation:)SH +/Times-Roman SF +15279 XM +(Christine Gianone, Columbia University, with contributions from many others.)SH +/Times-Italic SF +8280 22903 MT +(KERMIT-80 Capabilities At A Glance:)SH +/Times-Roman SF +9280 24513 MT +(Local operation:)SH +34480 XM +(Yes)SH +9280 25618 MT +(Remote operation:)SH +34480 XM +(Partial, Auto-receive only)SH +9280 26723 MT +(Login scipts:)SH +34480 XM +(Yes, limited)SH +9280 27828 MT +(Transfer text files:)SH +34480 XM +(Yes)SH +9280 28933 MT +(Transfer binary files:)SH +34480 XM +(Yes)SH +9280 30038 MT +(Wildcard send:)SH +34480 XM +(Yes)SH +9280 31143 MT +(File transfer interruption:)SH +34480 XM +(Yes)SH +9280 32248 MT +(Filename collision avoidance:)SH +34480 XM +(Yes)SH +9280 33353 MT +(Can time out:)SH +34480 XM +(Yes)SH +9280 34458 MT +(8th-bit prefixing:)SH +34480 XM +(Yes)SH +9280 35563 MT +(Repeat count prefixing:)SH +34480 XM +(No)SH +9280 36668 MT +(Alternate block checks:)SH +34480 XM +(Yes)SH +9280 37773 MT +(Terminal emulation:)SH +34480 XM +(Yes, VT52 and others)SH +9280 38878 MT +(Communication settings:)SH +34480 XM +(Yes)SH +9280 39983 MT +(Support for dial-out modems:)SH +34480 XM +(No)SH +9280 41088 MT +(Transmit BREAK:)SH +34480 XM +(Yes; most versions)SH +9280 42193 MT +(IBM communication:)SH +34480 XM +(Yes)SH +9280 43298 MT +(Transaction logging:)SH +34480 XM +(No)SH +9280 44403 MT +(Debug logging:)SH +34480 XM +(No)SH +9280 45508 MT +(Session logging:)SH +34480 XM +(Yes)SH +9280 46613 MT +(Raw file transmit:)SH +34480 XM +(Yes)SH +9280 47718 MT +(Act as server:)SH +34480 XM +(No)SH +9280 48823 MT +(Talk to server:)SH +34480 XM +(Yes)SH +9280 49928 MT +(Advanced commands for servers:)SH +34480 XM +(Yes)SH +9280 51033 MT +(Command/init files:)SH +34480 XM +(Yes)SH +9280 52138 MT +(Command macros:)SH +34480 XM +(No)SH +9280 53243 MT +(Local file management:)SH +34480 XM +(Yes)SH +9280 54348 MT +(Handle file attributes:)SH +34480 XM +(No)SH +9280 55453 MT +(Long packets:)SH +34480 XM +(No)SH +9280 56558 MT +(International Character Sets:)SH +34480 XM +(No)SH +9280 57663 MT +(Sliding Windows:)SH +34480 XM +(No)SH +9280 58768 MT +(Printer control:)SH +34480 XM +(Yes, limited)SH +14 /Times-Bold AF +8280 62370 MT +(1.1. Credits)SH +10 /Times-Roman AF +8280 64488 MT +(CP/M Kermit is the first) +170 W( of all the Kermit programs. It was originally written by Bill Catchings of Columbia)171 W +8280 65684 MT +(University in 1981.) +119 W( Over) +486 W( the years, contributions have been added by many people, including Charles Carvalho)118 W +8280 66880 MT +(\050ACC\051, Bernie Eiben \050DEC\051, Nick Bush \050Stevens Institute of Technology\051, John Bray) +109 W( \050University of Tennessee\051,)110 W +8280 68076 MT +(Bruce Tanner \050Cerritos College\051, Greg Small \050University) +99 W( of California at Berkeley\051, Kimmo Laaksonen \050Helskini)98 W +8280 69272 MT +(University of Technology\051, Bertil Schou \050Loughborough) +391 W( University\051, Jon Warbrick \050Plymouth Polytechnic)392 W +8280 70468 MT +(University\051, Brian Robertson \050Aberdeen University\051, A.J. Cole) +99 W( \050Leeds University\051, John Shearwood \050Birmingham)98 W +8280 71664 MT +(University\051, Tony Addyman \050Salford University\051,) +180 W( Godfrey Nix and Martin Carter \050Nottingham University\051, Ian)181 W +ES +%%Page: 2 3 +BS +0 SI +10 /Times-Italic AF +6120 4404 MT +(Page 2)SH +12 /Times-Bold AF +30586 XM +(Kermit User Guide: CP/M-80 KERMIT 1.1)SH +46800 50 6120 5709 UL +10 /Times-Roman AF +6120 7886 MT +(Young \050Edinburgh University\051, Chris Miles \050Manchester University\051,) +144 W( Richard Russell, Dave Roberts, and many,)143 W +6120 9082 MT +(many others.)SH +6120 11474 MT +(Version 4.11 is the work of Mike Freeman of the Bonneville Power Administration in Vancouver, WA, USA, with)49 W +6120 12670 MT +(assistance from Russell Lang of Monash University in Australia, Jay S Rouman of Mt Pleasant MI, and others.)SH +14 /Times-Bold AF +6120 16272 MT +(1.2. What's New)SH +10 /Times-Roman AF +6120 18390 MT +(Features added since version 4.09 include:)SH +/Symbol SF +7910 20295 MT +(\267)SH +/Times-Roman SF +8620 XM +(SET COLLISION {BACKUP/DISCARD/OVERWRITE/RENAME})SH +/Symbol SF +7910 22284 MT +(\267)SH +/Times-Roman SF +8620 XM +(SET INCOMPLETE-FILES {DISCARD/KEEP})SH +/Symbol SF +7910 24273 MT +(\267)SH +/Times-Roman SF +8620 XM +(Many REMOTE commands, including some REMOTE SET commands)SH +/Symbol SF +7910 26262 MT +(\267)SH +/Times-Roman SF +8620 XM +(RENAME command to rename CP/M files from within Kermit-80)SH +/Symbol SF +7910 28251 MT +(\267)SH +/Times-Roman SF +8620 XM +(SET RECEIVE/SEND PACKET-LENGTH nn \050nn <= 94\051)SH +/Symbol SF +7910 30240 MT +(\267)SH +/Times-Roman SF +8620 XM +(SET AUTORECEIVE) +122 W( ON now implies that Kermit-80 ALWAYS tries to receive more files when a)121 W +8620 31345 MT +(RECEIVE transaction has completed. The user can cancel with ^C.)SH +/Symbol SF +7910 33334 MT +(\267)SH +/Times-Roman SF +8620 XM +(QUIT is now a synonym for EXIT.)SH +/Symbol SF +7910 35323 MT +(\267)SH +/Times-Roman SF +8620 XM +(STAY is now a synonym for SET NO-EXIT.)SH +/Symbol SF +7910 37312 MT +(\267)SH +/Times-Roman SF +8620 XM +(CONNECT, RECEIVE and SEND may be abbreviated to C, R and S, respectively.)SH +/Symbol SF +7910 39301 MT +(\267)SH +/Times-Roman SF +8620 XM +(Cancellation of TAKE, TYPE, and PRINT commands from the keyboard.)SH +/Symbol SF +7910 41290 MT +(\267)SH +/Times-Roman SF +8620 XM +(Many bug fixes.)SH +/Symbol SF +7910 43279 MT +(\267)SH +/Times-Roman SF +8620 XM +(Kermit-80 Version 4.11 now supports the Microbee family) +67 W( of computers \05056K, 64K, 128K and 256K\051)68 W +8620 44384 MT +(manufactured by Microbee Systems, Ltd, of Australia.)SH +/Symbol SF +7910 46373 MT +(\267)SH +/Times-Roman SF +8620 XM +(Kermit-80 now supports the Ampro Little Board system.)SH +14 /Times-Bold AF +6120 49975 MT +(1.3. Overview of Kermit Operation)SH +10 /Times-Roman AF +6120 52093 MT +(Use the SET command to) +210 W( establish necessary communication parameters like SPEED and PARITY. Use the)209 W +6120 53289 MT +(CONNECT to establish a terminal connection to the remote computer. If you are dialing out with a modem, type)76 W +6120 54485 MT +(the necessary dialing commands to the modem first. The dialing process can be automated to some extent) +63 W( using a)62 W +6120 55681 MT +(TAKE command) +17 W( file containing INPUT, OUTPUT, and PAUSE commands. Then log in to the remote computer or)18 W +6120 56877 MT +(service and conduct a session.)SH +6120 59269 MT +(To transfer a text file, start the Kermit) +137 W( program on the remote computer and tell it to SEND the desired file \050if)136 W +6120 60465 MT +(uploading\051 or to) +49 W( RECEIVE \050if downloading\051. "Escape back" to CP/M Kermit, usually by typing Ctrl-] \050hold down)50 W +6120 61661 MT +(the Control key and press the right bracket key\051 and then) +181 W( type the letter C. At the CP/M Kermit prompt type)180 W +6120 62857 MT +(RECEIVE \050if you gave a SEND command to the remote Kermit\051 or SEND)3 W +/Times-Italic SF +36349 XM +(filename)SH +/Times-Roman SF +40046 XM +(\050if you gave a) +3 W( receive command)4 W +6120 64053 MT +(to the remote Kermit\051.)SH +6120 66445 MT +(To transfer a binary file, give the command) +13 W( SET FILE TYPE BINARY to the remote Kermit and SET FILE-MODE)12 W +6120 67641 MT +(BINARY to CP/M Kermit before issuing any SEND or RECEIVE commands.)SH +6120 70033 MT +(Multiple files of the same type \050text or binary\051) +107 W( can be transferred in a single operation using "wildcard notation")108 W +6120 71229 MT +(\050including special characters like asterisk in the filename\051.)SH +ES +%%Page: 3 4 +BS +0 SI +12 /Times-Bold AF +8280 4404 MT +(1.3. Overview of Kermit Operation)SH +10 /Times-Italic AF +52275 XM +(Page 3)SH +46800 50 8280 5709 UL +/Times-Roman SF +8280 7886 MT +(When file transfer is complete, CONNECT back to the remote computer, use the) +73 W( EXIT command to exit from the)72 W +8280 9082 MT +(remote Kermit program, finish your work on the remote computer, log out from it, escape back to) +111 W( CP/M Kermit)112 W +8280 10278 MT +(again, and EXIT from CP/M Kermit.)SH +8280 12670 MT +(The remote Kermit may also be put into "server) +57 W( mode" to simplify these operations. Give the SERVER command)56 W +8280 13866 MT +(to the remote Kermit, escape back to CP/M Kermit, and) +89 W( then issue SEND commands to send files \050upload\051, GET)90 W +/Times-Italic SF +8280 15062 MT +(filename)SH +/Times-Roman SF +12233 XM +(commands to receive \050download\051 files, REMOTE commands to request) +259 W( various other services \050like)258 W +8280 16258 MT +(directory listings\051 from the remote Kermit. When you are) +103 W( done, give a BYE command to terminate your remote)104 W +8280 17454 MT +(session, or) +87 W( a FINISH command to tell the remote Kermit to return to its prompt so you can CONNECT back and)86 W +8280 18650 MT +(conduct further business.)SH +8280 21042 MT +(That's all there is to it.)SH +14 /Times-Bold AF +8280 24644 MT +(1.4. Summary of CP/M)SH +10 /Times-Roman AF +8280 26762 MT +(There are essentially two versions of CP/M - Versions 2.2 and 3.0 \050sometimes also called CP/M PLUS.\051)SH +8280 29154 MT +(CP/M-80 Version 2)95 W +/Courier SF +(.)SH +/Times-Roman SF +(2 is run in) +95 W( a single 64 Kbyte "page", usually the largest amount of memory on Z80 or 8080)96 W +8280 30350 MT +(systems. The) +682 W( BIOS \050Basic input/output system\051, BDOS \050Basic Disk Operating System\051 and) +216 W( CCP \050Command)215 W +8280 31546 MT +(console processor\051 all share memory with) +58 W( any transient program the user may wish to run. Some basic commands)59 W +8280 32742 MT +(are available through the) +38 W( CCP, like DIR, ERA etc,while others are loaded from disk into the transient program area)37 W +8280 33938 MT +(and run as a program, like PIP or STAT.)SH +8280 36330 MT +(CP/M Version 3)33 W +/Courier SF +(.)SH +/Times-Roman SF +(0 \050or CP/M PLUS\051 effectively removes the requirement of having the CCP and) +33 W( BDOS along with)34 W +8280 37526 MT +(a chunk of the) +54 W( BIOS code being resident in the single 64k byte page of memory. This allows even more space for)53 W +8280 38722 MT +(programs in the) +20 W( TPA, but still a little less than the maximum of 64k. It is substantially different from CP/M version)21 W +8280 39918 MT +(2)SH +/Courier SF +(.)SH +/Times-Roman SF +(2, with lots of added features. Kermit-80) +239 W( uses very few additional version 3)238 W +/Courier SF +(.)SH +/Times-Roman SF +(0 features, and only where)238 W +8280 41114 MT +(absolutely necessary.)SH +8280 43506 MT +(CP/M file specifications are of the form)SH +/Courier SF +24472 XM +(DEV:XXXXXXXX.YYY)SH +/Times-Roman SF +(, where)SH +/Courier SF +8280 45297 MT +(DEV:)SH +/Times-Roman SF +16280 XM +(is a)125 W +/Times-Italic SF +18141 XM +(device name)125 W +/Times-Roman SF +(, normally the A:) +125 W( or) +SH( B:) +125 W( floppy.) +SH( If) +500 W( omitted, the device name defaults to your)125 W +16280 46402 MT +(connected diskette.)SH +/Courier SF +8280 47979 MT +(XXXXXXXX)SH +/Times-Roman SF +16280 XM +(is a)SH +/Times-Italic SF +17891 XM +(filename)SH +/Times-Roman SF +21585 XM +(of up to 8 characters.)SH +/Courier SF +8280 49556 MT +(YYY)SH +/Times-Roman SF +16280 XM +(is the)SH +/Times-Italic SF +18669 XM +(file type)SH +/Times-Roman SF +(, up to 3 characters.)SH +8280 51347 MT +(File names and file types may contain letters, digits, and some special characters, including dash, dollar) +90 W( sign, and)89 W +8280 52543 MT +(underscore, but no imbedded spaces. Upper and lower case letters are equivalent.)SH +8280 54935 MT +("Wildcard" file-group specifications are) +30 W( permitted in file names and file types \050but not device names\051 within certain)31 W +8280 56131 MT +(contexts; a ")134 W +/Courier SF +(*)SH +/Times-Roman SF +(" matches a whole field, a ")134 W +/Courier SF +(?)SH +/Times-Roman SF +(" matches) +518 W( a single character, including space.) +134 W( Examples:) +517 W( ")133 W +/Courier SF +(*.F??)SH +/Times-Roman SF +(")SH +8280 57327 MT +(specifies all files whose)24 W +/Times-Italic SF +18152 XM +(types)SH +/Times-Roman SF +20481 XM +(start with F and are 1, 2, or 3 characters long; ")24 W +/Courier SF +(F?.*)SH +/Times-Roman SF +(" specifies all files whose names)25 W +8280 58523 MT +(start with F and are no more than two characters long \050before the trailing spaces\051.)SH +8280 60915 MT +(The five CP/M commands are:)SH +8280 62706 MT +(DIR)SH +/Times-Italic SF +10252 XM +(file)SH +/Times-Roman SF +16280 XM +(Lists the the names of) +165 W( the specified files. The default file specification is "*.*". Example:)164 W +16280 63811 MT +(")SH +/Courier SF +(DIR B:*.FOR)SH +/Times-Roman SF +(".)SH +8280 65388 MT +(ERA)SH +/Times-Italic SF +10530 XM +(file)SH +/Times-Roman SF +16280 XM +(Erases \050deletes\051 the specified file\050s\051; wildcards allowed.)SH +8280 66965 MT +(REN)SH +/Times-Italic SF +10530 XM +(new old)SH +/Times-Roman SF +16280 XM +(Changes the name of a file from)SH +/Times-Italic SF +29416 XM +(old)SH +/Times-Roman SF +30944 XM +(to)SH +/Times-Italic SF +31972 XM +(new)SH +/Times-Roman SF +(, e.g.)SH +16280 68070 MT +(")SH +/Courier SF +(REN NEW.FOR=OLD.FOR)SH +/Times-Roman SF +(".)SH +8280 69647 MT +(SAVE)SH +16280 XM +(Saves the specified number of memory blocks into a file. \050Not on CP/M Plus systems\051)SH +8280 71224 MT +(TYPE)SH +/Times-Italic SF +11030 XM +(file)SH +/Times-Roman SF +16280 XM +(Types the specified file on the screen, e.g. ")SH +/Courier SF +(TYPE FOO.TXT)SH +/Times-Roman SF +(".)SH +ES +%%Page: 4 5 +BS +0 SI +10 /Times-Italic AF +6120 4404 MT +(Page 4)SH +12 /Times-Bold AF +30586 XM +(Kermit User Guide: CP/M-80 KERMIT 1.4)SH +46800 50 6120 5709 UL +10 /Times-Roman AF +6120 7886 MT +(The most important programs are:)SH +6120 9677 MT +(STAT)SH +14120 XM +(Gives statistics on disk usage; sets and displays IOBYTE. \050Not on CP/M Plus systems\051)SH +6120 11254 MT +(PIP)SH +14120 XM +(Peripheral Interchange) +51 W( Program. Copies files. In response to the ")52 W +/Courier SF +(*)SH +/Times-Roman SF +(" prompt, give a command)52 W +556 50 14120 11454 UL +333 50 18531 11454 UL +556 50 23553 11454 UL +14120 12359 MT +(of the form)SH +/Courier SF +16520 14014 MT +(disk:outfile=disk:infile)SH +/Times-Roman SF +14120 15731 MT +(Wildcards \050")71 W +/Courier SF +(*)SH +/Times-Roman SF +(" for a whole field or ")71 W +/Courier SF +(?)SH +/Times-Roman SF +(" for) +392 W( a letter\051 can be used. Examples:) +71 W( ")70 W +/Courier SF +(A:=B:*.*)SH +/Times-Roman SF +(" to)70 W +14120 16836 MT +(copy a whole disk, ")56 W +/Courier SF +(A:=B:*.FOR)SH +/Times-Roman SF +(" to copy all the Fortran programs) +56 W( from disk B to disk A. If)57 W +14120 17941 MT +(the disk specification is omitted, your "connected" disk is assumed. Command line arguments)78 W +14120 19046 MT +(are also accepted, e.g. ")SH +/Courier SF +(PIP A:=B:*.*)SH +/Times-Roman SF +(".)SH +6120 21438 MT +(There are equivalent commands for CP/M Version 3.0, but are not loaded into memory in the same) +4 W( way as for CP/M)5 W +6120 22634 MT +(Version 2.2. For further information on CP/M, consult your microcomputer manual or a CP/M handbook.)SH +14 /Times-Bold AF +6120 26236 MT +(1.5. Kermit-80 Description)SH +10 /Times-Roman AF +6120 28354 MT +(Since Kermit-80 runs on a standalone micro, it is always in control of the screen --) +47 W( it is always in ")46 W +/Times-Italic SF +(local)SH +/Times-Roman SF +48837 XM +(mode". It)342 W +6120 29550 MT +(includes a terminal emulator for establishing) +42 W( a connection to a remote computer or service, and during file transfer,)43 W +6120 30746 MT +(it keeps the screen updated with the file name and the packet number, whether sending or receiving.)SH +6120 33138 MT +(Kermit-80 is) +12 W( capable of an imprecise or "fuzzy" timeout on an input request, and can break deadlocks automatically.)11 W +6120 34334 MT +(In most cases, this is not important, because the Kermit program on) +55 W( the other side is most likely able to handle the)56 W +6120 35530 MT +(timeouts. The) +372 W( timeouts) +61 W( done by Kermit-80 are fuzzy because they depend on the speed of the processor and other)60 W +6120 36726 MT +(factors that can vary from system to system.)SH +6120 39118 MT +(If, despite the timeout capability, the transmission appears to be stuck \050and you) +26 W( can tell that this has happened if the)27 W +6120 40314 MT +(screen fails to change for a while\051 you can type carriage return to have the micro do what it would) +56 W( have done on a)55 W +6120 41510 MT +(timeout, namely NAK the expected packet to cause theforeign host to send it again \050or, if the micro is sending,) +75 W( to)76 W +6120 42706 MT +(retransmit the last packet\051. Micro/micro or micro/IBM-mainframe) +207 W( transfers could require this kind of manual)206 W +6120 43902 MT +(intervention.)SH +6120 46294 MT +(File transfers may be interrupted in several ways.)SH +6120 48085 MT +(Control-C)SH +14120 XM +(This will return you to Kermit-80 command level immediately, so that you can) +46 W( connect back to)47 W +14120 49190 MT +(the remote system, or take any other desired action.)SH +6120 50767 MT +(Control-X)SH +14120 XM +(When sending a file, this will) +182 W( terminate the sending of the current file with a signal to the)181 W +14120 51872 MT +(KERMIT on the other side to discard what it got so far. If there are more files to be sent,)157 W +14120 52977 MT +(KERMIT-80 will go on to) +53 W( the next one. When receiving a file, KERMIT-80 will send a signal)52 W +14120 54082 MT +(to the remote KERMIT to stop sending this file. If the remote KERMIT understands this) +31 W( signal)32 W +14120 55187 MT +(\050not all implementations of KERMIT do\051, it will comply, otherwise the file will keep coming.)91 W +14120 56292 MT +(In any case, the remote KERMIT will go on to the next file in the group, if any.)SH +6120 57869 MT +(Control-Z)SH +14120 XM +(Like Control-X, except if a file) +39 W( group is being transmitted, this will stop the transmission of the)40 W +14120 58974 MT +(entire group. If only a single file is being transmitted, it works exactly like Control-X.)SH +6120 60551 MT +(Carriage Return)SH +14120 XM +(If you type a carriage return Kermit-80 will resend the current packet. You) +233 W( may do this)232 W +14120 61656 MT +(repeatedly, up to the) +142 W( packet retry limit \050somewhere between 5 and 16 times\051 for a particular)143 W +14120 62761 MT +(packet.)SH +ES +%%Page: 5 6 +BS +0 SI +12 /Times-Bold AF +8280 4404 MT +(1.5. Kermit-80 Description)SH +10 /Times-Italic AF +52275 XM +(Page 5)SH +46800 50 8280 5709 UL +13 /Times-Bold AF +25451 8071 MT +(Kermit-80 Commands)SH +10 /Times-Roman AF +8280 10444 MT +(Kermit-80 is an interactive program. It issues a prompt, you type a command. The process repeats until you) +64 W( give)63 W +8280 11640 MT +(the EXIT command to leave the program.)SH +8280 14032 MT +(Commands consist of keywords, filenames, and numbers. Keywords) +190 W( may be abbreviated to minumum unique)191 W +8280 15228 MT +(length. "?") +296 W( may be typed to request a menu of the available options) +23 W( for the current field at any point in a command.)22 W +8280 16424 MT +(ESC may be typed at any point in a command to fill out the current keyword or filename;) +93 W( if sufficient characters)94 W +8280 17620 MT +(have not been typed to identify the current field uniquely, Kermit-80 will) +75 W( sound a beep and allow you to continue)74 W +8280 18816 MT +(from that point. Here are Kermit-80's commands:)SH +8280 20607 MT +(BREAK)SH +12280 XM +(Send a BREAK) +144 W( condition to the remote computer. This is only possible if your system is capable of)145 W +12280 21712 MT +(sending breaks. It is intended to be used with PAUSE, OUTPUT, etc and) +136 W( the TAKE command to do)135 W +12280 22817 MT +(wierd and wonderful things, like automatic logging on to a remote host.)SH +8280 24394 MT +(BYE)SH +12280 XM +(When talking to a remote Kermit Server, this command shuts down the server) +103 W( and logs it out, and also)104 W +12280 25499 MT +(exits from Kermit-80 to CP/M command level.)SH +8280 27076 MT +(CONNECT)SH +12280 28181 MT +(Establish a terminal connection to the computer, service, or) +135 W( device that is connected to the serial port,)136 W +12280 29286 MT +(i.e. pass) +SH( all typein to the serial port) +34 W( and display all input from the serial port on the screen. Also, emulate)33 W +12280 30391 MT +(a DEC VT52 to allow) +62 W( cursor control, screen clearing, etc., if VT52-EMULATION is ON \050see below\051, in)63 W +12280 31496 MT +(which case you should also set your terminal type on the remote host to VT52.) +68 W( \050Some) +385 W( versions emulate)67 W +12280 32601 MT +(other terminals.\051 The CONNECT command may be abbreviated by the single letter C.)SH +12280 34178 MT +(Warning: VT52 emulation is only successful if your system or its attached terminal can do the same) +62 W( sort)63 W +12280 35283 MT +(of functions as) +47 W( a genuine VT52. Things to beware of are cursor addressing, clear to end of page and end)46 W +12280 36388 MT +(of line, clear screen, home) +192 W( cursor, and clear-and-home functions. The useability of VT52 emulation)193 W +12280 37493 MT +(depends entirely on how many of the VT52 functions can be emulated by your micro or terminal.)SH +12280 39070 MT +(The escape) +103 W( character differs from micro to micro; when you issue the CONNECT command, the micro)102 W +12280 40175 MT +(will print) +40 W( a message telling you how to get back. The escape sequence is generally an uncommonly-used)41 W +12280 41280 MT +(control character, like CTRL-backslash or CTRL-rightbracket, followed by a single letter "command":)SH +12280 43071 MT +(C)SH +14280 XM +(Close Connection, return to)SH +/Courier SF +25585 XM +(Kermit-80>)SH +/Times-Roman SF +31835 XM +(command level.)SH +12280 44176 MT +(S)SH +14280 XM +(Display Status of connection, but maintain remote connection.)SH +/Courier SF +12280 45281 MT +(?)SH +/Times-Roman SF +14280 XM +(List available single-character commands.)SH +12280 46386 MT +(0)SH +14280 XM +(\050zero\051 Send a null \0500\051 character.)SH +12280 47491 MT +(B)SH +14280 XM +(Send a BREAK signal. Most systems provide this function.)SH +12280 48596 MT +(D)SH +14280 XM +(Drop the line. Used on) +51 W( the Apple with modem. Automatically closes the connection after dropping)50 W +14280 49701 MT +(the line. The TORCH system acknowledges this command but does nothing.)SH +12280 50806 MT +(P)SH +14280 XM +(Toggle printer on or off. Allows you to copy whatever goes to the screen to the printer.)SH +12280 51911 MT +(S)SH +14280 XM +(Temporarily suspend logging to the log file.)SH +12280 53016 MT +(Q)SH +14280 XM +(Restart logging to the log file)SH +/Courier SF +12280 54121 MT +(^])SH +/Times-Roman SF +14280 XM +(\050or whatever - a second copy of the escape character\051 Send the escape character itself) +69 W( to the remote)70 W +14280 55226 MT +(host.)SH +8280 57017 MT +(COPY)SH +/Times-Italic SF +11197 XM +(source destination)SH +/Times-Roman SF +12280 58122 MT +(Copy a named file to another file, either on the same drive or another drive.)SH +8280 59699 MT +(DIRECTORY)SH +12280 60804 MT +(This provides a directory listing of the specified files.) +27 W( If) +303 W( no files are specified, all files on the default disk)26 W +12280 61909 MT +(are listed. File sizes, in K, are included. You may interrupt the listing) +1 W( at any time by typing any character.)2 W +12280 63014 MT +(The listing \050even if interrupted\051 concludes with a display of the amount of free storage left) +99 W( on the disk.)98 W +12280 64119 MT +(You can inhibit the display of file sizes by SET DIRECTORY OFF.)SH +8280 65696 MT +(ERASE)SH +/Times-Italic SF +11697 XM +(filespec)SH +/Times-Roman SF +12280 66801 MT +(This executes the CP/M ERA command on the specified file\050s\051. The names of the files being erased) +65 W( are)64 W +12280 67906 MT +(not displayed.)SH +8280 69483 MT +(EXIT)SH +12280 XM +(Quit back to CP/M. The return is made by a JMP 0 \050Warmstart\051. QUIT is a synonym for EXIT.)SH +8280 71060 MT +(FINISH)SH +12280 XM +(Like LOGOUT, but shuts down the remote server) +199 W( without logging it out. Leaves you at Kermit-80)200 W +ES +%%Page: 6 7 +BS +0 SI +10 /Times-Italic AF +6120 4404 MT +(Page 6)SH +12 /Times-Bold AF +30586 XM +(Kermit User Guide: CP/M-80 KERMIT 1.5)SH +46800 50 6120 5709 UL +10 /Times-Roman AF +10120 7886 MT +(command level; subsequent CONNECT commands will put you back at host system command level.)SH +6120 9463 MT +(GET)SH +/Times-Italic SF +8314 XM +(filespec)SH +/Times-Roman SF +11619 XM +([)SH +/Times-Italic SF +(local_filespec)SH +/Times-Roman SF +(])SH +10120 10568 MT +(When Kermit-80 is talking) +67 W( to a Kermit Server on the host, you should use the GET command to request)68 W +10120 11673 MT +(the server to send files to you, for example:)SH +/Courier SF +12520 13328 MT +(get hlp:k*.hlp)SH +/Times-Roman SF +10120 15045 MT +(You may specify a local filename) +264 W( if you want to save the remote file under a different filename.)263 W +10120 16150 MT +(Limitation: If you request an alternate block check type using) +194 W( the SET BLOCK command, the GET)195 W +10120 17255 MT +(command will not communicate it to the remote server. If you want to have) +7 W( type 2 or 3 block checks done)6 W +10120 18360 MT +(when getting files from the server, you have to issue) +11 W( the appropriate SET BLOCK command to the remote)12 W +10120 19465 MT +(KERMIT before putting it in server mode.)SH +6120 21042 MT +(HELP)SH +10120 XM +(List all these commands,) +27 W( with a short description on what the commands do. A question mark will do the)26 W +10120 22147 MT +(same. If) +408 W( you have already typed a command but do not know) +79 W( what the parameters are, type a space \050to)80 W +10120 23252 MT +(indicate the end of the command\051 and a question mark.) +43 W( You) +335 W( will be informed of what Kermit can expect)42 W +10120 24357 MT +(at that stage.)SH +6120 25934 MT +(INPUT)SH +/Times-Italic SF +9314 XM +(seconds text)SH +/Times-Roman SF +10120 27039 MT +(Setup a text) +55 W( line and time delay for your CP/M system to expect from the host, then wait up to the given)54 W +10120 28144 MT +(number of seconds \050approximately\051 for text to be sent to your CP/M-80 system.)SH +6120 29721 MT +(LOG)SH +/Times-Italic SF +8425 XM +(filespec)SH +/Times-Roman SF +10120 30826 MT +(When CONNECTed to a foreign host as a terminal, log the terminal session to the specified diskette file.)49 W +10120 31931 MT +(This functionality depends to some extent) +13 W( on the remote host's ability to do XON/XOFF flow control, and)14 W +10120 33036 MT +(does not guarantee a complete transcript \050after all, that's what the KERMIT protocol is for\051. The log file)48 W +10120 34141 MT +(is closed when the connection is closed by typing the escape character followed by the single-character)104 W +10120 35246 MT +(command "C".)SH +10120 36823 MT +(It is possible to temporarily) +98 W( suspend logging during connect state. Typing an escape sequence can turn)97 W +10120 37928 MT +(file logging on \050<escape-character> R for Resume\051 or off \050<escape-character> Q for quiet\051.)SH +10120 39505 MT +(Re-entering connect state will re-open the previously opened log file and append to that file.)SH +6120 41082 MT +(LOGOUT)SH +10120 42187 MT +(Like BYE, but leaves you at Kermit-80 command level.)SH +6120 43764 MT +(OUTPUT)SH +/Times-Italic SF +10314 XM +(text)SH +/Times-Roman SF +10120 44869 MT +(Send the text to the remote computer as if you had typed it.)SH +6120 46446 MT +(PAUSE)SH +/Times-Italic SF +9537 XM +(seconds)SH +/Times-Roman SF +10120 47551 MT +(If this command is issued your CP/M system will wait) +42 W( a while before proceeding with another command.)41 W +10120 48656 MT +(This is intended for use) +21 W( in TAKE commands, where you may want to pause for a while before proceeding)22 W +10120 49761 MT +(with the rest of the TAKE file. The actual delay) +62 W( is very variable between systems, and values should be)61 W +10120 50866 MT +(determined on a trial and error basis.)SH +6120 52443 MT +(PRINT)SH +10120 XM +(Print a file to) +64 W( the console and printer. Output to the printer is buffered by the Kermit-maintained printer)65 W +10120 53548 MT +(buffer. This) +338 W( routine is identical) +44 W( to TYPE but characters are echoed to the printer as well as to the screen.)43 W +10120 54653 MT +(Suspending and canceling output is as described in TYPE.)SH +6120 56230 MT +(QUIT)SH +10120 XM +(Synonym for EXIT.)SH +6120 57807 MT +(RECEIVE)SH +/Times-Italic SF +10592 XM +(filespec)SH +/Times-Roman SF +10120 58912 MT +(Receive file\050s\051 from the remote) +185 W( Kermit, and save them under the names provided in the file headers)184 W +10120 60017 MT +(supplied by) +37 W( the remote host. If a local filespec is given, the file is saved under the given filename. If the)38 W +10120 61122 MT +(names aren't legal, use) +104 W( as many legal characters from the name as possible \050see the description of SET)103 W +10120 62227 MT +(FILE-WARNING below\051. If there's) +128 W( a conflict, and FILE-WARNING is ON, warn the user and try to)129 W +10120 63332 MT +(build a unique name for the file by) +71 W( adding ")70 W +/Courier SF +(&)SH +/Times-Roman SF +(" characters to the name. RECEIVE can be abbreviated to)70 W +10120 64437 MT +(the single letter R.)SH +6120 66014 MT +(REMOTE)SH +/Times-Italic SF +10481 XM +(command)SH +/Times-Roman SF +10120 67119 MT +(Send a command to a remote Kermit server.) +66 W( The) +381 W( results are sent back to your CP/M screen. When two)65 W +10120 68224 MT +(arguments are required and specify less than two in) +73 W( the command, you will be prompted for the missing)74 W +10120 69329 MT +(arguments. REMOTE) +250 W( commands include:)SH +10120 71120 MT +(REMOTE CD [directory])SH +ES +%%Page: 7 8 +BS +0 SI +12 /Times-Bold AF +8280 4404 MT +(1.5. Kermit-80 Description)SH +10 /Times-Italic AF +52275 XM +(Page 7)SH +46800 50 8280 5709 UL +/Times-Roman SF +14280 7886 MT +(Ask the remote server to change its default directory. If no directory is) +36 W( specified, the server changes)37 W +14280 8991 MT +(to its login directory.)SH +12280 10568 MT +(REMOTE COPY file1 file2)SH +14280 11673 MT +(Ask the remote server to copy file1 to file2.)SH +12280 13250 MT +(REMOTE RENAME file1 file2)SH +14280 14355 MT +(Ask the remote server to rename file1 to file2.)SH +12280 15932 MT +(REMOTE DELETE filespec)SH +14280 17037 MT +(Ask the remote server to delete the named file or files.)SH +12280 18614 MT +(REMOTE DIRECTORY [filespec])SH +14280 19719 MT +(Ask the remote server to display a directory listing of the given files or, if the filespec is) +41 W( omitted, all)40 W +14280 20824 MT +(the files in the current device or directory.)SH +12280 22401 MT +(REMOTE DISK-USAGE)SH +14280 23506 MT +(Ask the remote server to display information about its disk usage \050such as free or used space\051.)SH +12280 25083 MT +(REMOTE ERASE filespec)SH +14280 26188 MT +(Same as REMOTE DELETE.)SH +12280 27765 MT +(REMOTE FINISH)SH +14280 28870 MT +(Same as FINISH.)SH +12280 30447 MT +(REMOTE HELP)SH +14280 31552 MT +(Ask the remote server to display a list of the commands it can respond to.)SH +12280 33129 MT +(REMOTE HOST command)SH +14280 34234 MT +(Ask the remote server to have its operating system execute the given command.)SH +12280 35811 MT +(REMOTE KERMIT command)SH +14280 36916 MT +(Ask the remote server to execute the given Kermit command, given) +35 W( in the server Kermit's command)36 W +14280 38021 MT +(syntax.)SH +12280 39598 MT +(REMOTE LOGIN user password)SH +14280 40703 MT +(Log in to a remote Kermit server which has been set up to require a username and password.)SH +12280 42280 MT +(REMOTE MESSAGE text)SH +14280 43385 MT +(Send the text to the remote server for display on its screen \050useful with MS-DOS Kermit servers\051.)SH +12280 44962 MT +(REMOTE SET parameter value)SH +14280 46067 MT +(Ask the) +145 W( remote server to set the given parameter to the given value, for example REMOTE SET)146 W +14280 47172 MT +(FILE TYPE BINARY. Type REMOTE SET ? to see a list of the REMOTE SET options.)SH +12280 48749 MT +(REMOTE SPACE)SH +14280 49854 MT +(Same as REMOTE DISK-USAGE.)SH +12280 51431 MT +(REMOTE STATUS)SH +14280 52536 MT +(Ask the remote server to provide a status report.)SH +12280 54113 MT +(REMOTE TYPE file)SH +14280 55218 MT +(Ask the remote server to display the named file on the micro's screen.)SH +12280 56795 MT +(REMOTE WHO [user])SH +14280 57900 MT +(Ask the remote server for a list) +13 W( of users who are logged in, or if a user is specified, for a report on the)12 W +14280 59005 MT +(named user.)SH +8280 60796 MT +(RENAME file1 file2)SH +12280 61901 MT +(Rename local CP/M file1 to file2.)SH +8280 63478 MT +(SEND)SH +/Times-Italic SF +11141 XM +(filespec)SH +/Times-Roman SF +12280 64583 MT +(Send file\050s\051 specified by)13 W +/Times-Italic SF +22330 XM +(filespec)SH +/Times-Roman SF +25648 XM +(to the remote Kermit. The)13 W +/Times-Italic SF +36641 XM +(filespec)SH +/Times-Roman SF +39959 XM +(may contain CP/M wildcards.) +13 W( SEND)277 W +12280 65688 MT +(may be abbreviated to the single letter S.)SH +8280 67265 MT +(SET)SH +/Times-Italic SF +10308 XM +(parameter)SH +/Times-Roman SF +14724 XM +([)SH +/Times-Italic SF +(value)SH +/Times-Roman SF +(])SH +12280 68370 MT +(Set the specified parameter to the specified value. Possible parameter settings:)SH +12280 70161 MT +(AUTORECEIVE)SH +16280 71266 MT +(ON \050or OFF\051.) +157 W( Allows) +563 W( several files to be received without having to type RECEIVE on the)156 W +ES +%%Page: 8 9 +BS +0 SI +10 /Times-Italic AF +6120 4404 MT +(Page 8)SH +12 /Times-Bold AF +30586 XM +(Kermit User Guide: CP/M-80 KERMIT 1.5)SH +46800 50 6120 5709 UL +10 /Times-Roman AF +14120 7886 MT +(receiving machine. The routine simply looks for activity on) +91 W( the serial line, and if so fudges a)92 W +14120 8991 MT +(RECEIVE command. The packet sent by the sender will be lost.)SH +10120 10568 MT +(BLOCK-CHECK-TYPE)SH +/Times-Italic SF +20314 XM +(option)SH +/Times-Roman SF +14120 11673 MT +(The options are:)SH +14120 13464 MT +(1-CHARACTER-CHECKSUM)SH +18120 14569 MT +(Normal, default, standard 6-bit checksum.)SH +14120 15674 MT +(2-CHARACTER-CHECKSUM)SH +18120 16779 MT +(A 12-bit checksum encoded as two characters.)SH +14120 17884 MT +(3-CHARACTER-CRC-CCITT)SH +18120 18989 MT +(A 16-bit CCITT-format Cyclic Redundancy Check, encoded as 3 characters.)SH +10120 20780 MT +(BUFFER-SIZE)SH +/Times-Italic SF +16593 XM +(value)SH +/Times-Roman SF +14120 21885 MT +(This allows you to set a buffer size during transfer of data. On some systems) +86 W( it takes so long)87 W +14120 22990 MT +(that the remote end times) +9 W( out while the local system is reading or writing to disk. The size is the)8 W +14120 24095 MT +(number of 128 disk sectors \050nominal\051 and can be from 1 \050128 bytes\051 to 64 \0508 kbytes\051.)SH +14120 25672 MT +(CP/M-80 filenames will still be mapped to uppercase characters.)SH +10120 27249 MT +(COLLISION value)SH +14120 28354 MT +(What to do when a file arrives that has the same name as an existing file.) +66 W( BACKUP) +380 W( means to)65 W +14120 29459 MT +(rename the existing file. DISCARD means to discard) +444 W( and reject the incoming file.)445 W +14120 30564 MT +(OVERWRITE means to overwrite the existing file. RENAME means to rename the existing)126 W +14120 31669 MT +(file.)SH +10120 33246 MT +(DEBUG)SH +14120 XM +(ON \050or OFF\051. Enables/disables displaying of packets on the screen during) +122 W( file transfer. Not)123 W +14120 34351 MT +(performed if the QUIET option has been set for the terminal \050SET TERMINAL QUIET\051)SH +10120 35928 MT +(DEFAULT-DISK)SH +/Times-Italic SF +17591 XM +(drive letter)SH +/Times-Roman SF +14120 37033 MT +(This allows you to set the) +94 W( default disk as source and destination of file transfers. In addition,)95 W +14120 38138 MT +(issuing this command) +134 W( causes you to switch to the specified disk and log it in, write-enabled.)133 W +14120 39243 MT +(The colon must be included in the disk name \050A:\051. The selected disk appears in) +302 W( your)303 W +14120 40348 MT +(KERMIT-80 prompt, for instance)SH +/Courier SF +16520 42003 MT +(Kermit-80 14A:>)SH +/Times-Roman SF +10120 43720 MT +(DIRECTORY-FILE-SIZE ON \050or OFF\051.)SH +14120 45297 MT +(By setting DIRECTORY-FILE-SIZE OFF you) +71 W( can get an abreviated listing of your disk drive.)70 W +14120 46402 MT +(File sizes are not) +2 W( calculated, and five files are shown on a line. Setting this option ON will show)3 W +14120 47507 MT +(file sizes of each file.)SH +14120 49084 MT +(Both options will list the free space remaining.)SH +10120 50661 MT +(ESCAPE)SH +14120 XM +(Change the escape) +5 W( character for virtual terminal connections. Kermit-80 will prompt you for the)4 W +14120 51766 MT +(new escape character, which you enter literally.)SH +10120 53343 MT +(FILE-MODE)SH +/Times-Italic SF +15758 XM +(option)SH +/Times-Roman SF +14120 54448 MT +(Tells KERMIT-80 what kind of file it is) +69 W( sending, so that KERMIT can correctly determine the)68 W +14120 55553 MT +(end of the file. SET FILE BINARY means to send all the 128-byte blocks \050ie) +119 W( logical CP/M)120 W +14120 56658 MT +(sectors\051 of the file, including the last block in its entirety; SET FILE ASCII) +14 W( is used for text files,)13 W +14120 57763 MT +(and transmission stops when the first Control-Z is encountered anywhere in the) +70 W( file \050this is the)71 W +14120 58868 MT +(CP/M convention for marking the end of a text file\051.)SH +14120 60445 MT +(SET FILE-MODE) +99 W( DEFAULT tells Kermit to attempt to determine the file type by examining)98 W +14120 61550 MT +(the file) +50 W( being transmitted. If a Control-Z appears before the last block of the file, it is assumed)51 W +14120 62655 MT +(to be BINARY; if, when the first Control-Z is encountered, the remainder) +104 W( of the file contains)103 W +14120 63760 MT +(only control-Z's, it is assumed to be a text file. Unfortunately,) +253 W( not all programs fill the)254 W +14120 64865 MT +(remainder of the last record of a text file with Control-Z's, so this algorithm is not) +184 W( always)183 W +14120 65970 MT +(successful.)SH +14120 67547 MT +(If binary transmission is used on a text) +238 W( file, or a compressed file \050eg a .DQC file\051 some)239 W +14120 68652 MT +(extraneous characters \050up to 127 of them\051 may appear at the end of the file on the target system.)SH +14120 70229 MT +(If ASCII transmission is used on a binary file, any 8th) +96 W( bits set will be stripped and a warning)95 W +14120 71334 MT +(sent to the console. When the first control-Z is encountered, the file is assumed to be at) +16 W( the end,)17 W +ES +%%Page: 9 10 +BS +0 SI +12 /Times-Bold AF +8280 4404 MT +(1.5. Kermit-80 Description)SH +10 /Times-Italic AF +52275 XM +(Page 9)SH +46800 50 8280 5709 UL +/Times-Roman SF +16280 7886 MT +(even if it is not.)SH +12280 9463 MT +(FLOW-CONTROL ON \050or OFF\051)SH +16280 10568 MT +(Sets XON/XOFF flow control on or off. If set ON the host is expected to respond) +48 W( to an XOFF)49 W +16280 11673 MT +(or XON sent by Kermit-80. If set) +177 W( off, no flow control is assumed and any XON/XOFF is)176 W +16280 12778 MT +(ignored.)SH +12280 14355 MT +(IBM ON \050or OFF\051)SH +16280 15460 MT +(Allow the transfer) +125 W( of files to and from an IBM mainframe computer. This makes Kermit-80)124 W +16280 16565 MT +(wait for the IBM turnaround) +61 W( character \050XON\051, ignore parity on input, add appropriate parity to)62 W +16280 17670 MT +(output, and use local echoing during) +167 W( CONNECT. As distributed, KERMIT-80 uses MARK)166 W +16280 18775 MT +(parity for IBM communication. If you) +4 W( don't give this command, IBM mode is OFF. Since IBM)5 W +16280 19880 MT +(VM/CMS KERMIT does not have timeout capability,) +118 W( SET IBM ON also turns on the "fuzzy)117 W +16280 20985 MT +(timer" automatically.)SH +12280 22562 MT +(LOCAL-ECHO ON \050or OFF\051)SH +16280 23667 MT +(When you CONNECT to a) +136 W( remote host, you must set LOCAL-ECHO ON if the host is half)135 W +16280 24772 MT +(duplex, OFF if full duplex. OFF by default.)SH +12280 26349 MT +(LOGGING ON \050or OFF\051)SH +16280 27454 MT +(Cease or resume logging whenever) +25 W( connect mode is entered. This is really only applicable after)24 W +16280 28559 MT +(a LOG command is no longer required.)SH +12280 30136 MT +(NO-EXIT)SH +16280 31241 MT +(This command is applicable only) +145 W( for Kermit initiated with a command tail. For example, if)144 W +16280 32346 MT +(Kermit was initiated by:)SH +16280 33923 MT +(KERMIT ;SEND HELLO;NO-EXIT)SH +16280 35500 MT +(Kermit would first seek out and execute the KERMIT.INI file \050if present\051, then) +248 W( send file)249 W +16280 36605 MT +(HELLO to a remote system.) +8 W( Usually) +265 W( Kermit would exit back to CP/M, but NO-EXIT over-rides)7 W +16280 37710 MT +(this. STAY) +250 W( is a synonym for NO-EXIT.)SH +16280 39287 MT +(Note the leading semicolon. This clears leading spaces from the first command.)SH +12280 40864 MT +(OUTPUT)SH +/Times-Italic SF +16474 XM +(text-line)SH +/Times-Roman SF +16280 41969 MT +(Send a line of text) +121 W( to the remote computer \050or modem\051. This simply copies the string to the)120 W +16280 43074 MT +(correct line, and assumes all appropriate parameters have been set to be used, e.g. speed, parity)54 W +16280 44179 MT +(etc. It) +250 W( is intended for use in TAKE command files.)SH +12280 45756 MT +(PARITY)SH +/Times-Italic SF +16141 XM +(option)SH +/Times-Roman SF +16280 46861 MT +(Sets parity for outgoing characters to one of) +49 W( the following: NONE, SPACE, MARK, EVEN, or)50 W +16280 47966 MT +(ODD. On) +286 W( input, if parity is NONE, then the 8th bit is kept \050as data\051, otherwise it is stripped) +18 W( and)17 W +16280 49071 MT +(ignored. The) +558 W( parity setting applies to both terminal) +154 W( connection and file transfer. If you set)155 W +16280 50176 MT +(parity to) +236 W( anything other than none, KERMIT-80 will attempt to use "8th bit prefixing" to)235 W +16280 51281 MT +(transfer binary files.) +45 W( If) +341 W( the other KERMIT is also capable of 8th bit prefixing, then binary files)46 W +16280 52386 MT +(can be transferred successfully; if not, the 8th bit of each data byte) +75 W( will be lost \050you will see a)74 W +16280 53491 MT +(warning on your screen if this happens\051.)SH +12280 55068 MT +(PORT)SH +/Times-Italic SF +15086 XM +(port name)SH +/Times-Roman SF +16280 56173 MT +(Allows you to switch between different communication ports. This command is not available)96 W +16280 57278 MT +(on all systems. Type)56 W +/Courier SF +25283 XM +(SET PORT ?)57 W +/Times-Roman SF +31704 XM +(for a list of valid options for your system. \050Note: If your)57 W +16280 58383 MT +(system does not support several) +105 W( ports, this command will return a "Not implemented" error if)104 W +16280 59488 MT +(you try to set a port.\051)SH +12280 61065 MT +(PRINTER)SH +16280 62170 MT +(ON \050or OFF\051)SH +16280 63275 MT +(Turns copying of CONNECT session) +151 W( to printer on and off. It is also possible to toggle the)152 W +16280 64380 MT +(printer on/off from the connect state, by typing <escape character> followed by P.)SH +12280 65957 MT +(RECEIVE)SH +/Times-Italic SF +16752 XM +(parameter)SH +/Times-Roman SF +21168 XM +([)SH +/Times-Italic SF +(value)SH +/Times-Roman SF +(])SH +16280 67062 MT +(Set a RECEIVE parameter.)SH +16280 68853 MT +(PAD-CHAR)SH +20280 69958 MT +(Set the PAD character to use while receiving files. Currently a dummy, as for SET)100 W +20280 71063 MT +(SEND PAD-CHAR.)SH +ES +%%Page: 10 11 +BS +0 SI +10 /Times-Italic AF +6120 4404 MT +(Page 10)SH +12 /Times-Bold AF +30586 XM +(Kermit User Guide: CP/M-80 KERMIT 1.5)SH +46800 50 6120 5709 UL +10 /Times-Roman AF +14120 7886 MT +(PADDING [value])SH +18120 8991 MT +(Set the number of PAD characters to use while receiving files. Same as SET) +76 W( SEND)75 W +18120 10096 MT +(PADDING.)SH +14120 11201 MT +(START-OF-PACKET [value])SH +18120 12306 MT +(Set the default start of Packet character for receiving files.) +58 W( Apply) +364 W( the same rules and)57 W +18120 13411 MT +(considerations as for SET SEND START-OF-PACKET.)SH +14120 14516 MT +(PACKET-LENGTH number)SH +18120 15621 MT +(Tell the other Kermit the longest packet length CP/M Kermit) +171 W( is willing to receive)170 W +18120 16726 MT +(during file transfer. The maximum length is 94, which is also the default length.)SH +10120 18517 MT +(SEND)SH +/Times-Italic SF +12981 XM +(parameter)SH +/Times-Roman SF +17397 XM +([)SH +/Times-Italic SF +(value)SH +/Times-Roman SF +(])SH +14120 19622 MT +(Set a SEND parameter.)SH +14120 21413 MT +(PAD-CHAR)SH +18120 22518 MT +(Set the) +98 W( Pad character to be used while sending files. It is currently a dummy entry,)99 W +18120 23623 MT +(and does not do anything.)SH +14120 24728 MT +(PADDING [value])SH +18120 25833 MT +(Set the number of PAD-CHARS) +249 W( to be used while sending files. This too does)250 W +18120 26938 MT +(nothing.)SH +14120 28043 MT +(START-OF-PACKET)SH +18120 29148 MT +(Set the default start of packet character to another character than control-A. This) +28 W( may)29 W +18120 30253 MT +(be necessary on) +439 W( systems \050including intervening networks\051 that trap control-A)438 W +18120 31358 MT +(characters. Choose) +272 W( a control character not otherwise used, ie not carriage return) +11 W( \05013D,)12 W +18120 32463 MT +(ODH\051, line feed) +108 W( \05010D, OAN\051, tabs \05009D, 09H\051, backspace \05008H\051, and bell \05007H\051 or)107 W +18120 33568 MT +(any other used between you and your remote system.)SH +10120 35359 MT +(SPEED)SH +/Times-Italic SF +13426 XM +(value)SH +/Times-Roman SF +14120 36464 MT +(Change the) +23 W( baud rate of the communications port. This command only works on some systems.)22 W +/Times-Italic SF +14120 37569 MT +(value)SH +/Times-Roman SF +16718 XM +(is the numeric baud rate \050300, 9600, etc.\051 desired. Type) +182 W( SET SPEED followed by a)183 W +14120 38674 MT +(question mark for a list of supported baud rates. On systems that do) +36 W( not support this command,)35 W +14120 39779 MT +(you must set the port baud rate from CP/M or other setup mechanism outside of KERMIT-80.)SH +10120 41356 MT +(TACTRAP)SH +14120 42461 MT +(Set the TAC intercept character. If you are attached to a TAC it will) +149 W( swallow the intercept)148 W +14120 43566 MT +(character \050commercial AT sign by default\051 so Kermit sends) +94 W( it twice. With this command you)95 W +14120 44671 MT +(can set the intercept character \050ie the one to send twice\051 to another character.)SH +10120 46248 MT +(TERMINAL)SH +/Times-Italic SF +15536 XM +(option)SH +/Times-Roman SF +14120 47353 MT +(Select one of the following terminal characteristics:)SH +14120 49144 MT +(OFF)SH +18120 XM +(sets emulation off, and its up to the) +63 W( attached terminal to respond to escape sequences)64 W +18120 50249 MT +(sent from the remote host system.)SH +14120 51907 MT +(DUMB)SH +18120 XM +(Like off, but carriage return) +123 W( and line feed characters are the only control characters)122 W +18120 53012 MT +(accepted. All) +250 W( other control characters are simply ignored. \050Really a "Glass TTY"\051.)SH +14120 54670 MT +(EXTERNAL)SH +18120 55775 MT +(Emulation is provided for by a) +259 W( routine in the system dependent part of Kermit.)258 W +18120 56880 MT +(Attempting to set) +236 W( this option without having and externally supplied routine will)237 W +18120 57985 MT +(returna "Not Implemented" error.)SH +14120 59643 MT +(OFF)SH +18120 XM +(All characters are passed directly to the terminal without any interpretation by Kermit.)SH +14120 61301 MT +(VT52)SH +18120 XM +(When connected) +101 W( as a terminal to a foreign host, the micro emulates a VT52. VT52)100 W +18120 62406 MT +(emulation is set by default, except on micros that already have terminal functionality)74 W +18120 63511 MT +(built in, such) +35 W( as the DEC VT180 and DECmate \050these act as VT100-series terminals\051.)34 W +18120 64616 MT +(Some systems emulate other terminals, like the ADM3A; see table 1-5.)SH +14120 66274 MT +(QUIET)SH +18120 XM +(Do not display any file transfer information onto the console. This mode is useful) +72 W( if)73 W +18120 67379 MT +(you console takes) +58 W( a long time to update the display. Only the file name is displayed.)57 W +18120 68484 MT +(DEBUGging information is not displayed even if selected.)SH +14120 70142 MT +(REGULAR)SH +18120 71247 MT +(Inverse of QUIET. All packets etc displayed, as ususal.)SH +ES +%%Page: 11 12 +BS +0 SI +12 /Times-Bold AF +8280 4404 MT +(1.5. Kermit-80 Description)SH +10 /Times-Italic AF +51775 XM +(Page 11)SH +46800 50 8280 5709 UL +/Times-Roman SF +12280 7886 MT +(TIMER ON \050or OFF\051)SH +16280 8991 MT +(Enable or disable) +131 W( the "fuzzy timer". The timer is off by default, because in the normal case)132 W +16280 10096 MT +(KERMIT-80 is communicating with a mainframe KERMIT that has its own timer.) +62 W( Mainframe)372 W +16280 11201 MT +(KERMIT timers tend to be more precise or adaptable to changing conditions.) +46 W( You) +343 W( should SET)47 W +16280 12306 MT +(TIMER ON if you are communicating with a KERMIT that does not have a) +41 W( timer. You should)40 W +16280 13411 MT +(SET TIMER OFF if you are communicating over a network with long delays.)SH +12280 14988 MT +(USER)SH +/Times-Italic SF +15086 XM +(user-number)SH +/Times-Roman SF +16280 16093 MT +(Sets another user number to be active. Acceptable user numbers are) +203 W( 0 to 31, though it is)202 W +16280 17198 MT +(recommended to use user numbers 0 to 15 only. This is really only useful for Winchester)184 W +16280 18303 MT +(Systems with high disk capacities.)SH +12280 19880 MT +(WARNING ON \050or OFF\051)SH +16280 20985 MT +(Warn user of filename) +5 W( conflicts when receiving files from remote host, and attempt to generate a)6 W +16280 22090 MT +(unique name) +19 W( by adding ")18 W +/Courier SF +(&)SH +/Times-Roman SF +(" characters to the given name. ON by default, which is equivalent to)18 W +16280 23195 MT +(SET COLLISION RENAME.)SH +8280 24986 MT +(SHOW)SH +12280 XM +(Display all settable parameters. You will get a page or so) +83 W( of the status af all parameters that can be set)84 W +12280 26091 MT +(using the SET command.)SH +8280 27668 MT +(STATUS)SH +12280 XM +(The same function as Show.)SH +8280 29245 MT +(STAY)SH +12280 XM +(Equivalent to SET NO-EXIT.)SH +8280 30822 MT +(TAKE)SH +/Times-Italic SF +11196 XM +(filespec)SH +/Times-Roman SF +12280 31927 MT +(Take characters and commands from the specified file as if they) +40 W( were entered from the keyboard. This is)41 W +12280 33032 MT +(useful if you want to set up a batch job. A command file can send, get,) +210 W( receive, set functions etc)209 W +12280 34137 MT +(automatically. A) +250 W( TAKE command can be interrupted with ^C.)SH +12280 35714 MT +(An automatic) +67 W( "TAKE KERMIT.INI" is executed from the default drive when Kermit-80 is loaded. This)68 W +12280 36819 MT +(can be used to set defaults of band rate, parity, filetype, default drive etc.)SH +12280 38396 MT +(If KERMIT.INI does not exist, control is given directly to the user.)SH +8280 39973 MT +(TRANSMIT)SH +/Times-Italic SF +13641 XM +(filespec turnaround)SH +/Times-Roman SF +12280 41078 MT +(Send the specified file) +70 W( to the system on the other end of the connection as though it were being typed at)71 W +12280 42183 MT +(the terminal, one line at a time. Each line sent is terminated with a carriage return, and any line) +36 W( feeds are)35 W +12280 43288 MT +(stripped from the file sent.) +30 W( After) +311 W( each line has been sent Kermit waits for a character string from the host)31 W +12280 44393 MT +(\050eg a acrriage return\051. If not specified, a carriage return is assumed. No KERMIT protocol) +76 W( is involved.)75 W +12280 45498 MT +(An asterisk \050star\051 is sent to the console for every line sent,) +1 W( to indicate how the transfer is progressing. This)2 W +12280 46603 MT +(is useful for sending files to systems) +43 W( that don't have a KERMIT program. During transmission, you may)42 W +12280 47708 MT +(type one of these single-character commands:)SH +12280 49499 MT +(Control-C)SH +14280 50604 MT +(Cease transmission, and drop into terminal emulation mode.)SH +12280 51709 MT +(CR)SH +14280 XM +(\050carriage return\051 Re-transmit the previous line.)SH +8280 53500 MT +(TYPE filespec)SH +12280 54605 MT +(Type a) +49 W( local CP/M file or files on the CP/M screen. A Control-C will cancel the command and return to)50 W +12280 55710 MT +(the Kermit prompt. A Ctrl-X will cancel the current file and go on to the next one, if) +81 W( any. Typing any)80 W +12280 56815 MT +(other character) +86 W( while the file is being displayed will suspend the output. Another character will resume)87 W +12280 57920 MT +(output.)SH +8280 59497 MT +(VERSION)SH +12280 60602 MT +(Show the name, edit number, and edit date of several of the modules that make up Kermit-80.)SH +ES +%%Page: 12 13 +BS +0 SI +10 /Times-Italic AF +6120 4404 MT +(Page 12)SH +12 /Times-Bold AF +30586 XM +(Kermit User Guide: CP/M-80 KERMIT 1.6)SH +46800 50 6120 5709 UL +14 SS +6120 8138 MT +(1.6. Kermit-80 Flavors)SH +10 /Times-Roman AF +6120 10256 MT +(Many of the) +152 W( systems supported use an external terminal, rather than a built-in console. Kermit may be further)153 W +6120 11452 MT +(customized for these systems by) +98 W( defining \050at assembly time\051 the terminal type to be used. If the terminal type is)97 W +6120 12648 MT +(unknown or) +29 W( does not match any of the existing terminal options, the generic "CRT" option may be selected. In this)30 W +6120 13844 MT +(case, Kermit cannot do fancy screen control during file transfer; it simply types the file names, packet) +25 W( numbers, and)24 W +6120 15040 MT +(messages in sequence across and down the screen. This works best) +183 W( if you can put your micro or terminal in)184 W +6120 16236 MT +("autowrap" mode; otherwise the packet numbers will pile up in the rightmost column;) +69 W( the filenames and messages)68 W +6120 17432 MT +(will always appear on) +150 W( a new line, however. If no specific terminal has been selected, Kermit cannot do VT52)151 W +6120 18628 MT +(emulation; it can act as a "dumb terminal" \050sometimes called a "glass TTY"\051, or else its own built in) +167 W( terminal)166 W +6120 19824 MT +(firmware provides cursor control functions independent of the Kermit program.)SH +12 /Times-Bold AF +6120 22940 MT +(1.6.1. Generic Kermit-80)SH +10 /Times-Roman AF +6120 24882 MT +("Generic Kermit-80" is an implementation of Kermit that should run on any) +11 W( 8080-compatible CP/M 2.2 system with)12 W +6120 26078 MT +(no modification) +7 W( at all, or perhaps only a minor one. Unlike other Kermit-80 implementations, it contains no system-)6 W +6120 27274 MT +(dependent manipulation of the serial port. All) +87 W( I/O is done with standard CP/M BIOS calls, and I/O redirection is)88 W +6120 28470 MT +(done using the CP/M IOBYTE function, which, according to the Digital Research)24 W +/Times-Italic SF +39460 XM +(CP/M Operating System Manual)24 W +/Times-Roman SF +(,)SH +6120 29666 MT +(is an optional feature of any particular CP/M implementation.) +207 W( If) +665 W( your system does not provide the IOBYTE)208 W +6120 30862 MT +(function, Generic Kermit-80 will not work; furthermore, not all systems that implement IOBYTE do so in) +36 W( the same)35 W +6120 32058 MT +(way. The) +360 W( SET PORT command may be used to select the) +55 W( devices to be used for input and output. Table 1-1 lists)56 W +6120 33254 MT +(the options to the SET PORT command and their effects.)SH +46800 50 6120 35171 UL +/Courier SF +17220 37252 MT +(SET PORT)SH +/Courier-Oblique SF +22620 XM +(xxx)SH +/Courier SF +26820 XM +(input from) +SH( output) +3000 W( to)SH +7200 50 17220 37452 UL +6000 50 26820 37452 UL +5400 50 36420 37452 UL +20220 38283 MT +(CRT CRT: CRT:)6600 W +20220 39314 MT +(PTR PTR: PTP:)6600 W +20220 40345 MT +(TTY TTY: TTY:)6600 W +20220 41376 MT +(UC1 UC1: UC1:)6600 W +20220 42407 MT +(UR1 UR1: UP1:)6600 W +20220 43438 MT +(UR2 UR2: UP2:)6600 W +/Times-Bold SF +20881 45048 MT +(Table 1-1:)SH +/Times-Roman SF +25742 XM +(Kermit-80 SET PORT Options)SH +46800 50 6120 46858 UL +6120 49050 MT +(The default is SET PORT) +105 W( PTR. In all cases, the console \050CON:\051 and list \050LST:\051 devices used are those selected)104 W +6120 50246 MT +(when Kermit is started.)SH +6120 52638 MT +(The reason all Kermit-80 implementations aren't generic is that a good deal of speed is) +128 W( sacrificed by getting all)129 W +6120 53834 MT +(services from the operating system. While a specific implementation of Kermit-80 may be able to operate) +45 W( at 4800,)44 W +6120 55030 MT +(9600, or even 56 Kilo baud, generic Kermit will fail to work on some systems at speeds in excess) +30 W( of 1200 baud. In)31 W +6120 56226 MT +(addition, many features of Kermit require more specific knowledge of the hardware) +171 W( involved. Generic Kermit)170 W +6120 57422 MT +(cannot send a BREAK signal, or change the baud rate, for example.)SH +12 /Times-Bold AF +6120 60538 MT +(1.6.2. CP/M 3 Kermit)SH +10 /Times-Roman AF +6120 62480 MT +(CP/M-3 Kermit \050also known as CP/M-Plus Kermit\051 is) +161 W( a version of generic Kermit-80, and should run on most)162 W +6120 63676 MT +(CP/M-3 \050CP/M-Plus\051 systems. It uses the auxilliary port \050AUX:\051 to communicate to the remote Kermit. The SET)60 W +6120 64872 MT +(BAUD and SET PORT commands are not supported; nor can a BREAK be sent. Like generic Kermit-80, a terminal)3 W +6120 66068 MT +(may be selected at assembly time.)SH +ES +%%Page: 13 14 +BS +0 SI +12 /Times-Bold AF +8280 4404 MT +(1.6.3. System-Specific Versions)SH +10 /Times-Italic AF +51775 XM +(Page 13)SH +46800 50 8280 5709 UL +12 /Times-Bold AF +8280 8004 MT +(1.6.3. System-Specific Versions)SH +10 /Times-Roman AF +8280 9946 MT +(There are also many versions of Kermit-80 tailored to specific systems. Most) +39 W( of these operate uniformly, but some)38 W +8280 11142 MT +(of them take advantage \050or suffer limitations\051 of the specific system. Here are some of the special features) +145 W( for)146 W +8280 12338 MT +(particular systems:)SH +8280 14129 MT +(Amstrad: -- Two versions:)SH +3444 50 8280 14329 UL +10280 15920 MT +(PCW 8256)SH +12280 17025 MT +(The PCW 8256/8512 with the serial inerafce attached.)SH +10280 18602 MT +(CPC 6128)SH +12280 19707 MT +(The 664 with add on memory and 6128 are both) +10 W( supported. Both systems must run CP/M Plus, so the 664)9 W +12280 20812 MT +(will need an add on RAM pack and CP/M upgrade. A high speed transfer rate of) +70 W( 38k baud can be used)71 W +12280 21917 MT +(between Amstrad computers.)SH +8280 23708 MT +(ACCESS:)SH +3779 50 8280 23908 UL +10280 24813 MT +(Access Matrix computer using port J5. Supports SET BAUD-RATE for rates of 300-9600 baud.)SH +8280 26390 MT +(Apple II -- four variations:)SH +3360 50 8280 26590 UL +10280 28181 MT +(APMMDM:)SH +12280 29286 MT +(Apple with Z80 Softcard and Micromodem II in slot 2 Dialout capability provided in) +63 W( connect command;)62 W +12280 30391 MT +(user is prompted for phone number) +124 W( if carrier is not present. During connect mode,)125 W +/Courier SF +47449 XM +(^]D)SH +/Times-Roman SF +49624 XM +(drops carrier.)125 W +12280 31496 MT +(BYE command also causes carrier to be dropped.)SH +10280 33073 MT +(AP6551:)SH +12280 34178 MT +(Apple with Z80 Softcard, and one of several 6551-based communication cards; the slot) +198 W( number is a)199 W +12280 35283 MT +(compile-time parameter \050default is slot 2\051. SET BAUD-RATE supported; speeds are 110-19200 baud.)SH +10280 36860 MT +(APCPS:)SH +12280 37965 MT +(Apple with Z80 Softcard and CP Multi-Function Card. The) +279 W( slot number is again a compile-time)280 W +12280 39070 MT +(parameter. SET) +250 W( BAUD-RATE is supported for baud rates from 50 baud to 19200 baud.)SH +10280 40647 MT +(AP6850:)SH +12280 41752 MT +(Apple II) +72 W( with Z80 Softcard and a 6850-based USART in slot 2-the slot being a compile-time parameter.)73 W +12280 42857 MT +(SET BAUD-RATE is not supported.)SH +8280 44648 MT +(BBC:)SH +2001 50 8280 44848 UL +10280 45753 MT +(Acorn Computers BBC Computer with Acorn Z80 second processor running CP/M-80.) +288 W( Supports) +827 W( SET)289 W +10280 46858 MT +(BAUD-RATE and can send breaks.)SH +8280 48435 MT +(BigBoard II:)SH +4805 50 8280 48635 UL +10280 49540 MT +(Uses serial) +47 W( port A. To use port B, change mnport, mnprts, and baudrt and reassemble. Can generate BREAK.)48 W +10280 50645 MT +(SET SPEED supported; speeds are 300-38400 baud.)SH +8280 52222 MT +(Cifer:)SH +2055 50 8280 52422 UL +10280 53327 MT +(Originally coded for Cifer 1886) +81 W( using the VL: port set as TTYI: and TTYO: but works successfully on 18xx)82 W +10280 54432 MT +(and 28xx series machines.)SH +10280 56009 MT +(There are now two versions, each with two variations: Either running) +2 W( CP/M Version 2.2 or 3.0, and either using)1 W +10280 57114 MT +(the VL: or) +61 W( AUX: ports. The VL: port version can only use seven bits of data, so parity prefixing is required)62 W +10280 58219 MT +(for binary file transfers. This restriction is removed by using the AUX: port. For those interested, the) +22 W( problem)21 W +10280 59324 MT +(is due to the interprocessor link between the video and CPU \050!\051 boards. The VL:) +1 W( port is on the video board, and)2 W +10280 60429 MT +(the AUX: port on the CPU board, and the inter processor link can only transfer seven bits of data.)SH +10280 62006 MT +(Supports SET SPEED, and can generate breaks on some models with a BREAK key.)SH +8280 63583 MT +(Comart:)SH +3000 50 8280 63783 UL +10280 64688 MT +(Comart Communicator-Similar to Northstar equipment. Can generate BREAK.)SH +8280 66265 MT +(Compupro:)SH +4278 50 8280 66465 UL +10280 67370 MT +(Based on Kermit 3.x, and has been merged into V4.09)SH +8280 68947 MT +(CPT-85xx word processors:)SH +10943 50 8280 69147 UL +10280 70052 MT +(Can generate BREAK. SET SPEED supported; speeds are 50-9600 baud.)SH +8280 71629 MT +(Cromemco:)SH +4444 50 8280 71829 UL +ES +%%Page: 14 15 +BS +0 SI +10 /Times-Italic AF +6120 4404 MT +(Page 14)SH +12 /Times-Bold AF +29686 XM +(Kermit User Guide: CP/M-80 KERMIT 1.6.3)SH +46800 50 6120 5709 UL +10 /Times-Roman AF +8120 7886 MT +(Cromemco computers with TU-ART card. Supports SET BAUD-RATE \050110-9600 baud\051.)SH +6120 9463 MT +(DEC DECmate II word processor \050with Z80 card\051:)SH +20023 50 6120 9663 UL +8120 10568 MT +(Can generate BREAK.)SH +6120 12145 MT +(DEC VT180 \050Robin\051:)SH +8444 50 6120 12345 UL +8120 13250 MT +(Three output ports, referred to as COMMUNICATIONS, GENERAL, and PRINTER. Can generate BREAK.)SH +6120 14827 MT +(Digicomp Delphi 100:)SH +8722 50 6120 15027 UL +8120 15932 MT +(SET SPEED supported; speeds are 50-19200 baud.)SH +6120 17509 MT +(Discovery:)SH +4110 50 6120 17709 UL +8120 18614 MT +(Action Computer Enterprises "Discovery" Multi-user Computer. Uses Port) +31 W( B on an 83U user board. Supports)30 W +8120 19719 MT +(SET SPEED for 50-19200 baud. Can generate BREAK.)SH +6120 21296 MT +(Epson:)SH +2500 50 6120 21496 UL +8120 22401 MT +(Epson PX-8 with LCD display. Although it is quite different in displaying of Packet Information, it) +57 W( works as)56 W +8120 23506 MT +(any other CP/M-80 Kermit. Supports SET SPEED and can generate BREAK.)SH +6120 25083 MT +(Generic Kermit:)SH +6248 50 6120 25283 UL +8120 26188 MT +(Two versions, one for CP/M version 2)46 W +/Courier SF +(.)SH +/Times-Roman SF +(2 and version 3. These systems use IOBYTE flipping \050V2)46 W +/Courier SF +(.)SH +/Times-Roman SF +(2\051 and) +46 W( the)45 W +8120 27293 MT +(AUX: device) +306 W( to communicate to the serial line. You may have to SET PORT) +28 W( xxx before the version 2)29 W +/Courier SF +(.)SH +/Times-Roman SF +(2 will)29 W +8120 28398 MT +(work, as Kermit needs to know what device is the serial line.)SH +6120 29975 MT +(Genie:)SH +2388 50 6120 30175 UL +8120 31080 MT +(Eaca Video Genie.)SH +6120 32657 MT +(Heath: Three Versions:)SH +2388 50 6120 32857 UL +8120 34448 MT +(H8QUAD)SH +10120 35553 MT +(for Heath-8 systems with the quad io board. This system has been derived from V3.x code. Note) +14 W( that this)13 W +10120 36658 MT +(version will not run "as is" on H89 systems.)SH +8120 38235 MT +(H89)SH +10120 XM +(For Heath-89 machines suports baud rates from 50 to 56,000 baud.)SH +8120 39812 MT +(Z100)SH +10120 40917 MT +(For Z-100 running CP/M-85. This version does not support setting of baud rates.)SH +6120 42708 MT +(Intertec Superbrain: Two Versions:)SH +7692 50 6120 42908 UL +8120 44499 MT +(BRAINA)SH +10120 45604 MT +(For superbrain using AUX port. Breaks and SET BAUD both supported)SH +8120 47181 MT +(BRAINM)SH +10120 48286 MT +(As above, but using the MAIN port.)SH +6120 50077 MT +(Ithaca:)SH +2443 50 6120 50277 UL +8120 51182 MT +(Ithaca Intersystems based computer using the VIO card for all IO to the outside world. The system is strictly)60 W +8120 52287 MT +(speaking a home-brew variant of the Ithaca machine, using an S100 cardcage without) +24 W( a front panel. It uses the)23 W +8120 53392 MT +(Extended BIOS by EuroMicro of London. However, I see no reason for this version not running on) +38 W( a genuine)39 W +8120 54497 MT +(Ithaca Intersystems machine. There are patches needed to the EuroMicro BIOS to make this version work.)SH +6120 56074 MT +(Kaypro:)SH +3277 50 6120 56274 UL +8120 57179 MT +(Should work on most Kaypro models, as well) +24 W( as some related systems \050Ferguson BigBoard I, Xerox 820\051. For)25 W +8120 58284 MT +(the newer Kaypros with multiple ports, Kermit uses) +14 W( the one labeled "serial data"; it cannot use the serial printer)13 W +8120 59389 MT +(or internal modem ports \050but it should) +81 W( be possible to modify the values for mnport, mnprts, and baudrt to do)82 W +8120 60494 MT +(this\051. Can) +250 W( generate BREAK. SET SPEED supported; speeds are 50-19200 baud.)SH +6120 62071 MT +(Lobo:)SH +2111 50 6120 62271 UL +8120 63176 MT +(Lobo MAX-80. Supports SET SPEED and can generate BREAKS.)SH +6120 64753 MT +(Merlin:)SH +2722 50 6120 64953 UL +8120 65858 MT +(British Telecom Merlin M2215 \050also Rair Black Box, possibly also the ICL PC?\051. Requires a terminal.)SH +6120 67435 MT +(Microbee:)SH +3832 50 6120 67635 UL +8120 68540 MT +(Microbee Systems computer made in Australia. Works on Microbee 56K \050Series 2 APC\051, 64K) +26 W( \050Computer in a)27 W +8120 69645 MT +(Book\051, 128K \050Dynamic\051, and 256K) +94 W( \050256TC\051. Can generate BREAK. SET BAUD-RATE supported; speeds)93 W +8120 70750 MT +(are 75-9600. All serial I/O is via software, not) +86 W( hardware. Simultaneous transmit and receive possible on all)87 W +8120 71855 MT +(speeds except 75/1200, 1200/75, 4800, and 9600.)SH +ES +%%Page: 15 16 +BS +0 SI +12 /Times-Bold AF +8280 4404 MT +(1.6.3. System-Specific Versions)SH +10 /Times-Italic AF +51775 XM +(Page 15)SH +46800 50 8280 5709 UL +/Times-Roman SF +8280 7886 MT +(Micromate:)SH +4388 50 8280 8086 UL +10280 8991 MT +(PMC 101 Micromate. Supports SET SPEED and can generate BREAK.)SH +8280 10568 MT +(Micromint: Two versions)SH +4278 50 8280 10768 UL +10280 12359 MT +(S6)SH +12280 XM +(The Ciarcia/Micromint sb-180 board with a 6Mhz procoessor. System requires a terminal.)SH +10280 13936 MT +(S9)SH +12280 XM +(As above, but with a 9Mhz processor.)SH +8280 15727 MT +(NCR:)SH +2056 50 8280 15927 UL +10280 16832 MT +(Decisionmate 5. Uses the 2651 and is largely the same as the Ithaca Intersystems machine implementation.)SH +8280 18409 MT +(Northstar: -- There are four versions available:)SH +3777 50 8280 18609 UL +10280 20200 MT +(NORTHS:)SH +12280 21305 MT +(Northstar Horizon with HS10-4 board. Supports SET SPEED and SET PORT.)SH +10280 22882 MT +(HORIZON:)SH +12280 23987 MT +(Northstar Horizon using the serial ports on the Mother board. Can generate BREAK.)SH +10280 25564 MT +(BASICNS:)SH +12280 26669 MT +(Basic Northstar Horizon using the printer port. Can generate BREAK.)SH +10280 28246 MT +(ADVANT:)SH +12280 29351 MT +(Northstar Advantage. Supports SET SPEED and can generate BREAK. Traps Control-0 in the) +100 W( system)99 W +12280 30456 MT +(filter.)SH +8280 32247 MT +(Morrow Decision I:)SH +7665 50 8280 32447 UL +10280 33352 MT +(Uses the Multi-I/O board. Port 1 is the console, port 3 is the communications line. SET SPEED) +89 W( supported;)88 W +10280 34457 MT +(speeds are 75-56000 baud.)SH +8280 36034 MT +(Morrow Micro Decision I:)SH +10359 50 8280 36234 UL +8280 37611 MT +(Nokia MicroMikko:)SH +7805 50 8280 37811 UL +10280 38716 MT +(Will not echo control-O \050which locks keyboard\051. SET SPEED supported; speeds are 75-9600 baud.)SH +8280 40293 MT +(Ohio Scientific:)SH +6083 50 8280 40493 UL +10280 41398 MT +(Doesn't have screen control.)SH +8280 42975 MT +(Osborne 1:)SH +4138 50 8280 43175 UL +10280 44080 MT +(Uses serial line, not internal modem. Left-arrow key generates) +39 W( <DEL> \050"delete" or "rubout" character\051 during)38 W +10280 45185 MT +(connect mode. SET SPEED supported; speeds are 300 and 1200 baud. Now supports multi-sector buffering.)SH +8280 46762 MT +(Research Machines: Two Versions:)SH +7803 50 8280 46962 UL +10280 48553 MT +(RM380ZM:)SH +12280 49658 MT +(380Z and 5.25" disks supports SET BAUD.RATE)SH +10280 51235 MT +(RM380ZF:)SH +12280 52340 MT +(380Z and 8" disks, otherwise as above.)SH +8280 54131 MT +(Sanyo:)SH +2500 50 8280 54331 UL +10280 55236 MT +(Sanyo MBC-1100. This version derived from Kermit V3.x)SH +8280 56813 MT +(ScreenTyper:)SH +5109 50 8280 57013 UL +10280 57918 MT +(Details unkown.)SH +8280 59495 MT +(TRS-80: Three versions:)SH +3167 50 8280 59695 UL +10280 61286 MT +(TRS80LB:)SH +12280 62391 MT +(TRS-80 with Lifeboat CP/M)SH +10280 63968 MT +(TRS80PT:)SH +12280 65073 MT +(TRS-80 with Pickles and Trout CP/M)SH +10280 66650 MT +(TRSM4:)SH +12280 67755 MT +(TRS-80 Model 4 with Montezuma CP/M)SH +8280 69546 MT +(Teletek:)SH +2999 50 8280 69746 UL +10280 70651 MT +(Teletek Systemaster. Supports SET BAUD.)SH +ES +%%Page: 16 17 +BS +0 SI +10 /Times-Italic AF +6120 4404 MT +(Page 16)SH +12 /Times-Bold AF +29686 XM +(Kermit User Guide: CP/M-80 KERMIT 1.6.3)SH +46800 50 6120 5709 UL +10 /Times-Roman AF +6120 7886 MT +(Telcon:)SH +2777 50 6120 8086 UL +8120 8991 MT +(TELCON ZOBRA portable computer.)SH +6120 10568 MT +(Torch:)SH +2388 50 6120 10768 UL +8120 11673 MT +(Torch Unicorn 5 initially, but the code runs on other Z80 based CP/N \050as in Nut!\051 systems.) +79 W( It) +410 W( uses the BBC)80 W +8120 12778 MT +(Computer as a "Base processor", and is similar to the BBC version. The base processors RS423) +77 W( port is used)76 W +8120 13883 MT +(rather than any built in Modem. \050UK telecoms legislation effectively) +109 W( makes modem control software tricky)110 W +8120 14988 MT +(business...\051. Two) +591 W( potential versions exist-one using cursor positioning codes for a MCP and CCCP ROM)170 W +8120 16093 MT +(combination of revision less than 1.00, the other version uses the additional facility MCP/CCCP) +196 W( versions)197 W +8120 17198 MT +(greater than 1. Supports SET SPEED and can generate BREAKs.)SH +8120 18775 MT +(Note that binary files must be transferred using SET PARITY to anything other than) +45 W( NONE! Parity is neither)44 W +8120 19880 MT +(generated nor checked.)SH +6120 21457 MT +(US Micro Sales:)SH +6333 50 6120 21657 UL +8120 22562 MT +(S-100-8 based computer.)SH +6120 24139 MT +(Vector Graphics:)SH +6581 50 6120 24339 UL +8120 25244 MT +(Vector)SH +6120 26821 MT +(Xerox:)SH +2499 50 6120 27021 UL +8120 27926 MT +(Xerox 820.)SH +6120 29503 MT +(Z80MU:)SH +3222 50 6120 29703 UL +8120 30608 MT +(Development Kermit on a PC running the) +298 W( Z80MU Z80 and CP/M 2)299 W +/Courier SF +(.)SH +/Times-Roman SF +(2 development system. Allows)299 W +8120 31713 MT +(development of the system independent modules to be done on an IBM) +241 W( PC or clone. Also allows the)240 W +8120 32818 MT +(generation of new .HEX files, that may then be KERMITed to the target system. Note:) +54 W( Not) +359 W( all the BDOS or)55 W +8120 33923 MT +(BIOS routines are supported, so avoid "unusual" BIOS/BDOS calls. \050For example,) +92 W( DIR from within Kermit)91 W +8120 35028 MT +(will fail as one of the BIOS routines returning disk parameters is not supported.\051)SH +14 /Times-Bold AF +6120 38630 MT +(1.7. Installation of Kermit-80)SH +10 /Times-Roman AF +6120 40748 MT +(Kermit-80 was written originally for the Intertec SuperBrain in lowest-common-denominator) +97 W( 8080) +445 W( code with the)98 W +6120 41944 MT +(standard assembler, ASM \050single source module, no macros, no advanced) +293 W( instructions\051, so that it could be)292 W +6120 43140 MT +(assembled on any CP/M-80 system \050the 8080 assembler is distributed as a standard) +83 W( part of CP/M-80, whereas the)84 W +6120 44336 MT +(fancier Z80 or macro assemblers are normally commercial products\051. It has since been modified to run on many)99 W +6120 45532 MT +(other systems as well. Kermit-80 should be able) +106 W( to run on any 8080-, 8085- or Z80-based microcomputer under)107 W +6120 46728 MT +(CP/M with appropriate minor changes to reflect the port I/O and screen control for the system \050see below\051.)SH +6120 49120 MT +(The proliferation of new systems supported by Kermit-80 made) +66 W( the program grow so large and complicated that it)65 W +6120 50316 MT +(had to be) +138 W( broken up into system-independent and system-dependent modules, as of version 4 \050this was done by)139 W +6120 51512 MT +(Charles Carvalho of ACC\051. Each module is composed of multiple files. This has reduced the time and disk) +57 W( space)56 W +6120 52708 MT +(necessary for assembly; Kermit-80 may) +126 W( once again be assembled on a CP/M system with roughly 250Kbytes of)127 W +6120 53904 MT +(space. The) +302 W( majority of the code does not) +26 W( need to be reassembled to support a new system. Unfortunately, it can no)25 W +6120 55100 MT +(longer be assembled with ASM, since ASM does not support multiple input files.) +73 W( To) +398 W( allow it to be assembled on)74 W +6120 56296 MT +(any CP/M system,) +103 W( the public-domain assembler LASM is included in the distribution kit. Kermit-80 may also be)102 W +6120 57492 MT +(assembled with Microsoft's M80 \050not supplied\051. In theory, any 8080) +33 W( assembler supporting the INCLUDE directive)34 W +6120 58688 MT +(ought to work, as well.)SH +6120 61080 MT +(All versions of Kermit-80 are) +72 W( assembled from the same set of sources, with system dependencies taken care of by)71 W +6120 62276 MT +(assembly-time conditionals within the system-dependent module \050eventually, the system-dependent module) +183 W( will)184 W +6120 63472 MT +(itself be broken up into multiple files, one for each system\051. The most important) +45 W( system dependencies are terminal)44 W +6120 64668 MT +(emulation \050when CONNECTed to) +153 W( the remote host\051 and screen handling, which are dependent on the individual)154 W +6120 65864 MT +(micro's escape codes \050these features are table driven and easily modified for other CP/M) +74 W( systems\051, and the lowest)73 W +6120 67060 MT +(level I/O routines for the serial communications port. The) +93 W( port routines are best done only with BDOS calls, but)94 W +6120 68256 MT +(some systems do not allow this, primarily because the BDOS) +91 W( routines strip the parity bit during port I/O, and the)90 W +6120 69452 MT +(parity bit is used for data when transmitting binary files.)SH +6120 71844 MT +(Kermit-80's I/O routines must check the port status and go elsewhere if no input is available; this allows for virtual)38 W +ES +%%Page: 17 18 +BS +0 SI +12 /Times-Bold AF +8280 4404 MT +(1.7. Installation of Kermit-80)SH +10 /Times-Italic AF +51775 XM +(Page 17)SH +46800 50 8280 5709 UL +/Times-Roman SF +8280 7886 MT +(terminal connection, keyboard interruption of stuck transmissions, etc. On systems that fully) +246 W( implement I/O)245 W +8280 9082 MT +(redirection via the optional CP/M IOBYTE facility, this may be done by switching) +127 W( the IOBYTE definition. On)128 W +8280 10278 MT +(others, however, IN/OUT instructions explicitly referencing the port device registers must be used.)SH +8280 12670 MT +(CP/M-80 KERMIT) +110 W( versions 3.8 and later include a "fuzzy timer" that allows a timeout to occur after an interval)109 W +8280 13866 MT +(ranging from 5 to 20 seconds \050depending upon the speed) +32 W( of the processor and the operating system routines\051 during)33 W +8280 15062 MT +(which expected input does not appear at the port. In this) +2 W( case, retransmission occurs automatically. In any case, you)1 W +8280 16258 MT +(may type a carriage return during transmission to simulate a timeout when the transfer appears to be stuck.)SH +12 /Times-Bold AF +8280 19374 MT +(1.7.1. Organization of Kermit-80)SH +10 /Times-Roman AF +8280 21316 MT +(Kermit-80 consists of two modules, each of which is generated from multiple source files.) +209 W( The) +669 W( first module)210 W +8280 22512 MT +(contains the system-independent code;) +27 W( the second module is configured for a particular system and merged with the)26 W +8280 23708 MT +(system-independent module to produce a customized Kermit-80.)SH +8280 26100 MT +(The distribution kit contains:)SH +/Symbol SF +10070 28005 MT +(\267)SH +/Times-Roman SF +10780 XM +(the system-independent module,)SH +/Courier SF +24001 XM +(CPSKER.HEX)SH +/Times-Roman SF +(;)SH +/Symbol SF +10070 29110 MT +(\267)SH +/Times-Roman SF +10780 XM +(the system-dependent modules,)SH +/Courier SF +23612 XM +(CPV*.HEX)SH +/Times-Roman SF +28662 XM +(\050see table 1-2 and 1-3\051;)SH +/Symbol SF +10070 30215 MT +(\267)SH +/Times-Roman SF +10780 XM +(the source files,)SH +/Courier SF +17334 XM +(CPS*.ASM)SH +/Times-Roman SF +22384 XM +(and)SH +/Courier SF +24078 XM +(CPX*.ASM)SH +/Times-Roman SF +(,)SH +/Symbol SF +10070 31320 MT +(\267)SH +/Times-Roman SF +10780 XM +(the public-domain CP/M assembler,)SH +/Courier SF +25474 XM +(LASM.*)SH +/Times-Roman SF +(,)SH +/Symbol SF +10070 32425 MT +(\267)SH +/Times-Roman SF +10780 XM +(the public-domain CP/M load/patch utility,)SH +/Courier SF +28281 XM +(MLOAD.*)SH +ES +%%Page: 18 19 +BS +0 SI +10 /Times-Italic AF +6120 4404 MT +(Page 18)SH +12 /Times-Bold AF +29686 XM +(Kermit User Guide: CP/M-80 KERMIT 1.7.1)SH +46800 50 6120 5709 UL +46800 50 6120 8086 UL +10 /Courier AF +6120 10167 MT +(Symbol Filename) +600 W( System)SH +3600 50 6120 10367 UL +4800 50 10920 10367 UL +3600 50 16320 10367 UL +6120 11854 MT +(ACCESS CPVACC)600 W +/Times-Roman SF +15720 XM +(Access Matrix)SH +/Courier SF +6120 12885 MT +(ADVANT CPVADV)600 W +/Times-Roman SF +15720 XM +(Northstar Advantage)SH +/Courier SF +6120 13916 MT +(AP6551 CPVAPL)600 W +/Times-Roman SF +15720 XM +(Apple II, Z80 Softcard, 6551 ACIA in serial interface)SH +/Courier SF +6120 14947 MT +(AP6850 CPVA65)600 W +/Times-Roman SF +15720 XM +(Apple II, Z80 Softcard, 6850 ACIA in Serial Iiterface)SH +/Courier SF +6120 15978 MT +(APMMDM CPVAPM)600 W +/Times-Roman SF +15720 XM +(Apple II, Z80 Softcard, Micromodem II in slot 2)SH +/Courier SF +6120 17009 MT +(APCPS CPVCPS)1200 W +/Times-Roman SF +15720 XM +(Apple II, Z80 Softcard, with CPS multifunction card)SH +/Courier SF +6120 18040 MT +(BASICNS CPVBNS)SH +/Times-Roman SF +15720 XM +(Northstar Horizon \050terminal required\051)SH +/Courier SF +6120 19071 MT +(BBC CPVBBC)2400 W +/Times-Roman SF +15720 XM +(Acorn "BBC" computer with Acorn Z80 second processor)SH +/Courier SF +6120 20102 MT +(BBII CPVBB2)1800 W +/Times-Roman SF +15720 XM +(BigBoard II \050terminal required\051)SH +/Courier SF +6120 21133 MT +(BRAINM CPVBRM)600 W +/Times-Roman SF +15720 XM +(Intertec Superbrain using the main port)SH +/Courier SF +6120 22164 MT +(BRAINA CPVBRA)600 W +/Times-Roman SF +15720 XM +(Intertec Superbrain using the Aux port)SH +/Courier SF +6120 23195 MT +(CIFER2 CPVCIF)600 W +/Times-Roman SF +15720 XM +(Cifer 1886 using the VL: Serial port and CP/M V2.2)SH +/Courier SF +6120 24226 MT +(CIFER3 CPVCI3)600 W +/Times-Roman SF +15720 XM +(Cifer 1886 using the VL: Serial port and CP/M V3.0)SH +/Courier SF +6120 25257 MT +(CIFER2 CPVCA2)600 W +/Times-Roman SF +15720 XM +(Cifer 1886 using the AUX: Serial port and CP/M V2.2)SH +/Courier SF +6120 26288 MT +(CIFER3 CPVCA3)600 W +/Times-Roman SF +15720 XM +(Cifer 1886 using the AUX: Serial port and CP/M V3.0)SH +/Courier SF +6120 27319 MT +(CMEMCO CPVCRO)600 W +/Times-Roman SF +15720 XM +(Cromemco with TU-ART card. Terminal required\051)SH +/Courier SF +6120 28350 MT +(COMART CPVCOM)600 W +/Times-Roman SF +15720 XM +(Comart Communicator \050terminal required\051)SH +/Courier SF +6120 29381 MT +(COMPRO CPVPRO)600 W +/Times-Roman SF +15720 XM +(Compupro with Interfacer 4 \050or 3\051. Terminal required.)SH +/Courier SF +6120 30412 MT +(CPC CPVCPC)2400 W +/Times-Roman SF +15720 XM +(Amstrad CPC 664 and 6128 and CP/M 3)SH +/Courier SF +6120 31443 MT +(CPM3 CPVCP3)1800 W +/Times-Roman SF +15720 XM +("Generic": CP/M 3.0 \050CP/M Plus\051 systems \050terminal req'd\051)SH +/Courier SF +6120 32474 MT +(CPT85XX CPVCPT)SH +/Times-Roman SF +15720 XM +(CPT-85xx wordprocessor with CP/M)SH +/Courier SF +6120 33505 MT +(DELPHI CPVDEL)600 W +/Times-Roman SF +15720 XM +(Digicomp Delphi 100 \050terminal required\051)SH +/Courier SF +6120 34536 MT +(DISC CPVDIS)1800 W +/Times-Roman SF +15720 XM +(Action Computer Enterprises "Discovery" \050terminal req'd\051)SH +/Courier SF +6120 35567 MT +(DMII CPVDM2)1800 W +/Times-Roman SF +15720 XM +(DECmate II with CP/M option)SH +/Courier SF +6120 36598 MT +(GENER CPVGEN)1200 W +/Times-Roman SF +15720 XM +("Generic": CPM 2.2 systems with IOBYTE \050terminal req'd\051)SH +/Courier SF +6120 37629 MT +(GENIE CPVGNI)1200 W +/Times-Roman SF +15720 XM +(Video Genie)SH +/Courier SF +6120 38660 MT +(H8QUAD CPVH8Q)600 W +/Times-Roman SF +15720 XM +(Heath-8 with Quad 8 i/o board)SH +/Courier SF +6120 39691 MT +(HEATH CPVH89)1200 W +/Times-Roman SF +15720 XM +(Heath/Zenith H89)SH +/Courier SF +6120 40722 MT +(HORIZON CPVHOR)SH +/Times-Roman SF +15720 XM +(Northstar Horizon \050terminal required\051)SH +/Courier SF +6120 41753 MT +(KPII CPVKPR)1800 W +/Times-Roman SF +15720 XM +(Kaypro-II \050and 4; probably supports all Kaypro systems\051)SH +/Courier SF +6120 42784 MT +(LOBO CPVLBO)1800 W +/Times-Roman SF +15720 XM +(Lobo Max-80)SH +6120 44575 MT +("symbol" is the symbol used to select the target system, in)SH +/Courier SF +29658 XM +(CPVTYP.ASM)SH +/Times-Roman SF +(;)SH +6120 46802 MT +("filename" is the name under which the module is supplied in the distribution.)SH +/Times-Bold SF +18854 48412 MT +(Table 1-2:)SH +/Times-Roman SF +23715 XM +(Systems supported by Kermit-80 \050Part 1\051)SH +46800 50 6120 50222 UL +ES +%%Page: 19 20 +BS +0 SI +12 /Times-Bold AF +8280 4404 MT +(1.7.1. Organization of Kermit-80)SH +10 /Times-Italic AF +51775 XM +(Page 19)SH +46800 50 8280 5709 UL +46800 50 8280 8086 UL +/Courier SF +8280 10167 MT +(Symbol Filename) +600 W( System)SH +3600 50 8280 10367 UL +4800 50 13080 10367 UL +3600 50 18480 10367 UL +8280 11854 MT +(M2215 CPVMRL)1200 W +/Times-Roman SF +17880 XM +(British Telecom Merlin/Rair Black Box \050terminal required\051)SH +/Courier SF +8280 12885 MT +(MBEE CPVBEE)1800 W +/Times-Roman SF +17880 XM +(Microbee)SH +/Courier SF +8280 13916 MT +(MDI CPVMDI)2400 W +/Times-Roman SF +17880 XM +(Morrow Decision I \050terminal required\051)SH +/Courier SF +8280 14947 MT +(MIKKO CPVMIK)1200 W +/Times-Roman SF +17880 XM +(MikroMikko)SH +/Courier SF +8280 15978 MT +(MMATE CPVMM)1200 W +/Times-Roman SF +17880 XM +(PMC 101 Micromate \050terminal required\051)SH +/Courier SF +8280 17009 MT +(MMDI CPVUD)1800 W +/Times-Roman SF +17880 XM +(Morrow Micro Decision I \050terminal required\051)SH +/Courier SF +8280 18040 MT +(NCRDMV CPVDMV)600 W +/Times-Roman SF +17880 XM +(NCR Decision Mate V. \050Terminal required?\051)SH +/Courier SF +8280 19071 MT +(NORTHS CPVNS)600 W +/Times-Roman SF +17880 XM +(Northstar Horizon with HSIO-4 card \050terminal req'd\051)SH +/Courier SF +8280 20102 MT +(OSBRN1 CPVOSB)600 W +/Times-Roman SF +17880 XM +(Osborne 1)SH +/Courier SF +8280 21133 MT +(OSI CPVOSI)2400 W +/Times-Roman SF +17880 XM +(Ohio Scientific)SH +/Courier SF +8280 22164 MT +(PCI2651 CPVPCI)SH +/Times-Roman SF +17880 XM +(Ithaca Intersystems with VI0 card \050terminal required\051)SH +/Courier SF +8280 23195 MT +(PCW CPVPCW)2400 W +/Times-Roman SF +17880 XM +(Amstrad PCW 8256/8512 with serial interface)SH +/Courier SF +8280 24226 MT +(PX8 CPVPX8)2400 W +/Times-Roman SF +17880 XM +(Epson PX-8)SH +/Courier SF +8280 25257 MT +(RM380ZM CPVRMM)SH +/Times-Roman SF +17880 XM +(Research Machines 380Z with MDS \0505.25" discs\051)SH +/Courier SF +8280 26288 MT +(RM380ZF CPVRMF)SH +/Times-Roman SF +17880 XM +(Research Machines 380Z with FDS \0508" discs\051)SH +/Courier SF +8280 27319 MT +(ROBIN CPVROB)1200 W +/Times-Roman SF +17880 XM +(DEC VT180)SH +/Courier SF +8280 28350 MT +(S1008 CPVUSM)1200 W +/Times-Roman SF +17880 XM +(US Microsales S-100-8 \050terminal required\051)SH +/Courier SF +8280 29381 MT +(SANYO CPVSAN)1200 W +/Times-Roman SF +17880 XM +(Sanyo MBC-1100)SH +/Courier SF +8280 30412 MT +(SB6 CPVSB6)2400 W +/Times-Roman SF +17880 XM +(Micromint SB-180 with 6Mhz CPU \050terminal required\051)SH +/Courier SF +8280 31443 MT +(SB9 CPVSB9)2400 W +/Times-Roman SF +17880 XM +(Micromint SB-180 with 9Mhz CPU \050terminal required\051)SH +/Courier SF +8280 32474 MT +(SCNTPR CPVSCN)600 W +/Times-Roman SF +17880 XM +(Screentyper)SH +/Courier SF +8280 33505 MT +(TELCON CPVTEL)600 W +/Times-Roman SF +17880 XM +(TELCON Zobra portable)SH +/Courier SF +8280 34536 MT +(TELETEK CPVTET)SH +/Times-Roman SF +17880 XM +(Teletek Systemaster)SH +/Courier SF +8280 35567 MT +(TORCH CPVTRC)1200 W +/Times-Roman SF +17880 XM +(Torch computers BBC-B with Z80 second processors)SH +/Courier SF +8280 36598 MT +(TRS80LB CPVTLB)SH +/Times-Roman SF +17880 XM +(TRS-80 model II with Lifeboat 2.25C CP/M Display)SH +/Courier SF +8280 37629 MT +(TRS80PT CPVTPT)SH +/Times-Roman SF +17880 XM +(TRS-80 model II with Pickles + Trout CP/M Display)SH +/Courier SF +8280 38660 MT +(TRSM4 CPVTM4)1200 W +/Times-Roman SF +17880 XM +(TRS-80 model IV)SH +/Courier SF +8280 39691 MT +(VECTOR CPVVEC)600 W +/Times-Roman SF +17880 XM +(Vector Graphics)SH +/Courier SF +8280 40722 MT +(XER820 CPVXER)600 W +/Times-Roman SF +17880 XM +(Xerox 820)SH +/Courier SF +8280 41753 MT +(Z100 CPVZ00)1800 W +/Times-Roman SF +17880 XM +(Z-100 under CP/M-85)SH +/Courier SF +8280 42784 MT +(Z80MU CPVZ80)1200 W +/Times-Roman SF +17880 XM +(Z80MU development system on a PC)SH +8280 44575 MT +("symbol" is the symbol used to select the target system, in)SH +/Courier SF +31818 XM +(CPXTYP.ASM)SH +/Times-Roman SF +(;)SH +8280 46802 MT +("filename" is the name under which the module is supplied in the distribution.)SH +/Times-Bold SF +21014 48412 MT +(Table 1-3:)SH +/Times-Roman SF +25875 XM +(Systems supported by Kermit-80 \050Part 2\051)SH +46800 50 8280 50222 UL +ES +%%Page: 20 21 +BS +0 SI +10 /Times-Italic AF +6120 4404 MT +(Page 20)SH +12 /Times-Bold AF +29686 XM +(Kermit User Guide: CP/M-80 KERMIT 1.7.1)SH +46800 50 6120 5709 UL +46800 50 6120 8086 UL +10 /Courier AF +6120 10167 MT +(Symbol Terminal) +600 W( type)SH +3600 50 6120 10367 UL +4800 50 10920 10367 UL +2400 50 16320 10367 UL +6120 11854 MT +(CRT)SH +/Times-Roman SF +10920 XM +(Dumb terminal type. Does not do cursor addressing)SH +/Courier SF +6120 12885 MT +(ADM3A)SH +/Times-Roman SF +10920 XM +(Lear Seigler ADM 3A)SH +/Courier SF +6120 13916 MT +(ADM22)SH +/Times-Roman SF +10920 XM +(Lear Seigler ADM 22)SH +/Courier SF +6120 14947 MT +(AM230)SH +/Times-Roman SF +10920 XM +(Ampro 230)SH +/Courier SF +6120 15978 MT +(H1500)SH +/Times-Roman SF +10920 XM +(Hazeltine 1500)SH +/Courier SF +6120 17009 MT +(SMRTVD)SH +/Times-Roman SF +10920 XM +(Netronics Smartvid)SH +/Courier SF +6120 18040 MT +(SOROQ)SH +/Times-Roman SF +10920 XM +(Soroq IQ-120)SH +/Courier SF +6120 19071 MT +(TVI912)SH +/Times-Roman SF +10920 XM +(Televideo 912)SH +/Courier SF +6120 20102 MT +(TVI925)SH +/Times-Roman SF +10920 XM +(Televideo 925 or Freedom 100)SH +/Courier SF +6120 21133 MT +(VT52)SH +/Times-Roman SF +10920 XM +(Dec VT52 or equivalent \050H19\051)SH +/Courier SF +6120 22164 MT +(VT100)SH +/Times-Roman SF +10920 XM +(Dec VT100 or equivalent)SH +/Courier SF +6120 23195 MT +(WYSE)SH +/Times-Roman SF +10920 XM +(Wyse 100)SH +6120 24986 MT +("symbol" is the symbol used to select the target system, in)SH +/Courier SF +29658 XM +(CPXTYP.ASM)SH +/Times-Roman SF +(;)SH +6120 27213 MT +("Terminal type" is the type of terminal "symbol" selects.)SH +/Times-Bold SF +20132 28823 MT +(Table 1-4:)SH +/Times-Roman SF +24993 XM +(Terminals supported by Kermit-80)SH +46800 50 6120 30633 UL +12 /Times-Bold AF +6120 33549 MT +(1.7.2. Downloading Kermit-80)SH +10 /Times-Roman AF +6120 35491 MT +(You'll need either a pre-configured)4 W +/Courier SF +20552 XM +(.COM)SH +/Times-Roman SF +23207 XM +(file or the system-independent module,)5 W +/Courier SF +39119 XM +(CPSKER)SH +/Times-Roman SF +(, in binary \050)5 W +/Courier SF +(.COM)SH +/Times-Roman SF +(\051 or hex)5 W +6120 36687 MT +(\050)SH +/Courier SF +(.HEX)SH +/Times-Roman SF +(\051 format and the system-dependent overlay for your system \050from Tables 1-2 and 1-3\051. If your system is) +42 W( not)41 W +6120 37883 MT +(listed in the table, get the generic CP/M 2)12 W +/Courier SF +(.)SH +/Times-Roman SF +(2 Kermit) +12 W( or the generic CP/M 3 Kermit. If you already have a version of)13 W +6120 39079 MT +(Kermit on) +75 W( your micro and you want to install a new version, simply use your present version to get the new files.)74 W +6120 40275 MT +(Transfer the files to your system and skip ahead to "merging the modules".)SH +6120 42667 MT +(If you do) +27 W( not have a copy of Kermit on your micro, and you cannot borrow a Kermit floppy but you do have access)28 W +6120 43863 MT +(to a mainframe computer with a copy of the Kermit-80 distribution, you should read this section.)SH +6120 46255 MT +(There are several ways to get CP/M Kermit) +106 W( from a host system to your micro. The easiest is to "download" the)105 W +6120 47451 MT +(necessary "hex" files into your micro's memory and then save them on the disk.) +84 W( If) +419 W( you have a terminal emulator)85 W +6120 48647 MT +(program on your micro which can save a copy of the session to disk, connect to your host, and type) +69 W( the necessary)68 W +6120 49843 MT +(files. Exit) +316 W( from the emulator, saving) +33 W( the session log, and edit the session log to extract the hex files. Skip ahead to)34 W +6120 51039 MT +("merging the files".)SH +6120 53431 MT +(The following is a procedure which, though far from foolproof, should allow you to get a version of Kermit to your)32 W +6120 54627 MT +(CP/M based micro. It depends upon the host prompt, or at least the first character of the host) +62 W( prompt, being some)63 W +6120 55823 MT +(character that cannot appear in a hex) +58 W( file \050the valid characters for hex files are the digits 0-9, the upper case letters)57 W +6120 57019 MT +(A-F, the colon ``)55 W +/Courier SF +(:)SH +/Times-Roman SF +('', carriage return, and line feed\051. As soon the prompt character is encountered, the transfer) +55 W( will)56 W +6120 58215 MT +(terminate. If) +288 W( your host) +19 W( does not issue a prompt that will accommodate this scheme, you can achieve the same effect)18 W +6120 59411 MT +(by adding an atsign ``@'' to the very end of the hex file before sending it from the host. The) +36 W( program below looks)37 W +6120 60607 MT +(for an atsign \050the normal DEC-20 prompt, hex 40\051. DECSYSTEM-10 users would) +241 W( look for a dot, hex 2E;)240 W +6120 61803 MT +(VAX/VMS or UNIX users would look for a dollar sign, hex 24; UNIX C-Shell users would look) +29 W( for a percent sign,)30 W +6120 62999 MT +(hex 26.)SH +8120 64790 MT +(1.)SH +9120 XM +(For CP/M 2)44 W +/Courier SF +(.)SH +/Times-Roman SF +(2 systems, connect to a floppy disk with plenty) +44 W( of free space. Run DDT and type in the)43 W +9120 65895 MT +(following \050the comments should not be typed in; they are there just to tell you what's happening\051:)137 W +9120 67000 MT +(\050Note that this wont work for CP/M Plus or 3)SH +/Courier SF +(.)SH +/Times-Roman SF +(0 systems!\051)SH +ES +%%Page: 21 22 +BS +0 SI +12 /Times-Bold AF +8280 4404 MT +(1.7.2. Downloading Kermit-80)SH +10 /Times-Italic AF +51775 XM +(Page 21)SH +46800 50 8280 5709 UL +46800 50 8280 8086 UL +/Courier SF +8280 9585 MT +(-a100 ;Begin) +10800 W( assembling code at 100)SH +11280 10616 MT +(0100 LXI) +1800 W( H,2FE) +SH( ;Where) +3600 W( to store in memory)SH +11280 11647 MT +(0103 SHLD) +1800 W( 200) +SH( ;Keep) +4200 W( pointer there)SH +11280 12678 MT +(0106 MVI) +1800 W( E,D) +SH( ;Get) +4800 W( a CR)SH +11280 13709 MT +(0108 MVI) +1800 W( C,4) +SH( ;Output) +4800 W( to PUNCH \050send to HOST\051)SH +11280 14740 MT +(010A CALL) +1800 W( 5)SH +11280 15771 MT +(010D MVI) +1800 W( C,3) +SH( ;Input) +4800 W( from READER \050read from HOST\051)SH +11280 16802 MT +(010F CALL) +1800 W( 5)SH +11280 17833 MT +(0112 ANI) +1800 W( 7F) +SH( ;Strip) +5400 W( parity bit)SH +11280 18864 MT +(0114 PUSH) +1800 W( PSW) +SH( ;Save) +4200 W( a and flags)SH +11280 19895 MT +(0115 MOV) +1800 W( E,A) +SH( ;Move) +4800 W( char to E for echo)SH +11280 20926 MT +(0116 MVI) +1800 W( C,2) +SH( ;Output) +4800 W( to screen)SH +11280 21957 MT +(0118 CALL) +1800 W( 5)SH +11280 22988 MT +(011B POP) +1800 W( PSW) +SH( ;Restore) +4800 W( A and flags)SH +11280 24019 MT +(011C CPI) +1800 W( 40) +SH( ;\050or) +5400 W( 4E,24,26,etc\051 System prompt?)SH +11280 25050 MT +(011E JZ) +1800 W( 127) +SH( ;Yes,) +5400 W( have whole file in memory)SH +11280 26081 MT +(0121 CALL) +1800 W( 17A) +SH( ;No,) +4200 W( store another byte)SH +11280 27112 MT +(0124 JMP) +1800 W( 10D) +SH( ;Read) +4800 W( another byte)SH +11280 28143 MT +(0127 MVI) +1800 W( A,1A) +SH( ;Get) +4200 W( a Control-Z \050CP/M EOF mark\051)SH +11280 29174 MT +(0129 CALL) +1800 W( 17A) +SH( ;Store) +4200 W( it in memory)SH +11280 30205 MT +(012C LXI) +1800 W( H,300) +SH( ;Get) +3600 W( memory pointer)SH +11280 31236 MT +(012F SHLD) +1800 W( 202) +SH( ;Store) +4200 W( as DMA pointer)SH +11280 32267 MT +(0132 LDA) +1800 W( 201) +SH( ;Get) +4800 W( 'HI' byte of memory pointer)SH +11280 33298 MT +(0135 STA) +1800 W( 200) +SH( ;and) +4800 W( store it as 'LO' one)SH +11280 34329 MT +(0138 XRA) +1800 W( A)SH +11280 35360 MT +(0139 STA) +1800 W( 201) +SH( ;Zero) +4800 W( 'HI' byte \050slow *256\051)SH +11280 36391 MT +(013C MVI) +1800 W( C,16) +SH( ;Make) +4200 W( NEW file)SH +11280 37422 MT +(013E LXI) +1800 W( D,5C) +SH( ;With) +4200 W( FCB1)SH +11280 38453 MT +(0141 CALL) +1800 W( 5)SH +11280 39484 MT +(0144 CALL) +1800 W( 15E) +SH( ;Write) +4200 W( 128 bytes \050sector\051)SH +11280 40515 MT +(0147 CALL) +1800 W( 15E) +SH( ;Write) +4200 W( another sector)SH +11280 41546 MT +(014A LXI) +1800 W( H,FFFF) +SH( ;Get) +3000 W( a 16-bit Minus One)SH +11280 42577 MT +(014D XCHG) +1800 W( ;into) +6600 W( DE)SH +11280 43608 MT +(014E LHLD) +1800 W( 200) +SH( ;Get) +4200 W( 256-byte counter)SH +11280 44639 MT +(0151 DAD) +1800 W( D) +SH( ;Decrement)6000 W +11280 45670 MT +(0152 SHLD) +1800 W( 200) +SH( ;and) +4200 W( store back)SH +11280 46701 MT +(0155 MVI) +1800 W( A,2) +SH( ;Check) +4800 W( if)SH +11280 47732 MT +(0157 CMP) +1800 W( L) +SH( ;) +6000 W( 256-byte counter down to offset)SH +11280 48763 MT +(0158 JZ) +1800 W( 183) +SH( ;Yes,) +5400 W( we're done)SH +11280 49794 MT +(015B JMP) +1800 W( 144) +SH( ;Keep) +4800 W( writing..)SH +11280 50825 MT +(015E LHLD) +1800 W( 202) +SH( ;Get) +4200 W( file-pointer)SH +11280 51856 MT +(0161 XCHG) +1800 W( ;into) +6600 W( DE)SH +11280 52887 MT +(0162 MVI) +1800 W( C,1A) +SH( ;Set) +4200 W( DMA-address)SH +11280 53918 MT +(0164 CALL) +1800 W( 5)SH +11280 54949 MT +(0167 MVI) +1800 W( C,15) +SH( ;Write) +4200 W( sector \050128 bytes\051)SH +11280 55980 MT +(0169 LXI) +1800 W( D,5C) +SH( ;using) +4200 W( FCB1)SH +11280 57011 MT +(016C CALL) +1800 W( 5)SH +11280 58042 MT +(016F LHLD) +1800 W( 202) +SH( ;Get) +4200 W( file-pointer)SH +11280 59073 MT +(0172 LXI) +1800 W( D,80) +SH( ;128-bytes)4200 W +11280 60104 MT +(0175 DAD) +1800 W( D) +SH( ;added) +6000 W( to file-pointer)SH +11280 61135 MT +(0176 SHLD) +1800 W( 202) +SH( ;and) +4200 W( save)SH +11280 62166 MT +(0179 RET) +1800 W( ;and) +7200 W( return)SH +11280 63197 MT +(017A LHLD) +1800 W( 200) +SH( ;Get) +4200 W( Memory-pointer)SH +11280 64228 MT +(017D MOV) +1800 W( M,A) +SH( ;Store) +4800 W( character)SH +11280 65259 MT +(017E INX) +1800 W( H) +SH( ;Increment) +6000 W( Pointer)SH +11280 66290 MT +(017F SHLD) +1800 W( 200) +SH( ;and) +4200 W( save)SH +11280 67321 MT +(0182 RET) +1800 W( ;and) +7200 W( return)SH +11280 68352 MT +(0183 MVI) +1800 W( C,10) +SH( ;CLOSE) +4200 W( file)SH +11280 69383 MT +(0185 LXI) +1800 W( D,5C) +SH( ;using) +4200 W( FCB1)SH +11280 70414 MT +(0188 CALL) +1800 W( 5)SH +11280 71445 MT +(018B JMP) +1800 W( 0) +SH( ;Force) +6000 W( WARM BOOT)SH +ES +%%Page: 22 23 +BS +0 SI +10 /Times-Italic AF +6120 4404 MT +(Page 22)SH +12 /Times-Bold AF +29686 XM +(Kermit User Guide: CP/M-80 KERMIT 1.7.2)SH +46800 50 6120 5709 UL +10 /Courier AF +9120 7824 MT +(0179)SH +9120 8855 MT +(-^C ;\050Type) +12000 W( Control-C\051 Return to CP/M)SH +9120 9886 MT +(A>SAVE 1 FETCH.COM) +SH( ;Save) +3000 W( program, we need to run it twice.)SH +/Times-Bold SF +15591 11496 MT +(Figure 1-1:)SH +/Times-Roman SF +20840 XM +(Bootstrap program for Kermit-80 and CP/M Version 2.2)SH +46800 50 6120 13306 UL +9120 14823 MT +(Alternatively, an assembler source file for this program is distributed with) +374 W( CP/M Kermit as)373 W +/Courier SF +9120 15928 MT +(CPKFET.ASM)SH +/Times-Roman SF +(. You) +478 W( might prefer to type the assembler) +114 W( version in and assemble and load it \050ASM)115 W +9120 17033 MT +(CPKFET, LOAD CPKFET, or MASM CPKFET,) +43 W( MLOAD CPKFET\051, to let the assembler and loader)42 W +9120 18138 MT +(catch any typing errors.)SH +8120 20348 MT +(2.)SH +9120 XM +(Connect to your host using a terminal or a terminal emulation program. Ensure that your host does) +6 W( not)7 W +9120 21453 MT +(have your terminal in "page mode" \050does not pause at the end of each screenful\051.)SH +8120 23663 MT +(3.)SH +9120 XM +(Tell the host to display the first hex file \050the) +38 W( system-independent module\051 at your terminal, e.g. give a)37 W +9120 24768 MT +(command like)SH +/Courier SF +15064 XM +(TYPE CPSKER.HEX)SH +/Times-Roman SF +(,)SH +/Times-Italic SF +24564 XM +(without a terminating carriage return)SH +/Times-Roman SF +(.)SH +3001 50 24564 24968 UL +8120 26978 MT +(4.)SH +9120 XM +(Return to your micro by switching the cable from the terminal to the micro, or by terminating) +142 W( the)143 W +9120 28083 MT +(micro's terminal program.)SH +8120 30293 MT +(5.)SH +9120 XM +(Make sure your IOBYTE is set so that)17 W +/Courier SF +24864 XM +(RDR:)SH +/Times-Roman SF +27530 XM +(and)SH +/Courier SF +29240 XM +(PUN:)SH +/Times-Roman SF +31906 XM +(correspond to the I/O port that is connected to)16 W +9120 31398 MT +(the host \050this would normally be the case unless you have done something special to change things\051.)SH +8120 33608 MT +(6.)SH +9120 XM +(Load the program you entered in the first step with DDT, and use it to capture the first hex file:)SH +/Courier SF +11520 35263 MT +(DDT FETCH.COM)SH +11520 36294 MT +(-icpsker.hex ;Setup) +6600 W( FCB for file CPSKER.HEX)SH +11520 37325 MT +(-g100,179 ;Execute) +8400 W( the program.)SH +/Times-Roman SF +9120 39042 MT +(Now there should be a file)SH +/Courier SF +19951 XM +(CPSKER.HEX)SH +/Times-Roman SF +26201 XM +(on your connected disk.)SH +8120 41252 MT +(7.)SH +9120 XM +(Return to the host, and tell it) +112 W( to display the second hex file \050the system-dependent module for your)113 W +9120 42357 MT +(configuration\051. Again,) +250 W( do not type the terminating carriage return.)SH +8120 44567 MT +(8.)SH +9120 XM +(Return to your micro, and run the capture program again:)SH +/Courier SF +11520 46222 MT +(DDT FETCH.COM)SH +11520 47253 MT +(-icpxovl.hex ;Setup) +6600 W( FCB to create CPXOVL.HEX)SH +11520 48284 MT +(-g100,179 ;Execute) +8400 W( the program.)SH +/Times-Roman SF +9120 50001 MT +(Now there should be a file)132 W +/Courier SF +20743 XM +(CPXOVL.HEX)SH +/Times-Roman SF +27124 XM +(on your connected disk. Replace)131 W +/Courier SF +41435 XM +(CPXOVL.HEX)SH +/Times-Roman SF +47816 XM +(in this)131 W +9120 51106 MT +(example with the appropriate overlay file for your system.)SH +6120 52897 MT +(Merging the files:)SH +8120 54688 MT +(1.)SH +9120 XM +(For purposes of illustration, we will assume the system-dependent overlay is called "cpxovl)162 W +/Courier SF +(.)SH +/Times-Roman SF +(hex".)SH +9120 55793 MT +(The two hex) +1 W( files may be combined with MLOAD or DDT. If you already have a running Kermit, you)SH +9120 56898 MT +(can transfer)208 W +/Courier SF +14478 XM +(MLOAD.HEX)SH +/Times-Roman SF +20337 XM +(to your system and create)209 W +/Courier SF +31852 XM +(MLOAD.COM)SH +/Times-Roman SF +37711 XM +(by running LOAD. If you're)209 W +9120 58003 MT +(bootstrapping Kermit, you could transfer)27 W +/Courier SF +25864 XM +(MLOAD.HEX)SH +/Times-Roman SF +31541 XM +(to your system the same way you got the) +27 W( other)26 W +9120 59108 MT +(two)SH +/Courier SF +10910 XM +(.HEX)SH +/Times-Roman SF +13601 XM +(files, but it's probably simpler to use DDT to get Kermit running, and get MLOAD later if)41 W +9120 60213 MT +(you need it.)SH +8120 62423 MT +(2.)SH +9120 XM +(Using MLOAD, the two pieces may be easily merged:)SH +/Courier SF +11520 64078 MT +(A>mload kerm411=cpsker,cpxovl)SH +16200 50 12720 64278 UL +/Courier-Oblique SF +11520 65109 MT +(\050Some messages about program size, etc...\051)SH +/Courier SF +11520 66140 MT +(A>)SH +/Times-Roman SF +8120 68350 MT +(3.)SH +9120 XM +(If you don't have MLOAD running, it's a bit more complex:)SH +ES +%%Page: 23 24 +BS +0 SI +12 /Times-Bold AF +8280 4404 MT +(1.7.2. Downloading Kermit-80)SH +10 /Times-Italic AF +51775 XM +(Page 23)SH +46800 50 8280 5709 UL +/Courier SF +13680 7824 MT +(A>ddt cpsker.hex)SH +8400 50 14880 8024 UL +13680 8855 MT +(NEXT PC)600 W +13680 9886 MT +(3500 0100)SH +13680 10917 MT +(-icpxovl.hex)SH +6600 50 14280 11117 UL +13680 11948 MT +(-r)SH +600 50 14280 12148 UL +13680 12979 MT +(NEXT PC)600 W +13680 14010 MT +(xxxx 0000)SH +13680 15041 MT +(-^C)SH +1200 50 14280 15241 UL +13680 16072 MT +(A>save)SH +/Courier-Oblique SF +17880 XM +(dd)SH +/Courier SF +19680 XM +(kerm411.com)SH +11400 50 14880 16272 UL +/Times-Roman SF +11280 17789 MT +(The page count) +50 W( \050"dd"\051 used in the SAVE command is calculated from the last address \050"xxxx"\051 given)49 W +11280 18894 MT +(by DDT in) +48 W( response to the R command: drop the last two digits and add 1 if they were not zero, then)49 W +11280 19999 MT +(convert from hexadecimal \050base 16\051 to decimal \050base 10\051: 684F) +11 W( becomes 69 hex, which is 105 decimal)10 W +11280 21104 MT +(\0505 times 16 plus 9\051) +89 W( -- but 6700 becomes 67 hex, or 103 decimal \050consult an introductory computing)90 W +11280 22209 MT +(book if you don't understand number base conversion\051.)SH +10280 24419 MT +(4.)SH +11280 XM +(If you are using the Z80MU) +53 W( CP/M and Z80 development toolkit on an IBM PC or clone, then follow)52 W +11280 25524 MT +(the same instructions as for a genuine CP/M system. When you have loaded your file, you will) +57 W( have)58 W +11280 26629 MT +(to ship the .COM or two .HEX files to the target CP/M system. \050Possibly) +108 W( using a previous issue of)107 W +11280 27734 MT +(Kermit?\051)SH +10280 29944 MT +(5.)SH +11280 XM +(Note that CP/M hex files have checksums on each line. If there were any transmission) +67 W( errors during)68 W +11280 31049 MT +(the downloading process, MLOAD or DDT will) +210 W( notice a bad checksum and will report an error)209 W +11280 32154 MT +(\050something like "Illegal Format"\051. If you get any errors during loading, either fix the hex) +63 W( file locally)64 W +11280 33259 MT +(with an editor, or repeat the transfer.)SH +8280 35651 MT +(You now should have a running version of Kermit-80, called)SH +/Courier SF +32915 XM +(KERM411.COM)SH +/Times-Roman SF +(.)SH +8280 38043 MT +(Test your new Kermit by running it. If) +96 W( it gives you a prompt, it might be OK. \050don't delete your old one yet...\051.)95 W +8280 39239 MT +(Instead of a prompt, you could get one of two messages indicating that the configuration information is invalid:)SH +/Courier SF +10680 40894 MT +(?Kermit has not been configured for a target system)SH +/Times-Roman SF +8280 42611 MT +(or)SH +/Courier SF +10680 44266 MT +(?Consistency check on configuration failed)SH +/Times-Roman SF +8280 45983 MT +(Of course, neither of these messages should appear) +109 W( if you're building Kermit from the distribution kit. The first)110 W +8280 47179 MT +(message indicates that) +1 W( the overlay was not found where the system-independent module expected to find it, probably)SH +8280 48375 MT +(because the overlay address is incorrect; the second indicates that the version of CPXLNK used in the system-)157 W +8280 49571 MT +(dependent module is incompatible with the system-independent module.)SH +8280 51963 MT +(Once you are satisfied that KERMIT40 works correctly, you should rename your old)76 W +/Courier SF +43484 XM +(KERMIT.COM)SH +/Times-Roman SF +49810 XM +(to something)75 W +8280 53159 MT +(else, like)SH +/Courier SF +12085 XM +(OKERMIT.COM)SH +/Times-Roman SF +(, and rename)SH +/Courier SF +24072 XM +(KERMIT40.COM)SH +/Times-Roman SF +31522 XM +(to)SH +/Courier SF +32550 XM +(KERMIT.COM)SH +/Times-Roman SF +(.)SH +12 /Times-Bold AF +8280 56275 MT +(1.7.3. Assembling Kermit-80 from the sources)SH +10 /Times-Roman AF +8280 58217 MT +(Kermit-80 is built in two pieces from the following files:)SH +/Times-Italic SF +8280 60006 MT +(The system-independent files:)SH +/Courier SF +9480 61111 MT +(CPSKER.ASM)SH +/Times-Roman SF +16280 XM +(header file)SH +/Courier SF +9480 62216 MT +(CPSDEF.ASM)SH +/Times-Roman SF +16280 XM +(definitions for both KERMIT and KERSYS)SH +/Courier SF +9480 63321 MT +(CPSMIT.ASM)SH +/Times-Roman SF +16280 XM +(initialization, main loop, miscellaneous commands \050BYE, EXIT, LOG, SET,) +30 W( SHOW, STATUS,)31 W +16280 64426 MT +(and VERSION\051)SH +/Courier SF +9480 65531 MT +(CPSCOM.ASM)SH +/Times-Roman SF +16280 XM +(second part of commands, status and set file)SH +/Courier SF +9480 66636 MT +(CPSPK1.ASM)SH +/Times-Roman SF +16280 XM +(part 1 of the KERMIT protocol handler \050SEND, RECEIVE, LOGOUT,and FINISH commands\051)SH +/Courier SF +9480 67741 MT +(CPSPK2.ASM)SH +/Times-Roman SF +16280 XM +(part 2 of the KERMIT protocol handler)SH +/Courier SF +9480 68846 MT +(CPSREM.ASM)SH +/Times-Roman SF +16280 XM +(REMOTE routines \050FINISH, BYE and LOGOUT in CPXPK*.ASM\051)SH +/Courier SF +9480 69951 MT +(CPSSER.ASM)SH +/Times-Roman SF +16280 XM +(SERVER routines \050for the future\051)SH +/Courier SF +9480 71056 MT +(CPSTT.ASM)SH +/Times-Roman SF +16280 XM +(the transparent commands \050TRANSMIT, CONNECT\051)SH +ES +%%Page: 24 25 +BS +0 SI +10 /Times-Italic AF +6120 4404 MT +(Page 24)SH +12 /Times-Bold AF +29686 XM +(Kermit User Guide: CP/M-80 KERMIT 1.7.3)SH +46800 50 6120 5709 UL +10 /Courier AF +7320 7886 MT +(CPSCPM.ASM)SH +/Times-Roman SF +14120 XM +(CP/M commands \050DIR, ERA, USER, TYPE, PRINT, COPY\051)SH +/Courier SF +7320 8991 MT +(CPSWLD.ASM)SH +/Times-Roman SF +14120 XM +(the wildcard handler)SH +/Courier SF +7320 10096 MT +(CPSCMD.ASM)SH +/Times-Roman SF +14120 XM +(the command parser)SH +/Courier SF +7320 11201 MT +(CPSUTL.ASM)SH +/Times-Roman SF +14120 XM +(utility routines and data)SH +/Courier SF +7320 12306 MT +(CPSDAT.ASM)SH +/Times-Roman SF +14120 XM +(data space and the overlay definitions)SH +/Courier SF +7320 13411 MT +(CPXLNK.ASM)SH +/Times-Roman SF +14120 XM +(linkage area description)SH +/Times-Italic SF +6120 15840 MT +(The system-dependent files:)SH +/Courier SF +7320 16945 MT +(CPXTYP.ASM)SH +/Times-Roman SF +14120 XM +(system selection)SH +/Courier SF +7320 18050 MT +(CPXLNK.ASM)SH +/Times-Roman SF +14120 XM +(system overlay specification and jump table)SH +/Courier SF +7320 19155 MT +(CPXCOM.ASM)SH +/Times-Roman SF +14120 XM +(common routines for all systems)SH +/Courier SF +7320 20260 MT +(CPXSWT.ASM)SH +/Times-Roman SF +14120 XM +(system selector or switcher)SH +6120 22689 MT +(One of:)SH +/Courier SF +7320 23794 MT +(CPXSYS.ASM)SH +/Times-Roman SF +14120 XM +(family file for some system-specific code)SH +/Courier SF +7320 24899 MT +(CPXTOR.ASM)SH +/Times-Roman SF +14120 XM +(family file for Torch, Superbrain, PCI2651 etc)SH +/Courier SF +7320 26004 MT +(CPXNOR.ASM)SH +/Times-Roman SF +14120 XM +(family file for Northstar and Comart machines)SH +/Courier SF +7320 27109 MT +(CPXMRL.ASM)SH +/Times-Roman SF +14120 XM +(family file for British Telecom Merlin/Rair Black Box)SH +/Courier SF +7320 28214 MT +(CPXSB.ASM)SH +/Times-Roman SF +14120 XM +(family file for Micromint SB-180 systems)SH +/Courier SF +7320 29319 MT +(CPXCIF.ASM)SH +/Times-Roman SF +14120 XM +(family file for Cifer systems)SH +/Courier SF +7320 30424 MT +(CPXHEA.ASM)SH +/Times-Roman SF +14120 XM +(family file for Heath/Zenith systems)SH +/Courier SF +7320 31529 MT +(CPXAPP.ASM)SH +/Times-Roman SF +14120 XM +(family file for Apple II systems)SH +/Courier SF +7320 32634 MT +(CPXPCW.ASM)SH +/Times-Roman SF +14120 XM +(family file for Amstrad PCW 8256/8512 machines)SH +/Courier SF +7320 33739 MT +(CPXBBI.ASM)SH +/Times-Roman SF +14120 XM +(family file for BigBoard, Kaypro and Xerox 820 systems)SH +/Courier SF +7320 34844 MT +(CPXBEE.ASM)SH +/Times-Roman SF +14120 XM +(Microbee)SH +/Courier SF +7320 35949 MT +(CPXSYO.ASM)SH +/Times-Roman SF +14120 XM +(family file for Sanyo MBS-1100 systems)SH +/Courier SF +7320 37054 MT +(CPXTM4.ASM)SH +/Times-Roman SF +14120 XM +(family file for Tandy Model 4 with CP/M systems)SH +/Courier SF +7320 38159 MT +(CPXGNI.ASM)SH +/Times-Roman SF +14120 XM +(family file for Video Genie systems)SH +/Courier SF +7320 39264 MT +(CPXPRO.ASM)SH +/Times-Roman SF +14120 XM +(family file for Compupro systems)SH +/Courier SF +7320 40369 MT +(CPXZ80.ASM)SH +/Times-Roman SF +14120 XM +(family file for the Z80MU development system)SH +6120 42798 MT +(and if you use a terminal,)SH +/Courier SF +7320 43903 MT +(CPXVDU.ASM)SH +/Times-Roman SF +14120 XM +(display codes for VDUs etc. Not always required)SH +6120 45694 MT +(The system-independent module contains all of the system-independent files) +135 W( except for)134 W +/Courier SF +42791 XM +(CPXLNK.ASM)SH +/Times-Roman SF +(, which is)134 W +6120 46890 MT +(assembled into the system-dependent module to provide the structures needed to connect the) +156 W( two modules. As)157 W +6120 48086 MT +(distributed, the system-independent module is named)28 W +/Courier SF +27870 XM +(CPSKER.HEX)SH +/Times-Roman SF +(. If) +306 W( you have a) +28 W( copy of)27 W +/Courier SF +43616 XM +(CPSKER.HEX)SH +/Times-Roman SF +(, you do)27 W +6120 49282 MT +(not need to reassemble the system-independent module to configure Kermit for your system.)SH +6120 51674 MT +(The system-dependent module consists of)503 W +/Courier SF +25661 XM +(CPXTYP.ASM)SH +/Times-Roman SF +(,)SH +/Courier SF +32664 XM +(CPSDEF.ASM)SH +/Times-Roman SF +(,)SH +/Courier SF +39667 XM +(CPXLNK.ASM)SH +/Times-Roman SF +(,)SH +/Courier SF +46670 XM +(CPXSWT.ASM)SH +/Times-Roman SF +(,)SH +/Courier SF +6120 52870 MT +(CPSCOM.ASM)SH +/Times-Roman SF +(, one of) +675 W( the family files)674 W +/Courier SF +25748 XM +(CPXSYS.ASM)SH +/Times-Roman SF +(,)SH +/Courier SF +32922 XM +(CPXTOR.ASM)SH +/Times-Roman SF +(,)SH +/Courier SF +40096 XM +(CPXMRL.ASM)SH +/Times-Roman SF +(,)SH +/Courier SF +47270 XM +(CPXSB.ASM)SH +/Times-Roman SF +(,)SH +/Courier SF +6120 54066 MT +(CPXCIF.ASM)SH +/Times-Roman SF +(,)SH +/Courier SF +12878 XM +(CPXHEA.ASM)SH +/Times-Roman SF +(,)SH +/Courier SF +19636 XM +(CPXBBI.ASM)SH +/Times-Roman SF +(,)SH +/Courier SF +26394 XM +(CPXTM4.ASM)SH +/Times-Roman SF +(,)SH +/Courier SF +33152 XM +(CPXGNI.ASM)SH +/Times-Roman SF +(,)SH +/Courier SF +39911 XM +(CPXNOR.ASM)SH +/Times-Roman SF +(,)SH +/Courier SF +46670 XM +(CPXAPP.ASM)SH +/Times-Roman SF +(,)SH +/Courier SF +6120 55262 MT +(CPXPCW.ASM)SH +/Times-Roman SF +(, or)23 W +/Courier SF +13749 XM +(CPXPRO.ASM)SH +/Times-Roman SF +(, and possibly)23 W +/Courier SF +25596 XM +(CPXVDU.ASM)SH +/Times-Roman SF +(, if your) +23 W( system uses a terminal for the console. One)22 W +6120 56458 MT +(copy of the) +1 W( system-dependent module is supplied already assembled for each supported system; the filename may be)2 W +6120 57654 MT +(obtained from tables 1-2 and 1-3. If a terminal is) +170 W( required for a system, a CRT \050glass TTY device\051 has been)169 W +6120 58850 MT +(selected.)SH +6120 61242 MT +(After assembling the two pieces separately, they are combined with DDT or MLOAD into a system-specific Kermit.)SH +6120 63634 MT +(If you want to rebuild the system-independent module, the only change you may) +159 W( need to make is to select the)160 W +6120 64830 MT +(assembler to be used, in)182 W +/Courier SF +16862 XM +(CPSKER.ASM)SH +/Times-Roman SF +(. Define) +614 W( one of MAC80, M80, or LASM to TRUE to select) +182 W( it as the)181 W +6120 66026 MT +(assembler; the others should be defined FALSE.)SH +6120 68418 MT +(Assuming you have the Microsoft Macro Assembler package \050M80/L80\051, you'll need to do the following:)SH +/Courier SF +8520 70073 MT +(A>m80 cpsker=cpsker.asm)SH +12600 50 9720 70273 UL +8520 71104 MT +(A>l80 /p:100,cpsker,cpsker/n/e)SH +16800 50 9720 71304 UL +ES +%%Page: 25 26 +BS +0 SI +12 /Times-Bold AF +8280 4404 MT +(1.7.3. Assembling Kermit-80 from the sources)SH +10 /Times-Italic AF +51775 XM +(Page 25)SH +46800 50 8280 5709 UL +/Times-Roman SF +8280 7886 MT +(This will produce)SH +/Courier SF +15585 XM +(CPSKER.COM)SH +/Times-Roman SF +(.)SH +8280 10278 MT +(If you are using LASM instead, do this:)SH +/Courier SF +10680 11933 MT +(A>lasm cpsker)SH +6600 50 11880 12133 UL +/Times-Roman SF +8280 13650 MT +(LASM will generate)53 W +/Courier SF +16910 XM +(CPSKER.HEX)SH +/Times-Roman SF +23214 XM +(and)SH +/Courier SF +24962 XM +(CPSKER.PRN)SH +/Times-Roman SF +(. LASM) +358 W( allows options to be specified in the same way as)54 W +8280 14846 MT +(the standard assembler, ASM, so the command)SH +/Courier SF +10680 16501 MT +(A>lasm cpsker.abz)SH +9000 50 11880 16701 UL +/Times-Roman SF +8280 18218 MT +(will read the source files from drive A, send the)SH +/Courier SF +27637 XM +(.HEX)SH +/Times-Roman SF +30287 XM +(file to drive B, and suppress the listing file.)SH +8280 20610 MT +(If you are using) +128 W( the Z80MU development system on an IBM PC or clone, then assemble your files using either)127 W +8280 21806 MT +(LASM and MLOAD or M80 and L80, as) +3 W( if you were using a genuine CP/M-80 system. Note that you will still have)4 W +8280 23002 MT +(the problem of transferring your assembled files to the target CP/M system.)SH +8280 25394 MT +(If you want to generate a system-dependent overlay for a particular system, or want to change the terminal)247 W +8280 26590 MT +(supported, you'll need to check three areas in)SH +/Courier SF +26692 XM +(CPXTYP.ASM)SH +/Times-Roman SF +(:)SH +8280 28982 MT +(First, the overlay start ADDRESS. The symbol) +83 W( "ovladr" is EQUated to the address of "LNKFLG" in the system-)84 W +8280 30178 MT +(independent module, as the starting address of the overlay \0507000H for version)109 W +/Courier SF +40999 XM +(4.11)SH +/Times-Roman SF +(\051. You'll) +468 W( need to know this)109 W +8280 31374 MT +(value if you're building the overlay with M80/L80. You won't normally need to change this value.)SH +8280 33766 MT +(Second, the assembler being used. Again, define one of MAC80, M80, and LASM to be TRUE to) +104 W( select it, and)105 W +8280 34962 MT +(define the others to be FALSE. The two modules \050system-independent and system-dependent\051) +100 W( do not need to be)99 W +8280 36158 MT +(built with the same assembler.)SH +8280 38550 MT +(Third, the system configuration. Locate your system in) +158 W( tables 1-2 and 1-3, then define the appropriate symbol)159 W +8280 39746 MT +(TRUE, and the rest FALSE.) +84 W( If) +417 W( the system comes with a builtin console terminal, define all the terminal switches)83 W +8280 40942 MT +(FALSE. If) +558 W( the system uses an external terminal as the console, locate the terminal in) +154 W( table 1-5 and define the)155 W +8280 42138 MT +(appropriate symbol TRUE, and the remainder FALSE.) +20 W( If) +289 W( the terminal is not listed in table 1-5, use the CRT switch;)19 W +8280 43334 MT +(in this case, VT52 emulation is not supported.)SH +8280 45726 MT +(In addition, there are a few general and system-specific symbols which may be altered to fit your system:)SH +8280 47517 MT +(APSLOT)SH +16280 XM +(For Apple with 6551 ACIA, defines the slot number of the serial card)SH +8280 49094 MT +(CPUSPD)SH +16280 XM +(Processor speed in units of 100KHz \050currently used only for bbII and kpII for timing loops\051)SH +8280 50671 MT +(TAC)SH +16280 XM +(For users connecting through ARPAnet TACs: set to TRUE if you) +53 W( wish the default TACTRAP)54 W +16280 51776 MT +(status to be ON. \050This may be overridden with the SET TACTRAP command\051. If) +99 W( you're not)98 W +16280 52881 MT +(connecting through a TAC, set tac to FALSE and ignore tacval.)SH +8280 54458 MT +(TACVAL)SH +16280 XM +(For ARPANET TAC users: defines the default TAC) +4 W( intercept character \050may be overridden with)5 W +16280 55563 MT +(the SET TACTRAP command\051.)SH +8280 57955 MT +(If you are just assembling an existing configuration,) +141 W( you'll need to edit)140 W +/Courier SF +38603 XM +(CPXTYP.ASM)SH +/Times-Roman SF +44993 XM +(only. If) +530 W( you are adding)140 W +8280 59151 MT +(support for a new) +16 W( system, you should not modify)17 W +/Courier SF +28318 XM +(CPSDEF.ASM)SH +/Times-Roman SF +34585 XM +(or)SH +/Courier SF +35685 XM +(CPXLNK.ASM)SH +/Times-Roman SF +(; if you do, you'll have to change)17 W +8280 60347 MT +(the system-independent module also. Eventually,)28 W +/Courier SF +28613 XM +(CPXSYS.ASM)SH +/Times-Roman SF +34891 XM +(will be split into separate) +28 W( files, each of which will)27 W +8280 61543 MT +(generate one or more related systems. When this happens, you'll want to pick the one closest to your) +29 W( system to use)30 W +8280 62739 MT +(as a starting point.)SH +8280 65131 MT +(After editing)SH +/Courier SF +13668 XM +(CPXTYP.ASM)SH +/Times-Roman SF +19918 XM +(as necessary, assemble and link the overlay as follows:)SH +/Symbol SF +10070 67036 MT +(\267)SH +/Times-Roman SF +10780 XM +(With M80 \050where "xxxx" is the hex value of ovladr from)SH +/Courier SF +33842 XM +(CPXLNK.ASM)SH +/Times-Roman SF +(\051:)SH +/Courier SF +13180 68691 MT +(A>m80 cpxtyp=cpxtyp.asm)SH +12600 50 14380 68891 UL +13180 69722 MT +(A>l80 /p:xxxx,cpxtyp,cpxtyp/n/x/e)SH +18600 50 14380 69922 UL +/Symbol SF +10070 71711 MT +(\267)SH +/Times-Roman SF +10780 XM +(With LASM:)SH +ES +%%Page: 26 27 +BS +0 SI +10 /Times-Italic AF +6120 4404 MT +(Page 26)SH +12 /Times-Bold AF +29686 XM +(Kermit User Guide: CP/M-80 KERMIT 1.7.3)SH +46800 50 6120 5709 UL +10 /Courier AF +11020 7824 MT +(A>lasm cpxtyp)SH +6600 50 12220 8024 UL +/Times-Roman SF +6120 10216 MT +(With an IBM PC or clone using the Z80MU softwrae, follow the instructions as if) +128 W( you were using a real CP/M)127 W +6120 11412 MT +(system.)SH +6120 13804 MT +(The overlay \050)6 W +/Courier SF +(CPXTYP.HEX)SH +/Times-Roman SF +(\051 may then be merged with the system-independent module as) +6 W( described above \050creating)7 W +6120 15000 MT +(a runnable Kermit from the distribution kit\051.)SH +6120 17392 MT +(If you are using the Z80MU development system on a PC, and already have a running) +42 W( Kermit-80 v3.9 or later, you)41 W +6120 18588 MT +(can merge the) +1 W( two)2 W +/Courier SF +13735 XM +(.HEX)SH +/Times-Roman SF +16387 XM +(files into a)2 W +/Courier SF +20865 XM +(.COM)SH +/Times-Roman SF +23517 XM +(file with LINK80 \050TOPS 10/20\051, MLOAD \050Z80MU\051, L80 \050Z80MU\051, and)2 W +6120 19784 MT +(transfer the new)SH +/Courier SF +12812 XM +(.COM)SH +/Times-Roman SF +15462 XM +(file to your micro with Kermit:)SH +/Symbol SF +7910 21689 MT +(\267)SH +/Times-Roman SF +8620 XM +(Z80MU on a PC and MLOAD:)SH +/Courier SF +11020 23344 MT +(@MLOAD KERNEW=CPSKER,CPXTYP)SH +15600 50 11620 23544 UL +/Symbol SF +7910 25333 MT +(\267)SH +/Times-Roman SF +8620 XM +(Z80MU on a PC and C80:)SH +/Courier SF +11020 26988 MT +(@L80 /P:xxxx,CPXTYP,CPXTYP/N/X/E)SH +18600 50 11620 27188 UL +/Times-Roman SF +6120 28779 MT +(producing)SH +/Courier SF +10425 XM +(KERNEW.COM)SH +/Times-Roman SF +(.)SH +46800 50 6120 30589 UL +6120 32818 MT +(Symbol)SH +16920 XM +(Terminal description)SH +3112 50 6120 33018 UL +8360 50 16920 33018 UL +6120 33923 MT +(crt)SH +16920 XM +(Basic CRT, no cursor positioning)SH +6120 35028 MT +(adm3a)SH +16920 XM +(ADM3A Display or lookalike)SH +6120 36133 MT +(adm22)SH +16920 XM +(ADM22 Display or lookalike)SH +6120 37238 MT +(am230)SH +16920 XM +(Ampro 230)SH +6120 38343 MT +(h1500)SH +16920 XM +(Hazeltine 1500)SH +6120 39448 MT +(smrtvd)SH +16920 XM +(Netronics Smartvid-80)SH +6120 40553 MT +(soroq)SH +16920 XM +(Soroq IQ-120)SH +6120 41658 MT +(tvi912)SH +16920 XM +(TVI 912)SH +6120 42763 MT +(tvi925)SH +16920 XM +(TVI 925, Freedom 100)SH +6120 43868 MT +(vt52)SH +16920 XM +(VT 52 or VT52 emulator such as Heath H19, H29, etc.)SH +6120 44973 MT +(vt100)SH +16920 XM +(VT 100 or emulator \050most ANSI terminals should work\051)SH +6120 46078 MT +(wyse)SH +16920 XM +(Wyse 100)SH +/Times-Bold SF +20854 47688 MT +(Table 1-5:)SH +/Times-Roman SF +25715 XM +(Terminals known to Kermit-80)SH +46800 50 6120 49498 UL +14 /Times-Bold AF +6120 52900 MT +(1.8. Adding Support For A New System)SH +10 /Times-Roman AF +6120 55018 MT +(Kermit-80 is built from a common set of source files; the system-dependent module makes heavy use) +23 W( of conditional)22 W +6120 56214 MT +(assembly \050this complication will be removed in future releases\051. The) +90 W( system dependencies arise from attempts to)91 W +6120 57410 MT +(answer some questions:)SH +8120 59201 MT +(1.)SH +/Times-Italic SF +9120 XM +(What kind of terminal is to be supported?)SH +/Times-Roman SF +9120 61630 MT +(For many micros, the console is an integral part of the system, but others) +25 W( can use an external terminal.)24 W +9120 62735 MT +(In either case, the commands to manipulate the screen \050position) +38 W( the cursor, erase the screen, etc\051 must)39 W +9120 63840 MT +(be defined.)SH +8120 66050 MT +(2.)SH +/Times-Italic SF +9120 XM +(How is the serial line accessed?)SH +/Times-Roman SF +9120 68479 MT +(For systems supporting the IOBYTE function,) +38 W( this is straightforward; the symbol "IOBYT" is defined)37 W +9120 69584 MT +(TRUE. If) +554 W( the serial line is accessed with IN and OUT instructions, it may be possible to use the)152 W +9120 70689 MT +(simple I/O routines provided. In this case, the symbol "INOUT" is) +36 W( defined TRUE, the MNPORT and)35 W +9120 71794 MT +(MNPRTS are defined to be the data and control addresses, respectively, and) +64 W( bit masks for testing for)65 W +ES +%%Page: 27 28 +BS +0 SI +12 /Times-Bold AF +8280 4404 MT +(1.8. Adding Support For A New System)SH +10 /Times-Italic AF +51775 XM +(Page 27)SH +46800 50 8280 5709 UL +/Times-Roman SF +11280 7886 MT +("input data available") +123 W( and "output buffer empty" must be defined. If the interface is strange, leave)122 W +11280 8991 MT +(IOBYT and INOUT set to FALSE, and provide the I/O routines.)SH +10280 11201 MT +(3.)SH +/Times-Italic SF +11280 XM +(What initialization is necessary?)SH +/Times-Roman SF +11280 13630 MT +(You may wish to set the baud rate or configure the serial line at startup. Examples) +86 W( for a number of)87 W +11280 14735 MT +(devices are present.)SH +10280 16945 MT +(4.)SH +/Times-Italic SF +11280 XM +(What special features are to be supported?)SH +/Times-Roman SF +11280 19374 MT +(You may want to provide the capability to select one of several serial lines with the SET) +183 W( PORT)182 W +11280 20479 MT +(command, or to change the speed) +24 W( of the serial line with the SET SPEED command. To do this, you'll)25 W +11280 21584 MT +(need to build a command table, using the systems already) +2 W( supported as examples. The ability to send a)1 W +11280 22689 MT +(BREAK signal is desirable. Again, examples for several different interfaces \050ACIA, SIO,) +149 W( etc\051 are)150 W +11280 23794 MT +(present.)SH +10280 26004 MT +(5.)SH +/Times-Italic SF +11280 XM +(Do you want to design an external terminal type?)SH +/Times-Roman SF +11280 28433 MT +(There is a jump entry in the overlay file to allow users to add their own termainl emulator.) +114 W( If) +477 W( you)113 W +11280 29538 MT +(write the code for) +223 W( such an emulator, you must load this jump address with the address of your)224 W +11280 30643 MT +(emulator, and SET) +106 W( TERMINAL EXTERNAL from within Kermit. All characters will be passed to)105 W +11280 31748 MT +(this routine during connect mode.)SH +14 /Times-Bold AF +8280 35350 MT +(1.9. Notes on New Features in Kermit-80 Version 4)SH +10 /Symbol AF +10070 37582 MT +(\267)SH +/Times-Italic SF +10780 XM +(Debugging aids:)218 W +/Times-Roman SF +18628 XM +(SET DEBUG ON will add two fields to the SEND/RECEIVE display, labelled)218 W +10780 38687 MT +("Spack" and) +40 W( "Rpack". These display the last packet sent and received. Of course, this slows down the)39 W +10780 39792 MT +(transfer, especially if the console is an external) +24 W( terminal. SET DEBUG OFF removes these fields. The)25 W +10780 40897 MT +(VERSION command) +27 W( displays the name, edit number, and edit date of several of the modules that make)26 W +10780 42002 MT +(up Kermit.)SH +/Symbol SF +10070 43991 MT +(\267)SH +/Times-Italic SF +10780 XM +(TAC support:)32 W +/Times-Roman SF +16567 XM +(ARPAnet TACs \050and many other communication devices) +32 W( such as terminal concentrators,)33 W +10780 45096 MT +(modems, port contention units, network PADs, etc\051 use a printing character \050like) +79 W( "@"\051 as an intercept)78 W +10780 46201 MT +(character, to allow commands to be issued to the TAC, or modem, etc. In order to send this character) +7 W( to)8 W +10780 47306 MT +(the host, it must be typed) +163 W( twice. The command "SET TAC CHARACTER" to Kermit enables the)162 W +10780 48411 MT +("TACtrap" and asks the) +358 W( user to specify the TAC intercept character. This character will be)359 W +10780 49516 MT +(automatically doubled when it) +94 W( appears in Kermit protocol messages \050sent by the SEND or RECEIVE)93 W +10780 50621 MT +(commands\051 or when it appears in a) +295 W( file being sent with the TRANSMIT command. It is not)296 W +10780 51726 MT +(automatically doubled when typed by the user in CONNECT mode. "SET TAC) +192 W( ON" enables the)191 W +10780 52831 MT +(TACtrap but does not change the TAC intercept character, which) +109 W( is initially "@". "SET TAC OFF")110 W +10780 53936 MT +(disables the TACtrap.)SH +/Symbol SF +10070 55925 MT +(\267)SH +/Times-Italic SF +10780 XM +(File buffering:)96 W +/Times-Roman SF +17429 XM +(Previous versions of Kermit-80 buffered only) +96 W( one sector \050128 bytes\051 at a time during)95 W +10780 57030 MT +(file transfer operations. This version buffers 16Kbytes at a time, reducing the number of) +151 W( times the)152 W +10780 58135 MT +(floppy drive must be) +33 W( spun up and down, and increasing the effective throughput of the link. If the disk)32 W +10780 59240 MT +(transfer rate is) +89 W( too slow, however, the remote Kermit may time out and retransmit packets. This will)90 W +10780 60345 MT +(show up on the screen in the "Retries:" field; if this occurs after disk activity, you) +26 W( may want to increase)25 W +10780 61450 MT +(the timeout value on the remote Kermit,) +135 W( SET BUFFER <new value> while in Kermit,or reassemble)136 W +10780 62555 MT +(Kermit with a smaller value for MAXSEC \050in)304 W +/Courier SF +31821 XM +(CPSDEF.ASM)SH +/Times-Roman SF +(\051 This) +304 W( buffer is also used by the)303 W +10780 63660 MT +(TRANSMIT command; the log file enabled by the LOG command is still written a sector at a time.)SH +8280 66052 MT +(This section is intended for people wanting to implement their own versions) +16 W( of Kermit-80 for computers not already)17 W +8280 67248 MT +(defined.)SH +8280 69640 MT +(The system independent code communicates to routines for a specific system through a set of tables.) +62 W( These) +372 W( tables)61 W +8280 70836 MT +(are defined in CPXLNK.ASM, and) +106 W( should not be modified between revisions of Kermit. If an entry is added or)107 W +ES +%%Page: 28 29 +BS +0 SI +10 /Times-Italic AF +6120 4404 MT +(Page 28)SH +12 /Times-Bold AF +30586 XM +(Kermit User Guide: CP/M-80 KERMIT 1.9)SH +46800 50 6120 5709 UL +10 /Times-Roman AF +6120 7886 MT +(deleted, then) +199 W( the whole of Kermit-80 needs reassembling. Make sure that the changes to CPXLNK.ASM are)198 W +6120 9082 MT +(duplicated in CPSUTL.ASM, which has the system independent equivalent of CPXLNK.ASM.)SH +6120 11474 MT +(The following entries/definitions apply) +140 W( to revision 4.09. There have been three additional entries since revision)141 W +6120 12670 MT +(4.05.)SH +6120 15062 MT +(The table) +56 W( is split into three sectors; The first section defines two byte "words" giving 16 bits of interface data; The)55 W +6120 16258 MT +(second set is a set of jumps to various functions, and finally the third set a set of pure data bytes.)SH +12 /Times-Bold AF +6120 19374 MT +(1.9.1. Interface Data.)SH +10 /Times-Roman AF +10120 21316 MT +(LNKFLG)SH +14120 XM +(Must be first entry in overlay at overlay address. Is a two byte address giving the size of the)98 W +3944 50 10120 21516 UL +14120 22421 MT +(linkage table. This is used to check for consistency of overlay's)SH +10120 24850 MT +(ENTSIZE)SH +4055 50 10120 25050 UL +14120 25955 MT +(Length of entry table, also used for consistency checking after the overlay. Currently 6)SH +10120 28384 MT +(SYSEDT)SH +14120 XM +(The address of a dollar-terminated string giving the overlay revision level and date. Points) +45 W( to a)46 W +3778 50 10120 28584 UL +14120 29489 MT +(string like: CPXSYS.ASM\05033\051 4-JUN-1986$)SH +10120 31918 MT +(FAMILY)SH +14120 XM +(The address of a dollar-terminated string giving the Family overlay revision) +80 W( level and date. If)79 W +3833 50 10120 32118 UL +14120 33023 MT +(the system is in CPXSYS.ASM rather than a) +46 W( particular Family overlay, it is simply a pointer to)47 W +14120 34128 MT +($)SH +12 /Times-Bold AF +6120 39454 MT +(1.9.2. Jump Table.)SH +10 /Times-Roman AF +6120 41396 MT +(This is split into three main sectors-)SH +8120 44511 MT +(1.)SH +9120 XM +(Input/Output routines)SH +8120 46721 MT +(2.)SH +9120 XM +(Screen formatting routines)SH +8120 48931 MT +(3.)SH +9120 XM +(other system dependent routines)SH +7120 52246 MT +(SELMDM)SH +4278 50 7120 52446 UL +/Times-Italic SF +7120 53351 MT +(Parameters)SH +/Times-Roman SF +14120 XM +(None)SH +/Times-Italic SF +7120 54456 MT +(Returns)SH +/Times-Roman SF +14120 XM +(None)SH +/Times-Italic SF +7120 55561 MT +(Description)SH +/Times-Roman SF +14120 XM +(selects the modem port. Most) +56 W( systems do nothing and simply return. HL,DE and BC registers)55 W +14120 56666 MT +(preserved.)SH +7120 59095 MT +(OUTMDM)SH +4555 50 7120 59295 UL +/Times-Italic SF +7120 60200 MT +(Parameters)SH +/Times-Roman SF +14120 XM +(None)SH +/Times-Italic SF +7120 61305 MT +(Returns)SH +/Times-Roman SF +14120 XM +(None)SH +/Times-Italic SF +7120 62410 MT +(Description)SH +/Times-Roman SF +14120 XM +(Output the character in E register to the communications line. BC,DE,HL registers preserved.)SH +7120 64839 MT +(INPMDM)SH +4111 50 7120 65039 UL +/Times-Italic SF +7120 65944 MT +(Parameters)SH +/Times-Roman SF +14120 XM +(None)SH +/Times-Italic SF +7120 67049 MT +(Returns)SH +/Times-Roman SF +14120 XM +(Accumulator either 0 or character from comms line if available)SH +/Times-Italic SF +7120 68154 MT +(Description)SH +/Times-Roman SF +14120 XM +(Check modem) +90 W( for character and if so, return it in A. HL,DE,BC registers preserved, flags and)91 W +14120 69259 MT +(accumulator lost.)SH +7120 71688 MT +(FLSMDM)SH +4223 50 7120 71888 UL +ES +%%Page: 29 30 +BS +0 SI +12 /Times-Bold AF +8280 4404 MT +(1.9.2. Jump Table.)SH +10 /Times-Italic AF +51775 XM +(Page 29)SH +46800 50 8280 5709 UL +9280 7886 MT +(Parameters)SH +/Times-Roman SF +16280 XM +(None)SH +/Times-Italic SF +9280 8991 MT +(Returns)SH +/Times-Roman SF +16280 XM +(None)SH +/Times-Italic SF +9280 10096 MT +(Description)SH +/Times-Roman SF +16280 XM +(Clear any pending characters in the input buffer from the modem. No registers are preserved.)SH +9280 12525 MT +(SELCON)SH +3889 50 9280 12725 UL +/Times-Italic SF +9280 13630 MT +(Parameters)SH +/Times-Roman SF +16280 XM +(None)SH +/Times-Italic SF +9280 14735 MT +(Returns)SH +/Times-Roman SF +16280 XM +(None)SH +/Times-Italic SF +9280 15840 MT +(Description)SH +/Times-Roman SF +16280 XM +(Select the console.) +44 W( This) +337 W( is a null subroutine for most systems, but for IOBYTE systems selects)43 W +16280 16945 MT +(the console.)SH +9280 19374 MT +(OUTCON)SH +4166 50 9280 19574 UL +/Times-Italic SF +9280 20479 MT +(Parameters)SH +/Times-Roman SF +16280 XM +(Character in E)SH +/Times-Italic SF +9280 21584 MT +(Returns)SH +/Times-Roman SF +16280 XM +(None)SH +/Times-Italic SF +9280 22689 MT +(Description)SH +/Times-Roman SF +16280 XM +(Send the character in E to the console. Any quirks) +145 W( of system responding in an odd manner)146 W +16280 23794 MT +(should be handled. No registers preserved.)SH +9280 26223 MT +(INPCON)SH +3722 50 9280 26423 UL +/Times-Italic SF +9280 27328 MT +(Parameters)SH +/Times-Roman SF +16280 XM +(None)SH +/Times-Italic SF +9280 28433 MT +(Returns)SH +/Times-Roman SF +16280 XM +(Zero or character in A.)SH +/Times-Italic SF +9280 29538 MT +(Description)SH +/Times-Roman SF +16280 XM +(Get a character from the console or return a null if no character to be read.) +119 W( No) +486 W( registers are)118 W +16280 30643 MT +(preserved.)SH +9280 33072 MT +(OUTLPT)SH +3833 50 9280 33272 UL +/Times-Italic SF +9280 34177 MT +(Parameters)SH +/Times-Roman SF +16280 XM +(Character in E)SH +/Times-Italic SF +9280 35282 MT +(Returns)SH +/Times-Roman SF +16280 XM +(None)SH +/Times-Italic SF +9280 36387 MT +(Description)SH +/Times-Roman SF +16280 XM +(Send the character in E to the printer. The console is selected. Only DE registers are preserved)SH +9280 38816 MT +(LPTSTAT)SH +4278 50 9280 39016 UL +/Times-Italic SF +9280 39921 MT +(Parameters)SH +/Times-Roman SF +16280 XM +(None)SH +/Times-Italic SF +9280 41026 MT +(Returns)SH +/Times-Roman SF +16280 XM +(00H or 0FFH in A register)SH +/Times-Italic SF +9280 42131 MT +(Description)SH +/Times-Roman SF +16280 XM +(Test the printer to see if it is ready to receive a character to) +20 W( be printed. If a 00H is returned then)21 W +16280 43236 MT +(the printer is ready to receive a character.)SH +9280 45665 MT +(EXTTER)SH +3833 50 9280 45865 UL +/Times-Italic SF +9280 46770 MT +(Parameters)SH +/Times-Roman SF +16280 XM +(Character to be sent to the user supplied terminal emulator in the E register)SH +/Times-Italic SF +9280 47875 MT +(Returns)SH +/Times-Roman SF +16280 XM +(None)SH +/Times-Italic SF +9280 48980 MT +(Description)SH +/Times-Roman SF +16280 XM +(If the user has supplied a terminal emulator in) +67 W( the overlay code, EXTTER will be a JMP <non)66 W +16280 50085 MT +(zero address>. If SET TERMINAL EXTERNAL has been) +148 W( set, all caharcters will be passed)149 W +16280 51190 MT +(verbatim to this terminal emulator. If there is) +155 W( no external emulator, this code will never be)154 W +16280 52295 MT +(called. The) +320 W( user should reset terminal conditions on initialisation of both the system and) +35 W( before)36 W +16280 53400 MT +(CONNECT. All) +250 W( registers should be preserved.)SH +9280 55829 MT +(XBDOS)SH +3389 50 9280 56029 UL +/Times-Italic SF +9280 56934 MT +(Parameters)SH +/Times-Roman SF +16280 XM +(Any required for calling BDOS)SH +/Times-Italic SF +9280 58039 MT +(Returns)SH +/Times-Roman SF +16280 XM +(Any expected from the called BDOS routine)SH +/Times-Italic SF +9280 59144 MT +(Description)SH +/Times-Roman SF +16280 XM +(This is an alternative entry to BDOS. This entry will) +53 W( also check the printer status etc. For full)52 W +16280 60249 MT +(details see the code for the BDOS trap in CPSUTL.ASM.)SH +16280 62678 MT +(2b\051)SH +16280 65107 MT +(CLRLIN)SH +3611 50 16280 65307 UL +/Times-Italic SF +9280 66212 MT +(Parameters)SH +/Times-Roman SF +16280 XM +(None)SH +/Times-Italic SF +9280 67317 MT +(Returns)SH +/Times-Roman SF +16280 XM +(None)SH +/Times-Italic SF +9280 68422 MT +(Description)SH +/Times-Roman SF +16280 XM +(Clear the current line on the terminal)SH +9280 70851 MT +(CLRSPC)SH +3724 50 9280 71051 UL +/Times-Italic SF +9280 71956 MT +(Parameters)SH +/Times-Roman SF +16280 XM +(None)SH +ES +%%Page: 30 31 +BS +0 SI +10 /Times-Italic AF +6120 4404 MT +(Page 30)SH +12 /Times-Bold AF +29686 XM +(Kermit User Guide: CP/M-80 KERMIT 1.9.2)SH +46800 50 6120 5709 UL +10 /Times-Italic AF +7120 7886 MT +(Returns)SH +/Times-Roman SF +14120 XM +(None)SH +/Times-Italic SF +7120 8991 MT +(Description)SH +/Times-Roman SF +14120 XM +(Erase the current position \050after a backspace\051)SH +7120 11420 MT +(DELCHR)SH +4000 50 7120 11620 UL +/Times-Italic SF +7120 12525 MT +(Parameters)SH +/Times-Roman SF +14120 XM +(None)SH +/Times-Italic SF +7120 13630 MT +(Returns)SH +/Times-Roman SF +14120 XM +(None)SH +/Times-Italic SF +7120 14735 MT +(Description)SH +/Times-Roman SF +14120 XM +(Make delete \0507FH\051 look like a backspace. Some systems do a backspace, space, backspace)163 W +14120 15840 MT +(automatically others have to simulate it)SH +7120 18269 MT +(CLRTOP)SH +3834 50 7120 18469 UL +/Times-Italic SF +7120 19374 MT +(Parameters)SH +/Times-Roman SF +14120 XM +(None)SH +/Times-Italic SF +7120 20479 MT +(Returns)SH +/Times-Roman SF +14120 XM +(None)SH +/Times-Italic SF +7120 21584 MT +(Description)SH +/Times-Roman SF +14120 XM +(Clear the screen and place the cursor at the top LH corner)SH +7120 24013 MT +(SCREND)SH +3945 50 7120 24213 UL +/Times-Italic SF +7120 25118 MT +(Parameters)SH +/Times-Roman SF +14120 XM +(None)SH +/Times-Italic SF +7120 26223 MT +(Returns)SH +/Times-Roman SF +14120 XM +(None)SH +/Times-Italic SF +7120 27328 MT +(Description)SH +/Times-Roman SF +14120 XM +(Place the cursor on the line for the Kermit-80 prompt after a file transfer. \050Usually line 13\051)SH +7120 29757 MT +(SCRERR)SH +3835 50 7120 29957 UL +/Times-Italic SF +7120 30862 MT +(Parameters)SH +/Times-Roman SF +14120 XM +(None)SH +/Times-Italic SF +7120 31967 MT +(Returns)SH +/Times-Roman SF +14120 XM +(None)SH +/Times-Italic SF +7120 33072 MT +(Description)SH +/Times-Roman SF +14120 XM +(Move cursor to the error message field on the file transfer format screen)SH +7120 35501 MT +(SCRFLN)SH +3779 50 7120 35701 UL +/Times-Italic SF +7120 36606 MT +(Parameters)SH +/Times-Roman SF +14120 XM +(None)SH +/Times-Italic SF +7120 37711 MT +(Returns)SH +/Times-Roman SF +14120 XM +(None)SH +/Times-Italic SF +7120 38816 MT +(Description)SH +/Times-Roman SF +14120 XM +(Move the cursor to the filename field)SH +7120 41245 MT +(SCRNP)SH +3168 50 7120 41445 UL +/Times-Italic SF +7120 42350 MT +(Parameters)SH +/Times-Roman SF +14120 XM +(None)SH +/Times-Italic SF +7120 43455 MT +(Returns)SH +/Times-Roman SF +14120 XM +(None)SH +/Times-Italic SF +7120 44560 MT +(Description)SH +/Times-Roman SF +14120 XM +(Move the cursor to the packet count field)SH +7120 46989 MT +(SCRNRT)SH +3890 50 7120 47189 UL +/Times-Italic SF +7120 48094 MT +(Parameters)SH +/Times-Roman SF +14120 XM +(None)SH +/Times-Italic SF +7120 49199 MT +(Returns)SH +/Times-Roman SF +14120 XM +(None)SH +/Times-Italic SF +7120 50304 MT +(Description)SH +/Times-Roman SF +14120 XM +(Move cursor to the retry count field)SH +7120 52733 MT +(SCRST)SH +3057 50 7120 52933 UL +/Times-Italic SF +7120 53838 MT +(Parameters)SH +/Times-Roman SF +14120 XM +(None)SH +/Times-Italic SF +7120 54943 MT +(Returns)SH +/Times-Roman SF +14120 XM +(None)SH +/Times-Italic SF +7120 56048 MT +(Description)SH +/Times-Roman SF +14120 XM +(Move cursor to the status field)SH +7120 58477 MT +(RPPOS)SH +3057 50 7120 58677 UL +/Times-Italic SF +7120 59582 MT +(Parameters)SH +/Times-Roman SF +14120 XM +(None)SH +/Times-Italic SF +7120 60687 MT +(Returns)SH +/Times-Roman SF +14120 XM +(None)SH +/Times-Italic SF +7120 61792 MT +(Description)SH +/Times-Roman SF +14120 XM +(Move to the receive packet field \050debugging use\051)SH +7120 64221 MT +(SPPOS)SH +2946 50 7120 64421 UL +/Times-Italic SF +7120 65326 MT +(Parameters)SH +/Times-Roman SF +14120 XM +(None)SH +/Times-Italic SF +7120 66431 MT +(Returns)SH +/Times-Roman SF +14120 XM +(None)SH +/Times-Italic SF +7120 67536 MT +(Description)SH +/Times-Roman SF +14120 XM +(Move to the send packet field \050for debugging use\051)SH +14120 69965 MT +(2c\051)SH +14120 72394 MT +(SYSINIT)SH +3833 50 14120 72594 UL +ES +%%Page: 31 32 +BS +0 SI +12 /Times-Bold AF +8280 4404 MT +(1.9.2. Jump Table.)SH +10 /Times-Italic AF +51775 XM +(Page 31)SH +46800 50 8280 5709 UL +9280 7886 MT +(Parameters)SH +/Times-Roman SF +16280 XM +(None)SH +/Times-Italic SF +9280 8991 MT +(Returns)SH +/Times-Roman SF +16280 XM +(None)SH +/Times-Italic SF +9280 10096 MT +(Description)SH +/Times-Roman SF +16280 XM +(Initialize the system specific) +49 W( items. No registers are preserved. Any initialization is done once)48 W +16280 11201 MT +(only when Kermit-80 is first loaded.)SH +9280 13630 MT +(SYSEXIT)SH +4111 50 9280 13830 UL +/Times-Italic SF +9280 14735 MT +(Parameters)SH +/Times-Roman SF +16280 XM +(None)SH +/Times-Italic SF +9280 15840 MT +(Returns)SH +/Times-Roman SF +16280 XM +(None)SH +/Times-Italic SF +9280 16945 MT +(Description)SH +/Times-Roman SF +16280 XM +(Program termination. De-initialize anything in preparation for a return to CP/M)SH +9280 19374 MT +(SYSCON)SH +3945 50 9280 19574 UL +/Times-Italic SF +9280 20479 MT +(Parameters)SH +/Times-Roman SF +16280 XM +(None)SH +/Times-Italic SF +9280 21584 MT +(Returns)SH +/Times-Roman SF +16280 XM +(None)SH +/Times-Italic SF +9280 22689 MT +(Description)SH +/Times-Roman SF +16280 XM +(Initialize anything before entering the connect state.)SH +9280 25118 MT +(SYSCLS)SH +3668 50 9280 25318 UL +/Times-Italic SF +9280 26223 MT +(Parameters)SH +/Times-Roman SF +16280 XM +(None)SH +/Times-Italic SF +9280 27328 MT +(Returns)SH +/Times-Roman SF +16280 XM +(None)SH +/Times-Italic SF +9280 28433 MT +(Description)SH +/Times-Roman SF +16280 XM +(System dependent close routine when exiting connect state)SH +9280 30862 MT +(SYSINH)SH +3611 50 9280 31062 UL +/Times-Italic SF +9280 31967 MT +(Parameters)SH +/Times-Roman SF +16280 XM +(None)SH +/Times-Italic SF +9280 33072 MT +(Returns)SH +/Times-Roman SF +16280 XM +(None)SH +/Times-Italic SF +9280 34177 MT +(Description)SH +/Times-Roman SF +16280 XM +(Help routine to test for any extensions to the escape menu during the connect state.) +40 W( If) +331 W( a system)41 W +16280 35282 MT +(has any special feature it) +499 W( can use during connect mode, then it can be tested as)498 W +16280 36387 MT +(<escape-character>xxx. This) +1370 W( entry) +560 W( is a string for printing to the console for an)561 W +16280 37492 MT +(<escape-character>? Often) +250 W( used for generating breaks or controlling a modem.)SH +9280 39921 MT +(SYSINT)SH +3500 50 9280 40121 UL +/Times-Italic SF +9280 41026 MT +(Parameters)SH +/Times-Roman SF +16280 XM +(None)SH +/Times-Italic SF +9280 42131 MT +(Returns)SH +/Times-Roman SF +16280 XM +(None)SH +/Times-Italic SF +9280 43236 MT +(Description)SH +/Times-Roman SF +16280 XM +(This is a test-and-jump on receipt of an escape sequence not understood by Kermit-80.) +94 W( If) +437 W( the)93 W +16280 44341 MT +(character in A is not recognized by your version of Kermit=80, do a rskip)SH +9280 46770 MT +(SYSFLT)SH +3612 50 9280 46970 UL +/Times-Italic SF +9280 47875 MT +(Parameters)SH +/Times-Roman SF +16280 XM +(Character in E)SH +/Times-Italic SF +9280 48980 MT +(Returns)SH +/Times-Roman SF +16280 XM +(Character in E. Either a 00H or anything else in A)SH +/Times-Italic SF +9280 50085 MT +(Description)SH +/Times-Roman SF +16280 XM +(Test the character in E. If it may not be printed to the console, set A to zero.) +33 W( All) +317 W( other registers)34 W +16280 51190 MT +(preserved.)SH +16280 52295 MT +(NB <XON>,<XOFF>,<DEL>,<NULL> are always rejected.)SH +9280 54724 MT +(SYSBYE)SH +3834 50 9280 54924 UL +/Times-Italic SF +9280 55829 MT +(Parameters)SH +/Times-Roman SF +16280 XM +(None)SH +/Times-Italic SF +9280 56934 MT +(Returns)SH +/Times-Roman SF +16280 XM +(None)SH +/Times-Italic SF +9280 58039 MT +(Description)SH +/Times-Roman SF +16280 XM +(System dependent processing for the BYE command. \050eg hang up the phone\051)SH +9280 60468 MT +(SYSSPD)SH +3668 50 9280 60668 UL +/Times-Italic SF +9280 61573 MT +(Parameters)SH +/Times-Roman SF +16280 XM +(Value from table in DE)SH +/Times-Italic SF +9280 62678 MT +(Returns)SH +/Times-Roman SF +16280 XM +(None)SH +/Times-Italic SF +9280 63783 MT +(Description)SH +/Times-Roman SF +16280 XM +(The system dependent code for baud rate) +9 W( change. DE contains the two byte value from the baud)8 W +16280 64888 MT +(rate table. This value is also stored in "SPEED")SH +9280 67317 MT +(SYSPRT)SH +3668 50 9280 67517 UL +/Times-Italic SF +9280 68422 MT +(Parameters)SH +/Times-Roman SF +16280 XM +(Value in DE)SH +/Times-Italic SF +9280 69527 MT +(Returns)SH +/Times-Roman SF +16280 XM +(None)SH +/Times-Italic SF +9280 70632 MT +(Description)SH +/Times-Roman SF +16280 XM +(The system dependent code for setting the port. The parameters are passed in DE,) +106 W( which are)107 W +16280 71737 MT +(obtained from the port tables)SH +ES +%%Page: 32 33 +BS +0 SI +10 /Times-Italic AF +6120 4404 MT +(Page 32)SH +12 /Times-Bold AF +29686 XM +(Kermit User Guide: CP/M-80 KERMIT 1.9.2)SH +46800 50 6120 5709 UL +10 /Times-Roman AF +7120 9410 MT +(SYSSCR)SH +3724 50 7120 9610 UL +/Times-Italic SF +7120 10515 MT +(Parameters)SH +/Times-Roman SF +14120 XM +(String pointer in DE)SH +/Times-Italic SF +7120 11620 MT +(Returns)SH +/Times-Roman SF +14120 XM +(None)SH +/Times-Italic SF +7120 12725 MT +(Description)SH +/Times-Roman SF +14120 XM +(Setup the screen display for file transfer. The Kermit version string is pointed to by DE. If) +41 W( the)40 W +14120 13830 MT +(terminal is not capable of cursor addressing \050eg dumb glass TTY\051 then) +12 W( only the screen is cleared)13 W +14120 14935 MT +(and the version string is printed.)SH +7120 17364 MT +(CSRPOS)SH +3724 50 7120 17564 UL +/Times-Italic SF +7120 18469 MT +(Parameters)SH +/Times-Roman SF +14120 XM +(Row number in B, column number in C)SH +/Times-Italic SF +7120 19574 MT +(Returns)SH +/Times-Roman SF +14120 XM +(None)SH +/Times-Italic SF +7120 20679 MT +(Description)SH +/Times-Roman SF +14120 XM +(Move the cursor to) +74 W( row B, column C where B=1,C=1 is top LH corner of screen. The routine)73 W +14120 21784 MT +(should first end a) +19 W( "cursor position" leading string \050up to four characters\051 then use the parameters)20 W +14120 22889 MT +(given to complete the versions cursor position function)SH +7120 25318 MT +(SYSSPC)SH +3613 50 7120 25518 UL +/Times-Italic SF +7120 26423 MT +(Parameters)SH +/Times-Roman SF +14120 XM +(None)SH +/Times-Italic SF +7120 27528 MT +(Returns)SH +/Times-Roman SF +14120 XM +(K bytes free in HL)SH +/Times-Italic SF +7120 28633 MT +(Description)SH +/Times-Roman SF +14120 XM +(Get the amount of free disk space on the selected disk drive. This could be in the system)179 W +14120 29738 MT +(independent code. Automatically detects CP/M V2.2 or V3.0. No registers saved.)SH +7120 32167 MT +(MOVER)SH +3611 50 7120 32367 UL +/Times-Italic SF +7120 33272 MT +(Parameters)SH +/Times-Roman SF +14120 XM +(Source Pointer in HL)SH +14120 34377 MT +(Destination Pointer in DE)SH +14120 35482 MT +(Byte count in BC)SH +/Times-Italic SF +7120 36587 MT +(Returns)SH +/Times-Roman SF +14120 XM +(None)SH +/Times-Italic SF +7120 37692 MT +(Description)SH +/Times-Roman SF +14120 XM +(Move \050BC\051 bytes from \050HL\051 to \050DE\051 Z80 based) +50 W( systems do an LDIR, while 8080 systems do it)51 W +14120 38797 MT +(as a loop. All registers destroyed)SH +7120 41226 MT +(PRTSTR)SH +3668 50 7120 41426 UL +/Times-Italic SF +7120 42331 MT +(Parameters)SH +/Times-Roman SF +14120 XM +($ terminated string pointed to by DE)SH +/Times-Italic SF +7120 43436 MT +(Returns)SH +/Times-Roman SF +14120 XM +(None)SH +/Times-Italic SF +7120 44541 MT +(Description)SH +/Times-Roman SF +14120 XM +(Print the string onto the console.)SH +14120 46970 MT +(3\051)SH +7120 50504 MT +(PTTAB)SH +14120 XM +(WORD)SH +21320 XM +(Points to VT52 equivalent escape sequences.)SH +3167 50 7120 50704 UL +7120 52933 MT +(SPDTAB)SH +14120 XM +(WORD)SH +21320 XM +(Address of baud-rate command table, or 0 if table does not exist)SH +3834 50 7120 53133 UL +7120 55362 MT +(SPDHLP)SH +14120 XM +(WORD)SH +21320 XM +(Address of baud-rate help table, or 0 if SET SPEED is not supported.)SH +3723 50 7120 55562 UL +7120 57791 MT +(PRTTAB)SH +14120 XM +(WORD)SH +21320 XM +(Address of port command table or 0 if SET PORT is not supported.)SH +3834 50 7120 57991 UL +7120 60220 MT +(PRTHLP)SH +14120 XM +(WORD)SH +21320 XM +(Address of port help table or 0 if SET PORT is not supported)SH +3723 50 7120 60420 UL +7120 62649 MT +(TIMOUT)SH +14120 XM +(BYTE)SH +21320 XM +(FUZZY-TIMER. Set) +582 W( to value suitable to your system \050depends largely) +166 W( on)165 W +3888 50 7120 62849 UL +14120 63754 MT +(CPU speed\051)SH +7120 66183 MT +(VTFLG)SH +14120 XM +(BYTE)SH +21320 XM +(VT52 emulation flag. Set to 0 if terminal) +23 W( emulates a VT52, 01 if emulation is)24 W +3222 50 7120 66383 UL +14120 67288 MT +(required, or 0FFH if emulations not possible \050eg for "CRT"\051)SH +7120 69717 MT +(ESCCHR)SH +14120 XM +(BYTE)SH +21320 XM +(default escape character-usually control-] but sometimes control-\134)SH +3890 50 7120 69917 UL +7120 72146 MT +(SPEED)SH +14120 XM +(WORD)SH +21320 XM +(Storage space for baud-rate. Set to 0FFFFH as) +303 W( baud rates are initially)302 W +3056 50 7120 72346 UL +ES +%%Page: 33 34 +BS +0 SI +12 /Times-Bold AF +8280 4404 MT +(1.9.2. Jump Table.)SH +10 /Times-Italic AF +51775 XM +(Page 33)SH +46800 50 8280 5709 UL +/Times-Roman SF +16280 7886 MT +(unknown. Note) +250 W( that the STATUS routine only looks at the first \050least significant\051 byte.)SH +9280 10315 MT +(PORT)SH +16280 XM +(WORD)SH +23480 XM +(Storage space for port. Set to 0FFFFH as ports may not be implemented, and)43 W +2556 50 9280 10515 UL +16280 11420 MT +(is initially unknown)SH +9280 13849 MT +(PRNFLG)SH +16280 XM +(BYTE)SH +23480 XM +(Printer copy flag-if O no copy. Anything else => copy to printer)SH +3834 50 9280 14049 UL +9280 16278 MT +(DBGFLG)SH +16280 XM +(BYTE)SH +23480 XM +(Debugging flag. If O then no debugging to be) +24 W( done. \050ie writing of debugging)23 W +4000 50 9280 16478 UL +16280 17383 MT +(info during a file transfer\051)SH +9280 19812 MT +(ECOFLG)SH +16280 XM +(BYTE)SH +23480 XM +(Local ECHO flag \050default is off\051)SH +3889 50 9280 20012 UL +9280 22241 MT +(FLWFLG)SH +16280 XM +(BYTE)SH +23480 XM +(File warning flag. If set to 1 will not overwrite files already existing) +66 W( on disk)67 W +4000 50 9280 22441 UL +16280 23346 MT +(with some-named files being transferred)SH +9280 25775 MT +(IBMFLG)SH +16280 XM +(BYTE)SH +23480 XM +(IBM system is the host-assume IBM file transfers etc)SH +3778 50 9280 25975 UL +9280 28204 MT +(CPMFLG)SH +16280 XM +(BYTE)SH +23480 XM +(Flag indicating) +322 W( type of CP/M files to be transferred. Default setting -)321 W +4001 50 9280 28404 UL +16280 29309 MT +(DEFAULT)SH +9280 31738 MT +(PARITY)SH +16280 XM +(BYTE)SH +23480 XM +(Type of parity in use)SH +3611 50 9280 31938 UL +16280 32843 MT +(0 = Even parity)SH +16280 33948 MT +(3 = Mark parity)SH +16280 35053 MT +(6 = No parity \0508th bit is data\051)SH +16280 36158 MT +(9 = Odd parity)SH +16280 37263 MT +(12 = Space parity)SH +9280 39692 MT +(SPSIZ)SH +16280 XM +(BYTE)SH +23480 XM +(Size of send packet)SH +2612 50 9280 39892 UL +9280 42121 MT +(RPSIZ)SH +16280 XM +(BYTE)SH +23480 XM +(Size of receive packet)SH +2723 50 9280 42321 UL +9280 44550 MT +(STIME)SH +16280 XM +(BYTE)SH +23480 XM +(Send timer \050time-out\051)SH +3000 50 9280 44750 UL +9280 46979 MT +(RTIME)SH +16280 XM +(BYTE)SH +23480 XM +(Receive timer \050time-out\051)SH +3111 50 9280 47179 UL +9280 49408 MT +(SPAD)SH +16280 XM +(BYTE)SH +23480 XM +(Send Padding \050default=0\051)SH +2556 50 9280 49608 UL +9280 51837 MT +(RPAD)SH +16280 XM +(BYTE)SH +23480 XM +(Receive Padding \050default=0\051)SH +2667 50 9280 52037 UL +9280 54266 MT +(SPADCH)SH +16280 XM +(BYTE)SH +23480 XM +(Send Padding character \050default=NULL\051)SH +3945 50 9280 54466 UL +9280 56695 MT +(RPADCH)SH +16280 XM +(BYTE)SH +23480 XM +(Receive Padding character \050default=NULC\051)SH +4056 50 9280 56895 UL +9280 59124 MT +(SEOL)SH +16280 XM +(BYTE)SH +23480 XM +(Send EOL character \050default=CR\051)SH +2500 50 9280 59324 UL +9280 61553 MT +(REOL)SH +16280 XM +(BYTE)SH +23480 XM +(Receive EOL character \050default=CR\051)SH +2611 50 9280 61753 UL +9280 63982 MT +(SQUOTE)SH +16280 XM +(BYTE)SH +23480 XM +(Send quote character \050default=#\051)SH +3944 50 9280 64182 UL +9280 66411 MT +(RQUOTE)SH +16280 XM +(BYTE)SH +23480 XM +(Receive quote character \050default=#\051)SH +4055 50 9280 66611 UL +9280 68840 MT +(CHKTYP)SH +16280 XM +(BYTE)SH +23480 XM +(Ascii value of checktype)SH +4000 50 9280 69040 UL +16280 69945 MT +(31H="1"=checktype1 \0506bits\051)SH +16280 71050 MT +(32H="2"=checktype2 \05012bits\051)SH +ES +%%Page: 34 35 +BS +0 SI +10 /Times-Italic AF +6120 4404 MT +(Page 34)SH +12 /Times-Bold AF +29986 XM +(Kermit User Guide: CP/M-80 KERMIT 1.10)SH +46800 50 6120 5709 UL +10 /Times-Roman AF +14120 7886 MT +(33H="3"=CCITT checksum \050CRC\051)SH +14120 8991 MT +(Default is 31H\050"1"\051)SH +7120 11420 MT +(TACFLG)SH +14120 XM +(BYTE)SH +21320 XM +(If set to on \050non zero\051 send the TACCHR twice. This is for ARPA TAC users,)3 W +3889 50 7120 11620 UL +14120 12525 MT +(where the TAC swallows one "wakeup" character.) +11 W( If) +271 W( sent twice the TAC will pas one on and go)10 W +14120 13630 MT +(back to normal mode.)SH +7120 16059 MT +(TACCHR)SH +14120 XM +(BYTE)SH +21320 XM +(Desired TAC character. It is ignored if TAC trapping is turned off. Value) +71 W( to)72 W +4056 50 7120 16259 UL +14120 17164 MT +(send twice if TAC interception is set on. Default=0, but set to commercial) +16 W( AT if the conditional)15 W +14120 18269 MT +(assembly flag TAC is set true)SH +7120 20698 MT +(BUFADR)SH +14120 XM +(WORD)SH +21320 XM +(Address of Multi-Sector buffering for I/O)SH +4056 50 7120 20898 UL +7120 23127 MT +(BUFSEC)SH +14120 XM +(BYTE)SH +21320 XM +(The number of bytes the big buffers can hold. Default is 1. \0500=256 sectors\051.)SH +3779 50 7120 23327 UL +7120 25556 MT +(FFUSSY)SH +14120 XM +(BYTE)SH +21320 XM +(Indicates if) +491 W( funny characters may be used in CP/M file names \050eg)492 W +3668 50 7120 25756 UL +/Courier SF +14120 26661 MT +(<>.,;?#[])SH +/Times-Roman SF +(\051 If zero, allow anything. Default is nonzero.)SH +7120 29090 MT +(BMAX)SH +14120 XM +(SPACE:\0502bytes\051 Highest block number on selected disk drive)SH +3000 50 7120 29290 UL +7120 31519 MT +(BMASK)SH +14120 XM +(SPACE:\0501byte\051 \050Records/block\051-1)SH +3556 50 7120 31719 UL +7120 33948 MT +(BSHIFTF)SH +14120 XM +(SPACE:\0501byte\051 Number of shifts to multiply by rec.block)SH +4001 50 7120 34148 UL +7120 36377 MT +(NNAMS)SH +14120 XM +(SPACE:\0501byte\051 Counter for file-names per line)SH +3611 50 7120 36577 UL +14 /Times-Bold AF +6120 39979 MT +(1.10. Future Work)SH +10 /Times-Roman AF +6120 42097 MT +(Work that needs to be done in future releases includes:)SH +/Symbol SF +7910 44002 MT +(\267)SH +/Times-Roman SF +8620 XM +(Merge in support for additional CP/M-80 systems, particularly) +135 W( those for which support was recently)134 W +8620 45107 MT +(added to the monolithic v3.x source.)SH +/Symbol SF +7910 47096 MT +(\267)SH +/Times-Roman SF +8620 XM +(Break up)89 W +/Courier SF +12686 XM +(CPXSYS)SH +/Times-Roman SF +16625 XM +(into discrete source files, one for each system. These source files should serve) +89 W( as)90 W +8620 48201 MT +(simple models for adding support for new) +308 W( systems to Kermit-80 -- only the very basic screen)307 W +8620 49306 MT +(definitions, flags, i/o primitives,) +131 W( initializations, and so forth should appear in each system-dependent)132 W +8620 50411 MT +(file.)SH +/Symbol SF +7910 52400 MT +(\267)SH +/Times-Roman SF +8620 XM +(Addition of missing) +352 W( features -- compression of repeated characters during packet transmission,)351 W +8620 53505 MT +(transmission of file attributes \050particularly size, so that "percent done") +243 W( can be displayed for both)244 W +8620 54610 MT +(incoming and outbound files\051, command macros, more advanced login scripts, remote operation) +139 W( and)138 W +8620 55715 MT +(server mode, etc etc. Any offers??)SH +ES +%%Page: 35 36 +BS +0 SI +12 /Times-Bold AF +8280 4404 MT +(CP/M-80 Kermit)SH +10 /Times-Italic AF +51775 XM +(Page 35)SH +46800 50 8280 5709 UL +16 /Times-Bold AF +8280 8272 MT +(Index)SH +8 /Times-Roman AF +12280 10429 MT +(8080 12,) +400 W( 16)SH +31720 XM +(Parity 9)400 W +31720 11353 MT +(Pause 6)400 W +12280 12277 MT +(Append 6)400 W +31720 XM +(Port 9)400 W +12280 13201 MT +(ARPAnet 27)400 W +31720 XM +(Print 6)400 W +12280 14125 MT +(Attention Character) +SH( 27)400 W +31720 XM +(PRINTER 9)400 W +12280 15049 MT +(Autoreceive 7)400 W +31720 15973 MT +(RECEIVE 6)400 W +12280 16897 MT +(Baud 10)400 W +31720 XM +(REMOTE 6)400 W +12280 17821 MT +(BIOS 12)400 W +12280 18745 MT +(Block Check) +SH( 8)400 W +31720 XM +(SEND 7)400 W +12280 19669 MT +(Bootstrapping CP/M Kermit) +SH( 20)400 W +31720 XM +(SET 7)400 W +12280 20593 MT +(Break 5)400 W +31720 XM +(Set padding) +SH( 9,) +400 W( 10)SH +12280 21517 MT +(Buffer size) +SH( 8)400 W +31720 XM +(Set Receive) +SH( 9)400 W +12280 22441 MT +(Bye 5)400 W +31720 XM +(Set Send) +SH( 10)400 W +31720 23365 MT +(Set Start of packet) +SH( 10)400 W +12280 24289 MT +(Carriage Return) +SH( 4)400 W +31720 XM +(Show 11)400 W +12280 25213 MT +(COLLISION 8)400 W +31720 XM +(Status 11)400 W +12280 26137 MT +(Connect 5)400 W +12280 27061 MT +(Control-C 4)400 W +31720 XM +(TAC 27)400 W +12280 27985 MT +(Control-X 4)400 W +31720 XM +(TacTrap 10)400 W +12280 28909 MT +(Control-Z 4)400 W +31720 XM +(Take 11)400 W +12280 29833 MT +(Copy 5)400 W +31720 XM +(Terminal Emulation) +SH( 10)400 W +12280 30757 MT +(CP/M 16)400 W +31720 XM +(Timeout 4,) +400 W( 17)SH +12280 31681 MT +(CP/M-80 Kermit) +SH( 1)400 W +31720 XM +(TIMER 10)400 W +12280 32605 MT +(CR 4)400 W +31720 XM +(TRANSMIT 11)400 W +31720 33529 MT +(Type 11)400 W +12280 34453 MT +(Debug 8)400 W +12280 35377 MT +(Default Disk) +SH( 8)400 W +31720 XM +(USER 11)400 W +12280 36301 MT +(Directory 5)400 W +12280 37225 MT +(Directory file size) +SH( 8)400 W +31720 XM +(VERSION 11)400 W +12280 38149 MT +(Downloading 20)400 W +31720 XM +(Virtual Terminal) +SH( 5)400 W +31720 39073 MT +(VT100 Emulation) +SH( 10)400 W +12280 39997 MT +(Eighth-Bit Prefix) +SH( 9)400 W +31720 XM +(VT52 Emulation) +SH( 10)400 W +12280 40921 MT +(Erase 5)400 W +12280 41845 MT +(Escape Character) +SH( 5,) +400 W( 8)SH +31720 XM +(Warning 11)400 W +12280 42769 MT +(Exit 5)400 W +12280 43693 MT +(External Terminal Emulation) +SH( 10)400 W +31720 XM +(XON/XOFF 6)400 W +12280 45541 MT +(File Copying) +SH( 5)400 W +31720 XM +(Z80 16)400 W +12280 46465 MT +(File-mode 8)400 W +12280 47389 MT +(File-Warning 6)400 W +12280 48313 MT +(FINISH 5)400 W +12280 49237 MT +(Flow Control) +SH( 9)400 W +12280 51085 MT +(Generic Kermit-80) +SH( 12)400 W +12280 52009 MT +(GET 6)400 W +12280 53857 MT +(Help 6)400 W +12280 55705 MT +(IBM 9)400 W +12280 56629 MT +(Input 6)400 W +12280 57553 MT +(Intercept Character) +SH( 27)400 W +12280 59401 MT +(Local 4)400 W +12280 60325 MT +(Local-Echo 9)400 W +12280 61249 MT +(LOG 6)400 W +12280 62173 MT +(Logging 9)400 W +12280 63097 MT +(LOGOUT 6)400 W +12280 64945 MT +(NAK 4)400 W +12280 65869 MT +(No-exit 9)400 W +12280 67717 MT +(OUTPUT 6,) +400 W( 9)SH +12280 69565 MT +(Pad character) +SH( 9,) +400 W( 10)SH +ES +%%Page: 36 37 +BS +0 SI +10 /Times-Italic AF +6120 4404 MT +(Page 36)SH +12 /Times-Bold AF +43052 XM +(Kermit User Guide)SH +46800 50 6120 5709 UL +ES +%%Page: i 38 +BS +0 SI +12 /Times-Bold AF +8280 4404 MT +(CP/M-80 Kermit)SH +10 /Times-Italic AF +52497 XM +(Page i)SH +46800 50 8280 5709 UL +16 /Times-Bold AF +25591 8272 MT +(Table of Contents)SH +12 SS +8280 10684 MT +(1. CP/M-80 KERMIT)SH +54480 XM +(1)SH +10 SS +9780 12074 MT +(1.1. Credits)SH +54580 XM +(1)SH +9780 13154 MT +(1.2. What's New)SH +54580 XM +(2)SH +9780 14234 MT +(1.3. Overview of Kermit Operation)SH +54580 XM +(2)SH +9780 15314 MT +(1.4. Summary of CP/M)SH +54580 XM +(3)SH +9780 16394 MT +(1.5. Kermit-80 Description)SH +54580 XM +(4)SH +9780 17474 MT +(1.6. Kermit-80 Flavors)SH +54080 XM +(12)SH +11780 18554 MT +(1.6.1. Generic Kermit-80)SH +54080 XM +(12)SH +11780 19634 MT +(1.6.2. CP/M 3 Kermit)SH +54080 XM +(12)SH +11780 20714 MT +(1.6.3. System-Specific Versions)SH +54080 XM +(13)SH +9780 21794 MT +(1.7. Installation of Kermit-80)SH +54080 XM +(16)SH +11780 22874 MT +(1.7.1. Organization of Kermit-80)SH +54080 XM +(17)SH +11780 23954 MT +(1.7.2. Downloading Kermit-80)SH +54080 XM +(20)SH +11780 25034 MT +(1.7.3. Assembling Kermit-80 from the sources)SH +54080 XM +(23)SH +9780 26114 MT +(1.8. Adding Support For A New System)SH +54080 XM +(26)SH +9780 27194 MT +(1.9. Notes on New Features in Kermit-80 Version 4)SH +54080 XM +(27)SH +11780 28274 MT +(1.9.1. Interface Data.)SH +54080 XM +(28)SH +11780 29354 MT +(1.9.2. Jump Table.)SH +54080 XM +(28)SH +9780 30434 MT +(1.10. Future Work)SH +54080 XM +(34)SH +12 SS +8280 31958 MT +(Index)SH +53880 XM +(35)SH +ES +%%Page: ii 39 +BS +0 SI +10 /Times-Italic AF +6120 4404 MT +(Page ii)SH +12 /Times-Bold AF +43052 XM +(Kermit User Guide)SH +46800 50 6120 5709 UL +ES +%%Page: iii 40 +BS +0 SI +12 /Times-Bold AF +8280 4404 MT +(CP/M-80 Kermit)SH +10 /Times-Italic AF +51941 XM +(Page iii)SH +46800 50 8280 5709 UL +16 /Times-Bold AF +26702 8272 MT +(List of Figures)SH +10 SS +9780 10550 MT +(Figure 1-1:) +SH( Bootstrap) +500 W( program for Kermit-80 and CP/M Version 2.2)SH +54080 XM +(22)SH +ES +%%Page: iv 41 +BS +0 SI +10 /Times-Italic AF +6120 4404 MT +(Page iv)SH +12 /Times-Bold AF +43052 XM +(Kermit User Guide)SH +46800 50 6120 5709 UL +ES +%%Page: v 42 +BS +0 SI +12 /Times-Bold AF +8280 4404 MT +(CP/M-80 Kermit)SH +10 /Times-Italic AF +52331 XM +(Page v)SH +46800 50 8280 5709 UL +16 /Times-Bold AF +27013 8272 MT +(List of Tables)SH +10 SS +9780 10550 MT +(Table 1-1:) +SH( Kermit-80) +500 W( SET PORT Options)SH +54080 XM +(12)SH +9780 11630 MT +(Table 1-2:) +SH( Systems) +500 W( supported by Kermit-80 \050Part 1\051)SH +54080 XM +(18)SH +9780 12710 MT +(Table 1-3:) +SH( Systems) +500 W( supported by Kermit-80 \050Part 2\051)SH +54080 XM +(19)SH +9780 13790 MT +(Table 1-4:) +SH( Terminals) +500 W( supported by Kermit-80)SH +54080 XM +(20)SH +9780 14870 MT +(Table 1-5:) +SH( Terminals) +500 W( known to Kermit-80)SH +54080 XM +(26)SH +ES +%%Trailer +%%Pages: 42 +%%DocumentFonts: Times-Roman Times-Bold Times-Italic Courier Symbol Courier-Oblique diff --git a/cpkerm.txt b/cpkerm.txt new file mode 100644 index 0000000..abcd0a3 --- /dev/null +++ b/cpkerm.txt @@ -0,0 +1,2463 @@ + + CP/M-80 KERMIT VERSION 4.11 USER GUIDE + + + C. Gianone + + Columbia University Center for Computing Activities + New York, New York 10027 + + + April 23, 1991 + + + + Copyright (C) 1981,1991 + Trustees of Columbia University in the City of New York + + Permission is granted to any individual or institution to use, copy, + or redistribute this document so long as it is not sold for profit, and + provided this copyright notice is retained. +1. CP/M-80 KERMIT + +******** +This document is formatted as an ordinary, plain text ASCII disk file. Typeset +copies are available in the Kermit User Guide from Columbia University. +Changes should be made to CPKERM.MSS. +******** + +Program: Mike Freeman, Bonneville Power Administration, Vancouver, WA, USA, + with contributions from many others. + +Language: 8080 Assembler, LASM, M80, or MAC80 + +Version: 4.11 + +Date: April 1, 1991 + +Documentation: Christine Gianone, Columbia University, with contributions from + many others. + +KERMIT-80 Capabilities At A Glance: + Local operation: Yes + Remote operation: Partial, Auto-receive only + Login scipts: Yes, limited + Transfer text files: Yes + Transfer binary files: Yes + Wildcard send: Yes + File transfer interruption: Yes + Filename collision avoidance: Yes + Can time out: Yes + 8th-bit prefixing: Yes + Repeat count prefixing: No + Alternate block checks: Yes + Terminal emulation: Yes, VT52 and others + Communication settings: Yes + Support for dial-out modems: No + Transmit BREAK: Yes; most versions + IBM communication: Yes + Transaction logging: No + Debug logging: No + Session logging: Yes + Raw file transmit: Yes + Act as server: No + Talk to server: Yes + Advanced commands for servers: Yes + Command/init files: Yes + Command macros: No + Local file management: Yes + Handle file attributes: No + Long packets: No + International Character Sets: No + Sliding Windows: No + Printer control: Yes, limited + + +1.1. Credits + +CP/M Kermit is the first of all the Kermit programs. It was originally written +by Bill Catchings of Columbia University in 1981. Over the years, +contributions have been added by many people, including Charles Carvalho (ACC), +Bernie Eiben (DEC), Nick Bush (Stevens Institute of Technology), John Bray +(University of Tennessee), Bruce Tanner (Cerritos College), Greg Small +(University of California at Berkeley), Kimmo Laaksonen (Helskini University of +Technology), Bertil Schou (Loughborough University), Jon Warbrick (Plymouth +Polytechnic University), Brian Robertson (Aberdeen University), A.J. Cole +(Leeds University), John Shearwood (Birmingham University), Tony Addyman +(Salford University), Godfrey Nix and Martin Carter (Nottingham University), +Ian Young (Edinburgh University), Chris Miles (Manchester University), Richard +Russell, Dave Roberts, and many, many others. + +Version 4.11 is the work of Mike Freeman of the Bonneville Power Administration +in Vancouver, WA, USA, with assistance from Russell Lang of Monash University +in Australia, Jay S Rouman of Mt Pleasant MI, and others. + + +1.2. What's New + +Features added since version 4.09 include: + + - SET COLLISION {BACKUP/DISCARD/OVERWRITE/RENAME} + + - SET INCOMPLETE-FILES {DISCARD/KEEP} + + - Many REMOTE commands, including some REMOTE SET commands + + - RENAME command to rename CP/M files from within Kermit-80 + + - SET RECEIVE/SEND PACKET-LENGTH nn (nn <= 94) + + - SET AUTORECEIVE ON now implies that Kermit-80 ALWAYS tries to receive + more files when a RECEIVE transaction has completed. The user can + cancel with ^C. + + - QUIT is now a synonym for EXIT. + + - STAY is now a synonym for SET NO-EXIT. + + - CONNECT, RECEIVE and SEND may be abbreviated to C, R and S, + respectively. + + - Cancellation of TAKE, TYPE, and PRINT commands from the keyboard. + + - Many bug fixes. + + - Kermit-80 Version 4.11 now supports the Microbee family of computers + (56K, 64K, 128K and 256K) manufactured by Microbee Systems, Ltd, of + Australia. + + - Kermit-80 now supports the Ampro Little Board system. + + +1.3. Overview of Kermit Operation + +Use the SET command to establish necessary communication parameters like SPEED +and PARITY. Use the CONNECT to establish a terminal connection to the remote +computer. If you are dialing out with a modem, type the necessary dialing +commands to the modem first. The dialing process can be automated to some +extent using a TAKE command file containing INPUT, OUTPUT, and PAUSE commands. +Then log in to the remote computer or service and conduct a session. + +To transfer a text file, start the Kermit program on the remote computer and +tell it to SEND the desired file (if uploading) or to RECEIVE (if downloading). +"Escape back" to CP/M Kermit, usually by typing Ctrl-] (hold down the Control +key and press the right bracket key) and then type the letter C. At the CP/M +Kermit prompt type RECEIVE (if you gave a SEND command to the remote Kermit) or +SEND filename (if you gave a receive command to the remote Kermit). + +To transfer a binary file, give the command SET FILE TYPE BINARY to the remote +Kermit and SET FILE-MODE BINARY to CP/M Kermit before issuing any SEND or +RECEIVE commands. + +Multiple files of the same type (text or binary) can be transferred in a single +operation using "wildcard notation" (including special characters like asterisk +in the filename). + +When file transfer is complete, CONNECT back to the remote computer, use the +EXIT command to exit from the remote Kermit program, finish your work on the +remote computer, log out from it, escape back to CP/M Kermit again, and EXIT +from CP/M Kermit. + +The remote Kermit may also be put into "server mode" to simplify these +operations. Give the SERVER command to the remote Kermit, escape back to CP/M +Kermit, and then issue SEND commands to send files (upload), GET filename +commands to receive (download) files, REMOTE commands to request various other +services (like directory listings) from the remote Kermit. When you are done, +give a BYE command to terminate your remote session, or a FINISH command to +tell the remote Kermit to return to its prompt so you can CONNECT back and +conduct further business. + +That's all there is to it. + + +1.4. Summary of CP/M + +There are essentially two versions of CP/M - Versions 2.2 and 3.0 (sometimes +also called CP/M PLUS.) + +CP/M-80 Version 2.2 is run in a single 64 Kbyte "page", usually the largest +amount of memory on Z80 or 8080 systems. The BIOS (Basic input/output system), +BDOS (Basic Disk Operating System) and CCP (Command console processor) all +share memory with any transient program the user may wish to run. Some basic +commands are available through the CCP, like DIR, ERA etc,while others are +loaded from disk into the transient program area and run as a program, like PIP +or STAT. + +CP/M Version 3.0 (or CP/M PLUS) effectively removes the requirement of having +the CCP and BDOS along with a chunk of the BIOS code being resident in the +single 64k byte page of memory. This allows even more space for programs in +the TPA, but still a little less than the maximum of 64k. It is substantially +different from CP/M version 2.2, with lots of added features. Kermit-80 uses +very few additional version 3.0 features, and only where absolutely necessary. + +CP/M file specifications are of the form DEV:XXXXXXXX.YYY, where + +DEV: is a device name, normally the A: or B: floppy. If omitted, + the device name defaults to your connected diskette. + +XXXXXXXX is a filename of up to 8 characters. + +YYY is the file type, up to 3 characters. + +File names and file types may contain letters, digits, and some special +characters, including dash, dollar sign, and underscore, but no imbedded +spaces. Upper and lower case letters are equivalent. + +"Wildcard" file-group specifications are permitted in file names and file types +(but not device names) within certain contexts; a "*" matches a whole field, a +"?" matches a single character, including space. Examples: "*.F??" specifies +all files whose types start with F and are 1, 2, or 3 characters long; "F?.*" +specifies all files whose names start with F and are no more than two +characters long (before the trailing spaces). + +The five CP/M commands are: + +DIR file Lists the the names of the specified files. The default file + specification is "*.*". Example: "DIR B:*.FOR". + +ERA file Erases (deletes) the specified file(s); wildcards allowed. + +REN new old Changes the name of a file from old to new, e.g. + "REN NEW.FOR=OLD.FOR". + +SAVE Saves the specified number of memory blocks into a file. (Not + on CP/M Plus systems) + +TYPE file Types the specified file on the screen, e.g. "TYPE FOO.TXT". + +The most important programs are: + +STAT Gives statistics on disk usage; sets and displays IOBYTE. (Not + on CP/M Plus systems) + +PIP Peripheral Interchange Program. Copies files. In response to + the "*" prompt, give a command of the form + + disk:outfile=disk:infile + + Wildcards ("*" for a whole field or "?" for a letter) can be + used. Examples: "A:=B:*.*" to copy a whole disk, "A:=B:*.FOR" + to copy all the Fortran programs from disk B to disk A. If the + disk specification is omitted, your "connected" disk is + assumed. Command line arguments are also accepted, e.g. "PIP + A:=B:*.*". + +There are equivalent commands for CP/M Version 3.0, but are not loaded into +memory in the same way as for CP/M Version 2.2. For further information on +CP/M, consult your microcomputer manual or a CP/M handbook. + + +1.5. Kermit-80 Description + +Since Kermit-80 runs on a standalone micro, it is always in control of the +screen -- it is always in "local mode". It includes a terminal emulator for +establishing a connection to a remote computer or service, and during file +transfer, it keeps the screen updated with the file name and the packet number, +whether sending or receiving. + +Kermit-80 is capable of an imprecise or "fuzzy" timeout on an input request, +and can break deadlocks automatically. In most cases, this is not important, +because the Kermit program on the other side is most likely able to handle the +timeouts. The timeouts done by Kermit-80 are fuzzy because they depend on the +speed of the processor and other factors that can vary from system to system. + +If, despite the timeout capability, the transmission appears to be stuck (and +you can tell that this has happened if the screen fails to change for a while) +you can type carriage return to have the micro do what it would have done on a +timeout, namely NAK the expected packet to cause theforeign host to send it +again (or, if the micro is sending, to retransmit the last packet). Micro/ +micro or micro/IBM-mainframe transfers could require this kind of manual +intervention. + +File transfers may be interrupted in several ways. + +Control-C This will return you to Kermit-80 command level immediately, so + that you can connect back to the remote system, or take any + other desired action. + +Control-X When sending a file, this will terminate the sending of the + current file with a signal to the KERMIT on the other side to + discard what it got so far. If there are more files to be + sent, KERMIT-80 will go on to the next one. When receiving a + file, KERMIT-80 will send a signal to the remote KERMIT to stop + sending this file. If the remote KERMIT understands this + signal (not all implementations of KERMIT do), it will comply, + otherwise the file will keep coming. In any case, the remote + KERMIT will go on to the next file in the group, if any. + +Control-Z Like Control-X, except if a file group is being transmitted, + this will stop the transmission of the entire group. If only a + single file is being transmitted, it works exactly like + Control-X. + +Carriage Return If you type a carriage return Kermit-80 will resend the current + packet. You may do this repeatedly, up to the packet retry + limit (somewhere between 5 and 16 times) for a particular + packet. + + + KERMIT-80 COMMANDS + +Kermit-80 is an interactive program. It issues a prompt, you type a command. +The process repeats until you give the EXIT command to leave the program. + +Commands consist of keywords, filenames, and numbers. Keywords may be +abbreviated to minumum unique length. "?" may be typed to request a menu of +the available options for the current field at any point in a command. ESC may +be typed at any point in a command to fill out the current keyword or filename; +if sufficient characters have not been typed to identify the current field +uniquely, Kermit-80 will sound a beep and allow you to continue from that +point. Here are Kermit-80's commands: + +BREAK Send a BREAK condition to the remote computer. This is only possible + if your system is capable of sending breaks. It is intended to be used + with PAUSE, OUTPUT, etc and the TAKE command to do wierd and wonderful + things, like automatic logging on to a remote host. + +BYE When talking to a remote Kermit Server, this command shuts down the + server and logs it out, and also exits from Kermit-80 to CP/M command + level. + +CONNECT Establish a terminal connection to the computer, service, or device + that is connected to the serial port, i.e. pass all typein to the + serial port and display all input from the serial port on the screen. + Also, emulate a DEC VT52 to allow cursor control, screen clearing, + etc., if VT52-EMULATION is ON (see below), in which case you should + also set your terminal type on the remote host to VT52. (Some versions + emulate other terminals.) The CONNECT command may be abbreviated by + the single letter C. + + Warning: VT52 emulation is only successful if your system or its + attached terminal can do the same sort of functions as a genuine VT52. + Things to beware of are cursor addressing, clear to end of page and end + of line, clear screen, home cursor, and clear-and-home functions. The + useability of VT52 emulation depends entirely on how many of the VT52 + functions can be emulated by your micro or terminal. + + The escape character differs from micro to micro; when you issue the + CONNECT command, the micro will print a message telling you how to get + back. The escape sequence is generally an uncommonly-used control + character, like CTRL-backslash or CTRL-rightbracket, followed by a + single letter "command": + + C Close Connection, return to Kermit-80> command level. + S Display Status of connection, but maintain remote connection. + ? List available single-character commands. + 0 (zero) Send a null (0) character. + B Send a BREAK signal. Most systems provide this function. + D Drop the line. Used on the Apple with modem. Automatically closes + the connection after dropping the line. The TORCH system + acknowledges this command but does nothing. + P Toggle printer on or off. Allows you to copy whatever goes to the + screen to the printer. + S Temporarily suspend logging to the log file. + Q Restart logging to the log file + ^] (or whatever - a second copy of the escape character) Send the + escape character itself to the remote host. + +COPY source destination + Copy a named file to another file, either on the same drive or another + drive. + +DIRECTORY + This provides a directory listing of the specified files. If no files + are specified, all files on the default disk are listed. File sizes, + in K, are included. You may interrupt the listing at any time by + typing any character. The listing (even if interrupted) concludes with + a display of the amount of free storage left on the disk. You can + inhibit the display of file sizes by SET DIRECTORY OFF. + +ERASE filespec + This executes the CP/M ERA command on the specified file(s). The names + of the files being erased are not displayed. + +EXIT Quit back to CP/M. The return is made by a JMP 0 (Warmstart). QUIT is + a synonym for EXIT. + +FINISH Like LOGOUT, but shuts down the remote server without logging it out. + Leaves you at Kermit-80 command level; subsequent CONNECT commands will + put you back at host system command level. + +GET filespec [local_filespec] + When Kermit-80 is talking to a Kermit Server on the host, you should + use the GET command to request the server to send files to you, for + example: + + get hlp:k*.hlp + + You may specify a local filename if you want to save the remote file + under a different filename. Limitation: If you request an alternate + block check type using the SET BLOCK command, the GET command will not + communicate it to the remote server. If you want to have type 2 or 3 + block checks done when getting files from the server, you have to issue + the appropriate SET BLOCK command to the remote KERMIT before putting + it in server mode. + +HELP List all these commands, with a short description on what the commands + do. A question mark will do the same. If you have already typed a + command but do not know what the parameters are, type a space (to + indicate the end of the command) and a question mark. You will be + informed of what Kermit can expect at that stage. + +INPUT seconds text + Setup a text line and time delay for your CP/M system to expect from + the host, then wait up to the given number of seconds (approximately) + for text to be sent to your CP/M-80 system. + +LOG filespec + When CONNECTed to a foreign host as a terminal, log the terminal + session to the specified diskette file. This functionality depends to + some extent on the remote host's ability to do XON/XOFF flow control, + and does not guarantee a complete transcript (after all, that's what + the KERMIT protocol is for). The log file is closed when the + connection is closed by typing the escape character followed by the + single-character command "C". + + It is possible to temporarily suspend logging during connect state. + Typing an escape sequence can turn file logging on (<escape-character> + R for Resume) or off (<escape-character> Q for quiet). + + Re-entering connect state will re-open the previously opened log file + and append to that file. + +LOGOUT Like BYE, but leaves you at Kermit-80 command level. + +OUTPUT text + Send the text to the remote computer as if you had typed it. + +PAUSE seconds + If this command is issued your CP/M system will wait a while before + proceeding with another command. This is intended for use in TAKE + commands, where you may want to pause for a while before proceeding + with the rest of the TAKE file. The actual delay is very variable + between systems, and values should be determined on a trial and error + basis. + +PRINT Print a file to the console and printer. Output to the printer is + buffered by the Kermit-maintained printer buffer. This routine is + identical to TYPE but characters are echoed to the printer as well as + to the screen. Suspending and canceling output is as described in + TYPE. + +QUIT Synonym for EXIT. + +RECEIVE filespec + Receive file(s) from the remote Kermit, and save them under the names + provided in the file headers supplied by the remote host. If a local + filespec is given, the file is saved under the given filename. If the + names aren't legal, use as many legal characters from the name as + possible (see the description of SET FILE-WARNING below). If there's a + conflict, and FILE-WARNING is ON, warn the user and try to build a + unique name for the file by adding "&" characters to the name. RECEIVE + can be abbreviated to the single letter R. + +REMOTE command + Send a command to a remote Kermit server. The results are sent back to + your CP/M screen. When two arguments are required and specify less + than two in the command, you will be prompted for the missing + arguments. REMOTE commands include: + + REMOTE CD [directory] + Ask the remote server to change its default directory. If no + directory is specified, the server changes to its login directory. + + REMOTE COPY file1 file2 + Ask the remote server to copy file1 to file2. + + REMOTE RENAME file1 file2 + Ask the remote server to rename file1 to file2. + + REMOTE DELETE filespec + Ask the remote server to delete the named file or files. + + REMOTE DIRECTORY [filespec] + Ask the remote server to display a directory listing of the given + files or, if the filespec is omitted, all the files in the current + device or directory. + + REMOTE DISK-USAGE + Ask the remote server to display information about its disk usage + (such as free or used space). + + REMOTE ERASE filespec + Same as REMOTE DELETE. + + REMOTE FINISH + Same as FINISH. + + REMOTE HELP + Ask the remote server to display a list of the commands it can + respond to. + + REMOTE HOST command + Ask the remote server to have its operating system execute the + given command. + + REMOTE KERMIT command + Ask the remote server to execute the given Kermit command, given in + the server Kermit's command syntax. + + REMOTE LOGIN user password + Log in to a remote Kermit server which has been set up to require a + username and password. + + REMOTE MESSAGE text + Send the text to the remote server for display on its screen + (useful with MS-DOS Kermit servers). + + REMOTE SET parameter value + Ask the remote server to set the given parameter to the given + value, for example REMOTE SET FILE TYPE BINARY. Type REMOTE SET ? + to see a list of the REMOTE SET options. + + REMOTE SPACE + Same as REMOTE DISK-USAGE. + + REMOTE STATUS + Ask the remote server to provide a status report. + + REMOTE TYPE file + Ask the remote server to display the named file on the micro's + screen. + + REMOTE WHO [user] + Ask the remote server for a list of users who are logged in, or if + a user is specified, for a report on the named user. + +RENAME file1 file2 + Rename local CP/M file1 to file2. + +SEND filespec + Send file(s) specified by filespec to the remote Kermit. The filespec + may contain CP/M wildcards. SEND may be abbreviated to the single + letter S. + +SET parameter [value] + Set the specified parameter to the specified value. Possible parameter + settings: + + AUTORECEIVE + ON (or OFF). Allows several files to be received without + having to type RECEIVE on the receiving machine. The routine + simply looks for activity on the serial line, and if so fudges + a RECEIVE command. The packet sent by the sender will be lost. + + BLOCK-CHECK-TYPE option + The options are: + + 1-CHARACTER-CHECKSUM + Normal, default, standard 6-bit checksum. + 2-CHARACTER-CHECKSUM + A 12-bit checksum encoded as two characters. + 3-CHARACTER-CRC-CCITT + A 16-bit CCITT-format Cyclic Redundancy Check, encoded + as 3 characters. + + BUFFER-SIZE value + This allows you to set a buffer size during transfer of data. + On some systems it takes so long that the remote end times out + while the local system is reading or writing to disk. The size + is the number of 128 disk sectors (nominal) and can be from 1 + (128 bytes) to 64 (8 kbytes). + + CP/M-80 filenames will still be mapped to uppercase characters. + + COLLISION value + What to do when a file arrives that has the same name as an + existing file. BACKUP means to rename the existing file. + DISCARD means to discard and reject the incoming file. + OVERWRITE means to overwrite the existing file. RENAME means + to rename the existing file. + + DEBUG ON (or OFF). Enables/disables displaying of packets on the + screen during file transfer. Not performed if the QUIET option + has been set for the terminal (SET TERMINAL QUIET) + + DEFAULT-DISK drive letter + This allows you to set the default disk as source and + destination of file transfers. In addition, issuing this + command causes you to switch to the specified disk and log it + in, write-enabled. The colon must be included in the disk name + (A:). The selected disk appears in your KERMIT-80 prompt, for + instance + + Kermit-80 14A:> + + DIRECTORY-FILE-SIZE ON (or OFF). + + By setting DIRECTORY-FILE-SIZE OFF you can get an abreviated + listing of your disk drive. File sizes are not calculated, and + five files are shown on a line. Setting this option ON will + show file sizes of each file. + + Both options will list the free space remaining. + + ESCAPE Change the escape character for virtual terminal connections. + Kermit-80 will prompt you for the new escape character, which + you enter literally. + + FILE-MODE option + Tells KERMIT-80 what kind of file it is sending, so that KERMIT + can correctly determine the end of the file. SET FILE BINARY + means to send all the 128-byte blocks (ie logical CP/M sectors) + of the file, including the last block in its entirety; SET FILE + ASCII is used for text files, and transmission stops when the + first Control-Z is encountered anywhere in the file (this is + the CP/M convention for marking the end of a text file). + + SET FILE-MODE DEFAULT tells Kermit to attempt to determine the + file type by examining the file being transmitted. If a + Control-Z appears before the last block of the file, it is + assumed to be BINARY; if, when the first Control-Z is + encountered, the remainder of the file contains only + control-Z's, it is assumed to be a text file. Unfortunately, + not all programs fill the remainder of the last record of a + text file with Control-Z's, so this algorithm is not always + successful. + + If binary transmission is used on a text file, or a compressed + file (eg a .DQC file) some extraneous characters (up to 127 of + them) may appear at the end of the file on the target system. + + If ASCII transmission is used on a binary file, any 8th bits + set will be stripped and a warning sent to the console. When + the first control-Z is encountered, the file is assumed to be + at the end, even if it is not. + + FLOW-CONTROL ON (or OFF) + Sets XON/XOFF flow control on or off. If set ON the host is + expected to respond to an XOFF or XON sent by Kermit-80. If + set off, no flow control is assumed and any XON/XOFF is + ignored. + + IBM ON (or OFF) + Allow the transfer of files to and from an IBM mainframe + computer. This makes Kermit-80 wait for the IBM turnaround + character (XON), ignore parity on input, add appropriate parity + to output, and use local echoing during CONNECT. As + distributed, KERMIT-80 uses MARK parity for IBM communication. + If you don't give this command, IBM mode is OFF. Since IBM + VM/CMS KERMIT does not have timeout capability, SET IBM ON also + turns on the "fuzzy timer" automatically. + + LOCAL-ECHO ON (or OFF) + When you CONNECT to a remote host, you must set LOCAL-ECHO ON + if the host is half duplex, OFF if full duplex. OFF by + default. + + LOGGING ON (or OFF) + Cease or resume logging whenever connect mode is entered. This + is really only applicable after a LOG command is no longer + required. + + NO-EXIT This command is applicable only for Kermit initiated with a + command tail. For example, if Kermit was initiated by: + + KERMIT ;SEND HELLO;NO-EXIT + + Kermit would first seek out and execute the KERMIT.INI file (if + present), then send file HELLO to a remote system. Usually + Kermit would exit back to CP/M, but NO-EXIT over-rides this. + STAY is a synonym for NO-EXIT. + + Note the leading semicolon. This clears leading spaces from + the first command. + + OUTPUT text-line + Send a line of text to the remote computer (or modem). This + simply copies the string to the correct line, and assumes all + appropriate parameters have been set to be used, e.g. speed, + parity etc. It is intended for use in TAKE command files. + + PARITY option + Sets parity for outgoing characters to one of the following: + NONE, SPACE, MARK, EVEN, or ODD. On input, if parity is NONE, + then the 8th bit is kept (as data), otherwise it is stripped + and ignored. The parity setting applies to both terminal + connection and file transfer. If you set parity to anything + other than none, KERMIT-80 will attempt to use "8th bit + prefixing" to transfer binary files. If the other KERMIT is + also capable of 8th bit prefixing, then binary files can be + transferred successfully; if not, the 8th bit of each data byte + will be lost (you will see a warning on your screen if this + happens). + + PORT port name + Allows you to switch between different communication ports. + This command is not available on all systems. Type SET PORT ? + for a list of valid options for your system. (Note: If your + system does not support several ports, this command will return + a "Not implemented" error if you try to set a port.) + + PRINTER ON (or OFF) + Turns copying of CONNECT session to printer on and off. It is + also possible to toggle the printer on/off from the connect + state, by typing <escape character> followed by P. + + RECEIVE parameter [value] + Set a RECEIVE parameter. + + PAD-CHAR + Set the PAD character to use while receiving files. + Currently a dummy, as for SET SEND PAD-CHAR. + PADDING [value] + Set the number of PAD characters to use while receiving + files. Same as SET SEND PADDING. + START-OF-PACKET [value] + Set the default start of Packet character for receiving + files. Apply the same rules and considerations as for + SET SEND START-OF-PACKET. + PACKET-LENGTH number + Tell the other Kermit the longest packet length CP/M + Kermit is willing to receive during file transfer. The + maximum length is 94, which is also the default length. + + SEND parameter [value] + Set a SEND parameter. + + PAD-CHAR + Set the Pad character to be used while sending files. + It is currently a dummy entry, and does not do + anything. + PADDING [value] + Set the number of PAD-CHARS to be used while sending + files. This too does nothing. + START-OF-PACKET + Set the default start of packet character to another + character than control-A. This may be necessary on + systems (including intervening networks) that trap + control-A characters. Choose a control character not + otherwise used, ie not carriage return (13D, ODH), line + feed (10D, OAN), tabs (09D, 09H), backspace (08H), and + bell (07H) or any other used between you and your + remote system. + + SPEED value + Change the baud rate of the communications port. This command + only works on some systems. value is the numeric baud rate + (300, 9600, etc.) desired. Type SET SPEED followed by a + question mark for a list of supported baud rates. On systems + that do not support this command, you must set the port baud + rate from CP/M or other setup mechanism outside of KERMIT-80. + + TACTRAP Set the TAC intercept character. If you are attached to a TAC + it will swallow the intercept character (commercial AT sign by + default) so Kermit sends it twice. With this command you can + set the intercept character (ie the one to send twice) to + another character. + + TERMINAL option + Select one of the following terminal characteristics: + + OFF sets emulation off, and its up to the attached terminal + to respond to escape sequences sent from the remote + host system. + + DUMB Like off, but carriage return and line feed characters + are the only control characters accepted. All other + control characters are simply ignored. (Really a "Glass + TTY"). + + EXTERNAL + Emulation is provided for by a routine in the system + dependent part of Kermit. Attempting to set this + option without having and externally supplied routine + will returna "Not Implemented" error. + + OFF All characters are passed directly to the terminal + without any interpretation by Kermit. + + VT52 When connected as a terminal to a foreign host, the + micro emulates a VT52. VT52 emulation is set by + default, except on micros that already have terminal + functionality built in, such as the DEC VT180 and + DECmate (these act as VT100-series terminals). Some + systems emulate other terminals, like the ADM3A; see + table 1-5. + + QUIET Do not display any file transfer information onto the + console. This mode is useful if you console takes a + long time to update the display. Only the file name is + displayed. DEBUGging information is not displayed even + if selected. + + REGULAR Inverse of QUIET. All packets etc displayed, as + ususal. + + TIMER ON (or OFF) + Enable or disable the "fuzzy timer". The timer is off by + default, because in the normal case KERMIT-80 is communicating + with a mainframe KERMIT that has its own timer. Mainframe + KERMIT timers tend to be more precise or adaptable to changing + conditions. You should SET TIMER ON if you are communicating + with a KERMIT that does not have a timer. You should SET TIMER + OFF if you are communicating over a network with long delays. + + USER user-number + Sets another user number to be active. Acceptable user numbers + are 0 to 31, though it is recommended to use user numbers 0 to + 15 only. This is really only useful for Winchester Systems + with high disk capacities. + + WARNING ON (or OFF) + Warn user of filename conflicts when receiving files from + remote host, and attempt to generate a unique name by adding + "&" characters to the given name. ON by default, which is + equivalent to SET COLLISION RENAME. + +SHOW Display all settable parameters. You will get a page or so of the + status af all parameters that can be set using the SET command. + +STATUS The same function as Show. + +STAY Equivalent to SET NO-EXIT. + +TAKE filespec + Take characters and commands from the specified file as if they were + entered from the keyboard. This is useful if you want to set up a + batch job. A command file can send, get, receive, set functions etc + automatically. A TAKE command can be interrupted with ^C. + An automatic "TAKE KERMIT.INI" is executed from the default drive when + Kermit-80 is loaded. This can be used to set defaults of band rate, + parity, filetype, default drive etc. + + If KERMIT.INI does not exist, control is given directly to the user. + +TRANSMIT filespec turnaround + Send the specified file to the system on the other end of the + connection as though it were being typed at the terminal, one line at a + time. Each line sent is terminated with a carriage return, and any + line feeds are stripped from the file sent. After each line has been + sent Kermit waits for a character string from the host (eg a acrriage + return). If not specified, a carriage return is assumed. No KERMIT + protocol is involved. An asterisk (star) is sent to the console for + every line sent, to indicate how the transfer is progressing. This is + useful for sending files to systems that don't have a KERMIT program. + During transmission, you may type one of these single-character + commands: + + Control-C + Cease transmission, and drop into terminal emulation mode. + CR (carriage return) Re-transmit the previous line. + +TYPE filespec + Type a local CP/M file or files on the CP/M screen. A Control-C will + cancel the command and return to the Kermit prompt. A Ctrl-X will + cancel the current file and go on to the next one, if any. Typing any + other character while the file is being displayed will suspend the + output. Another character will resume output. + +VERSION Show the name, edit number, and edit date of several of the modules + that make up Kermit-80. + + +1.6. Kermit-80 Flavors + +Many of the systems supported use an external terminal, rather than a built-in +console. Kermit may be further customized for these systems by defining (at +assembly time) the terminal type to be used. If the terminal type is unknown +or does not match any of the existing terminal options, the generic "CRT" +option may be selected. In this case, Kermit cannot do fancy screen control +during file transfer; it simply types the file names, packet numbers, and +messages in sequence across and down the screen. This works best if you can +put your micro or terminal in "autowrap" mode; otherwise the packet numbers +will pile up in the rightmost column; the filenames and messages will always +appear on a new line, however. If no specific terminal has been selected, +Kermit cannot do VT52 emulation; it can act as a "dumb terminal" (sometimes +called a "glass TTY"), or else its own built in terminal firmware provides +cursor control functions independent of the Kermit program. + + +1.6.1. Generic Kermit-80 + +"Generic Kermit-80" is an implementation of Kermit that should run on any 8080- +compatible CP/M 2.2 system with no modification at all, or perhaps only a minor +one. Unlike other Kermit-80 implementations, it contains no system-dependent +manipulation of the serial port. All I/O is done with standard CP/M BIOS +calls, and I/O redirection is done using the CP/M IOBYTE function, which, +according to the Digital Research CP/M Operating System Manual, is an optional +feature of any particular CP/M implementation. If your system does not provide +the IOBYTE function, Generic Kermit-80 will not work; furthermore, not all +systems that implement IOBYTE do so in the same way. The SET PORT command may +be used to select the devices to be used for input and output. Table 1-1 lists +the options to the SET PORT command and their effects. + + ----------------------------------------------------------------------- + + SET PORT xxx input from output to + CRT CRT: CRT: + PTR PTR: PTP: + TTY TTY: TTY: + UC1 UC1: UC1: + UR1 UR1: UP1: + UR2 UR2: UP2: + + Table 1-1: Kermit-80 SET PORT Options + + ----------------------------------------------------------------------- + +The default is SET PORT PTR. In all cases, the console (CON:) and list (LST:) +devices used are those selected when Kermit is started. + +The reason all Kermit-80 implementations aren't generic is that a good deal of +speed is sacrificed by getting all services from the operating system. While a +specific implementation of Kermit-80 may be able to operate at 4800, 9600, or +even 56 Kilo baud, generic Kermit will fail to work on some systems at speeds +in excess of 1200 baud. In addition, many features of Kermit require more +specific knowledge of the hardware involved. Generic Kermit cannot send a +BREAK signal, or change the baud rate, for example. + + +1.6.2. CP/M 3 Kermit + +CP/M-3 Kermit (also known as CP/M-Plus Kermit) is a version of generic +Kermit-80, and should run on most CP/M-3 (CP/M-Plus) systems. It uses the +auxilliary port (AUX:) to communicate to the remote Kermit. The SET BAUD and +SET PORT commands are not supported; nor can a BREAK be sent. Like generic +Kermit-80, a terminal may be selected at assembly time. + + +1.6.3. System-Specific Versions + +There are also many versions of Kermit-80 tailored to specific systems. Most +of these operate uniformly, but some of them take advantage (or suffer +limitations) of the specific system. Here are some of the special features for +particular systems: + +Amstrad: -- Two versions: + + PCW 8256 + The PCW 8256/8512 with the serial inerafce attached. + + CPC 6128 + The 664 with add on memory and 6128 are both supported. Both systems + must run CP/M Plus, so the 664 will need an add on RAM pack and CP/M + upgrade. A high speed transfer rate of 38k baud can be used between + Amstrad computers. + +ACCESS: + Access Matrix computer using port J5. Supports SET BAUD-RATE for rates of + 300-9600 baud. + +Apple II -- four variations: + + APMMDM: + Apple with Z80 Softcard and Micromodem II in slot 2 Dialout capability + provided in connect command; user is prompted for phone number if + carrier is not present. During connect mode, ^]D drops carrier. BYE + command also causes carrier to be dropped. + + AP6551: + Apple with Z80 Softcard, and one of several 6551-based communication + cards; the slot number is a compile-time parameter (default is slot 2). + SET BAUD-RATE supported; speeds are 110-19200 baud. + + APCPS: + Apple with Z80 Softcard and CP Multi-Function Card. The slot number is + again a compile-time parameter. SET BAUD-RATE is supported for baud + rates from 50 baud to 19200 baud. + + AP6850: + Apple II with Z80 Softcard and a 6850-based USART in slot 2-the slot + being a compile-time parameter. SET BAUD-RATE is not supported. + +BBC: + Acorn Computers BBC Computer with Acorn Z80 second processor running + CP/M-80. Supports SET BAUD-RATE and can send breaks. + +BigBoard II: + Uses serial port A. To use port B, change mnport, mnprts, and baudrt and + reassemble. Can generate BREAK. SET SPEED supported; speeds are 300-38400 + baud. + +Cifer: + Originally coded for Cifer 1886 using the VL: port set as TTYI: and TTYO: + but works successfully on 18xx and 28xx series machines. + + There are now two versions, each with two variations: Either running CP/M + Version 2.2 or 3.0, and either using the VL: or AUX: ports. The VL: port + version can only use seven bits of data, so parity prefixing is required + for binary file transfers. This restriction is removed by using the AUX: + port. For those interested, the problem is due to the interprocessor link + between the video and CPU (!) boards. The VL: port is on the video board, + and the AUX: port on the CPU board, and the inter processor link can only + transfer seven bits of data. + + Supports SET SPEED, and can generate breaks on some models with a BREAK + key. + +Comart: + Comart Communicator-Similar to Northstar equipment. Can generate BREAK. + +Compupro: + Based on Kermit 3.x, and has been merged into V4.09 + +CPT-85xx word processors: + Can generate BREAK. SET SPEED supported; speeds are 50-9600 baud. + +Cromemco: + Cromemco computers with TU-ART card. Supports SET BAUD-RATE (110-9600 + baud). + +DEC DECmate II word processor (with Z80 card): + Can generate BREAK. + +DEC VT180 (Robin): + Three output ports, referred to as COMMUNICATIONS, GENERAL, and PRINTER. + Can generate BREAK. + +Digicomp Delphi 100: + SET SPEED supported; speeds are 50-19200 baud. + +Discovery: + Action Computer Enterprises "Discovery" Multi-user Computer. Uses Port B + on an 83U user board. Supports SET SPEED for 50-19200 baud. Can generate + BREAK. + +Epson: + Epson PX-8 with LCD display. Although it is quite different in displaying + of Packet Information, it works as any other CP/M-80 Kermit. Supports SET + SPEED and can generate BREAK. + +Generic Kermit: + Two versions, one for CP/M version 2.2 and version 3. These systems use + IOBYTE flipping (V2.2) and the AUX: device to communicate to the serial + line. You may have to SET PORT xxx before the version 2.2 will work, as + Kermit needs to know what device is the serial line. + +Genie: + Eaca Video Genie. + +Heath: Three Versions: + + H8QUAD + for Heath-8 systems with the quad io board. This system has been + derived from V3.x code. Note that this version will not run "as is" on + H89 systems. + + H89 For Heath-89 machines suports baud rates from 50 to 56,000 baud. + + Z100 + For Z-100 running CP/M-85. This version does not support setting of + baud rates. + +Intertec Superbrain: Two Versions: + + BRAINA + For superbrain using AUX port. Breaks and SET BAUD both supported + + BRAINM + As above, but using the MAIN port. + +Ithaca: + Ithaca Intersystems based computer using the VIO card for all IO to the + outside world. The system is strictly speaking a home-brew variant of the + Ithaca machine, using an S100 cardcage without a front panel. It uses the + Extended BIOS by EuroMicro of London. However, I see no reason for this + version not running on a genuine Ithaca Intersystems machine. There are + patches needed to the EuroMicro BIOS to make this version work. + +Kaypro: + Should work on most Kaypro models, as well as some related systems + (Ferguson BigBoard I, Xerox 820). For the newer Kaypros with multiple + ports, Kermit uses the one labeled "serial data"; it cannot use the serial + printer or internal modem ports (but it should be possible to modify the + values for mnport, mnprts, and baudrt to do this). Can generate BREAK. + SET SPEED supported; speeds are 50-19200 baud. + +Lobo: + Lobo MAX-80. Supports SET SPEED and can generate BREAKS. + +Merlin: + British Telecom Merlin M2215 (also Rair Black Box, possibly also the ICL + PC?). Requires a terminal. + +Microbee: + Microbee Systems computer made in Australia. Works on Microbee 56K (Series + 2 APC), 64K (Computer in a Book), 128K (Dynamic), and 256K (256TC). Can + generate BREAK. SET BAUD-RATE supported; speeds are 75-9600. All serial + I/O is via software, not hardware. Simultaneous transmit and receive + possible on all speeds except 75/1200, 1200/75, 4800, and 9600. + +Micromate: + PMC 101 Micromate. Supports SET SPEED and can generate BREAK. + +Micromint: Two versions + + S6 The Ciarcia/Micromint sb-180 board with a 6Mhz procoessor. System + requires a terminal. + + S9 As above, but with a 9Mhz processor. + +NCR: + Decisionmate 5. Uses the 2651 and is largely the same as the Ithaca + Intersystems machine implementation. + +Northstar: -- There are four versions available: + + NORTHS: + Northstar Horizon with HS10-4 board. Supports SET SPEED and SET PORT. + + HORIZON: + Northstar Horizon using the serial ports on the Mother board. Can + generate BREAK. + + BASICNS: + Basic Northstar Horizon using the printer port. Can generate BREAK. + + ADVANT: + Northstar Advantage. Supports SET SPEED and can generate BREAK. Traps + Control-0 in the system filter. + +Morrow Decision I: + Uses the Multi-I/O board. Port 1 is the console, port 3 is the + communications line. SET SPEED supported; speeds are 75-56000 baud. + +Morrow Micro Decision I: + +Nokia MicroMikko: + Will not echo control-O (which locks keyboard). SET SPEED supported; + speeds are 75-9600 baud. + +Ohio Scientific: + Doesn't have screen control. + +Osborne 1: + Uses serial line, not internal modem. Left-arrow key generates <DEL> + ("delete" or "rubout" character) during connect mode. SET SPEED supported; + speeds are 300 and 1200 baud. Now supports multi-sector buffering. + +Research Machines: Two Versions: + + RM380ZM: + 380Z and 5.25" disks supports SET BAUD.RATE + + RM380ZF: + 380Z and 8" disks, otherwise as above. + +Sanyo: + Sanyo MBC-1100. This version derived from Kermit V3.x + +ScreenTyper: + Details unkown. + +TRS-80: Three versions: + + TRS80LB: + TRS-80 with Lifeboat CP/M + + TRS80PT: + TRS-80 with Pickles and Trout CP/M + + TRSM4: + TRS-80 Model 4 with Montezuma CP/M + +Teletek: + Teletek Systemaster. Supports SET BAUD. + +Telcon: + TELCON ZOBRA portable computer. + +Torch: + Torch Unicorn 5 initially, but the code runs on other Z80 based CP/N (as in + Nut!) systems. It uses the BBC Computer as a "Base processor", and is + similar to the BBC version. The base processors RS423 port is used rather + than any built in Modem. (UK telecoms legislation effectively makes modem + control software tricky business...). Two potential versions exist-one + using cursor positioning codes for a MCP and CCCP ROM combination of + revision less than 1.00, the other version uses the additional facility + MCP/CCCP versions greater than 1. Supports SET SPEED and can generate + BREAKs. + + Note that binary files must be transferred using SET PARITY to anything + other than NONE! Parity is neither generated nor checked. + +US Micro Sales: + S-100-8 based computer. + +Vector Graphics: + Vector + +Xerox: + Xerox 820. + +Z80MU: + Development Kermit on a PC running the Z80MU Z80 and CP/M 2.2 development + system. Allows development of the system independent modules to be done on + an IBM PC or clone. Also allows the generation of new .HEX files, that may + then be KERMITed to the target system. Note: Not all the BDOS or BIOS + routines are supported, so avoid "unusual" BIOS/BDOS calls. (For example, + DIR from within Kermit will fail as one of the BIOS routines returning disk + parameters is not supported.) + + +1.7. Installation of Kermit-80 + +Kermit-80 was written originally for the Intertec SuperBrain in lowest-common- +denominator 8080 code with the standard assembler, ASM (single source module, +no macros, no advanced instructions), so that it could be assembled on any +CP/M-80 system (the 8080 assembler is distributed as a standard part of +CP/M-80, whereas the fancier Z80 or macro assemblers are normally commercial +products). It has since been modified to run on many other systems as well. +Kermit-80 should be able to run on any 8080-, 8085- or Z80-based microcomputer +under CP/M with appropriate minor changes to reflect the port I/O and screen +control for the system (see below). + +The proliferation of new systems supported by Kermit-80 made the program grow +so large and complicated that it had to be broken up into system-independent +and system-dependent modules, as of version 4 (this was done by Charles +Carvalho of ACC). Each module is composed of multiple files. This has reduced +the time and disk space necessary for assembly; Kermit-80 may once again be +assembled on a CP/M system with roughly 250Kbytes of space. The majority of +the code does not need to be reassembled to support a new system. +Unfortunately, it can no longer be assembled with ASM, since ASM does not +support multiple input files. To allow it to be assembled on any CP/M system, +the public-domain assembler LASM is included in the distribution kit. Kermit-80 +may also be assembled with Microsoft's M80 (not supplied). In theory, any 8080 +assembler supporting the INCLUDE directive ought to work, as well. + +All versions of Kermit-80 are assembled from the same set of sources, with +system dependencies taken care of by assembly-time conditionals within the +system-dependent module (eventually, the system-dependent module will itself be +broken up into multiple files, one for each system). The most important system +dependencies are terminal emulation (when CONNECTed to the remote host) and +screen handling, which are dependent on the individual micro's escape codes +(these features are table driven and easily modified for other CP/M systems), +and the lowest level I/O routines for the serial communications port. The port +routines are best done only with BDOS calls, but some systems do not allow +this, primarily because the BDOS routines strip the parity bit during port I/O, +and the parity bit is used for data when transmitting binary files. + +Kermit-80's I/O routines must check the port status and go elsewhere if no +input is available; this allows for virtual 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. + +CP/M-80 KERMIT versions 3.8 and later include a "fuzzy timer" that allows a +timeout to occur after an interval ranging from 5 to 20 seconds (depending upon +the speed of the processor and the operating system routines) during which +expected input does not appear at the port. In this case, retransmission +occurs automatically. In any case, you may type a carriage return during +transmission to simulate a timeout when the transfer appears to be stuck. + + +1.7.1. Organization of Kermit-80 + +Kermit-80 consists of two modules, each of which is generated from multiple +source files. The first module contains the system-independent code; the +second module is configured for a particular system and merged with the system- +independent module to produce a customized Kermit-80. + +The distribution kit contains: + + - the system-independent module, CPSKER.HEX; + - the system-dependent modules, CPV*.HEX (see table 1-2 and 1-3); + - the source files, CPS*.ASM and CPX*.ASM, + - the public-domain CP/M assembler, LASM.*, + - the public-domain CP/M load/patch utility, MLOAD.* + +------------------------------------------------------------------------------- + +Symbol Filename System +ACCESS CPVACC Access Matrix +ADVANT CPVADV Northstar Advantage +AP6551 CPVAPL Apple II, Z80 Softcard, 6551 ACIA in serial interface +AP6850 CPVA65 Apple II, Z80 Softcard, 6850 ACIA in Serial Iiterface +APMMDM CPVAPM Apple II, Z80 Softcard, Micromodem II in slot 2 +APCPS CPVCPS Apple II, Z80 Softcard, with CPS multifunction card +BASICNS CPVBNS Northstar Horizon (terminal required) +BBC CPVBBC Acorn "BBC" computer with Acorn Z80 second processor +BBII CPVBB2 BigBoard II (terminal required) +BRAINM CPVBRM Intertec Superbrain using the main port +BRAINA CPVBRA Intertec Superbrain using the Aux port +CIFER2 CPVCIF Cifer 1886 using the VL: Serial port and CP/M V2.2 +CIFER3 CPVCI3 Cifer 1886 using the VL: Serial port and CP/M V3.0 +CIFER2 CPVCA2 Cifer 1886 using the AUX: Serial port and CP/M V2.2 +CIFER3 CPVCA3 Cifer 1886 using the AUX: Serial port and CP/M V3.0 +CMEMCO CPVCRO Cromemco with TU-ART card. Terminal required) +COMART CPVCOM Comart Communicator (terminal required) +COMPRO CPVPRO Compupro with Interfacer 4 (or 3). Terminal required. +CPC CPVCPC Amstrad CPC 664 and 6128 and CP/M 3 +CPM3 CPVCP3 "Generic": CP/M 3.0 (CP/M Plus) systems (terminal req'd) +CPT85XX CPVCPT CPT-85xx wordprocessor with CP/M +DELPHI CPVDEL Digicomp Delphi 100 (terminal required) +DISC CPVDIS Action Computer Enterprises "Discovery" (terminal req'd) +DMII CPVDM2 DECmate II with CP/M option +GENER CPVGEN "Generic": CPM 2.2 systems with IOBYTE (terminal req'd) +GENIE CPVGNI Video Genie +H8QUAD CPVH8Q Heath-8 with Quad 8 i/o board +HEATH CPVH89 Heath/Zenith H89 +HORIZON CPVHOR Northstar Horizon (terminal required) +KPII CPVKPR Kaypro-II (and 4; probably supports all Kaypro systems) +LOBO CPVLBO Lobo Max-80 + +"symbol" is the symbol used to select the target system, in CPVTYP.ASM; + +"filename" is the name under which the module is supplied in the distribution. + + Table 1-2: Systems supported by Kermit-80 (Part 1) + +------------------------------------------------------------------------------- + +------------------------------------------------------------------------------- + +Symbol Filename System +M2215 CPVMRL British Telecom Merlin/Rair Black Box (terminal required) +MBEE CPVBEE Microbee +MDI CPVMDI Morrow Decision I (terminal required) +MIKKO CPVMIK MikroMikko +MMATE CPVMM PMC 101 Micromate (terminal required) +MMDI CPVUD Morrow Micro Decision I (terminal required) +NCRDMV CPVDMV NCR Decision Mate V. (Terminal required?) +NORTHS CPVNS Northstar Horizon with HSIO-4 card (terminal req'd) +OSBRN1 CPVOSB Osborne 1 +OSI CPVOSI Ohio Scientific +PCI2651 CPVPCI Ithaca Intersystems with VI0 card (terminal required) +PCW CPVPCW Amstrad PCW 8256/8512 with serial interface +PX8 CPVPX8 Epson PX-8 +RM380ZM CPVRMM Research Machines 380Z with MDS (5.25" discs) +RM380ZF CPVRMF Research Machines 380Z with FDS (8" discs) +ROBIN CPVROB DEC VT180 +S1008 CPVUSM US Microsales S-100-8 (terminal required) +SANYO CPVSAN Sanyo MBC-1100 +SB6 CPVSB6 Micromint SB-180 with 6Mhz CPU (terminal required) +SB9 CPVSB9 Micromint SB-180 with 9Mhz CPU (terminal required) +SCNTPR CPVSCN Screentyper +TELCON CPVTEL TELCON Zobra portable +TELETEK CPVTET Teletek Systemaster +TORCH CPVTRC Torch computers BBC-B with Z80 second processors +TRS80LB CPVTLB TRS-80 model II with Lifeboat 2.25C CP/M Display +TRS80PT CPVTPT TRS-80 model II with Pickles + Trout CP/M Display +TRSM4 CPVTM4 TRS-80 model IV +VECTOR CPVVEC Vector Graphics +XER820 CPVXER Xerox 820 +Z100 CPVZ00 Z-100 under CP/M-85 +Z80MU CPVZ80 Z80MU development system on a PC + +"symbol" is the symbol used to select the target system, in CPXTYP.ASM; + +"filename" is the name under which the module is supplied in the distribution. + + Table 1-3: Systems supported by Kermit-80 (Part 2) + +------------------------------------------------------------------------------- + +------------------------------------------------------------------------------- + +Symbol Terminal type +CRT Dumb terminal type. Does not do cursor addressing +ADM3A Lear Seigler ADM 3A +ADM22 Lear Seigler ADM 22 +AM230 Ampro 230 +H1500 Hazeltine 1500 +SMRTVD Netronics Smartvid +SOROQ Soroq IQ-120 +TVI912 Televideo 912 +TVI925 Televideo 925 or Freedom 100 +VT52 Dec VT52 or equivalent (H19) +VT100 Dec VT100 or equivalent +WYSE Wyse 100 + +"symbol" is the symbol used to select the target system, in CPXTYP.ASM; + +"Terminal type" is the type of terminal "symbol" selects. + + Table 1-4: Terminals supported by Kermit-80 + +------------------------------------------------------------------------------- + + +1.7.2. Downloading Kermit-80 + +You'll need either a pre-configured .COM file or the system-independent module, +CPSKER, in binary (.COM) or hex (.HEX) format and the system-dependent overlay +for your system (from Tables 1-2 and 1-3). If your system is not listed in the +table, get the generic CP/M 2.2 Kermit or the generic CP/M 3 Kermit. If you +already have a version of Kermit on your micro and you want to install a new +version, simply use your present version to get the new files. Transfer the +files to your system and skip ahead to "merging the modules". + +If you do not have a copy of Kermit on your micro, and you cannot borrow a +Kermit floppy but you do have access to a mainframe computer with a copy of the +Kermit-80 distribution, you should read this section. + +There are several ways to get CP/M Kermit from a host system to your micro. +The easiest is to "download" the necessary "hex" files into your micro's memory +and then save them on the disk. If you have a terminal emulator program on +your micro which can save a copy of the session to disk, connect to your host, +and type the necessary files. Exit from the emulator, saving the session log, +and edit the session log to extract the hex files. Skip ahead to "merging the +files". + +The following is a procedure which, though far from foolproof, should allow you +to get a version of Kermit to your CP/M based micro. It depends upon the host +prompt, or at least the first character of the host prompt, being some +character that cannot appear in a hex file (the valid characters for hex files +are the digits 0-9, the upper case letters A-F, the colon ``:'', carriage +return, and line feed). As soon the prompt character is encountered, the +transfer will terminate. If your host does not issue a prompt that will +accommodate this scheme, you can achieve the same effect by adding an atsign +``@'' to the very end of the hex file before sending it from the host. The +program below looks for an atsign (the normal DEC-20 prompt, hex 40). +DECSYSTEM-10 users would look for a dot, hex 2E; VAX/VMS or UNIX users would +look for a dollar sign, hex 24; UNIX C-Shell users would look for a percent +sign, hex 26. + + 1. For CP/M 2.2 systems, connect to a floppy disk with plenty of free + space. Run DDT and type in the following (the comments should not + be typed in; they are there just to tell you what's happening): + (Note that this wont work for CP/M Plus or 3.0 systems!) + + ---------------------------------------------------------------- +-a100 ;Begin assembling code at 100 + 0100 LXI H,2FE ;Where to store in memory + 0103 SHLD 200 ;Keep pointer there + 0106 MVI E,D ;Get a CR + 0108 MVI C,4 ;Output to PUNCH (send to HOST) + 010A CALL 5 + 010D MVI C,3 ;Input from READER (read from HOST) + 010F CALL 5 + 0112 ANI 7F ;Strip parity bit + 0114 PUSH PSW ;Save a and flags + 0115 MOV E,A ;Move char to E for echo + 0116 MVI C,2 ;Output to screen + 0118 CALL 5 + 011B POP PSW ;Restore A and flags + 011C CPI 40 ;(or 4E,24,26,etc) System prompt? + 011E JZ 127 ;Yes, have whole file in memory + 0121 CALL 17A ;No, store another byte + 0124 JMP 10D ;Read another byte + 0127 MVI A,1A ;Get a Control-Z (CP/M EOF mark) + 0129 CALL 17A ;Store it in memory + 012C LXI H,300 ;Get memory pointer + 012F SHLD 202 ;Store as DMA pointer + 0132 LDA 201 ;Get 'HI' byte of memory pointer + 0135 STA 200 ;and store it as 'LO' one + 0138 XRA A + 0139 STA 201 ;Zero 'HI' byte (slow *256) + 013C MVI C,16 ;Make NEW file + 013E LXI D,5C ;With FCB1 + 0141 CALL 5 + 0144 CALL 15E ;Write 128 bytes (sector) + 0147 CALL 15E ;Write another sector + 014A LXI H,FFFF ;Get a 16-bit Minus One + 014D XCHG ;into DE + 014E LHLD 200 ;Get 256-byte counter + 0151 DAD D ;Decrement + 0152 SHLD 200 ;and store back + 0155 MVI A,2 ;Check if + 0157 CMP L ; 256-byte counter down to offset + 0158 JZ 183 ;Yes, we're done + 015B JMP 144 ;Keep writing.. + 015E LHLD 202 ;Get file-pointer + 0161 XCHG ;into DE + 0162 MVI C,1A ;Set DMA-address + 0164 CALL 5 + 0167 MVI C,15 ;Write sector (128 bytes) + 0169 LXI D,5C ;using FCB1 + 016C CALL 5 + 016F LHLD 202 ;Get file-pointer + 0172 LXI D,80 ;128-bytes + 0175 DAD D ;added to file-pointer + 0176 SHLD 202 ;and save + 0179 RET ;and return + 017A LHLD 200 ;Get Memory-pointer + 017D MOV M,A ;Store character + 017E INX H ;Increment Pointer + 017F SHLD 200 ;and save + 0182 RET ;and return + 0183 MVI C,10 ;CLOSE file + 0185 LXI D,5C ;using FCB1 + 0188 CALL 5 + 018B JMP 0 ;Force WARM BOOT + 0179 + -^C ;(Type Control-C) Return to CP/M + A>SAVE 1 FETCH.COM ;Save program, we need to run it twice. + + Figure 1-1: Bootstrap program for Kermit-80 and CP/M Version 2.2 + + ---------------------------------------------------------------- + + Alternatively, an assembler source file for this program is + distributed with CP/M Kermit as CPKFET.ASM. You might prefer to + type the assembler version in and assemble and load it (ASM CPKFET, + LOAD CPKFET, or MASM CPKFET, MLOAD CPKFET), to let the assembler and + loader catch any typing errors. + + 2. Connect to your host using a terminal or a terminal emulation + program. Ensure that your host does not have your terminal in "page + mode" (does not pause at the end of each screenful). + + 3. Tell the host to display the first hex file (the system-independent + module) at your terminal, e.g. give a command like TYPE CPSKER.HEX, + without a terminating carriage return. + + 4. Return to your micro by switching the cable from the terminal to the + micro, or by terminating the micro's terminal program. + + 5. Make sure your IOBYTE is set so that RDR: and PUN: correspond to the + I/O port that is connected to the host (this would normally be the + case unless you have done something special to change things). + + 6. Load the program you entered in the first step with DDT, and use it + to capture the first hex file: + + DDT FETCH.COM + -icpsker.hex ;Setup FCB for file CPSKER.HEX + -g100,179 ;Execute the program. + + Now there should be a file CPSKER.HEX on your connected disk. + + 7. Return to the host, and tell it to display the second hex file (the + system-dependent module for your configuration). Again, do not type + the terminating carriage return. + + 8. Return to your micro, and run the capture program again: + + DDT FETCH.COM + -icpxovl.hex ;Setup FCB to create CPXOVL.HEX + -g100,179 ;Execute the program. + + Now there should be a file CPXOVL.HEX on your connected disk. + Replace CPXOVL.HEX in this example with the appropriate overlay file + for your system. + +Merging the files: + + 1. For purposes of illustration, we will assume the system-dependent + overlay is called "cpxovl.hex". The two hex files may be combined + with MLOAD or DDT. If you already have a running Kermit, you can + transfer MLOAD.HEX to your system and create MLOAD.COM by running + LOAD. If you're bootstrapping Kermit, you could transfer MLOAD.HEX + to your system the same way you got the other two .HEX files, but + it's probably simpler to use DDT to get Kermit running, and get + MLOAD later if you need it. + + 2. Using MLOAD, the two pieces may be easily merged: + + A>mload kerm411=cpsker,cpxovl + (Some messages about program size, etc...) + A> + + 3. If you don't have MLOAD running, it's a bit more complex: + A>ddt cpsker.hex + NEXT PC + 3500 0100 + -icpxovl.hex + -r + NEXT PC + xxxx 0000 + -^C + A>save dd kerm411.com + + The page count ("dd") used in the SAVE command is calculated from + the last address ("xxxx") given by DDT in response to the R command: + drop the last two digits and add 1 if they were not zero, then + convert from hexadecimal (base 16) to decimal (base 10): 684F + becomes 69 hex, which is 105 decimal (5 times 16 plus 9) -- but 6700 + becomes 67 hex, or 103 decimal (consult an introductory computing + book if you don't understand number base conversion). + + 4. If you are using the Z80MU CP/M and Z80 development toolkit on an + IBM PC or clone, then follow the same instructions as for a genuine + CP/M system. When you have loaded your file, you will have to ship + the .COM or two .HEX files to the target CP/M system. (Possibly + using a previous issue of Kermit?) + + 5. Note that CP/M hex files have checksums on each line. If there were + any transmission errors during the downloading process, MLOAD or DDT + will notice a bad checksum and will report an error (something like + "Illegal Format"). If you get any errors during loading, either fix + the hex file locally with an editor, or repeat the transfer. + +You now should have a running version of Kermit-80, called KERM411.COM. + +Test your new Kermit by running it. If it gives you a prompt, it might be OK. +(don't delete your old one yet...). Instead of a prompt, you could get one of +two messages indicating that the configuration information is invalid: + + ?Kermit has not been configured for a target system + +or + + ?Consistency check on configuration failed + +Of course, neither of these messages should appear if you're building Kermit +from the distribution kit. The first message indicates that the overlay was +not found where the system-independent module expected to find it, probably +because the overlay address is incorrect; the second indicates that the version +of CPXLNK used in the system-dependent module is incompatible with the system- +independent module. + +Once you are satisfied that KERMIT40 works correctly, you should rename your +old KERMIT.COM to something else, like OKERMIT.COM, and rename KERMIT40.COM to +KERMIT.COM. + + +1.7.3. Assembling Kermit-80 from the sources + +Kermit-80 is built in two pieces from the following files: + +The system-independent files: + CPSKER.ASM header file + CPSDEF.ASM definitions for both KERMIT and KERSYS + CPSMIT.ASM initialization, main loop, miscellaneous commands (BYE, EXIT, + LOG, SET, SHOW, STATUS, and VERSION) + CPSCOM.ASM second part of commands, status and set file + CPSPK1.ASM part 1 of the KERMIT protocol handler (SEND, RECEIVE, + LOGOUT,and FINISH commands) + CPSPK2.ASM part 2 of the KERMIT protocol handler + CPSREM.ASM REMOTE routines (FINISH, BYE and LOGOUT in CPXPK*.ASM) + CPSSER.ASM SERVER routines (for the future) + CPSTT.ASM the transparent commands (TRANSMIT, CONNECT) + CPSCPM.ASM CP/M commands (DIR, ERA, USER, TYPE, PRINT, COPY) + CPSWLD.ASM the wildcard handler + CPSCMD.ASM the command parser + CPSUTL.ASM utility routines and data + CPSDAT.ASM data space and the overlay definitions + CPXLNK.ASM linkage area description + +The system-dependent files: + CPXTYP.ASM system selection + CPXLNK.ASM system overlay specification and jump table + CPXCOM.ASM common routines for all systems + CPXSWT.ASM system selector or switcher + +One of: + CPXSYS.ASM family file for some system-specific code + CPXTOR.ASM family file for Torch, Superbrain, PCI2651 etc + CPXNOR.ASM family file for Northstar and Comart machines + CPXMRL.ASM family file for British Telecom Merlin/Rair Black Box + CPXSB.ASM family file for Micromint SB-180 systems + CPXCIF.ASM family file for Cifer systems + CPXHEA.ASM family file for Heath/Zenith systems + CPXAPP.ASM family file for Apple II systems + CPXPCW.ASM family file for Amstrad PCW 8256/8512 machines + CPXBBI.ASM family file for BigBoard, Kaypro and Xerox 820 systems + CPXBEE.ASM Microbee + CPXSYO.ASM family file for Sanyo MBS-1100 systems + CPXTM4.ASM family file for Tandy Model 4 with CP/M systems + CPXGNI.ASM family file for Video Genie systems + CPXPRO.ASM family file for Compupro systems + CPXZ80.ASM family file for the Z80MU development system + +and if you use a terminal, + CPXVDU.ASM display codes for VDUs etc. Not always required + +The system-independent module contains all of the system-independent files +except for CPXLNK.ASM, which is assembled into the system-dependent module to +provide the structures needed to connect the two modules. As distributed, the +system-independent module is named CPSKER.HEX. If you have a copy of +CPSKER.HEX, you do not need to reassemble the system-independent module to +configure Kermit for your system. + +The system-dependent module consists of CPXTYP.ASM, CPSDEF.ASM, CPXLNK.ASM, +CPXSWT.ASM, CPSCOM.ASM, one of the family files CPXSYS.ASM, CPXTOR.ASM, +CPXMRL.ASM, CPXSB.ASM, CPXCIF.ASM, CPXHEA.ASM, CPXBBI.ASM, CPXTM4.ASM, +CPXGNI.ASM, CPXNOR.ASM, CPXAPP.ASM, CPXPCW.ASM, or CPXPRO.ASM, and possibly +CPXVDU.ASM, if your system uses a terminal for the console. One copy of the +system-dependent module is supplied already assembled for each supported +system; the filename may be obtained from tables 1-2 and 1-3. If a terminal is +required for a system, a CRT (glass TTY device) has been selected. + +After assembling the two pieces separately, they are combined with DDT or MLOAD +into a system-specific Kermit. + +If you want to rebuild the system-independent module, the only change you may +need to make is to select the assembler to be used, in CPSKER.ASM. Define one +of MAC80, M80, or LASM to TRUE to select it as the assembler; the others should +be defined FALSE. + +Assuming you have the Microsoft Macro Assembler package (M80/L80), you'll need +to do the following: + + A>m80 cpsker=cpsker.asm + A>l80 /p:100,cpsker,cpsker/n/e + +This will produce CPSKER.COM. + +If you are using LASM instead, do this: + + A>lasm cpsker + +LASM will generate CPSKER.HEX and CPSKER.PRN. LASM allows options to be +specified in the same way as the standard assembler, ASM, so the command + + A>lasm cpsker.abz + +will read the source files from drive A, send the .HEX file to drive B, and +suppress the listing file. + +If you are using the Z80MU development system on an IBM PC or clone, then +assemble your files using either LASM and MLOAD or M80 and L80, as if you were +using a genuine CP/M-80 system. Note that you will still have the problem of +transferring your assembled files to the target CP/M system. + +If you want to generate a system-dependent overlay for a particular system, or +want to change the terminal supported, you'll need to check three areas in +CPXTYP.ASM: + +First, the overlay start ADDRESS. The symbol "ovladr" is EQUated to the +address of "LNKFLG" in the system-independent module, as the starting address +of the overlay (7000H for version 4.11). You'll need to know this value if +you're building the overlay with M80/L80. You won't normally need to change +this value. + +Second, the assembler being used. Again, define one of MAC80, M80, and LASM to +be TRUE to select it, and define the others to be FALSE. The two modules +(system-independent and system-dependent) do not need to be built with the same +assembler. + +Third, the system configuration. Locate your system in tables 1-2 and 1-3, +then define the appropriate symbol TRUE, and the rest FALSE. If the system +comes with a builtin console terminal, define all the terminal switches FALSE. +If the system uses an external terminal as the console, locate the terminal in +table 1-5 and define the appropriate symbol TRUE, and the remainder FALSE. If +the terminal is not listed in table 1-5, use the CRT switch; in this case, VT52 +emulation is not supported. + +In addition, there are a few general and system-specific symbols which may be +altered to fit your system: + +APSLOT For Apple with 6551 ACIA, defines the slot number of the serial + card + +CPUSPD Processor speed in units of 100KHz (currently used only for + bbII and kpII for timing loops) + +TAC For users connecting through ARPAnet TACs: set to TRUE if you + wish the default TACTRAP status to be ON. (This may be + overridden with the SET TACTRAP command). If you're not + connecting through a TAC, set tac to FALSE and ignore tacval. + +TACVAL For ARPANET TAC users: defines the default TAC intercept + character (may be overridden with the SET TACTRAP command). + +If you are just assembling an existing configuration, you'll need to edit +CPXTYP.ASM only. If you are adding support for a new system, you should not +modify CPSDEF.ASM or CPXLNK.ASM; if you do, you'll have to change the system- +independent module also. Eventually, CPXSYS.ASM will be split into separate +files, each of which will generate one or more related systems. When this +happens, you'll want to pick the one closest to your system to use as a +starting point. + +After editing CPXTYP.ASM as necessary, assemble and link the overlay as +follows: + + - With M80 (where "xxxx" is the hex value of ovladr from CPXLNK.ASM): + + A>m80 cpxtyp=cpxtyp.asm + A>l80 /p:xxxx,cpxtyp,cpxtyp/n/x/e + + - With LASM: + + A>lasm cpxtyp + +With an IBM PC or clone using the Z80MU softwrae, follow the instructions as if +you were using a real CP/M system. + +The overlay (CPXTYP.HEX) may then be merged with the system-independent module +as described above (creating a runnable Kermit from the distribution kit). + +If you are using the Z80MU development system on a PC, and already have a +running Kermit-80 v3.9 or later, you can merge the two .HEX files into a .COM +file with LINK80 (TOPS 10/20), MLOAD (Z80MU), L80 (Z80MU), and transfer the new +.COM file to your micro with Kermit: + + - Z80MU on a PC and MLOAD: + + @MLOAD KERNEW=CPSKER,CPXTYP + + - Z80MU on a PC and C80: + + @L80 /P:xxxx,CPXTYP,CPXTYP/N/X/E + +producing KERNEW.COM. + +------------------------------------------------------------------------------- + +Symbol Terminal description +crt Basic CRT, no cursor positioning +adm3a ADM3A Display or lookalike +adm22 ADM22 Display or lookalike +am230 Ampro 230 +h1500 Hazeltine 1500 +smrtvd Netronics Smartvid-80 +soroq Soroq IQ-120 +tvi912 TVI 912 +tvi925 TVI 925, Freedom 100 +vt52 VT 52 or VT52 emulator such as Heath H19, H29, etc. +vt100 VT 100 or emulator (most ANSI terminals should work) +wyse Wyse 100 + + Table 1-5: Terminals known to Kermit-80 + +------------------------------------------------------------------------------- + + +1.8. Adding Support For A New System + +Kermit-80 is built from a common set of source files; the system-dependent +module makes heavy use of conditional assembly (this complication will be +removed in future releases). The system dependencies arise from attempts to +answer some questions: + + 1. What kind of terminal is to be supported? + + For many micros, the console is an integral part of the system, but + others can use an external terminal. In either case, the commands + to manipulate the screen (position the cursor, erase the screen, + etc) must be defined. + + 2. How is the serial line accessed? + + For systems supporting the IOBYTE function, this is straightforward; + the symbol "IOBYT" is defined TRUE. If the serial line is accessed + with IN and OUT instructions, it may be possible to use the simple + I/O routines provided. In this case, the symbol "INOUT" is defined + TRUE, the MNPORT and MNPRTS are defined to be the data and control + addresses, respectively, and bit masks for testing for "input data + available" and "output buffer empty" must be defined. If the + interface is strange, leave IOBYT and INOUT set to FALSE, and + provide the I/O routines. + + 3. What initialization is necessary? + + You may wish to set the baud rate or configure the serial line at + startup. Examples for a number of devices are present. + + 4. What special features are to be supported? + + You may want to provide the capability to select one of several + serial lines with the SET PORT command, or to change the speed of + the serial line with the SET SPEED command. To do this, you'll need + to build a command table, using the systems already supported as + examples. The ability to send a BREAK signal is desirable. Again, + examples for several different interfaces (ACIA, SIO, etc) are + present. + + 5. Do you want to design an external terminal type? + + There is a jump entry in the overlay file to allow users to add + their own termainl emulator. If you write the code for such an + emulator, you must load this jump address with the address of your + emulator, and SET TERMINAL EXTERNAL from within Kermit. All + characters will be passed to this routine during connect mode. + + +1.9. Notes on New Features in Kermit-80 Version 4 + + - Debugging aids: SET DEBUG ON will add two fields to the SEND/RECEIVE + display, labelled "Spack" and "Rpack". These display the last packet + sent and received. Of course, this slows down the transfer, + especially if the console is an external terminal. SET DEBUG OFF + removes these fields. The VERSION command displays the name, edit + number, and edit date of several of the modules that make up Kermit. + + - TAC support: ARPAnet TACs (and many other communication devices such + as terminal concentrators, modems, port contention units, network + PADs, etc) use a printing character (like "@") as an intercept + character, to allow commands to be issued to the TAC, or modem, etc. + In order to send this character to the host, it must be typed twice. + The command "SET TAC CHARACTER" to Kermit enables the "TACtrap" and + asks the user to specify the TAC intercept character. This character + will be automatically doubled when it appears in Kermit protocol + messages (sent by the SEND or RECEIVE commands) or when it appears in + a file being sent with the TRANSMIT command. It is not automatically + doubled when typed by the user in CONNECT mode. "SET TAC ON" enables + the TACtrap but does not change the TAC intercept character, which is + initially "@". "SET TAC OFF" disables the TACtrap. + + - File buffering: Previous versions of Kermit-80 buffered only one + sector (128 bytes) at a time during file transfer operations. This + version buffers 16Kbytes at a time, reducing the number of times the + floppy drive must be spun up and down, and increasing the effective + throughput of the link. If the disk transfer rate is too slow, + however, the remote Kermit may time out and retransmit packets. This + will show up on the screen in the "Retries:" field; if this occurs + after disk activity, you may want to increase the timeout value on + the remote Kermit, SET BUFFER <new value> while in Kermit,or + reassemble Kermit with a smaller value for MAXSEC (in CPSDEF.ASM) + This buffer is also used by the TRANSMIT command; the log file + enabled by the LOG command is still written a sector at a time. + +This section is intended for people wanting to implement their own versions of +Kermit-80 for computers not already defined. + +The system independent code communicates to routines for a specific system +through a set of tables. These tables are defined in CPXLNK.ASM, and should +not be modified between revisions of Kermit. If an entry is added or deleted, +then the whole of Kermit-80 needs reassembling. Make sure that the changes to +CPXLNK.ASM are duplicated in CPSUTL.ASM, which has the system independent +equivalent of CPXLNK.ASM. + +The following entries/definitions apply to revision 4.09. There have been +three additional entries since revision 4.05. + +The table is split into three sectors; The first section defines two byte +"words" giving 16 bits of interface data; The second set is a set of jumps to +various functions, and finally the third set a set of pure data bytes. + + +1.9.1. Interface Data. + + LNKFLG Must be first entry in overlay at overlay address. Is a two + byte address giving the size of the linkage table. This is + used to check for consistency of overlay's + + ENTSIZE Length of entry table, also used for consistency checking after + the overlay. Currently 6 + + SYSEDT The address of a dollar-terminated string giving the overlay + revision level and date. Points to a string like: + CPXSYS.ASM(33) 4-JUN-1986$ + + FAMILY The address of a dollar-terminated string giving the Family + overlay revision level and date. If the system is in + CPXSYS.ASM rather than a particular Family overlay, it is + simply a pointer to $ + + + + +1.9.2. Jump Table. + +This is split into three main sectors- + + + 1. Input/Output routines + + 2. Screen formatting routines + + 3. other system dependent routines + + + SELMDM + Parameters None + Returns None + Description selects the modem port. Most systems do nothing and simply + return. HL,DE and BC registers preserved. + + OUTMDM + Parameters None + Returns None + Description Output the character in E register to the communications line. + BC,DE,HL registers preserved. + + INPMDM + Parameters None + Returns Accumulator either 0 or character from comms line if available + Description Check modem for character and if so, return it in A. HL,DE,BC + registers preserved, flags and accumulator lost. + + FLSMDM + Parameters None + Returns None + Description Clear any pending characters in the input buffer from the + modem. No registers are preserved. + + SELCON + Parameters None + Returns None + Description Select the console. This is a null subroutine for most + systems, but for IOBYTE systems selects the console. + + OUTCON + Parameters Character in E + Returns None + Description Send the character in E to the console. Any quirks of system + responding in an odd manner should be handled. No registers + preserved. + + INPCON + Parameters None + Returns Zero or character in A. + Description Get a character from the console or return a null if no + character to be read. No registers are preserved. + + OUTLPT + Parameters Character in E + Returns None + Description Send the character in E to the printer. The console is + selected. Only DE registers are preserved + + LPTSTAT + Parameters None + Returns 00H or 0FFH in A register + Description Test the printer to see if it is ready to receive a character + to be printed. If a 00H is returned then the printer is ready + to receive a character. + + EXTTER + Parameters Character to be sent to the user supplied terminal emulator in + the E register + Returns None + Description If the user has supplied a terminal emulator in the overlay + code, EXTTER will be a JMP <non zero address>. If SET TERMINAL + EXTERNAL has been set, all caharcters will be passed verbatim + to this terminal emulator. If there is no external emulator, + this code will never be called. The user should reset terminal + conditions on initialisation of both the system and before + CONNECT. All registers should be preserved. + + XBDOS + Parameters Any required for calling BDOS + Returns Any expected from the called BDOS routine + Description This is an alternative entry to BDOS. This entry will also + check the printer status etc. For full details see the code + for the BDOS trap in CPSUTL.ASM. + + 2b) + + CLRLIN + Parameters None + Returns None + Description Clear the current line on the terminal + + CLRSPC + Parameters None + Returns None + Description Erase the current position (after a backspace) + + DELCHR + Parameters None + Returns None + Description Make delete (7FH) look like a backspace. Some systems do a + backspace, space, backspace automatically others have to + simulate it + + CLRTOP + Parameters None + Returns None + Description Clear the screen and place the cursor at the top LH corner + + SCREND + Parameters None + Returns None + Description Place the cursor on the line for the Kermit-80 prompt after a + file transfer. (Usually line 13) + + SCRERR + Parameters None + Returns None + Description Move cursor to the error message field on the file transfer + format screen + + SCRFLN + Parameters None + Returns None + Description Move the cursor to the filename field + + SCRNP + Parameters None + Returns None + Description Move the cursor to the packet count field + + SCRNRT + Parameters None + Returns None + Description Move cursor to the retry count field + + SCRST + Parameters None + Returns None + Description Move cursor to the status field + + RPPOS + Parameters None + Returns None + Description Move to the receive packet field (debugging use) + + SPPOS + Parameters None + Returns None + Description Move to the send packet field (for debugging use) + + 2c) + + SYSINIT + Parameters None + Returns None + Description Initialize the system specific items. No registers are + preserved. Any initialization is done once only when Kermit-80 + is first loaded. + + SYSEXIT + Parameters None + Returns None + Description Program termination. De-initialize anything in preparation for + a return to CP/M + + SYSCON + Parameters None + Returns None + Description Initialize anything before entering the connect state. + + SYSCLS + Parameters None + Returns None + Description System dependent close routine when exiting connect state + + SYSINH + Parameters None + Returns None + Description Help routine to test for any extensions to the escape menu + during the connect state. If a system has any special feature + it can use during connect mode, then it can be tested as + <escape-character>xxx. This entry is a string for printing to + the console for an <escape-character>? Often used for + generating breaks or controlling a modem. + + SYSINT + Parameters None + Returns None + Description This is a test-and-jump on receipt of an escape sequence not + understood by Kermit-80. If the character in A is not + recognized by your version of Kermit=80, do a rskip + + SYSFLT + Parameters Character in E + Returns Character in E. Either a 00H or anything else in A + Description Test the character in E. If it may not be printed to the + console, set A to zero. All other registers preserved. + NB <XON>,<XOFF>,<DEL>,<NULL> are always rejected. + + SYSBYE + Parameters None + Returns None + Description System dependent processing for the BYE command. (eg hang up + the phone) + + SYSSPD + Parameters Value from table in DE + Returns None + Description The system dependent code for baud rate change. DE contains + the two byte value from the baud rate table. This value is + also stored in "SPEED" + + SYSPRT + Parameters Value in DE + Returns None + Description The system dependent code for setting the port. The parameters + are passed in DE, which are obtained from the port tables + + SYSSCR + Parameters String pointer in DE + Returns None + Description Setup the screen display for file transfer. The Kermit version + string is pointed to by DE. If the terminal is not capable of + cursor addressing (eg dumb glass TTY) then only the screen is + cleared and the version string is printed. + + CSRPOS + Parameters Row number in B, column number in C + Returns None + Description Move the cursor to row B, column C where B=1,C=1 is top LH + corner of screen. The routine should first end a "cursor + position" leading string (up to four characters) then use the + parameters given to complete the versions cursor position + function + + SYSSPC + Parameters None + Returns K bytes free in HL + Description Get the amount of free disk space on the selected disk drive. + This could be in the system independent code. Automatically + detects CP/M V2.2 or V3.0. No registers saved. + + MOVER + Parameters Source Pointer in HL + Destination Pointer in DE + Byte count in BC + Returns None + Description Move (BC) bytes from (HL) to (DE) Z80 based systems do an LDIR, + while 8080 systems do it as a loop. All registers destroyed + + PRTSTR + Parameters $ terminated string pointed to by DE + Returns None + Description Print the string onto the console. + + 3) + + + PTTAB WORD Points to VT52 equivalent escape sequences. + + SPDTAB WORD Address of baud-rate command table, or 0 if table + does not exist + + SPDHLP WORD Address of baud-rate help table, or 0 if SET SPEED is + not supported. + + PRTTAB WORD Address of port command table or 0 if SET PORT is not + supported. + + PRTHLP WORD Address of port help table or 0 if SET PORT is not + supported + + TIMOUT BYTE FUZZY-TIMER. Set to value suitable to your system + (depends largely on CPU speed) + + VTFLG BYTE VT52 emulation flag. Set to 0 if terminal emulates a + VT52, 01 if emulation is required, or 0FFH if emulations not + possible (eg for "CRT") + + ESCCHR BYTE default escape character-usually control-] but + sometimes control-\ + + SPEED WORD Storage space for baud-rate. Set to 0FFFFH as baud + rates are initially unknown. Note that the STATUS routine only + looks at the first (least significant) byte. + + PORT WORD Storage space for port. Set to 0FFFFH as ports may + not be implemented, and is initially unknown + + PRNFLG BYTE Printer copy flag-if O no copy. Anything else => + copy to printer + + DBGFLG BYTE Debugging flag. If O then no debugging to be done. + (ie writing of debugging info during a file transfer) + + ECOFLG BYTE Local ECHO flag (default is off) + + FLWFLG BYTE File warning flag. If set to 1 will not overwrite + files already existing on disk with some-named files being + transferred + + IBMFLG BYTE IBM system is the host-assume IBM file transfers etc + + CPMFLG BYTE Flag indicating type of CP/M files to be transferred. + Default setting - DEFAULT + + PARITY BYTE Type of parity in use + 0 = Even parity + 3 = Mark parity + 6 = No parity (8th bit is data) + 9 = Odd parity + 12 = Space parity + + SPSIZ BYTE Size of send packet + + RPSIZ BYTE Size of receive packet + + STIME BYTE Send timer (time-out) + + RTIME BYTE Receive timer (time-out) + + SPAD BYTE Send Padding (default=0) + + RPAD BYTE Receive Padding (default=0) + + SPADCH BYTE Send Padding character (default=NULL) + + RPADCH BYTE Receive Padding character (default=NULC) + + SEOL BYTE Send EOL character (default=CR) + + REOL BYTE Receive EOL character (default=CR) + + SQUOTE BYTE Send quote character (default=#) + + RQUOTE BYTE Receive quote character (default=#) + + CHKTYP BYTE Ascii value of checktype + 31H="1"=checktype1 (6bits) + 32H="2"=checktype2 (12bits) + 33H="3"=CCITT checksum (CRC) + Default is 31H("1") + + TACFLG BYTE If set to on (non zero) send the TACCHR twice. This + is for ARPA TAC users, where the TAC swallows one "wakeup" + character. If sent twice the TAC will pas one on and go back + to normal mode. + + TACCHR BYTE Desired TAC character. It is ignored if TAC trapping + is turned off. Value to send twice if TAC interception is set + on. Default=0, but set to commercial AT if the conditional + assembly flag TAC is set true + + BUFADR WORD Address of Multi-Sector buffering for I/O + + BUFSEC BYTE The number of bytes the big buffers can hold. + Default is 1. (0=256 sectors). + + FFUSSY BYTE Indicates if funny characters may be used in CP/M + file names (eg <>.,;?#[]) If zero, allow anything. Default is + nonzero. + + BMAX SPACE:(2bytes) Highest block number on selected disk drive + + BMASK SPACE:(1byte) (Records/block)-1 + + BSHIFTF SPACE:(1byte) Number of shifts to multiply by rec.block + + NNAMS SPACE:(1byte) Counter for file-names per line + + +1.10. Future Work + +Work that needs to be done in future releases includes: + + - Merge in support for additional CP/M-80 systems, particularly those + for which support was recently added to the monolithic v3.x source. + + - Break up CPXSYS into discrete source files, one for each system. + These source files should serve as simple models for adding support + for new systems to Kermit-80 -- only the very basic screen + definitions, flags, i/o primitives, initializations, and so forth + should appear in each system-dependent file. + + - Addition of missing features -- compression of repeated characters + during packet transmission, transmission of file attributes + (particularly size, so that "percent done" can be displayed for both + incoming and outbound files), command macros, more advanced login + scripts, remote operation and server mode, etc etc. Any offers?? + +Index (Page numbers are approximate)... + + 8080 5, 6 + + Append 2 + ARPAnet 10 + Attention Character 10 + Autoreceive 3 + + Baud 4 + BIOS 5 + Block Check 3 + Bootstrapping CP/M Kermit 8 + Break 2 + Buffer size 3 + Bye 2 + + Carriage Return 2 + COLLISION 3 + Connect 2 + Control-C 2 + Control-X 2 + Control-Z 2 + Copy 2 + CP/M 6 + CP/M-80 Kermit 1 + CR 2 + + Debug 3 + Default Disk 3 + Directory 2 + Directory file size 3 + Downloading 8 + + Eighth-Bit Prefix 4 + Erase 2 + Escape Character 2, 3 + Exit 2 + External Terminal Emulation + 4 + + File Copying 2 + File-mode 3 + File-Warning 3 + FINISH 2 + Flow Control 4 + + Generic Kermit-80 5 + GET 2 + + Help 2 + + IBM 4 + Input 2 + Intercept Character 10 + + Local 2 + Local-Echo 4 + LOG 2 + Logging 4 + LOGOUT 3 + + NAK 2 + No-exit 4 + + OUTPUT 3, 4 + + Pad character 4 + Parity 4 + Pause 3 + Port 4 + Print 3 + PRINTER 4 + + RECEIVE 3 + REMOTE 3 + + SEND 3 + SET 3 + Set padding 4 + Set Receive 4 + Set Send 4 + Set Start of packet 4 + Show 4 + Status 4 + + TAC 10 + TacTrap 4 + Take 4 + Terminal Emulation 4 + Timeout 2, 7 + TIMER 4 + TRANSMIT 5 + Type 5 + + USER 4 + + VERSION 5 + Virtual Terminal 2 + VT100 Emulation 4 + VT52 Emulation 4 + + Warning 4 + + XON/XOFF 2 + + Z80 6 + + +Table of Contents (page numbers are approximate) + +1. CP/M-80 KERMIT 1 + + 1.1. Credits 1 + 1.2. What's New 1 + 1.3. Overview of Kermit Operation 1 + 1.4. Summary of CP/M 1 + 1.5. Kermit-80 Description 2 + 1.6. Kermit-80 Flavors 5 + 1.6.1. Generic Kermit-80 5 + 1.6.2. CP/M 3 Kermit 5 + 1.6.3. System-Specific Versions 5 + 1.7. Installation of Kermit-80 6 + 1.7.1. Organization of Kermit-80 7 + 1.7.2. Downloading Kermit-80 8 + 1.7.3. Assembling Kermit-80 from the sources 9 + 1.8. Adding Support For A New System 10 + 1.9. Notes on New Features in Kermit-80 Version 4 10 + 1.9.1. Interface Data. 10 + 1.9.2. Jump Table. 10 + 1.10. Future Work 12 + +Index 13 + + List of Figures + + Figure 1-1: Bootstrap program for Kermit-80 and CP/M Version 2.2 8 + + + List of Tables + + Table 1-1: Kermit-80 SET PORT Options 5 + Table 1-2: Systems supported by Kermit-80 (Part 1) 7 + Table 1-3: Systems supported by Kermit-80 (Part 2) 7 + Table 1-4: Terminals supported by Kermit-80 8 + Table 1-5: Terminals known to Kermit-80 10 diff --git a/cpkfet.ddt b/cpkfet.ddt new file mode 100644 index 0000000..1fcca53 --- /dev/null +++ b/cpkfet.ddt @@ -0,0 +1,61 @@ +-a100 ;Begin assembling code at 100 +0100 LXI H,2FE ;Where to store in memory +0103 SHLD 200 ;Keep pointer there +0106 MVI E,D ;Get a CR +0108 MVI C,4 ;Output to PUNCH {send to HOST} +010A CALL 5 +010D MVI C,3 ;Input from READER {read from HOST} +010F CALL 5 +0112 ANI 7F ;Strip parity bit +0114 PUSH PSW ;save a and flags +0115 MOV E,A ;move char to e for echo +0116 MVI C,2 ;Output to screen +0118 CALL 5 +011B POP PSW ;restore a and flags +011C CPI 40 ;Is it our DEC-20 prompt? +011E JZ 127 ;Yes, have whole file in memory +0121 CALL 17A ;no , store another byte +0124 JMP 10D ;read another byte +0127 MVI A,1A ;Get a Control-Z {CP/M EOF mark} +0129 CALL 17A ;store it in memory +012C LXI H,300 ;Get memory pointer +012F SHLD 202 ;Store as DMA pointer +0132 LDA 201 ;Get 'HI' byte of memory pointer +0135 STA 200 ;and store it as 'LO' one +0138 XRA A +0139 STA 201 ;Zero 'HI' byte {slow *256} +013C MVI C,16 ;Make NEW file +013E LXI D,5C ;With FCB1 +0141 CALL 5 +0144 CALL 15E ;Write 128 bytes {sector} +0147 CALL 15E ;Write another sector +014A LXI H,FFFF ;Get a 16-bit Minus One +014D XCHG ;into DE +014E LHLD 200 ;Get 256-byte counter +0151 DAD D ;decrement +0152 SHLD 200 ;and store back +0155 MVI A,2 ;Check if +0157 CMP L ; 256-byte counter down to offset +0158 JZ 183 ;Yes, wer'e done +015B JMP 144 ;Keep writing.. +015E LHLD 202 ;Get file-pointer +0161 XCHG ;into DE +0162 MVI C,1A ;Set DMA-address +0164 CALL 5 +0167 MVI C,15 ;Write sector {128 bytes} +0169 LXI D,5C ;using FCB1 +016C CALL 5 +016F LHLD 202 ;Get file-pointer +0172 LXI D,80 ;128-bytes +0175 DAD D ;added to file-pointer +0176 SHLD 202 ;and save +0179 RET ;and return +017A LHLD 200 ;Get Memory-pointer +017D MOV M,A ;store character +017E INX H ;Increment Pointer +017F SHLD 200 ;and save +0182 RET ;and return +0183 MVI C,10 ;CLOSE file +0185 LXI D,5C ;using FCB1 +0188 CALL 5 +018B JMP 0 ;Force WARM BOOT diff --git a/cpkfet.msg b/cpkfet.msg new file mode 100644 index 0000000..97b3043 --- /dev/null +++ b/cpkfet.msg @@ -0,0 +1,24 @@ +Date: 23 May 1986 0807-EDT +From: "Bernie AT&T:617-467-5664 LDP Workstations" <EIBEN@MARLBORO.DEC.COM> +To: sy.fdc@cu20b +Subject: CP/M-80 Kermit Bootstrapping Procedure Corrected + +Here is a fixed version of the CP/M bootstrapping program. The version that +has been listed in the CP/M-80 Kermit manual for the past several years failed +to store the end of the file after downloading it into memory. The new version +stores in multiples of 2 sectors [256 bytes] and could have a 'overrun' of that +much, however without problems, since the Control-Z does the magic. Unlike the +previous version, this program displays the data on the screen while capturing +it into memory. + +Probably you want to include the 'program' - for the guy who has an editor AND +the DDT-form. I believe that the assembler will catch typos easier than DDT - +and not everybody is fluent enough in DDT to correct typos on the fly. + +The Rainbow was able to 'fetch' at 2400 baud, VT180 only checked at 1200 baud. +You might want to check on your micros, first thing to go [speed-wise] could be +the 'visual' display - although I NEEDED to see the 'bytes' trickling in - and +its also quite handy to see a 'blotch' coming on the VT180 - so you know right +away when a transfer wasn't clean. + +- Bernie diff --git a/cpkhdr.mss b/cpkhdr.mss new file mode 100644 index 0000000..240b5a2 --- /dev/null +++ b/cpkhdr.mss @@ -0,0 +1,156 @@ +@Comment(-*-SCRIBE-*-) +@Comment(SCRIBE Text Formatter Input for the CP/M-80 Kermit User Guide) + +@Make<Manual> +@device(postscript) +@Comment(Use /draft:F on command line to produce .LPT file w/cc in column 1) + +@case(device,postscript="@LibraryFile<Mathematics10>") + +@String<Ellips="..."> + +@Style<Spacing 1, Spread 1, Indent 0, HyphenBreak Off, SingleSided> + +@case<device,file="@style(justification off,hyphenation off)", +else="@Style(Justification On, Hyphenation On, WidestBlank 1.4)"> + +@Use<Hyphendic="kuser.hyp"> +@Modify<IndexEnv,Boxed, + Columns 2,ColumnMargin 0.5inch,LineWidth 2.2inch,ColumnWidth 2.7inch> + +@Comment(Set desired spacing around various environments) + +@Modify<Quotation,Indentation 0, Above 1, Below 1, Spacing 1> +@Modify<Example, Above 1, Below 1, Blanklines Hinge> +@Modify<Verbatim, Leftmargin 0> +@Modify<Itemize, Above 1, Below 1, Spacing 1, Spread 1> +@Modify<Enumerate, Above 1, Below 1, Spacing 1, Spread 1> +@Modify<Description, Above 1, Below 1, Spacing 1> +@Define<MD,Use Display> +@Define<Q,FaceCode R> +@Define<QQ,FaceCode R,AfterEntry=["],BeforeExit=["]> +@Define<SubH,Use Display,FaceCode R,Above 1.6,Below 1> +@Define<SubU,Use UX,FaceCode R,Above 1.6,Below 1,need 6> +@define<xx,use b> +@define<yy,use i> + +@Comment(Printing Device Dependencies) + +@Case{Device, + LPT="@use(Auxfile='CPMLP.AUX') + @Case[Draft,F=`@Style(CarriageControl=FORTRAN)'] + @Style(linewidth 79) + @Define<SubH,Use Display,FaceCode B,Above 1.6,Below 1>", + Printronix="@use(AuxFile='CPMPX.AUX') + @Case[Draft,F=`@Style(CarriageControl=FORTRAN)'] + @Style(LineWidth 74, PaperLength 11 inches,BottomMargin 5 spacings)", + PagedFile="@use(AuxFile='CPMPF.AUX') + @Style(LineWidth 79, PaperLength 10.8 inches) + @Style(TopMargin 3 spacings,BottomMargin 6 Spacings) + @Modify(Example,Leftmargin +2)", + Diablo="@Use(Auxfile='CPMDIA.AUX') + @TypeWheel(Titan 10) + @Define<SubH,Use Display,FaceCode B,Above 1.6,Below 1>", + Postscript="@Use(Auxfile='CPMPS.AUX') + @Style<Doublesided> + @Style<Fontscale 10> + @Define<MD,Use Mathdisplay> + @String<Ellips='@Math(@Ldots)'> + @Define<xx,use b,Size 12> + @Define<yy,use i,Size 10> + @Define<Q,FaceCode T> + @Define(QQ,FaceCode T,AfterEntry=[@r<``>],BeforeExit=[@r<''>]) + @Define<SubH,Use Display,FaceCode B,Above 1.6,Below 1> + @Modify<Quotation,Size +0> + @Modify<Itemize,Spread 0.8>", + Imprint10="@Use(AuxFile='CPMIMP.AUX') + @Define<Q,FaceCode U> + @Define(QQ,FaceCode U,AfterEntry=[@r<``>],BeforeExit=[@r<''>]) + @Define<SubH,Use Display,FaceCode B,Above 1.6,Below 1> + @define<xx,use b,font bodyfont> + @define<yy,use i,font bodyfont> + @Modify<Insert,Spacing 1> + @Modify<Verbatim,FaceCode U> + @Modify<Example,FaceCode U,spacing 1.2> + @Modify<Itemize,Spread 0.8> + @Style<FontFamily SmallRoman12,Spacing 1.6,SingleSided>", + Imagen300="@Use(AuxFile='CPMIM3.AUX') + @Define<Q,FaceCode U> + @Define(QQ,FaceCode U,AfterEntry=[@r<``>],BeforeExit=[@r<''>]) + @Define<SubH,Use Display,FaceCode B,Above 1.6,Below 1> + @define<xx,use b,font bodyfont> + @define<yy,use i,font bodyfont> + @Modify<Insert,Spacing 1> + @Modify<Verbatim,FaceCode U> + @Modify<Example,FaceCode U,spacing 1.2> + @Modify<Itemize,Spread 0.8> + @Style<FontFamily SmallRoman12,Spacing 1.6,SingleSided>", + X9700="@Use<AuxFile='CKX9.AUX'> + @Style<FontFamily Univers10, DoubleSided, Spacing 0.9, Spread 0.8> + @Style<Scriptpush No> + @define<xx,use b,font bodyfont> + @define<yy,use i,font bodyfont> + @Define<Q,FaceCode U> + @Define(QQ,FaceCode U,AfterEntry=[@r<``>],BeforeExit=[@r<''>]) + @Define<SubH,Use Display,FaceCode B,Above 1.6,Below 1> + @Modify<Description,Spacing 0.8,Spread 0.75> + @Modify<Quotation,Spacing 0.8,Spread 0.75> + @Modify<Enumerate,Spacing 0.8,Spread 0.75> + @Modify(Verbatim,Spacing 0.8,Spread 0.75,FaceCode U) + @Modify<Example,FaceCode U, Spacing 1.1> + @Modify[Itemize, Numbered < @,- >, Spacing 0.8, Spread 0.5]" +} +@Comment(Set spacing and paging requirements for chapter & section headings) + +@Modify(Hdx,Above 2,Below 1,Need 8) +@Modify(Hd0,Above 2,Below 1,Need 8) +@Modify(Hd2,Above 2,Below 1,Need 8) +@Modify(Hd3,Above 2,Below 1,Need 8) +@Modify(Hd4,Above 2,Below 1,Need 8) +@Modify<Heading, Above 2, Need 8> +@Modify<Subheading, Above 1.5, Need 6> + +@Pageheading<> +@Begin(TitlePage,Initialize "@BlankSpace(2.4inches)",sink 0) +@MajorHeading(CP/M-80 KERMIT VERSION 4.11 USER GUIDE) + + +C. Gianone + +Columbia University Center for Computing Activities +New York, New York 10027 + + +@i<April 23, 1991> + + + +Copyright (C) 1981,1991 +Trustees of Columbia University in the City of New York + +@i<Permission is granted to any individual or institution to use, copy, +or redistribute this document so long as it is not sold for profit, and +provided this copyright notice is retained.> +@case[device, x9700="@blankpage(1)"] +@end<titlepage> +@PageHeading(Odd,Immediate, + Left="@xx<@Value[SectionNumber]. @Value[SectionTitle]>", + Right="@yy<Page @ref(page)>", + Line="@bar()@blankspace(2)") +@PageHeading(Even, + Left="@yy<Page @ref(page)>", + Right="@xx<Kermit User Guide: @Title(Chapter) @Value[SectionNumber]>", + Line="@bar()@blankspace(2)") +@set(page=1) +@Include<cpkerm.mss> +@PageHeading(Odd,Immediate, + Left="@xx<CP/M-80 Kermit>", + Right="@yy<Page @ref(page)>", + Line="@bar()@blankspace(2)") +@PageHeading(Even, + Left="@yy<Page @ref(page)>", + Right="@xx<Kermit User Guide>", + Line="@bar()@blankspace(2)") +@Case(Device,x9700="@Comment<Begin Duplex Kludge> +@SendEnd(#Index `@begin<Transparent,PageBreak UntilOdd>@end<Transparent>') +@Comment<End Duplex Kludge>") diff --git a/cpkhex.bas b/cpkhex.bas new file mode 100644 index 0000000..9bad29b --- /dev/null +++ b/cpkhex.bas @@ -0,0 +1,88 @@ +1 REM -- CP4HEX.BAS -- +2 REM This program reads an Intel-format hex file and checks it for validity. +3 REM It discards blank lines, and if it finds any other lines that are bad, +4 REM either bacause the format is wrong or the checksum doesn't agree, it +5 REM prompts you to type in a replacement line. Use this program to fix +6 REM hex files you have downloaded using a non-error-correcting method. +7 REM Written by F. da Cruz & C. Gianone, Columbia University, April 1986. +8 REM Used with success on Vector Graphic Model 3 CP/M-80 system. +9 REM +100 ON ERROR GOTO 9000 +200 INPUT;"Input hex file "; F$ +300 PRINT +400 OPEN "I",#1,F$ +500 INPUT;"Output hex file"; O$ +600 PRINT +700 OPEN "O",#2,O$ +800 B = 0 +900 REM Loop at 1000 for each line, B, of the input hex file, then... +901 REM Discard blank lines. +902 REM Look for colon that begins hex record +903 REM Decode rest of record... +904 REM L = length of rest, in bytes (not hex characters!), 1 byte +905 REM N = address, 2 bytes +906 REM T = record type, 0 = data, 1 = EOF +907 REM C% = 1-byte checksum +908 REM Record has negative of actual checksum, adding to C% should give 0. +909 REM Subroutine at 8000 converts pair of hex nibbles to 8-bit byte. +910 REM +1000 LINE INPUT #1, A$ +1010 B = B + 1 +1015 IF A$ = "" THEN GOTO 1000 +1020 IF LEFT$(A$,1) = ":" THEN GOTO 2000 +1030 X = INSTR(2,A$,":") +1033 IF X < 1 THEN GOTO 1040 +1035 A$ = MID$(A$,X,LEN(A$)-X+1) +1037 GOTO 2000 +1040 PRINT "Line";B;"has no colon" +1060 GOTO 3070 +2000 C% = 0 +2005 PRINT "."; +2010 X$ = MID$(A$,2,2) +2020 GOSUB 8000 +2030 L = K +2040 X$ = MID$(A$,4,2) +2050 GOSUB 8000 +2060 N = K +2070 X$ = MID$(A$,6,2) +2080 GOSUB 8000 +2090 N = 256 * N + K +2100 X$ = MID$(A$,8,2) +2110 GOSUB 8000 +2120 T = K +2125 IF T = 1 THEN PRINT "End of";F$;"at line";B : GOTO 9000 +2130 IF T <> 0 THEN PRINT "Invalid record type"; T : GOTO 3070 +2140 M = 10 +3000 X$ = MID$(A$,M,2) +3002 GOSUB 8000 +3005 M = M + 2 +3010 L = L - 1 +3020 IF L > 0 THEN GOTO 3000 +3030 X$ = MID$(A$,M,2) +3050 GOSUB 8000 +3060 IF (C% AND 255) = 0 THEN GOTO 3100 +3065 PRINT "Bad Checksum" +3070 PRINT "Line";B +3075 PRINT "Bad: "; A$ +3080 INPUT "New "; A$ +3090 PRINT +3100 PRINT #2,A$ +4000 GOTO 1000 +7999 REM Subroutine to convert pair of hex nibbles to one 8-bit byte. +8000 I = ASC(LEFT$(X$,1)) +8005 K = 0 +8010 IF I > 64 AND I < 71 THEN I = I - 7 +8020 IF I < 48 OR I > 63 THEN K = -1 +8030 J = ASC(MID$(X$,2,1)) +8040 IF J > 64 AND J < 71 THEN J = J - 7 +8050 IF J < 48 OR J > 63 THEN K = -1 +8060 IF K < 0 THEN RETURN +8070 K = 16 * (I - 48) + J - 48 +8080 C% = C% + K +8099 RETURN +8999 Program exit and error handler +9000 CLOSE #1 +9010 CLOSE #2 +9020 CLOSE +9030 PRINT "Records processed:";B +9999 END diff --git a/cpscmd.asm b/cpscmd.asm new file mode 100644 index 0000000..6cff603 --- /dev/null +++ b/cpscmd.asm @@ -0,0 +1,1140 @@ +; CPSCMD.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 file provides a user oriented way of parsing commands. +; It is similar to that of the COMND JSYS in TOPS-20. +; +; revision history (latest first): +; +;edit 13, 17-Jan-1991 by MF. Modified "cmifil" routine to zero the entire +; fcb (not just the extent) to fix a bug in the COPY command which +; prevented successive COPY commands from working properly. +;edit 12, 16-Jan-1991 by MF. Modified routine "cmkeyw" to ignore leading +; spaces/tabs before a keyword. This apparently was the intent in +; "prompt" and "repars" (at least for command-lines) as the variable +; "cmsflg "is set upon command parse and reparse. The intent was , +; subverted, however, as "cmkeyw" did not reset the flag to ignore +; leading white space for each search thru the key tables (even though +; the buffer pointer to the keyword entered was reset). The fix was +; to reset the "spaces seen" flag (cmsflg) after "cmkey2" so that +; it is reset each time a new table entry is compared to the text +; the user has entered from the keyboard/TAKE-file etc. The upshot +; of all this is that the kluge code in "cminbf" at "cminb0" designed +; to force Kermit to ignore leading white space on command-lines in +; TAKE-files and on the CP/M command-line is no longer needed and, +; therefore, has been eliminated. Also modify "comnd" to expect leading +; spaces for functions other than "get keyword". +;edit 11, 26-Dec-1990 by MF. Modified routines to ignore leading white space +; in lines from TAKE-files as well as during input from the CP/M +; command-line (form-feeds are now considered white space under these +; circumstances). +;edit 10, 8-Sep-1990 by Mike Freeman. Modified routines to ignore leading +; spaces/tabs when processing Kermit commands from the CP/M +; command-line. +; Added flag CMBFLG to allow initial word on a command-line +; to be blank (useful for Remote commands such as Remote CWD etc). +; Added flag cmqflg to prevent character-echoing while entering +; commands so Remote CWD etc can have nonechoing password entry. +; edit 9, 15 June, 1987 by OBSchou. Bug fixing to allow a second filename +; (quiet) be entered as d:<blank>. Previous revision put the drive name +; in first character of FCB, I put that character back to a space. +; +; edit 8, 12 June, 1987 by OBSchou. Addedin code in cmkeyw to print +; 20 lines of help, then pause for a key from the user befor +; proceeding with help. +; +; edit 7, 11 March, 1987 by OBSchou for Richard Russell, BBC. He writes: +; Bug in cmtext which prevented use of octal characters (\nnn) fixed. +; +; edit 6, 18 June, 1986 by OBSchou, Loughborough University, Leics. UK +; added code to parse a number from user input. Added check to make +; sure the input command buffer does not overflow the limit. +; +; edit 5a: 7 March, 1986. OBSchou. Added stuff rom MJ Carter. He writes: +; 7th May 85, MJ Carter [majoc], Nottingham University +; Code in cmifil() put one too many spaces in the FCB; this caused +; the BDOS of the British Micro Mimi to search for exteny 32, +; rather than extent 0, so era() always said "can't find file" +; Puttig a null at the point in question ought to fix 9 it. +; +; edit 5: 6-Feb-85 by Charles Carvalho +; Make ffussy a runtime (rather than assembly-time) switch, to +; eliminate conditional assembly in system-independent module. +; Don't allow _%|()/\ in filenames if ffussy set; my CP/M manual +; disallows those, too. +; +; edit 4: 13-Jan-85 by Vanya J.Cooper Pima Commun. College Tel: 602-884-6809 +; +;pcc006 2-jan-85 VJC modules:cp4cmd,cp4utl +; Problems with "?" in filespecs. On reparse, may cause action +; flag to be reset at wrong point, requiring multiple <CR>'s +; to terminate the line or other weird stuff. Also need to +; check flag and complain if wild-cards illegal. + +;pcc007 2-Jan-85 vjc modules:cp4def,cp4cmd +; Cmifil is too fussy about what characters to accept in a +; filespec. My CP/M manual says any printable character is ok +; except <>.,;:?*[], and lower case. In practice, even those work +; sometimes. Kermit itself uses '&' if file warning is on, +; and then won't let you reference the file. Allow all +; printable characters except those above. Add conditional +; ffussy, so that if not ffussy, all special characters will be +; allowed, just convert lower to upper-case. + +; edit 3: July 8, 1984 (CJC) +; integrate Toad Hall changes for LASM compatibility: CP4CPM is linked +; by CP4WLD, and links CP4UTL. +; +; edit 2: June 5, 1984 (CJC) +; formatting and documentation; delete unnecessary code at cminb7; add +; module version string. +; +; edit 1: May, 1984 (CJC) +; extracted from CPMBASE.M80 version 3.9; modifications are described in +; the accompanying .UPD file. + +cmdver: db 'CPSCMD.ASM (13) 17-Jan-1991$' ; name, edit number, date + +; This routine prints the prompt in DE and specifies the reparse +; address. +; called by: kermit + +prompt: pop h ;Get the return address. + push h ;Put it on the stack again. + shld cmrprs ;Save it as the address to go to on reparse. + lxi h,0 ;Clear out hl pair. + dad sp ;Get the present stack pointer. + shld cmostp ;Save for later restoral. + xchg ;Save the pointer to the prompt. + shld cmprmp + xchg + lxi h,cmdbuf + shld cmcptr ;Initialize the command pointer. + shld cmdptr + xra a + sta cmaflg ;Zero the flags. + sta cmccnt +; mvi a,0FFH ;Try it this way (Daphne.) +; sta cmsflg + call prcrlf ;Print a CR/LF [Toad Hall] + jmp prprmp ;Print the prompt. [Toad Hall] +; +; This address is jumped to on reparse. +; here from: cmcfrm, cmkeyw, cmifil, cminbf + +repars: lhld cmostp ;Get the old stack pointer. + sphl ;Make it the present one. + lxi h,cmdbuf + shld cmdptr +; mvi a,0FFH ;Try it this way (Daphne.) +; sta cmsflg + lhld cmrprs ;Get the reparse address. + pchl ;Go there. + +; This address can be jumped to on a parsing error. +; here from: cmkeyw, cminbf + +prserr: lhld cmostp ;Get the old stack pointer. + sphl ;Make it the present one. + lxi h,cmdbuf + shld cmcptr ;Initialize the command pointer. + shld cmdptr + xra a + sta cmaflg ;Zero the flags. + sta cmccnt +; mvi a,0FFH ;Try it this way (Daphne.) +; sta cmsflg + call prcrlf ;Print a CR/LF [Toad Hall] + call prprmp ;Print the prompt [Toad Hall] +;* Instead return to before the prompt call. + lhld cmrprs + pchl +; +; This routine parses the specified function in A. Any additional +; information is in DE and HL. +; Returns +1 on success +; +4 on failure (assumes a JMP follows the call) +; called by: log, setcom, read, send, xmit, dir, era, keycmd, cfmcmd +; and CPSREM + +comnd: sta cmstat ;Save what we are presently parsing. + call cminbf ;Get chars until an action or a erase char. + push psw ;[MF]Save function + mvi a,0ffh ;[MF]Expect leading spaces + sta cmsflg ;[MF]... + pop psw ;[MF]Restore function + cpi cmcfm ;Parse a confirm? + jz cmcfrm ;Go get one. + cpi cmkey ;Parse a keyword? + jz cmkeyw ;Try and get one. + cpi cmifi ;Parse an input file spec? + jz cmifil ;Go get one. + cpi cmifin ;Input file-spec silent? + jz cmifil ;do as he wishes + cpi cmofi ;Output file spec? + jz cmofil ;Go get one. + cpi cmtxt ;Parse arbitrary text? + jz cmtext ;Go do it. + cpi cmnum ;[7] Parse a number? + jz cmnumb ;[7] go do it + lxi d,cmer00 ;"?Unrecognized COMND call" + call prtstr + ret +; +; This routine parses arbitrary text up to a CR. +; Accepts DE: address to put text +; Returns in A: number of chars in text (may be 0) +; DE: updated pointer +; called by: comnd + +cmtext: xra a ; clear counters erc for slashes etc + sta slshsn ; if we are in a slash sequence + sta slashn ; the octal number being entered + sta slashc ; number of characters entered + + xchg ;Put the pointer to the dest in HL. + shld cmptab ;Save the pointer. + mvi b,0 ;Init the char count +cmtxt1: call cmgtch ;Get a char. + ora a ;Terminator? + jp cmtx3 ;No, put in user space. [rtr] was cmtx5 + ani 7FH ;Turn off minus bit. + cpi esc ;An escape? + jnz cmtxt2 ;No. + mvi c,conout + mvi e,bell ;Get a bell. + call bdos + xra a + sta cmaflg ;Turn off the action flag. + lhld cmcptr ;Move the pointer to before the escape. + dcx h + shld cmcptr + shld cmdptr + lxi h,cmccnt ;Get the char count. + dcr m ;Decrement it by one. + jmp cmtxt1 ;Try again. + +cmtxt2: cpi '?' ;Is it a question mark? + jz cmtxt4 ;If so put it in the text. [rtr] was cmtx3 + cpi ff ;Is it a formfeed? + cz clrtop ;If so blank the screen. + mov a,b ;Return the count. + lhld cmptab ;Return updated pointer in HL. + xchg + jmp rskp ;Return success. + +cmtx3: cpi '\' ; slash? + jnz cmtx3a ; nope, so try something else + lda slshsn ; a slash already entered? + ana a + cma ;[rtr] + jnz cmtx3a ; yes, so assume its a valid slash to enter + sta slshsn ; make sure the flag is set for next time routnd + jmp cmtxt1 ; get another character + +cmtx3a: +; lxi h,cmaflg ;Point to the action flag. +; mvi m,0 ;Set it to zero. + mov e,a ; save it in case we are interpreting a slash + lda slshsn ; slash already entered? + ana a ; test flag + mov a,e ; restore it in case... + jz cmtx5 ; not a slash seen, so enter as a normal character + cpi '\' + jnz cmtx3b ; \\ not detected + lda slashn ; else get number + jmp cmtx5b ; and enter it ( in the case of \n or \nn) + ; here if an octal number of 1 or 2 digits + ; entered instead of 3, followed by \ again + +cmtx3b: + sui 30h ; else it should be an octal number + jm cmtxt6 ; if not a digit complain + cpi 8 ; ditto + jp cmtxt6 ;[rtr] was cmtxt + mov e,a ; else add it to the number already entered + lda slashn + add a + add a + add a ; multiply by 8 + add e + sta slashn + lda slashc ; get the count + inr a + sta slashc ; plus one. If three then a number entered + cpi 3 + lda slashn ; get the number in case... + jz cmtx5 + jmp cmtxt1 ; else loop + +cmtxt4: lhld cmdptr ;[rtr] Get a pointer into the buffer + inx h ;[rtr] Bump past '?' + shld cmdptr ;[rtr] +cmtx5: call cmtx5c + jmp cmtxt1 ; put this into a subroutine + +cmtx5b: + call cmtx5c ; here if we see \n\ or \nn\ rather than \nnn\ + mvi a,'\' ; so send slash number to buffer, + sta slshsn ; re-store a slash seen + jmp cmtxt1 ; try next one + +cmtx5c: + inr b ;Increment the count. + lhld cmptab ;Get the pointer. + mov m,a ;Put the char in the array. + inx h + shld cmptab ;Save the updated pointer. + xra a ; clear slash counters etc + sta slashc + sta slashn + sta slshsn + ret ; and exit + +cmtxt6: lxi d,cmer05 ; complain - not a valid \ parameter + call prtstr + jmp kermit ; and try another command + ds 20h ; for debugging +; +; This routine gets a number from user input. +; Called by: comnd +; +cmnumb: lxi h,0 ; make sure the number is zero to start with + shld number +cmnum0: call cmgtch ; get another character + ora a ; if negative then its an action + jp cmnum1 ; nope, so (possibly) valid input + ani 7fh ; else lets see what it is... + cpi esc ; do not know what to do with this one... + cpi ' ' ; if it is a space then either a return or more + jnz cmnum2 ; else + jmp rskp ; space is a deliminter + dw 0 ; set three bytes aside for a jump/call + dw 0 ; and then another three just in case... + dw 0 ; making 6 bytes +cmnum2: cpi '?' ; user is curious + jz gnum2 + cpi cr ; end of input? + jz cmnumx +gnum1: jmp prserr ; did not under stand this, so error +cmnumx: dw 0 + dw 0 + jmp rskp ; return ok + +gnum2: lhld number ; get the number.. if at all entered + mov a,l + ora h ; if hl = 0 then possibly no number entered + lxi d,cmin02 ; say confirm...or more on line + jnz gnum21 ; else say enter a return + lxi d,cmin01 ; say enter a number +gnum21: call prtstr ; say it + call prcrlf ; do a lf + call prprmp ; another reprompt + lhld cmdptr ; get pointer of string already entered + mvi m,'$' ; dollar it to set end of line + lhld cmcptr + dcx h ; decrement and save the buffer pointer + shld cmcptr + lxi d,cmdbuf + call prtstr ; print what has already been entered + xra a + sta cmaflg ; turn the action flag off + jmp repars ; and try again + + mvi a,cmcfm ; parse a confirm +dw 0 +dw 0 +dw 0 +dw 0 +dw 0 ; some space to patch... +dw 0 + +cmnum1: ani 7fh ; here for a (potentially) valid number + sui '0' ; less ascii bias + jc gnum3 + cpi 10 ; if 10 or more its still bad + jnc gnum3 + cmc + lhld number ; now multiply number by ten and add the new value + push h + pop d + dad h ; hl = hl * 2 + dad h ; * 4 + dad d ; * 5 + dad h ; * 10 + mvi d,0 + mov e,a ; add de to hl... + dad d + shld number + jmp cmnum0 +; +gnum3: lxi d,cmer04 ; invalid number... + call prtstr + jmp rskp +; + +; +; This routine gets a confirm. +; called by: comnd + +cmcfrm: call cmgtch ;Get a char. + ora a ;Is it negative (a terminator;a space or + ;a tab will not be returned here as they + ;will be seen as leading white space.) + rp ;If not, return failure. + ani 7FH ;Turn off the minus bit. + cpi esc ;Is it an escape? + jnz cmcfr2 + mvi c,conout + mvi e,bell ;Get a bell. + call bdos + xra a + sta cmaflg ;Turn off the action flag. + lhld cmcptr ;Move the pointer to before the escape. + dcx h + shld cmcptr + shld cmdptr + lxi h,cmccnt ;Get the char count. + dcr m ;Decrement it by one. + jmp cmcfrm ;Try again. + +cmcfr2: cpi '?' ;Curious? + jnz cmcfr3 + lxi d,cmin00 ;Print something useful. + call prtstr + call prcrlf ;Print a crlf. [Toad Hall] + call prprmp ;Reprint the prompt [Toad Hall] + lhld cmdptr ;Get the pointer into the buffer. + mvi a,'$' ;Put a $ there for printing. + mov m,a + lhld cmcptr + dcx h ;Decrement and save the buffer pointer. + shld cmcptr + lxi d,cmdbuf + call prtstr + xra a ;Turn off the action flag. + sta cmaflg + jmp repars ;Reparse everything. + +cmcfr3: cpi ff ;Is it a form feed? + cz clrtop ;If so blank the screen. + jmp rskp +; +; This routine parses a keyword from the table pointed +; to in DE. The format of the table is as follows: +; +; addr: db n ;Where n is the # of entries in the table. +; db m ;M is the size of the keyword. +; db 'string$' ;Where string is the keyword. +; db a,b ;Where a & b are pieces of data +; ;to be returned. (Must be two of them.) +; +; The keywords must be in alphabetical order. +;**** Note: The data value a is returned in registers A and E. The +;**** data value b is returned in register D. This allows the two data +; bytes to be stored as: +; dw xxx +; and result in a correctly formatted 16-bit value in register pair +; DE. +; called by: comnd + +cmkeyw: shld cmhlp ;Save the help. + xchg ;Get the address of the table. + shld cmptab ;Save the beginning of keyword tab for '?'. + mov b,m ;Get the number of entries in the table. + inx h + shld cmkptr + lhld cmdptr ;Save the command pointer. + shld cmsptr +cmkey2: mov a,b ;Get the number of entries left. + ora a ;Any left? + rz ;If not we failed. + mvi a,0ffh ;[MF]Make sure we ignore leading spaces + sta cmsflg ;[MF]... + lhld cmkptr + mov e,m ;Get the length of the keyword. + inx h +cmkey3: dcr e ;Decrement the number of chars left. + mov a,e + cpi 0FFH ;Have we passed the end? + jm cmkey5 ;If so go to the next. + call cmgtch ;Get a char. + ora a ;Is it a terminator? + jp cmkey4 ;If positive, it is not. + ani 7FH ;Turn off the minus bit. + cpi '?' + jnz cmky31 + xra a + sta cmaflg ;Turn off the action flag. + lxi h,cmccnt ;Decrement the char count. + dcr m +;* Must go through the keyword table and print them. + lhld cmhlp ;For now print the help text. + xchg + call p20ln ;[8] print at most 20 lines then pause +; call prtstr + call prcrlf ;Print a crlf [Toad Hall] + call prprmp ;Reprint the prompt [Toad Hall] + lhld cmdptr ;Get the pointer into the buffer. + mvi a,'$' ;Put a $ there for printing. + mov m,a + lhld cmcptr + dcx h ;Decrement and save the buffer pointer. + shld cmcptr + lxi d,cmdbuf + call prtstr + jmp repars ;Reparse everything. + +cmky31: cpi esc ;Is it an escape? + jnz cmky35 + xra a + sta cmaflg ;Turn off the action flag. + push d + push b + push h + call cmambg + jmp cmky32 ;Not ambiguous. + mvi c,conout + mvi e,bell + call bdos ;Ring the bell. + lhld cmcptr ;Move the pointer to before the escape. + dcx h + shld cmcptr + shld cmdptr + lxi h,cmccnt ;Get the char count. + dcr m ;Decrement it by one. + pop h + pop b + pop d + inr e ;Increment the left to parse char count. + jmp cmkey3 + +cmky32: lhld cmcptr ;Pointer into buffer. + dcx h ;Backup to the escape. + xchg + pop h + push h +cmky33: mov a,m ;Get the next char. + cpi '$' ;Finished? + jz cmky34 + inx h + xchg + mov m,a ;Move it into the buffer. + inx h + xchg + lda cmccnt ;Increment the char count. + inr a + sta cmccnt + jmp cmky33 + +cmky34: lda cmccnt ;Get the character count. + inr a ;Increment and save it. + sta cmccnt + xchg ;Put the command buffer pointer in HL. + mvi a,' ' ;Get a blank. + mov m,a ;Put it in the command buffer. + inx h ;Increment the pointer + shld cmcptr ;Save the updated pointer. + shld cmdptr + pop h + push h + xchg + call prtstr ;Print the rest of the keyword. + mvi c,conout + mvi e,' ' + call bdos ;Print a blank. + pop h + pop b + pop d + jmp cmky37 + +cmky35: push h + push d + call cmambg + jmp cmky36 + lxi d,cmer01 + call prtstr ;Say its ambiguous. + jmp prserr ;Give up. + +cmky36: pop d + pop h +cmky37: inr e ;Add one incase it is negative. + mvi d,0 + dad d ;Increment past the keyword. + inx h ;Past the $. + mov e,m ;Get the data. + inx h + mov d,m + mov a,e + jmp rskp + +cmkey4: cpi 'a' ;Is it less than a? + jm cmky41 ;If so don't capitalize it. + cpi 'z'+1 ;Is it more than z? + jp cmky41 ;If so don't capitalize it. + ani 137O ;Capitalize it. +cmky41: mov d,m ;Get the next char of the keyword. + inx h + cmp d ;Match? + jz cmkey3 ;If so get the next letter. + +cmkey5: mvi d,0 + mov a,e ;Get the number of chars left. + ora a ;Is it negative? + jp cmky51 + mvi d,0FFH ;If so, sign extend. +cmky51: dad d ;Increment past the keyword. + lxi d,0003H ;Plus the $ and data. + dad d + shld cmkptr + dcr b ;Decrement the number of entries left. + lhld cmsptr ;Get the old cmdptr. + shld cmdptr ;Restore it. +;* check so we don't pass it. + jmp cmkey2 ;Go check the next keyword. +; +; Test keyword for ambiguity. +; returns: nonskip if ambiguous, skip if OK. +; called by: cmkeyw + +cmambg: dcr b ;Decrement the number of entries left. + rm ;If none left then it is not ambiguous. + inr e ;This is off by one;adjust. + mov c,e ;Save the char count. + mov a,e + ora a ;Any chars left? + rz ;No, it can't be ambiguous. + mvi d,0 + dad d ;Increment past the keyword. + mvi e,3 ;Plus the $ and data. + dad d + mov b,m ;Get the length of the keyword. + inx h + xchg + lhld cmkptr ;Get pointer to keyword entry. + mov a,m ;Get the length of the keyword. + sub c ;Subtract how many left. + mov c,a ;Save the count. + cmp b + jz cmamb0 + rp ;If larger than the new word then not amb. +cmamb0: lhld cmsptr ;Get the pointer to what parsed. +cmamb1: dcr c ;Decrement the count. + jm rskp ;If we are done then it is ambiguous. + xchg ;Exchange the pointers. + mov b,m ;Get the next char of the keyword + inx h + xchg ;Exchange the pointers. + mov a,m ;Get the next parsed char. + inx h + cpi 'a' ;Is it less than a? + jm cmamb2 ;If so don't capitalize it. + cpi 'z'+1 ;Is it more than z? + jp cmamb2 ;If so don't capitalize it. + ani 137O +cmamb2: cmp b ;Are they equal? + rnz ;If not then its not ambiguous. + jmp cmamb1 ;Check the next char. +; +; cmofil - parse output filespec +; cmifil - parse input filespec +; here from: comnd + +cmofil: mvi a,0 ;Don't allow wildcards. +; jmp cmifil ;For now, the same as CMIFI. +cmifil: sta cmfwld ;Set wildcard flag + xchg ;Get the fcb address. + shld cmfcb ;Save it. + mvi e,0 ;Initialize char count. + mvi m,0 ;Set the drive to default to current. + inx h + shld cmfcb2 + xra a ;Initialize counter. +cmifi0: mvi m,' ' ;Blank the FCB. + inx h + inr a +; cpi 0CH ;Twelve? [5a dont use this] + cpi 0Bh ; [majoc 850585] Eleven? + jm cmifi0 +cmif0a: ;[MF]Zero entire fcb, not just the extent + mvi m,0 ; [majoc 850507] Specify extent 0 + inx h ;[MF]Increment fcb byte pointer + inr a ;[MF]Increment fcb byte count + cpi 32 ;[MF]Done with fcb? + jm cmif0a ;[MF]No, zero until done +cmifi1: call cmgtch ;Get another char. + ora a ;Is it an action character? + jp cmifi2 + ani 7FH ;Turn off the action bit. + cpi '?' ;A question mark? + jnz cmif12 + lda cmfwld ;[pcc006] Wildcards allowed? + ora a ;[pcc006] + jz cmif11 ;[pcc006] complain if not + lhld cmdptr ;[jd] Increment buffer pointer + inx h ;[jd] that was decremented in cmgtch + shld cmdptr ;[jd] since we want this chr + lda cmcptr ;[pcc006] get lsb of real input pointer + cmp l ;[pcc006] is this the last chr input? + jnz cmif1a ;[pcc006] no, don't reset action flag + xra a ;[pcc006] yes, reset action flag + sta cmaflg ;[pcc006] +cmif1a: mvi a,'?' ;[pcc006] get it back in A + jmp cmifi8 ;Treat like any other character + +cmif12: cpi esc ;An escape? + jnz cmif13 +;Try to recognize file-spec a'la TOPS-20 + xra a + sta cmaflg ;Turn off the action flag. + lhld cmcptr ;Move the pointer to before the escape. + dcx h + shld cmcptr + shld cmdptr + lxi h,cmccnt ;Get the char count. + dcr m ;Decrement it by one. + mov a,e ;Save character count up to now. + sta temp1 + cpi 9 ;Past '.'? + jm cmfrec ;No. + dcr a ;Yes, don't count point. +cmfrec: lhld cmfcb2 ;Fill the rest with CP/M wildcards. +cmfrc1: cpi 11 ;Done? + jp cmfrc2 ;Yes. + mvi m,'?' + inx h + inr a + jmp cmfrc1 + +cmfrc2: mvi c,sfirst ;Find first matching file? + lhld cmfcb + xchg + call bdos + cpi 0FFH + jz cmfrc9 ;No, lose. + lxi h,fcbblk ;Copy first file spec. + call fspcop + lxi h,fcbblk+10H ;Get another copy (in case not ambiguous). + call fspcop + mvi c,snext ;More matching specs? + lhld cmfcb + xchg + call bdos + cpi 0FFH + jz cmfrc3 ;Only one. + lxi h,fcbblk+10H ;Copy second file spec. + call fspcop +cmfrc3: lxi d,fcbblk ;Start comparing file names. + lxi h,fcbblk+10H + lda temp1 ;Bypass characters typed. + cpi 9 ;Past '.'? + jm cmfrc4 ;No. + dcr a ;Yes, don't count point. +cmfrc4: mvi c,0 +cmfrl1: cmp c ;Bypassed? + jz cmfrl2 ;Yes. + inx d + inx h + inr c + jmp cmfrl1 ;Repeat. + +cmfrl2: mov a,c ;Get file name characters processed. + cpi 11 ;All done? + jz cmfrc5 ;Yes. + cpi 8 ;End of file name? + jnz cmfrl3 ;No. + lda temp1 ;Exactly at point? + cpi 9 + jz cmfrl3 ;Yes, don't output a second point. + mvi a,'.' ;Output separator. + call cmfput +cmfrl3: ldax d ;Get a character from first file spec. + inx d + mov b,m ;Get from second file spec. + inx h + cmp b ;Compare. + jnz cmfrc5 ;Ambiguous. + inr c ;Same, count. + cpi ' ' ;Blank? + jz cmfrl2 ;Yes, don't output. + call cmfput ;Put character into buffer. + jmp cmfrl2 ;Repeat. + +cmfrc5: mov a,c ;Get count of characters processed. + sta temp1 ;Save it. + mvi a,'$' ;Get terminator. + call cmfput ;Put it into buffer. + lhld cmdptr ;Output recognized characters. + xchg + mvi c,prstr + call bdos + lhld cmcptr ;Remove terminator from buffer. + dcx h + shld cmcptr + lxi h,cmccnt + dcr m + lda temp1 ;Characters processed. + cpi 11 ;Complete file name. + jz repars ;Yes, don't beep. + +cmfrc9: mvi c,conout + mvi e,bell + call bdos ;Ring the bell. + jmp repars +; +; Continue file spec parsing. + +cmif13: mov a,e ;It must be a terminator. + ora a ;Test the length of the file name. + jz cmifi9 ;If zero complain. + cpi 0DH + jp cmifi9 ;If too long complain. + jmp rskp ;Otherwise we have succeeded. + +cmifi2: cpi '.' + jnz cmifi3 + inr e + mov a,e + cpi 1H ;Any chars yet? + jz cmifi9 ;No, give error. + cpi 0AH ;Tenth char? + jp cmifi9 ;Past it, give an error. + mvi c,9H + mvi b,0 + lhld cmfcb + dad b ;Point to file type field. + shld cmfcb2 + mvi e,9H ;Say we've gotten nine. + jmp cmifi1 ;Get the next char. + +cmifi3: cpi ':' + jnz cmifi4 + inr e + mov a,e + cpi 2H ;Is it in the right place for a drive? + jnz cmifi9 ;If not, complain. + lhld cmfcb2 + dcx h ;Point to previous character. + mov a,m ;Get the drive name. + sui '@' ;Get the drive number. + shld cmfcb2 ;Save pointer to beginning of name field. + mvi m,space ;[obs] restore a space in FCB + dcx h ;Point to drive number. + mov m,a ;Put it in the fcb. + mvi e,0 ;Start character count over. + jmp cmifi1 + +cmifi4: cpi '*' + jnz cmifi7 + lda cmfwld ;Wildcards allowed? + cpi 0 + jz cmif11 ;No,complain + mov a,e + cpi 8H ;Is this in the name or type field? + jz cmifi9 ;If its where the dot should be give up. + jp cmifi5 ;Type. + mvi b,8H ;Eight chars. + jmp cmifi6 + +cmifi5: mvi b,0CH ;Three chars. +cmifi6: lhld cmfcb2 ;Get a pointer into the FCB. + mvi a,'?' + mov m,a ;Put a question mark in. + inx h + shld cmfcb2 + inr e + mov a,e + cmp b + jm cmifi6 ;Go fill in another. + jmp cmifi1 ;Get the next char. + +cmifi7: cpi '!' ;[pcc007] control chr or space? + jm cmifi9 ;[pcc007] yes, illegal + mov h,a ;[5] stash input char for a bit + lda ffussy ;[5] while we check the fussy flag + ora a ;[5] set the flags accordingly + mov a,h ;[5] restore the input character + jz cmif7a ;[5] if ffussy=0, allow <>.,;:?*[] +;[5] So far, we've eliminated "action characters" (including question), +;[5] period, colon, asterisk, control characters, and space. +;[5] That leaves us %(),/;<=>[\]_| to check for. + cpi '%' ;[5] + jz cmifi9 ;[5] + cpi '(' ;[5] + jz cmifi9 ;[5] + cpi ')' ;[5] + jz cmifi9 ;[5] + cpi ',' ;[pcc007] weed out comma + jz cmifi9 ;[pcc007] + cpi '/' ;[5] + jz cmifi9 ;[5] + cpi '9'+1 ;[pcc007] anything else 21H-39H is ok + jm cmifi8 ;[pcc007] except '*' never gets here + cpi '@' ;[pcc007] all of 3AH-3FH is illegal + jm cmifi9 ;[pcc007] + cpi '[' ;[pcc007] [\] also illegal + jm cmifi8 ;[pcc007] + cpi ']'+1 ;[pcc007] + jm cmifi9 ;[pcc007] + cpi '_' ;[5] + jz cmifi9 ;[5] (If I was doing CP/M, I would have + cpi '|' ;[5] just eliminated all them funny chars + jz cmifi9 ;[5] instead of a random selection) +cmif7a: ;[5] + cpi 'a' ;[pcc007] if not lower case its ok + jm cmifi8 ;[pcc007] (DEL never gets here) + cpi 'z'+1 ;[pcc007] only convert letters + jp cmifi8 ;[pcc007] + ani 137O ;Capitalize. +cmifi8: lhld cmfcb2 ;Get the pointer into the FCB. + mov m,a ;Put the char there. + inx h + shld cmfcb2 + inr e + jmp cmifi1 + +cmifi9: lda cmstat + cpi cmifin ;"silent"? + jz r ;Yes,let him go w/o check + lxi d,cmer02 +cmif10: mvi c,prstr + call bdos + ret + +cmif11: lxi d,cmer03 ;Complain about wildcards. + jmp cmif10 + +; + +; copy filename from buffer +; called with HL = destination, A = position (0-3) in buffer +; called by: cmifil + +fspcop: push psw ;Save A. + lxi d,buff ;Get the right offset in the buffer. + rlc + rlc + rlc + rlc + rlc + add e + inr a ;Bypass drive spec. + mov e,a + mvi b,11 ;Copy file name. +fspcp1: ldax d + inx d + mov m,a + inx h + dcr b + jnz fspcp1 + pop psw ;Restore A. + ret + +; append character in A to command buffer +; called by: cmifil + +cmfput: push h ;Save H. + lhld cmcptr ;Get buffer pointer. + mov m,a ;Store in buffer. + inx h + shld cmcptr + lxi h,cmccnt ;Count it. + inr m + pop h ;Restore H. + ret +; +; Read characters from the command buffer. +; called by: cmtext, cmcfrm, cmkeyw, cmifil + +cmgtch: push h + push b +cmgtc1: lda cmaflg + ora a ;Is it set. + cz cminbf ;If the action char flag is not set get more. + lhld cmdptr ;Get a pointer into the buffer. + mov a,m ;Get the next char. + inx h + shld cmdptr + cpi ' ' ;Is it a space? + jz cmgtc2 + cpi tab ;Or a tab? + jnz cmgtc3 +cmgtc2: lda cmsflg ;Get the space flag. + ora a ;Was the last char a space? + jnz cmgtc1 ;Yes, get another char. + mvi a,0FFH ;Set the space flag. + sta cmsflg + mvi a,' ' + pop b + pop h + jmp cmgtc5 + +cmgtc3: push psw + xra a + sta cmsflg ;Zero the space flag. + pop psw + pop b + pop h + cpi esc + jz cmgtc5 + cpi '?' ;Is the user curious? + jz cmgtc4 + cpi cr + jz cmgtc4 + cpi lf + jz cmgtc4 + cpi ff + rnz ;Not an action char, just return. +cmgtc4: push h + lhld cmdptr + dcx h + shld cmdptr + pop h +cmgtc5: ori 80H ;Make the char negative to indicate it is + ret ;a terminator. +; +; Read characters from console into command buffer, processing +; editing characters (^H, ^M, ^J, ^L, ^U, ^X, ?, del). +; called by: comnd, cmgtch + +cminbf: push psw + push d + push h + lda cmaflg ;Is the action char flag set? + ora a + jnz cminb9 ;If so get no more chars. +cminb1: lxi h,cmccnt ;Increment the char count. + inr m + mvi c,conin ;Get a char. + lda cmqflg ;[MF]but do we want it echoed? + ora a ;[MF]... + jz cmin1b ;[MF]Yup, proceed normally +cmin1c: mvi e,0ffH ;[MF]Nope, do it with Direct + mvi c,dconio ;[MF]Console I/O + call bdos ;[MF]... + ora a ;[MF]Did the user type anything? + jz cmin1c ;[MF]No, don't go on until he/she does. + jmp cmin1a ;[MF]We got a character +cmin1b: call bdos +cmin1a: lhld cmcptr ;Get the pointer into the buffer. + mov m,a ;Put it in the buffer. + inx h + shld cmcptr + cpi 25O ;Is it a ^U? + jz cmnb12 ;Yes. + cpi 30O ;Is it a ^X? + jnz cminb2 +cmnb12: call clrlin ;Clear the line. + call prprmp ;Print the prompt [Toad Hall] + lxi h,cmdbuf + shld cmcptr ;Reset the point to the start. + lxi h,cmccnt ;Zero the count. + mvi m,0 + jmp repars ;Go start over. + +cminb2: cpi 10O ;Backspace? + jz cminb3 + cpi del ;or Delete? + jnz cminb4 + lda cmqflg ;[MF]If we are echoing characters, + ora a ;[MF]... + cz delchr ;Print the delete string. [MF] +cminb3: lda cmccnt ;Decrement the char count by two. + dcr a + dcr a + ora a ;Have we gone too far? + jp cmnb32 ;If not proceed. + mvi c,conout ;Ring the bell. + mvi e,bell + call bdos + jmp cmnb12 ;Go reprint prompt and reparse. + +cmnb32: sta cmccnt ;Save the new char count. + lda cmqflg ;[MF]Echoing characters? + ora a ;[MF]If we are, then + cz clrspc ;Erase the character. [MF] + lhld cmcptr ;Get the pointer into the buffer. + dcx h ;Back up in the buffer. + dcx h + shld cmcptr + jmp repars ;Go reparse everything. + +cminb4: cpi '?' ;Is it a question mark. + jz cminb6 + cpi esc ;Is it an escape? + jz cminb6 + cpi cr ;Is it a carriage return? + jz cminb5 + cpi lf ;Is it a line feed? + jz cminb5 + cpi ff ;Is it a formfeed? + jnz cminb8 ;no - just store it and + ;test if buffer overflowing, else get another character. + call clrtop +cminb5: lda cmbflg ;[MF]Allowing initial blank word (<cr>)? + ora a ;[MF]... + jnz cminb6 ;[MF]Yes + lda cmccnt ;Have we parsed any chars yet? + cpi 1 + jz prserr ;If not, just start over. +cminb6: mvi a,0FFH ;Set the action flag. + sta cmaflg + jmp cminb9 + +cminb8: + lda cmccnt ; get the command character count + cpi cmbufl ; check for comand buffer length + jm cminb1 ; if less, then all ok + mvi e,bell ; else beep at user + call outcon ; send it to the console + lda cmccnt ; back up one character + dcr a + sta cmccnt + lhld cmcptr ; ditto pointer + dcx h + shld cmcptr ; save it again + jmp cminb1 ; and try again + +cminb9: pop h + pop d + pop psw + ret +; +;Little utility to print the prompt. (We do a LOT of these.) [Toad Hall] +;Enters with nothing. +;Destroys HL (and I suppose B and DE and A). + +prprmp: mvi e,cr ; do a cr first + mvi c,dconio + call bdos + lhld cmprmp ;Get the prompt. + xchg + call prtstr + ret + +; Little code to allow some expansion of code without changing +; every futher address, only up to the end of this file. +; TO BE REMOVED FOR RELEASE! + +; org ($+100h) AND 0FF00H + + +IF lasm +LINK CPSUTL +ENDIF ;lasm [Toad Hall] diff --git a/cpscom.asm b/cpscom.asm new file mode 100644 index 0000000..7f2a57a --- /dev/null +++ b/cpscom.asm @@ -0,0 +1,1371 @@ +; CPSCOM.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 file contains some of the main loop commands, all SET xxx and +; status routines. File split from CPSMIT.ASM as that file +; was getting too big. +; +; revision history: +; +;edit 13, 25-Mar-1991 by MF. Require confirmation if a STAY command +; (code at "noexit") is given and a question-mark is entered. +;edit 12, 21-Mar-1991 by MF. Change SET COLLISSION REPLACE to +; SET COLLISION OVERWRITE to conform with C-Kermit. Modify SET COLLISION +; help text slightly. + +;edit 11, 27-Feb-1991 by MF. Show Kermit version in VERSION command +; ("shover"). +;edit 10, 12-Feb-1991 by MF. Modified OUTPUT command to get a "confirm" +; after accepting the string to be output so that the OUTPUT command +; doesn't immediately execute if a terminator other than <cr> is typed +; (immediate execution confuses some users new to Kermit). This +; situation should seldom, if ever, occur, as the OUTPUT command +; is most likely to be executed in a TAKE-file but one should +; protect oneself, shouldn't one? +; Also commented out case-sensivity code as it is unlikely to be used. +;edit 9, 4-Dec-1990 by MF. Add "stautr" routine to display Autoreceive +; status in SHOW/STATUS/<ESC>S commands. +;edit 8, 30-Nov-1990 by MF. Modify routine "statvt" (terminal status) to +; display setting of "quiet" switch. Although I presume that Mr. +; Schou thought the code would accommodate display of QUIET or +; REGULAR, the code does not in fact allow this since the emulation +; flag is not involved in the "quiet" setting. +; Also fix SET TERMINAL's help text a bit. +;edit 7, 8-Nov-1990 by MF. In SET {RECEIVE/SEND} PACKET-LENGTH routines, +; call utility routine subbc from CPSUTL.ASM to do 16-bit subtraction +; rather than doing it in-line to save a few bytes. Eliminate +; commented-out instructions. +;edit 6, 1-Nov-1990 by MF. Changed SET BAUD-RATE to SET SPEED in the quest +; for uniformity of nomenclature (per request of FDC). +;edit 5, 17-Oct-1990 by MF. Change SET {RECEIVE SEND} PACKET-SIZE to +; SET {RECEIVE SEND} PACKET-LENGTH to conform with the nomenclature +; suggested in Chapter 10 of the 6th edition of the Kermit Protocol +; Manual. +;edit 4, 14-Sep-1990 by MF. Implemented SET FILE-COLLISION (SET COLLISION) +; command (except for SET COLLISION ASK and SET COLLISION APPEND). +; How one APPENDs to a CP/M file depends upon whether it's ASCII or +; BINARY -- something we may not know. +; Also implemented SET INCOMPLETE-FILE command. +; Let's also restore SET FILE-MODE DEFAULT: I never use it but if +; we leave the DEFAULT code, as Version 4.09 does, the user is entitled +; to be able to select it if he/she wishes (I'd favor getting rid +; of it altogether but as soon as I did that, someone'd come out +; of the woodwork and complain vehemently that he/she **likes** +; SET FILE-MODE DEFAULT and would the so-and-so who took it out +; please put it back in. Such is life. In any case, the user can +; always set the file-mode from a take-file. +;edit 3, 9-Sep-1990 by MF. Implemented setting of packet sizes for +; packets up thru length 94 characters for SEND and RECEIVE. Even +; for standard-length packets, variable sizes are useful. +; Correct 16-bit subtraction in stspks/strpks to set carry if needed +; Also corrected bug in routine getnp wherein a JMP KERMIT +; instruction was left out after trying to parse a confirm, thus +; skipping loading of number into HL. +; Fixed bug in PRTSTR wherein BC/HL were not saved under certain +; conditions, thus causing garbage to appear when PRTSTR was +; called with QUIETD set. +; edit 2, September 10, 1987, by OBSchou. Changed SET IBM to reset the +; flow control flag. IBMs use 13h as a turnaround character (so they +; say) so no flow control. Anybody willing to add comments etsc, as I +; have NO IDEA what IBMs do or need. +; Also removed the SET FILE-MODE DEFAULT option, as it always causes +; so much trouble. Assume the default mode to be ASCII. Moved a test +; for key pressed from the status routine to the CPSUTL file. +; +; edit 1, April 8th, 1987. +; Hived off the SET command etc from CPSMIT.ASM to +; make a more manageable file + + +comver: db 'CPSCOM.ASM (13) 25-Mar-1991$' ;name, edit no. and date +; +; +; This is the SET command. + +setcom: lxi d,settab ;Parse a keyword from the set table. + lxi h,sethlp + call keycmd + xchg ; Get result (dispatch address) into HL + pchl ; Dispatch. + +settab: db 26 ;[pcc013] 16 entries [Toad Hall] [9], now 17 + ;[11] removed XMIT and added CASE and FLOW-CTL + ; Value is address of processing routine. + ;[14] removed SET CASE-SENSITIVE for now + ;[DRJ] Added SET USER. settab = 22 + ;[OBS] Added SET AUTORECEIVE. + ; and SET NO-EXIT. settab = 24 + ;[MF]Added SET COLLISION, settab=25 + ;[MF]Added Set Incomplete settab=26 + db 11, 'AUTORECEIVE$' + dw setaut + db 16, 'BLOCK-CHECK-TYPE$' + dw blkset + db 11, 'BUFFER-SIZE$' + dw setbuf +; db 14, 'CASE-SENSITIVE$' ;[10] +; dw setcase ;[10] + db 9,'COLLISION$' ;[MF] + dw setcol ;[MF] + db 5, 'DEBUG$' + dw setdbg + db 12, 'DEFAULT-DISK$' + dw setdisk + db 19, 'DIRECTORY-FILE-SIZE$' + dw hidef + db 6, 'ESCAPE$' + dw escape + db 9, 'FILE-MODE$' + dw setcpm + db 12, 'FLOW-CONTROL$' ;[10] + dw setflo ;[10] + db 3, 'IBM$' + dw ibmset + db 16,'INCOMPLETE-FILES$' + dw setinc ;[MF]Set Incomplete + db 10, 'LOCAL-ECHO$' + dw locall + db 7, 'LOGGING$' ;[pcc013] + dw setlog ;[pcc013] + db 7, 'NO-EXIT$' + dw noexit + db 6, 'PARITY$' + dw parset + db 4, 'PORT$' + dw prtset + db 7, 'PRINTER$' + dw setprn + db 7, 'RECEIVE$' ;[gnn] + dw setrec ;[gnn] + db 4, 'SEND$' ;[gnn] + dw setsnd ;[gnn] + db 5, 'SPEED$';[MF] + dw baud + db 7, 'TACTRAP$' + dw settac + db 8, 'TERMINAL$' + dw vt52em + db 5, 'TIMER$' + dw settim + db 4, 'USER$' ;[DJR] + dw user ;[DJR] + db 7, 'WARNING$' + dw filwar + +; help message for SET command. Caps indicate keywords + +sethlp: db cr,lf,'AUTORECEIVE to automatically re-receive files' + db cr,lf,'BLOCK-CHECK-TYPE for error detection' + db cr,lf,'BUFFER-SIZE for multi-sector buffering' +; db cr,lf,'CASE-SENSITIVE to equate lower and upper case' ;[10] + db cr,lf,'COLLISION to specify action for filename conflicts' + db cr,lf,'DEBUG message control' + db cr,lf,'DEFAULT-DISK to receive data' + db cr,lf,'DIRECTORY-FILE-SIZE when displaying directories' + db cr,lf,'ESCAPE character during CONNECT' + db cr,lf,'FILE-MODE for outgoing files' + db cr,lf,'FLOW-CONTROL to set XON/XOFF flow control' ;[10] + db cr,lf,'IBM mode: parity and turn around handling' + db cr,lf,'INCOMPLETE-FILE disposition' + db cr,lf,'LOCAL-ECHO (half-duplex)' + db cr,lf,'LOGGING of terminal sessions' ;[pcc013] + db cr,lf,'NO-EXIT to prevent exit to CP/M after a command tail' + db cr,lf,'PARITY for communication line' + db cr,lf,'PORT to communicate on' + db cr,lf,'PRINTER copy control' + db cr,lf,'RECEIVE parameters' ;not all currently implemented + db cr,lf,'SEND parameters' ;Ditto + db cr,lf,'SPEED of communication line' + db cr,lf,'TAC interface support' + db cr,lf,'TERMINAL to set a terminal type' + db cr,lf,'TIMER control' + db cr,lf,'USER to set a user number' ;[DJR] + db cr,lf,'WARNING for filename conflicts' + db '$' + +; +; SET AUTORECEIVE on/off command +setaut: call onoff ; set it either on or off + sta autorc ; and save the flag + jmp kermit ; and do next command + +;SET BLOCK-CHECK-TYPE command. + +blkset: lxi d,blktab ;Get the address of the block-check table + lxi h,blkhlp ;And the address of the help text + call chkkey ;Go check input (val returns in A). + sta chktyp ;Save desired checksum type + jmp kermit ;Go get another command + +blktab: db 3 ;Three entries. + db 20, '1-CHARACTER-CHECKSUM$', '1','1' + db 20, '2-CHARACTER-CHECKSUM$', '2','2' + db 21, '3-CHARACTER-CRC-CCITT$', '3','3' + +blkhlp: db cr,lf,'1-CHARACTER-CHECKSUM' + db cr,lf,'2-CHARACTER-CHECKSUM' + db cr,lf,'3-CHARACTER-CRC-CCITT$' + +; +; This is the SET BUFFER-SIZE command. +; Sets to maximum number of sectors to use for multiple sector +; buffering. Sorts a lot f problems on some slow disc-access machines.. +setbuf: mvi a,cmnum ; get a number from the user + call comnd + jmp kermit ; error if nothing + lhld number ; get the value + mov a,h + ana a + jnz setbu1 ; if number greater than 255 then error + lda maxbsc ; get maximum no sectors allowed by system + cmp l ; set flags from a-l + jm setbu1 ; if l > a then error + mov a,l ; only ls bits used + sta bufsec + jmp kermit + +setbu1: lxi d,erms25 + call prtstr + jmp kermit + + +;SET DEFAULT DISK command + +setdisk:lxi d,fcb + mvi a,cmifin ;get "file-spec" silently + call comnd + jmp setdi1 +setdi1: lda fcb + ora a ;Was a drive specified? (if zero, no) + jnz setdi2 ;he typed a drive-spec + lda curdsk ;he didn't - give him default +setdi2: sta curdsk + mvi c,inbdos ;reset disks + call bdos + lda curdsk + dcr a ;LOGDSK is relative 0 + mov e,a + mvi c,logdsk + call bdos ;and "LOG" it + jmp kermit ;all done +; +;SET SEND command. Sort of supported + +setsnd: lxi d,stsntb ;Parse a keyword from the set send table. + lxi h,stshlp + call keycmd + xchg ; Get dispatch address into HL + pchl ; Go for it. + +stsntb: db 4 ;Two entries. four entries + db 8, 'PAD-CHAR$' + dw stspac + db 7, 'PADDING$' + dw stspad + db 15, 'START-OF-PACKET$' ;[gnn] + dw stssop ;[gnn] + db 13,'PACKET-LENGTH$' ; + dw stspks ; +; db 9,'CHECKTYPE$' ; +; dw stsckt ; + +stshlp: db cr,lf,'PAD-CHAR to define the pad character to use' + db cr,lf,'PADDING to define the number of PAD-CHAR to use' + db cr,lf,'START-OF-PACKET to define the start of packet character' ;[gnn] + db cr,lf,'PACKET-LENGTH for the length of transmitted packet'; +; db cr,lf,'CHECKTYPE to define the check-type to use';[21] + db '$' ;[gnn] + +; SET SEND START-OF-PACKET [gnn] +stssop: call cfmcmd + lxi d,sopmes + call prtstr + mvi c,conin + call bdos + sta sndsop + jmp kermit + +; SET SEND PADDING command. does nothing. get value to dspad +stspad: call getnp ; get the number of padding characters + sta dspad ; save ad default send no. pad characters + jmp kermit + +; SET SEND PAD-CHAR command. does nothing. gets char to dspadc +stspac: call getpad ; get the character to use + sta dspadc ; save as default send pad character + jmp kermit + +; SET SEND PACKET-LENGTH command. Max 95, but could be more for long pkts... +stspks: call getnp ; get number into hl + lxi b,(maxpkt-1) ;[MF] One below upper limit of packet-size + push h ;[MF] Save number + call subbc ;[MF] Do 16-bit subtraction, even though + ;[MF] getnp puts low-order bits in a, + ;[MF] in case long packets are + ;[MF] implemented + pop h ;[MF] Restore number + lxi d,erms26 ; packet length to long error + jnc stspk1 + mov a,l + sta spsiz ;[MF] Save as default send packet length + jmp kermit +stspk1: call prtstr + jmp kermit ; error exit + +; SET SEND CHECKTYPE command. Accepts 1,2 or 3 +stsckt: call getnp ; get a number + cpi 4 ; if more than 3 then error + jnz stsck1 +stsck2: lxi d,erms27 ; checktype wrong + jmp kermit +stsck1: cpi 0 ; error also for null + jz stsck2 + adi 30h ; make it printable + sta sdckt ; save as default send checktype + jmp kermit + + +;SET RECEIVE command. [gnn] +setrec: lxi d,strctb ;Parse a keyword from the set rec table. + lxi h,stshlp ; use same help for send and receive + call keycmd + xchg ; Get dispatch address into HL + pchl ; Go for it. + +strctb: db 4 ; Three entries. four entries + db 8, 'PAD-CHAR$' + dw strpac ; use dummy entry of set send + db 7, 'PADDING$' + dw strpad ; use dummy entry of set send + db 15,'START-OF-PACKET$' + dw strsop + db 13,'PACKET-LENGTH$' ; + dw strpks ; +; db 9,'CHECKTYPE$' ; +; dw strckt ; + +; SET RECEIVE START-OF-PACKET +strsop: call cfmcmd + lxi d,sopmes + call prtstr + mvi c,conin + call bdos + sta rcvsop + jmp kermit + +; SET RECEIVE PADDING +strpad: mvi a,cmnum ; go parse a number + call comnd ; get it + jmp kermit ; duff entry, so die + mvi a,cmcfm ; ask to confirm + call comnd + lhld number ; get the number of padding charaters + mov a,l ; assume 255 or less + sta dspad ; save ad default send no. pad characters + +; SET SEND RECEIVE routines +getpad: call cfmcmd + lxi d,padcms ; tell user we want the pad character + call prtstr + mvi c,conin ; get it verbatum + call bdos + ret + +; SET RECEIVE PAD-CHAR routine +strpac: call getpad ; get the character to use + sta drpadc ; save it + jmp kermit + +; SET RECEIVE PACKET-LENGTH. Max 95, but could be more for long pkts... +strpks: call getnp ; get number into hl + lxi b,(maxpkt-1) ;[MF] One below upper limit of packet-size + push h ;[MF] Save number + call subbc ;[MF] Do 16-bit subtraction, even though + ;[MF] getnp puts low-order bits in a, + ;[MF] in case long packets are + ;[MF] implemented + pop h ;[MF] Restore number + lxi d,erms26 ; packet length to long error + jnc strpk1 + mov a,l + sta rpsiz ;[MF] Save as default receive packet-length + jmp kermit +strpk1: call prtstr + jmp kermit ; error exit + + +; SET RECEIVE CHECKTYPE +strckt: call getnp ; get a number + cpi 4 ; if more than 3 then error + jnz strck1 +strck2: lxi d,erms27 ; checktype wrong + jmp kermit +strck1: cpi 0 ; error also for null + jz strck2 + adi 30h ; make it printable + sta rdckt ; save as default receive checktype + jmp kermit + +getnp: mvi a,cmnum ; go parse a number + call comnd ; get it + jmp kermit ; duff entry, so die + mvi a,cmcfm ; ask to confirm + call comnd + jmp kermit ;[MF] Die! + lhld number ; get the number of padding charaters + mov a,l ; assume 255 or less + ret ; return to caller + + +; SET NO-EXIT on/off. Sets a flag to prevent automatically dropping +; back to CPM after a command tail has been "done". No other use. +noexit: call cfmcmd ;[MF]Get a "confirm" in case here via STAY + xra a + sta nexitf ; no exit to CP/M + jmp kermit + +;[pcc013] +; This is the SET LOGGING ON/OFF subcommand + +setlog: call onoff ;[pcc013] Get on/off + sta logflg ;[pcc013] Store flag + jmp kermit +; +; This is the SET ESCAPE character subcommand. + +escape: call cfmcmd + lxi d,escmes ;Get the address of the escape message. + call prtstr + mvi c,conin ;Get the char. + call bdos + sta escchr ;Store the new escape character. + jmp kermit + +; This is the SET LOCAL-ECHO subcommand. + +locall: call onoff ;Get on/off setting [Toad Hall] + sta ecoflg ;Store local echo flag. + jmp kermit + +; This is the SET PRINTER ON/OFF subcommand + +setprn: call onoff ;Get on/off setting [Toad Hall] + sta prnflg ;Store printer flag + jmp kermit + +; This is the SET DEBUG ON/OFF subcommand + +setdbg: call onoff ;Get on/off setting [Toad Hall] + sta dbgflg ;Store debug flag + jmp kermit + +;[jd] this is the SET TIMER subcommand + +settim: call onoff ;Get on/off setting [Toad Hall] + sta timflg ;Store timer flag value + jmp kermit + +;This is the SET FILE-WARNING subcommand + +filwar: call onoff ;Get on/off setting [Toad Hall] + sta flwflg ;Store file-warning flag. + jmp kermit + +;[MF]This is the SET COLLISION subcommand +;[MF]First, the requisite tables: +; +coltab: db 4 ;[MF]4 entries + db 6,'BACKUP$',02h,02h + db 7,'DISCARD$',03h,03h + db 9,'OVERWRITE$',00h,00h + db 6,'RENAME$',01h,01h +; +colhlp: db cr,lf,'BACKUP (rename) existing files' + db cr,lf,'DISCARD new versions of existing files' + db cr,lf,'OVERWRITE existing files' + db cr,lf,'RENAME new versions of existing files' + db '$' +; +;[MF]Now the routine proper +; +setcol: lxi d,coltab ;[MF]Table address + lxi h,colhlp ;[MF]Help address + call chkkey ;[MF]Get user's answer + sta flwflg ;[MF]and remember it + jmp kermit ;[MF]Back to main loop + +;[10] This is the SET FLOW-CONTROL subcommand. +setflo: call onoff ;is it on or off + sta floctl ; store flow contol flag + jmp kermit + +;[10] SET CASE-SENSITIVE on or off +;setcase: +; call onoff ; set it on or off +; sta casens ; save it +; jmp kermit + +; SET FILE-SIZE on or off. If on, then show file size during DIR +; +hidef: call onoff ; see if on or off + sta hidefs + jmp kermit + +; +; This is the SET IBM command. +; +; If SET IBM ON, we should do +; 1) Flow Control = off +; 2) Parity = mark +; 3) Local echo = on +; 4) Timer = on +; +; If SET IBM OF, we should assume (& do) +; 1) Flow control = off (default) +; 2) Parity = none +; 3) Local Echo = off +; 4) Timer = off + + +ibmset: call onoff ;Get on/off setting [Toad Hall] + sta ibmflg ;Store IBM flag. + ora a ;Is it turned on? + jz ibmst1 ;If not, set parity to the default. +; +; SET IBM ON code + mvi a,ibmpar ;Get the IBM parity. + sta parity + mvi a,1 ;Set local echo on. + sta ecoflg + sta timflg ; also set timer on + xra a ; no flow control + sta floctl + jmp ibmst2 ; exit +; +; SET IBM OFF code + +ibmst1: mvi a,defpar ; set default parity (none) + sta parity + xra a ;Set local echo off. + sta ecoflg + sta timflg ;[jd] timer is same as local echo + sta floctl ;[obs] set flow control off +ibmst2: jmp kermit ; exit from here + +; +; SET FILE-MODE command. +;[OBS] assume only ascii and binary, no default. + +setcpm: lxi d,typtab + lxi h,typhlp + call chkkey ;Get and confirm keyword, or die trying + sta cpmflg ;Set the CPM flag. + jmp kermit + +typtab: db 3 ;Three entries, now two entries + ;[MF]Now 3 again! + db 5, 'ASCII$', 01H,01H + db 6, 'BINARY$', 02H,02H + db 7, 'DEFAULT$', 00H,00H ; Default + +typhlp: db cr,lf,'ASCII BINARY DEFAULT' + db '$' +; +;setinc - Set Incomplete-file [MF] +; +setinc: lxi d,inctab ;[MF]Point to tables + lxi h,inchlp ;[MF]... + call chkkey ;[MF]Get user's answer or croak + sta incflg ;[MF]Remember the answer + jmp kermit ;[MF]We are done. +; +inctab: db 2 ;two entries + db 7,'DISCARD$' + db 00h,00h ;Discard incomplete files + db 4,'KEEP$' + db 01h,01h ;Keep incomplete files +; +inchlp: db cr,lf,'DISCARD KEEP' + db '$' + +; This is the SET PARITY subcommand. + +parset: lxi d,partab + lxi h,parhlp + call chkkey ;Get and confirm keyword, or die trying + sta parity ;Set the parity flag. + jmp kermit + +partab: db 5 ;Five entries. + db 4, 'EVEN$', parevn,parevn + db 4, 'MARK$', parmrk,parmrk + db 4, 'NONE$', parnon,parnon + db 3, 'ODD$', parodd,parodd + db 5, 'SPACE$', parspc,parspc + +parhlp: db cr,lf,'EVEN MARK NONE ODD SPACE$' + +; This is the SET TACTRAP subcommand. +; options are ON, OFF, or CHARACTER. (for CHARACTER, we request the +; new TAC Intercept character, and turn the TACtrap on) + +settac: lxi d,tactab + lxi h,tachlp + call chkkey ;Get and confirm keyword + ora a ;Was it "OFF" (zero)? + jz settc2 ;If so, go disable TACtrap. + cpi 1 ;Was it "ON"? + jz settc1 ;If so, go enable TACtrap. + lxi d,tacmes ;"CHARACTER". request new TAC Intercept char. + call prtstr + mvi c,conin ;Get the char. + call bdos + sta tacchr ;Store the new TAC Intercept character. +settc1: lda tacchr ;Copy tacchr to tacflg to enable TACtrap. +settc2: sta tacflg ;Enable/disable TACtrap + jmp kermit + +tactab: db 3 ;Three entries. + db 9, 'CHARACTER$', 02H,02H + db 3, 'OFF$', 00H,00H + db 2, 'ON$', 01H,01H + +tachlp: db cr,lf,'ON to enable TAC trap' + db cr,lf,'OFF to disable TAC trap' + db cr,lf,'CHARACTER to enable TAC trap and' + db ' specify intercept character$' + +; This is the SET VT52-EMULATION subcommand. +; Now SET TERMINAL xxx +;vt52em: lda vtflg ;get the flag value +; cpi 0ffH ;0ffH means not allowed - +; jz notimp ; say it's not implemented. +; call onoff ;Get keyword (ON or OFF) +; sta vtflg ;Set the VT52 emulation flag. +; jmp kermit +vt52em: lxi d,sttert ; set terminal type + lxi h,stterh ; help table + call chkkey ; get it + mov a,d ; value returned in DE + cpi vtdefe ; was it selecting an external terminal? + jnz vt52e1 ; no, so save new value + lhld extern+1 ; if external, lets see if one is in place + mov a,h + ora l + mvi a,vtdefe ; restore external flag + jnz vt52e1 ; we have one, so we can save value + call prcrlf + lxi d,inms11 ; load up sorry message + call prtstr + jmp kermit + +vt52e1: cpi 40h ; are we to have a quiet display? + jnz vt52e2 + sta quietd ; store it + jmp kermit + +vt52e2: cpi 80h ; are we to be a noisy display? + jnz vt52e3 + xra a + sta quietd + jmp kermit + +vt52e3: sta vtflg ; else save new set parameter.. + jmp kermit ; and exit + +; tabe with string entry, and the returned value as two identical bytes. +sttert: db 6 ; six types + db 4,'DUMB$',vtdefd,vtdefd ; assume our terminal is thick + db 8,'EXTERNAL$',vtdefe,vtdefe ; assume off, but terminal is in dep. code + db 5,'QUIET$',40h,40h ; display quiet + db 7,'REGULAR$',80h,80h ; display loud + db 3,'OFF$',vtdefo,vtdefo ; assume our terminal does everything + db 4,'VT52$',vtdefv,vtdefv ; VT52 as before + +stterh: db cr,lf,'DUMB - only printable characters passed to terminal' + db cr,lf,'EXTERNAL - with emulation code system specific' + db cr,lf,'OFF - all characters passed to terminal' + db cr,lf,'QUIET - display nothing during transfers' + db cr,lf,'REGULAR - normal display for transfers' + db cr,lf,'VT52 - assume Kermit can emulate a VT52' + db '$' + +; +; Note: For the SET BAUD and SET PORT commands, which might not be +; supported for the current system, the command tables are stored in +; the overlay. We locate them through pointers in the linkage area: +; spdtab for SET BAUD, prttab for SET PORT. The contents of spdtab +; (or prttab) is the address of the beginning of the table (the table +; does NOT begin at spdtab). If the address is zero, the command is +; not supported. If the table address is nonzero, then there is a +; corresponding help message pointed to by (NOT starting at) spdhlp +; or prthlp. + +; This is the SET BAUD command + +baud: lhld spdtab ; get pointer to speed table + mov a,h + ora l ; test for NULL (zero) + jz notimp ; if so, say it's not implemented + xchg ; move speed table address to DE + lhld spdhlp ; get pointer to speed help text + call keycmd + push d ; save selected speed + call cfmcmd ; confirm... + pop h ; restore speed to HL + shld speed ; save all 16 bits of speed value + xchg ; move speed to DE + call sysspd ; do system-dependent speed setting. + jmp kermit ; return to command level + +; This is the SET PORT command + +prtset: lhld prttab ; get pointer to port table + mov a,h + ora l ; test for NULL + jz notimp ; not supported if pointer was null. + xchg ; move port table address to DE + lhld prthlp ; get pointer to port help text + call keycmd + push d ; save selected port entry + call cfmcmd ; confirm... + pop h ; restore table address to HL + shld port ;[hh] save all 16 bits of port value + call sysprt ; go do port stuff + jmp kermit +; +; Subroutines for SET subcommands + +; ontab - command table for onoff. +; onhlp - help text for onoff. +; onoff - accept "ON" or "OFF" keyword. +; returns: +; success: value in A (non-zero = ON) +; error: no return to caller. print error message and return to +; main loop. +ontab: db 2 ;Two entries. + db 3, 'OFF$', 00H,00H + db 2, 'ON$', 01H,01H + +onhlp: db cr,lf,'OFF ON$' + +onoff: lxi d,ontab + lxi h,onhlp + ;Fall through to check input. [Toad Hall] + +; chkkey - parse and confirm keyword. +; called with: +; DE/ address of keyword table +; HL/ address of help text +; returns: +; success: low byte of keyword value (from table) in A. +; error: no return to caller. print error message and return to +; main loop. (Since the main loop reloads the stack pointer, +; we don't have to attempt to clean up the stack here) + +chkkey: call keycmd ; Parse a keyword (might not return) + sta temp1 ; Save the parsed value + call cfmcmd ; Request confirmation (might not return) + lda temp1 ; Get saved value + ret ; Return + +;[hh] fndkyw - find a keyword string from a table using +; it's associated value +; called with: +; HL/ address of keyword table +; A/ value associated with keyword string +; returns: +; success: HL points to first byte of keyword string +; CY flag is cleared +; error: HL points to error string (?Not found) +; CY flag is set + +fndkyw: mov d,m ;get count of entries + inx h ;advance over count value +fndkw1: mov b,m ;get string length + inr b ;account for $ + inx h ;advance over length value + shld temp1 ;save string pointer +fndkw2: inx h ;loop over string + dcr b + jnz fndkw2 + mov c,m ;get keyword value from table + cmp c ;do they match? + jz fndkw3 ;Yup + inx h ;bump to next keyword + inx h ; + dcr d ;decrement entry count + jnz fndkw1 ;check the remaining keywords + lxi h,kywdnf ;point to not found message + stc ;give calling routine a not found flag + ret +fndkw3: ora a ;clear CY to tell caller we succeeded + lhld temp1 ;restore the saved string pointer + ret + +kywdnf: db cr,lf,'?Not found$' ;not found message + +; +; This is the SHOW command. + +show: call cfmcmd +;* Reconcile this and status. + call clrtop ;[hh] Clear screen first + call stat01 ;For now just cop out. + jmp kermit + +; This is the STATUS command. + +status: call cfmcmd + call clrtop ;[hh] Clear screen first + call stat01 + jmp kermit + +; processor for SHOW, STATUS and <escape>S commands +; called by: show, status, intchr + +stat01: lda fileio ;Are we in transmit? + ora a + jz sta01b ;No + lxi d,xmtst ;Yes,say so + call prtstr + +; The following block of code - down to RET - re-ordered by [DJR] +; DJR January 1987 to get SHOW/STATUS output in the same [DJR] +; (alphabetical) order as SET's HELP. [DJR] +sta01b: + call stautr ;[MF]Show AUTORECEIVE state + call stabcc ; Tell current block check type + call stabsz ; Tell user about multi-sector buffers + call stacol ;[MF]COLLISION state + call stadbg ; [DJR] Debug mode + call stacurd ; [DJR] Current disk + call stahfs ; Tell user if file sizez are hidden during DIR + call staesc ; Tell current escape character + call stafil ; Tell about file type + call staflo ;[10] Tell about flow control + call staibm ; Tell about IBM flag + call stainc ;[MF]Tell about incomplete file disposition +; +; Ask user to press a key before continuing +; + call pausit ; wait for a while till user presses a key +; + call staeco ; Tell about local echo flag + call stalog ; [pcc003] Tell about log file status + call stapar ; Tell about parity + lhld prttab ;[hh] Got a port table? (is pointer nonzero?) + mov a,h ;[hh] + ora l ;[hh] + cnz stapor ;[hh] If so, tell which port we're using + call stalpt ; Tell about printer copy flag + call starps ;[MF]Show receive packet length + call starsp ;[gnn] tell rec. start-of-pkt char + call stasps ;[MF]Show send packet length + call stassp ;[gnn] tell send start-of-pkt char + lhld spdtab ; Got a speed table? (is pointer nonzero?) + mov a,h + ora l + cnz staspd ; If so, tell what speed we're running. + call statac ; Tell about TAC flag/intercept character. + call statim ; Tell about timer flag + call stusr ;[7] Tell about user + call statvt ; Tell about what emulation we are doing + call stawrn ; Tell about file-warning flag + ret + +; stautr - Show Autoreceive setting [MF] +; +stautr: lxi d,autrst ;[MF]Point to "Autoreceive" string + call prtstr ;[MF]and print it + lda autorc ;[MF]Get Autoreceive flag + jmp staton ;[MF]Say "on" or "off" and return + +; Show the value of the LOCAL-ECHO flag (On or Off). + +staeco: lxi d,locst ;Get the address of the local echo string. + call prtstr + lda ecoflg ;Get the local echo flag. + jmp staton ;Say ON or OFF, and return + +; Show the value of the VT52-EMULATION flag (On, Off, or Not Supported). +; Also show terminal display mode (regular, quiet) + +statvt: lxi d,vtdpst ;[MF]Get address of terminal display string + call prtstr ;[MF]Print it + lxi d,vtdpsr ;[MF]Assume a regular (loud) display + lda quietd ;[MF]Get "quiet" flag + ora a ;[MF]a quiet display? + jz statva ;[MF]No, print "regular" message + lxi d,vtdpsq ;[MF]Yes, point to "quiet" string +statva: call prtstr ;[MF]and print it + lxi d,vtemst ; Get the address of the VT52 emulation string. + call prtstr + lda vtflg ; Get the VT52 emulation flag. + cpi 0ffh ; isterminal emulation possible? + jnz statv0 ; yes, maybe + lxi h,inms11 ; ... no, load up not implemented message ... + jmp prvtv ; so tell user + + +statv0: mov c,a ; save it to C + lxi h,sttert ; get table listing what we can do + mov b,m ; get number of terminal types to b +statv1: inx h ; point to first entry + mov e,m ; get length of entry + mvi d,0 + inx h ; point to text part of entry + xchg ; save address in de + dad d ; start + length + inx h ;... + 1 for the dollar... + inx h ; plus point to seconcd copy of ter. type value + cmp m ; is it the one we want? + jz prvtv ; yes, then print the terminal type value + dcr b ; have we completed? + rz ; yes, then just exit back to status + jmp statv1 ; else try next entry. HL points to next -1 + +prvtv: jmp prtstr ; print string from DE + ;[MF]and return + +; Show the value of the FILE-MODE flag (ASCII, Binary, or Default). + +stafil: lxi d,cpmst ; Get the address of the file mode message. + call prtstr + lda cpmflg ; Get the file mode flag. + lxi d,defstr ; Assume Default (0). + ora a ; Is it? + jz prtstr ; If so, say so, and return. + lxi d,ascstr ; Not default, assume ASCII + cpi 1 ; Is it ASCII? + jz prtstr ; Say ASCII, and return + lxi d,binstr ; Not default or ASCII, must be binary + jmp prtstr ; Print type, and return. +; +;Show current disposition for incomplete files [MF] +; +stainc: lxi d,incst ;[MF]Announce what's to be shown + call prtstr ;[MF]... + lxi d,dscstr ;[MF]Assume "discard" + lda incflg ;[MF]Get flag + ora a ;[MF]Really discarding incomplete files? + jz prtstr ;[MF]Yes, say so and return + lxi d,kepstr ;[MF]No, say we're keeping incomplete files + jmp prtstr ;[MF]and return + +; show if file sizes are hidden during DIR (Would have thought this +; obvious, but its in for completeness +stahfs: lxi d,hfsod ; get hide file size on dir + call prtstr + lda hidefs + jmp staton ; say if on or off + +; Show the value of the IBM-MODE flag (On or Off). + +staibm: lxi d,ibmst ;IBM string. + call prtstr + lda ibmflg ; Get IBM flag. + jmp staton ; Print its value and return + +; Show the value of the FILE-WARNING flag (On or Off). + +stawrn: lxi d,filst ; File warning string. + call prtstr + lda flwflg ; File warning flag. + jmp staton ; Say ON or OFF + +; Show the value of the PRINTER flag (On or Off). + +stalpt: lxi d,prst ;Printer copy string + call prtstr + lda prnflg ;Printer ON/OFF flag + jmp staton ; Say ON or OFF + + +; Show status of log file +stalog: lxi d,logst ;[pcc003] Logging lead-in message + call prtstr ;[pcc003] +; name of logging file +; Code derived from [JD's] code for GET, and uses his FNBUF [DJR] + lxi d,fnbuf ;[DJR] point to destination + lxi h,lognam ;[DJR] source of filespec + mov a,m ;[DJR] get drive byte + ora a ;[DJR] zero = default disc + jnz stalg1 ;[DJR] if drive has been specified + lda curdsk ;[DJR] otherwise get the default +stalg1: adi 'A'-1 ;[DJR] make it printable + stax d ;[DJR] into dest block + inx d ;[DJR] + mvi a,':' ;[DJR] colon after drive + stax d ;[DJR] + inx d ;[DJR] + + mvi c,8 ;[DJR] length of name part + lxi h,lognam+1 ;[DJR] start of name + mvi b,0 ;[DJR] first-time-thru flag +stalga: mov a,m ;[DJR] get a char from the name + inx h ;[DJR] pass it + cpi ' ' ;[DJR] end of this part of name? + jz stalgb ;[DJR] yes, skip rest... + stax d ;[DJR] else drop char into dest + inx d ;[DJR] increment dest ptr + dcr c ;[DJR] decrement count + jnz stalga ;[DJR] and continue if more to go + +stalgb: mov a,b ;[DJR] + ora a ;[DJR] first time thru? + jnz stalgc ;[DJR] no, no period + mvi a,'.' ;[DJR] period between parts + stax d ;[DJR] + inx d ;[DJR] + mvi b,0ffh ;[DJR] not first time thru anymore + mvi c,3 ;[DJR] length of ext part + lxi h,lognam+9 ;[DJR] start of extension + jmp stalga ;[DJR] keep copying + +stalgc: mvi a,'$' + stax d ;[DJR] end the name string + lxi d,fnbuf ;[DJR] Print the file name + call prtstr ;[DJR] + + lxi d,logst2 ;[DJR] second part of message + call prtstr ;[DJR] + +; Show status of logging + lda logflg ;[pcc003] get the flag + ani 7FH ;[pcc003] ignore open flag + cpi 2 ;[pcc003] is it suspended? + jnz staton ;[pcc003] no, must be on or off + lxi d,susstr ;[pcc003] suspended + jp prtstr ;[pcc003] print and return + +; Show the value of the PARITY flag (Odd, Even, Mark, Space, or None). + +stapar: lxi d,parst ;Parity string. + call prtstr + lda parity ;Get the parity setting. + lxi d,pnonst ;Assume parity is NONE + cpi parnon ;Were we right? + jz prtstr ;Yep, go say None, and return + lxi d,pmrkst ;Get ready to say Mark + cpi parmrk ;Is it mark? + jz prtstr ;Yep, go say Mark, and return + lxi d,pspcst ;Get ready to say Space + cpi parspc ;Is it space? + jz prtstr ;Yep, go say Space, and return + lxi d,poddst ;Get ready to say Odd + cpi parodd ;Is it odd? + jz prtstr ;Yep, go say Odd, and return + lxi d,pevnst ;Must be Even. + jmp prtstr ;Say Even, and return. + +; [gnn] Show start of packet characters +stassp: lxi d,sspmsg ;message of send s-o-p + call prtstr + lda sndsop + adi 'A'-1 ;convert to printable character + mov e,a + mvi c,conout + jmp bdos ;and print it +starsp: lxi d,rspmsg ;rec. s-o-p message + call prtstr + lda rcvsop + adi 'A'-1 ;convert to printable character + mov e,a + mvi c,conout + jmp bdos ;and print it +; +;[MF]Show receive packet length +; +starps: lxi d,rpsmsg ;[MF]Point to message + call prtstr ;[MF]and print it + lda rpsiz ;[MF]Get receive packet length + mov l,a ;[MF]Put in HL + mvi h,0 ;[MF]... + jmp nout ;[MF]Print receive packet length in decimal +; +;[MF]stasps - Print send packet length +; +stasps: lxi d,spsmsg ;[MF]Point to message + call prtstr ;[MF]and print it + lda spsiz ;[MF]Get send packet length + mov l,a ;[MF]into HL + mvi h,0 ;[MF]... + jmp nout ;[MF]and print in decimal + +;[hh] Show the current port (if known). + +stapor: lxi d,porst ;[hh] + call prtstr ;[hh] + lda port ;[hh] Get current port value + lxi h,spdust ;[hh] Assume undefined (this error msg is fine) + cpi 0FFH ;[hh] Is it? + jz stat73 ;[hh] Yup. Say so + lhld prttab ;[hh] Address of port keyword table + call fndkyw ;[hh] Look for correct keyword string + jnc stpr1 ;[hh] Found a match + lxi h,spdust ;[hh] No match found - say it's undefined +stpr1: jmp stat73 ;[hh] Print it and return + +; Show the current line speed (if known). + +staspd: lxi d,spdst + call prtstr + lda speed ;Get current speed. + 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 b,m ;Get string length. + inr b ;Account for $. + inx h + shld temp1 ;Save string pointer. +stat71: inx h ;Loop over string. + dcr b + jnz stat71 + mov c,m ;Get speed value + cmp c ;Match? + jz stat72 ;Yes. + inx h ;Bump to next keyword. + inx h + 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. + xchg ;[MF] Set into DE for display + call prtstr ;[MF] Print speed + lxi h,spdst2 ;[MF] Point to "bps" message +stat73: xchg ;Set into DE for display. + jmp prtstr ; print it, and return. + +; Show the current BLOCK-CHECK-TYPE (1-, 2-, or 3-character). + +stabcc: lxi d,bckst ;Get the string + call prtstr ;Print "Block check type: " + lda chktyp ;Get the type (character 1, 2, or 3) + mov e,a ;Put into E + mvi c,conout ;Want to print it + call BDOS ;Do so + lxi d,bckst1 ;Get rest of text ("-character") + jmp prtstr ;Print it and return +; +;[MF]stacol - Print "SET COLLISION" state +; +stacol: lxi d,collst ;[MF]Get message + call prtstr ;[MF]Print it + lxi h,coltab ;[MF]Point to COLLISION keywords + lda flwflg ;[MF]Get COLLISION state + call fndkyw ;[MF]Get COLLISION state + ;[MF](Since user doesn't control flwflg + ;[MF]directly, no need to check for errors + xchg ;[MF]Prepare for printing + jmp prtstr ;[MF]Print COLLISION state and return + +; Print the current escape character + +staesc: lxi d,escst ;Escape string. + call prtstr + call escpr ;Print the escape char. +; jmp prcrlf ;removed [DJR] Print CR/LF and return [Toad Hall] + ret ;[DJR] added + +; Show number proportion of buffers used in multiple sector buffering +stabsz: lxi d,bufsz1 + call prtstr ; do first bit of string + lxi h,0 + lda bufsec + mov l,a ; get size used... + call nout ;... to screen + lxi d,bufsz2 ; and then say max value + call prtstr + lxi h,0 + lda maxbsc ; get max for this system + mov l,a + call nout ;.. thence to screen +; jmp prcrlf ; removed [DJR] cr lf and out + ret ;[DJR] + +; +; Show the value of the TIMER flag +statim: lxi d,timmsg ;[jd] + call prtstr ;[jd] + lda timflg + jmp staton ;Tell whether it's on or off. + +; Show internal versions (edit strings) +shover: call cfmcmd + call prcrlf + lxi d,version ;[MF]Point to Kermit version + call prtstr ;[MF]and show it + lxi d,modmsg ;[MF]Continue the message + call prtstr ;[MF]... + call prcrlf ;[MF]End the line + lxi h,vertab ; Get address of version list +shovr1: mov e,m ; Get next word from list + inx h + mov d,m ; Next version string is in DE + inx h + mov a,d ; Test for zero (end of list) + ora e + jz shovr2 ; Done with list if zero + push h ; Save position in list + call prtstr ; Not zero. Print it. + call prcrlf ; Follow with crlf + pop h ; Restore position in list + jmp shovr1 ; and go see if there are any more. + +shovr2: lhld ovlver ; Get overlay version string + xchg ; into DE + call prtstr ; Print it + call prcrlf ; Output crlf + lhld family ;[11] New entry in overlay. Get string of + xchg ;[11] family of machines (eg apple) and print + call prtstr ;[11] it. For "common" m/c do a $ only. + jmp kermit ; Return to main loop. + +; table of pointers to version strings. +vertab: dw mitver ; CPSMIT + dw comver ; CPSCOM + dw pk1ver ; CPSPK1 + dw pk2ver ; CPSPK2 + dw remver ; CPSREM + dw server ; CPSSER + dw ttver ; CPSTT + dw cpmver ; CPSCPM + dw wldver ; CPSWLD + dw cmdver ; CPSCMD + dw utlver ; CPSUTL + dw datver ; CPSDAT + dw 0 ; end of list + +; Show TACTrap status (On or Off, and intercept character) +statac: lxi d,tacst ;"Current TACTrap status/char: " + call prtstr + lxi d,offstr ;Assume set off + lda tacflg ;Get the TACTrap char/flag + ora a ;Is it off? + jz prtstr ;Yep, go print OFF... + mvi c,conout ;Display... + mov e,a ;...the current intercept char + call bdos + jmp prcrlf + +; Show if flow control is set on or off +staflo: lxi d,flost ; Flow control string + call prtstr + lda floctl ; get the flag + jmp staton + +; Show if Case sensitvity is on or off +;stasens: +; lxi d,senst ; case sensitivity string +; call prtstr ; +; lda casens +; jmp staton ; say if its on or off + + +; Show the current user. (Should do this under directory...) +stusr: + mvi c,usrcod + mvi e,0ffh ;[9] get the current user + call bdos + mov l,a ;[9] print hl as a number... + mvi h,0 + push h ;[9] got the user number + lxi d,usrst ;[9] tell the user number + call prtstr + pop h ;[9] now do number + call nout ;[6] using routine for writing packet nos. + ret + +; +; +; [DJR] Show debug mode +stadbg: + lxi d,dbgst ;[DJR] Display string + call prtstr ;[DJR] + lda dbgflg ;[DJR] load flag + jmp staton ;[DJR] + + +; [DJR] Show default disk +stacurd: + lxi d,curdst ;[DJR] + call prtstr ;[DJR] + lda curdsk ;[DJR] + adi 'A'-1 ;[DJR] + mov e,a ;[DJR] + mvi c,conout ;[DJR] + jmp bdos ;[DJR] + +; +; Display current state of a boolean flag. +; called with A/ value (zero = Off, non-zero = On) + +staton: lxi d,onstr ; Assume it's on. + ora a ; Is it on? + jnz prtstr ; If so, say so, then return. + lxi d,offstr ; No, say off. + jmp prtstr ; Print the string, then return. + +; STRING command +; get a string from the user and send it to the host. +string: mvi a,cmtxt ; get the text + lxi d,stbuff ; where to put it + call comnd + jmp kermit ; if we cannot do it, then back to command level + sta strcnt ; save the string count + ana a ; if it is zero, then do nowt + jz kermit + call cfmcmd ;[MF]Otherwise, get a "confirm" + call selmdm ; then select the modem + lxi d,stbuff ; where to get the string +stlop: ldax d ; get byte + inx d ; pointer plus one + push d ; update pointer, and save de, and the character + call setpar ; set whatever parity + mov e,a ; outmdm wants character in e + call outmdm ; send character in a to line + pop d + lda strcnt ; get the count + dcr a + sta strcnt ; less one + jnz stlop ; else still looping + call selcon ; re-select the console + jmp kermit + +; Print "(not implemented)". +; here from vt52em, baud, prtset, stavt + +notimp: lxi d,inms12 ; Say it's not implemented. + call prtstr + jmp kermit ; Return to main loop. + +; Little code to allow some expansion of code without changing +; every futher address, only up to the end of this file. +; TO BE REMOVED FRO RELEASE! + +; org ($+100h) AND 0FF00H + +IF lasm ; If using LASM, chain to the next file. + LINK CPSPK1 ;[obs] break down them big files... +ENDIF;lasm diff --git a/cpscpm.asm b/cpscpm.asm new file mode 100644 index 0000000..49df54f --- /dev/null +++ b/cpscpm.asm @@ -0,0 +1,932 @@ +; CPSCPM.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 +; 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 file duplicates the CP/M DIR and ERA functions so we don't have +; to exit. +; +; revision history: +; +;edit 14, 1-Apr-1991 by MF. Correct a bug which crept in with edit 13 which +; caused any control-key other than ^Y or ^Z to act like ^X after a key +; had been depressed to halt output of the TYPE/PRINT commands. +;edit 13, 25-Mar-1991 by MF. Make the TYPE command always abort to Kermit +; command-level if ^C is entered on the console even if multiple files +; are being typed via wild-cards. Make ^X typed on the console abort +; typeout of the current file and begin typeout of the next file, +; if any, otherwise go back to Kermit command-level. +; The foregoing also applies to the PRINT command. +;edit 12, 14-Feb-1991 by MF. Call "clrtop" in TYPE command at "type1" +; rather than sending a <ff> directly to the terminal as some +; terminals don't respond to <ff> characters. Thus the screen will be +; cleared (if the terminal allows) before each file is typed. +; Also use "getfil" rather than the bdos "openf" call to open +; files for typing (label "type2"). This tightens up the code. +; Zero "fcbcnt" before starting to type files (label "type0b"). +; This apparently fixes a phantom bug which caused incorrect lookup (and +; hence garbage typeout) of files occassionally after a new disk +; was inserted and a SET DEFAULT-DISK was performed to reset the disk +; system. (It looked like parts of other files were being typed, as +; if the directory had been misread or had not been reset.) +;edit 11, 8-Feb-1991 by MF. Cause the bdos call for direct console input +; in "ckchr" **not** to go thru the bdos trap but to call bdos at 0005h +; directly. This corrects a bug wherein if commands such as INPUT +; (which check to see if a keyboard key has been pressed) were executed +; from a TAKE-file, the character following the terminator of such +; commands was being interpreted as that keyboard input, thus causing +; the next command in the TAKE-file to be unrecognized since its +; first character had been eaten as a result of the keyboard check. +; This bug **may** be the cause of a report received by Dr. Martin +; J. Carter of Nottingham University in the U.K. in which Kermit +; was reported to have read a character beyond a command terminator +; in a TAKE-file, making the subsequent command unrecognizable since +; its first character was missing. +;edit 10, 29-Jan-1991 by MF. Use the big buffer for TYPE/PRINT commands. +; Thus, edit 9 has been superseded. +;edit 9, 29-Jan-1991 by MF. Corrected EOF check in TYPE command routine +; following label "type20". a READF call, if successful, gives A=0 +; (not A=0FFH) and A not zero if failure. Thus the "INR A" instruction +; checking for EOF was **always** nonzero. The reason the TYPE command +; worked is that CP/M text files indicate the text end-of-file with a +; Control-Z, in which case the TYPE routine branched correctly. In +; other words, this edit is more for aesthetic purposes to satisfy +; purists than something brought about by dire necessity! +;edit 8, 28-Jan-1991 by MF. Added code courtesy of Dr. Martin J. Carter +; of Nottingham University, UK, to use the big buffer for the COPY +; command. +;edit 7, 18-Sep-1990 by MF. Added RENAME routine to implement the +; RENAME (FRENAME) command to rename a CP/M file. +; Modified COPY routine to explicitly reject wild-carded filenames +; by using COMND function CMOFI rather than functions CMIFI and +; CMIFIN to get input and output filenames. +; Modified ERA and COPY routines to not act upon the respective +; commands until a "confirm" is typed. This prevents these +; routines from taking off upon recognition of action characters +; like "?", which can be quite annoying if one is an inexperienced user. +; edit 6, March 11, 1987 by OBSchou. Added in the TYPE and PRINT commands +; Both type to the screen, print also echoes to printer. +; +; edit 5 20 June, 1986. Added support for multiple file FCB buffering. +; +; edit 4: June 16, 1986 OBSchou at Loughborough University, UK +; added in a test to prevent a DIR command issued from a TAKE command +; being interruped by the next character in the take command buffer. +; Also added code for USER nn. (Well, its OS related,is it not?) +; +; edit 3: July 8, 1984 (CJC) +; Merge modifications from Toad Hall: support LASM (linked by CPSTT, +; links to CPSWLD), use prcrlf where appropriate. +; +; edit 2: June 5, 1984 (CJC) +; documentation and formatting; delete unused code (dir13); add module +; version string. +; +; edit 1: May, 1984 (CJC) +; extracted from CPMBASE.M80 version 3.9; modifications are described in +; the accompanying .UPD file. +; +cpmver: db 'CPSCPM.ASM (14) 1-Apr-1991$' ; name, edit number, date + +npl EQU 04H ;Number of names per line for dir command. + +; This is the DIR command. Display the name and size of all files +; matching the filespec. +; here from: kermit +; +; Note: This is abstracted from Keith Peterson's DIRF.ASM +; directory print function. Thanks again Keith. +; +; +dir: lxi d,fcb ;Where to put the data, if any. + mvi a,cmifin + call comnd ;Parse a full or piece of file-spec + jmp dir2 ;Didn't get a FULL file-spec + jmp dir4 ;lets do it +; +; +;Make FCB all '?' to match any file +dir2: lda fcb + cpi ' ' ;CMIFIN leaves that as ' ' + jnz dir2a ;he typed at least x: + xra a + sta fcb ;default drive +dir2a: lxi h,fcb+1 + mvi b,11 ;FN+FT count. + +dir3: mvi m,'?' ;Store '?'s in FCB. + inx h + dcr b + jnz dir3 +;Print signon message and drive name +dir4: call getun ; get current user number + lda fcb + ora a ;if not zero, get default + jnz dir4a + lda curdsk ;get default +dir4a: adi 'A'-1 ;Asciize it + sta dnam14+2 ;[4] add in user no, and Save it in message. + lda temp1+1 ;[4] most sig. user number + cpi '0' ;[4] if zero set space + jnz dir4b + mvi a,' ' ;[4] space +dir4b: sta dnam14 ;[4] + lda temp1 + sta dnam14+1 ;[4] ls user number digit + call prcrlf + lxi d,inms14 ;Point to message + call prtstr +; +;Initialize number of names per line counter + mvi a,npl ;Nr. names per line. + sta nnams ;Init counter. + lda hidefs ; are we doing file size? + ana a + jnz dir4c ; we are not showing file size, + lda nnams + inr a + sta nnams ; so we can show another name per line + +dir4c: xra a ; clear the flags ready for multi-sector buffering + sta fcbcnt ; clear fcb counter + sta mfflg1 + sta mfflg2 + sta mfflg3 + lxi h,fcb0 ; reset pointer for fcb save space + shld xfcbptr +; + call dir26 ;Get disk parameters + xra a ;[5] say first time round, so no spare fcbs + sta fcbcnt ;[5] +dir5: call mfname ;get some names + jnc dir6 ;got one + jmp dir17 ;got none - do summary + +dir6: ;Check for console break + lda takflg ;[4] ... but not if issued from TAKE.... + ana a ;[4] + jnz dir6a ;[4] we do the lot regardless. + + mvi c,consta ;Ck status of kbd. + call bdos + ora a ;Any key pressed? + jz dir6a ;nope, keep going + mvi c,conin + call bdos ;gobble key + jmp dir17 ;and print summary only + +;Print an entry +dir6a: + lxi h,fcb+1 ;point to Filename + mvi b,8 ;File name length. + call dir11 ;Type filename. + mvi a,'.' ;Period after FN. + call dir10 + mvi b,3 ;Get the filetype. + call dir11 + call dir25 ;print size + lxi h,nnams ;Point to names counter. + dcr m ;One less on this line. + push psw + cnz dir7 ;No cr-lf needed, do fence. + pop psw + cz dir12 ;Cr-lf needed. + jmp dir5 + +;Print space, fence character, then space +dir7: call dir9 + mvi a,':' ;Fence character. + call dir10 + jmp dir9 + +; dir8 - Print two spaces +; dir9 - Print one space +; dir10 - Type char in A register +dir8: call dir9 +dir9: mvi a,' ' +dir10: push b + push d + push h + mov e,a ;Char to E for CP/M. + mvi c,conout ;Write char to console function. + call bdos + pop h + pop d + pop b + ret + +;Type (B) characters from memory (HL) +dir11: mov a,m + ani 7FH ;Remove CP/M 2.x attributes. + call dir10 + inx h + dcr b + jnz dir11 + ret + +;CR-LF routine. HL=NNAMS upon entry +dir12: push b + push d + push h + call prcrlf ;Print CR/LF [Toad Hall] + pop h ;(did use call to dir10, but slooow) + pop d + pop b + mvi m,npl ;Number of names per line. + lda hidefs ; are we showing file size? + ana a + rnz ; no, so all ok + inr m ; else show another file per line + ret + +;Exit - All done, return via jmp (as for all main commands) +dir16: call prcrlf + lda curdsk + dcr a ;relative to 0 + mov e,a + mvi c,logdsk + call bdos ;back to "logged in" disk + jmp kermit ;...and return to kermit. + +; +;Determines free space remaining +; +dir17: xra a + sta mfflg1 ;clean up MFNAME + sta mfflg2 + lda fcb ; get drive number from FCB + ora a + jz dir18 ; default? + dcr a ; no, make requested drive current drive. + mov e,a + mvi c,logdsk + call bdos +dir18: call sysspc ; get space available for current drive + push h + lxi d,inms15 ;"Drive " + call prtstr + lda fcb ;If no drive, get + ora a ;logged in drive + jnz dir24 + mvi c,rddrv + call bdos + inr a +dir24: adi 'A'-1 + sta inms16 + lxi d,inms16 ;"x has " + call prtstr + pop h ;Get number of bytes available + call nout + lxi d,inms17 ;"K bytes free" + call prtstr + jmp dir16 ;all done + +;Compute the size of the file + +dir25: lda hidefs ; do we show file size? + ana a ; if non zero, we dont. + rz ; so just return + mvi c,cflsz ;get file-size + lxi d,fcb + call bdos + lda fcbrno ;shift least sign. part + lxi b,0 ;init bc + mov l,a + ani 7 + jz dir250 ;even K + lxi b,1 ;save for later +dir250: push b ;save 0 or 1 to add to size + mvi b,3 ;shift 3 bits +dir25a: xra a ;clear sign + lda fcbrno+1 ;get most sig byte + rar ;shift right + sta fcbrno+1 ;put back + lda fcbrno ;get least sig part + rar + sta fcbrno + dcr b ;loop 3 times + jnz dir25a + mov l,a ;size in HL + lda fcbrno+1 + mov h,a + pop b ;get 0 or 1 + dad b ;round up to KB used + lda bmask ;get (sectors/block)-1 + rrc + rrc ;get (K/block)-1 + rrc + ani 1FH + mov c,a + dad b ;add (K/block)-1 to size to round up + cma ;make a mask + ana l ;truncate after rounding up + mov l,a + push h + lxi b,-10 ;subtract 10 + dad b + jc dir25d ;>= 10 + call dir8 ; print a leading space + jmp dir25e + +dir25d: pop h ;get size again + push h + lxi b,-100 ;subtract 100 + dad b + jc dir25e ;>= 100 + call dir9 ; print another leading space +dir25e: call dir9 ;a space + pop h ;get size back + call nout ;..go print it + mvi a,'k' ;..and follow with K size + call dir10 + ret + +dir26: mvi c,gtdpar ;current DISK PARAMETER BLOCK + call bdos + inx h + inx h + mov a,m ;Get Block Shift Factor + sta bshiftf + inx h ;Bump to Block Mask + mov a,m ;get it + sta bmask + inx h + inx h + mov e,m ;Get Max Block number + inx h + mov d,m + xchg + shld bmax ;Put it away + ret +; +; ERA command - erase a CP/M file +; here from: kermit + +era: mvi a,cmifi ;Parse a file-spec + lxi d,fcb ;into FCB + call comnd + jmp kermit ;bad parse + mvi a,cmcfm ;[MF]Get a confirm from the user + call comnd ;[MF]... + jmp kermit ;[MF]NO? try another command + lxi d,fcb + mvi c,sfirst ;check if valid + call bdos + inr a ;0 if FILE not found + jnz era1 ;found at least one + lxi d,erms15 ;"unable to find file" + call prtstr + jmp kermit + +era1: lxi d,fcb + mvi c,delf + call bdos + lxi d,inms18 ;" File(s) erased" + call prtstr + jmp kermit + +; USER - select a new user. This is an unusual routine in that the user +; enters a number. The others take on/off or filename (except +; set escape +; +user: mvi a,cmnum ; go parse a number + call comnd + jmp kermit ; if we can not do it, quit to command loop + mvi a,cmcfm ; get a confirm from the user + call comnd + jmp kermit ; if no, then try another command + lhld number ; else get the number... + xchg ; until a non valid digit is typed (eg cr) + lxi h,-32 ; if a carry, then ok + dad d ; ... else its above 32 + jc user1 + xchg ; restor number in hl again + mov a,l ; Lets save it + sta curusr ; as current user number + mov e,l ; get user no to e... + mvi c,usrcod + call bdos + call getun ; get user number to temp1 and temp2 + lda temp2 + cpi '0' + jnz user0 ; dont do ms digit if a zero + mvi a,' ' +user0: sta kerm1 ; save into string etc + sta dnam14 ; also for dir command + lda temp1 + sta kerm1+1 + sta dnam14+1 ; also for dir command + jmp kermit + +user1: lxi d,erms23 ; tell user sorry + call prtstr + jmp kermit + + +; +; TYPE - type a file or files to the console. +; +; This utility also used by print, where the characters printed to +; the console are also copied to the printer if the prnfl flag +; is non-zero. Uses mfname to type (print) multiple names. +; Each file is preceeded with a formfeed character (usually clears +; the screen on a VDU) +; + +type: mvi a,cmifi ; parse a file name + lxi d,fcb ; let the parser know where the FCB is + call comnd + jmp type02 ; if error say so + +type0b: + xra a ; clear some flags for mfname + sta mfflg1 + sta mfflg2 + sta mfflg3 + sta fcbcnt ;[12]... + lxi h,fcb0 ; reset the fcb pointers etc + shld fcbptr + call mfname + jc type02 ; match not found + +;[MF][10]The following code to type a file using a 1-sector buffer has +;[MF][10]been replaced by code to use the "big buffer" -- 30-Jan-1991 +;type1: lxi d,buff ; point to the default DMA address +; mvi c,setdma +; call bdos ; tell bdos where to put the dma address +; mvi a,ff ; do a form feed +; call typit +; xra a ; clear the character count +; sta chrcnt +; +;type2: mvi c,openf ; open the file for reading +; lxi d,fcb +; xra a ; but first clear bits of fcb... +; sta fcb+12 +; sta fcb+14 +; sta fcb+15 +; sta fcb+32 +; call bdos ; NOW open the file +; +;type20: mvi c,readf ; open up the file and read first sector +; lxi d,fcb +; call bdos +;;[MF][9]Correct EOF test below (next two instructions) +;; inr a ; if 0ffh returned, error. Assume EOF +;; jz typex ; so exit from here +; ora a ;[MF][9]If error, assume EOF +; jnz typex ;[MF][9]so exit +; lxi h,0 ; else clear the pointer into the file +; shld typptr +; +; +;type2a: lxi d,buff ;ok, so lets get the byte to print +; lhld typptr +; dad d ; add offset to the DMA base +; mov a,m ; and get character to type (print) +; ani 7fh ; make sure it is printable +; cpi 20h ; is it a control character? +; jp type3 +; cpi 09h ; if its a tab, then expand it +; jnz type2b +; +;type2c: mvi a,' ' ; send a space +; call typit ; type it +; lda chrcnt ; get the number of chrs so far +; ani 7h ; see of an 8th pos? +; jnz type2c ; loop until all spaces done, then exit +; jmp type4 +; +;type2b: cpi cr ; is it a cr or lf? +; jnz type2d +; call typit ; do a cr +; xra a +; sta chrcnt ; cr of lf => clear character count +; jmp type4 ; and exit +; +;type2d: cpi lf +; jnz type2e +; call typit ; print the character +; xra a +; sta chrcnt ; cr or lf clears the character count +; jmp type4 +; +;type2e: cpi cntlz ; is it end of file? +; jnz type2f +; jmp typex ; yes, so close and try for another file +; +;type2f: push psw ; control char - save the character +; mvi a,'^' ; send control chars as ^A, for ex. +; call typit +; pop psw +; +;type3: call typit +; +; +;type4: lhld typptr ; get the pointer +; inx h +; shld typptr ; up it by one character, and save it. +; mov a,l ; lets see if the sector has been typed +; ana a +; jm type20 ; if 80h => read new sector +; jmp type2a ; else just continue along + +;[MF][10]The following code uses the "big buffer" to read the file +;[MF][10]which is to be typed +;[12]Clear the screen explicitly as some terminals don't respond +;[12]to the <ff> character. +;type1: mvi a,ff ; do a form feed +; call typit +type1: call clrtop ;[12] Clear the screen + xra a ; clear the character count + sta temp1 ;[MF]alias column counter + +type2: +;[12]Eliminate call to openf in favor of call to "getfil" +; mvi c,openf ; open the file for reading + lxi d,fcb +; xra a ; but first clear bits of fcb... +; sta fcb+12 +; sta fcb+14 +; sta fcb+15 +; sta fcb+32 +; call bdos ; NOW open the file + call getfil ;[12] NOW open the file + +type20: call inbuf ;[MF]Fill input buffers + jmp typex ;[MF]Tru end-of-file reached + jmp type21 ;[MF]Begin typing/printing characters + +type2a: lda chrcnt ;[MF]Get buffer character counter + dcr a ;[MF]and decrement it + jm type20 ;[MF]Get more characters if needed +type21: sta chrcnt ;[MF]else remember new buffer character counter + lhld bufpnt ;[MF]Now get character pointer + mov a,m ; and get character to type (print) + inx h ;[MF]Increment the pointer + shld bufpnt ;[MF]and remember it + ani 7fh ; make sure character is printable + cpi 20h ; is it a control character? + jp type3 + cpi 09h ; if its a tab, then expand it + jnz type2b + +type2c: mvi a,' ' ; send a space + call typit ; type it + lda temp1 ;[MF]Get the number of characters so far + ani 7h ; see if an 8th pos? + jnz type2c ; loop until all spaces done, then exit + jmp type2a ;[MF]and continue + +type2b: cpi cr ; is it a cr or lf? + jnz type2d + call typit ; do a cr + xra a + sta temp1 ; cr or lf => clear character count + jmp type2a ;[MF]and continue + +type2d: cpi lf + jnz type2e + call typit ; print the character + xra a + sta temp1 ; cr or lf clears the character count + jmp type2a ;[MF]and continue + +type2e: cpi cntlz ; is it end of file? + jnz type2f + jmp typex ; yes, so close and try for another file + +type2f: push psw ; control char - save the character + mvi a,'^' ; send control chars as ^A, for ex. + call typit + pop psw + +type3: call typit + jmp type2a ; and continue along + +typex: mvi c,closf + lxi d,fcb + call bdos ; close the file + mvi a,cr ; send cr lf to screen/printer to clear buffers + call typit + mvi a,lf + call typit + call mfname ; and see if there are other files to type + jnc type1 ; yup, so go do it + xra a ; make sure the flag is reset + sta prnfl + jmp kermit ; then exit. + +typex0: mvi c,closf ;[MF]Close the file + lxi d,fcb ;[MF]... + call bdos ;[MF]... + mvi a,cr ;[MF]Clear buffers + call typit ;[MF]... + mvi a,lf ;[MF]... + call typit ;[MF]... + xra a ;[MF]Clear flag + sta prnfl ;[MF]... + lda takflg ;[MF]See if we're TAKEing commands + ani 1 ;[MF]from a file + cnz closet ;[MF]If we are, abort TAKE-file processing + jmp kermit ;[MF]Back to Kermit command-level + +; error for file not found for type +type02: lxi d,nofile ; say no file name (its invalid) + call prtstr + xra a + sta prnfl ; clear the flag + jmp kermit ; so abort + + +typit: mov e,a + call ckqtyp ; see if a cntl-c or other character from user + jmp typit2 ;[MF] Control-C entered, abort + jc typit1 ; CNTL-X entered, so abort file [MF] + push d ; save for a bit + call outcon ; send it to the console + lda temp1 ; update the number of characters sent[MF] + inr a + sta temp1 ;[MF] + pop d + lda prnfl ; see if we have to print it too + ana a + rz + call outprn ; send character to printer (buffer) + ret + +typit1: pop d ; adjust stack again + jmp typex ; and say we are done (for this file) + +typit2: pop d ;[MF] Adjust the stack + jmp typex0 ;[MF] and abort file typeout completely + + +; CKQTYP - CHeck for requested Quiet TYPe (ie hang on a second) +; Routine sees if the user has typed ANY key. If a key HAS been pressed +; see if its a Control-c. If so, flag for an abort, else wait for +; a second entry from the user. If its a Control C, flag an abort +; else continue with the print. +; note: only the DE registers maintained. All others destroyed. +; **NOTE** CKQTYP now gives a nonskip return if Control-C is typed, +; a skip-return with carry set if a Control-X is typed and a skip-return +; with carry clear if any other character is typed as the second +; character. + +ckqtyp: push d ; save the character to be printed + call ckchr ; see if user entered a character + ani 7fh ; strip parity etc + jz ckqty3 ; nothing entered, so go on as usual (See below) + cpi ctrlc ; control c? + jz ckqt1a ;[MF] Yup, give nonskip return + cpi 'X'-100o ;[MF] If Control-X, + jz ckqty1 ; yup, set carry and exit +ckqty2: call ckchr ; another character to wait for (ie pause) + ani 7fh + jz ckqty2 ; wait until some input + cpi ctrlc ; if control c, abort + jz ckqt1a ;[MF] ... + cpi 'X'-100o ;[MF] Control-X? + jz ckqty1 ; yuss, so flag abort file [MF] +ckqty3: pop d ; else restore the character to be typed [MF] +; ret ; no, so continue with type/print + stc ;[MF]Set carry + cmc ;[MF]Then clear it + jmp rskp ;[MF] Continue with type/print (skip ret) + +ckqty1: pop d ; restore stack again + stc ; set carry and return +; ret + jmp rskp ;[MF] ... + +ckqt1a: pop d ;[MF] Adjust stack + ret ;[MF] and return + +;[MF][14]No longer need these lines +;ckqty3: pop d ; restore stack again +;; ret +; stc ;[MF] Clear carry +; cmc ;[MF] ... +; jmp rskp ;[MF] and give skip return + +ckchr: call selcon ; make sure we are talking to the console + mvi e,0ffh ; see if user has any input for us + mvi c,dconio +; call bdos ;[11]Don't go thru bdos trap + call 0005h ;[11]Call bdos directly + ret ; This routine does not care what comes back + + +; +; COPY - routine to copy from a source file to a destination file +; from the Kermit command state. +; +; Note. This could be tricky, as there are several forms of copy +; copy d:source.ext d:dest.ext (Easy one) +; copy d:source.ext d: (File to another drive) +; copy d:source.??? d: (several files) +; copy d:*.* d: (Several files) +; +; Initially, lets make it top one, and see how we go, ok? +; +; +;Things to do for copy: +; 1) get source name +; 2) get target name +; 3) if both source and destination = abort +; 4) if source does not exist abort +; 5) attempt to delete destination file if it exists +; 6) open source and destination files +; 7) copy file across +; 8) close all files +; 9) return to command mode +; +copy: ; Here goes... +; 1) get source file name + mvi a,cmofi ; go parse a file name + ;[MF]Nonwild + lxi d,cfcbs ; use the source for copy FCB (Allows copy + call comnd ; from a TAKE file etc) + jmp kermit ; if error, abort + +; 2) get target name + mvi a,cmofi ; go parse a target file name + ;[MF]Again, nonwild + lxi d,cfcbd ; use destination fcb + call comnd ; get it + jmp kermit ;[MF]Couldn't. + mvi a,cmcfm ;[MF]Get a confirm from the user + call comnd ;[MF]... + jmp kermit ;[MF]No? try another command + +; 3) see if both target and source are equal +copy0: mvi b,12 ; we are gonna test drive, file and extention + lxi d,cfcbs ; from source file name... + lxi h,cfcbd ; to destination file name + xra a ; clear flag for difference found + sta equflg +copy1: ldax d ; get source file name character + cmp m ; test with targer file name + jz copy2 ; if equal, do nothing + lda equflg ; else update flage (ie files are different) + inr a + sta equflg +copy2: inx h + inx d + dcr b + jnz copy1 ; up pointers and test for next char + + lda equflg ; if still null, then its a daft thing to do + ana a + jnz copy3 ; its not a daft thing to do + lxi d,samems ; load up "File source and destination the same" + call prtstr ; tell user + jmp kermit ; and try again + +; 4) If source does not exist, abort. Assume we have a full file name. +copy3: + lxi d,cfcbs ; load up source fcb + mvi c,openf ; open file + call bdos + inr a ; error on open? + jnz copy4 + lxi d,nofile ; assume file not found + call prtstr + jmp kermit ; and die + +copy4: lxi d,cfcbd ; load up destination fcb + mvi c,delf ; destroy target name if it exists + call bdos ; ignore error messages + lxi d,cfcbd ; load up destination fcb + mvi c,makef ; make a file + call bdos + inr a ; make error? + jnz copy4a + lxi d,erms12 ; no directory space + call prtstr + jmp copy7 ; close source file + +copy4a: lxi d,cfcbd ; load up destination fcb... + mvi c,openf ; for open + call bdos + inr a ; error on open? + jnz copy5 ; could do with better error detection... + lxi d,erms15 ;... but assume its a disk full + call prtstr + jmp copy7 ; close source file and jmp kermit + +;copy5: lxi d,buff ; set default dma address to 80h +; mvi c,setdma +; call bdos +; +;copy6: lxi d,cfcbs ; copy routine proper.. get a sector +; mvi c,readf +; call bdos +; ana a ; error reading the file? +; jnz copy8 ; yes, then cope with it (could be EOF) +; [MaJoC 910128] The above code, which reads single logical sectors, +; is grossly inefficient with systems (most of them) with larger physical +; disk blocks and a single shared read/write buffer. Use of INBUF below +; is functionally equivalent at this level, but does actual disk reads +; by the Big Buffer-ful. +copy5: + xra a ; Initialise INBUF, to force reading of + sta seccnt ; the first Big Buffer-ful. Redundant + sta endsts ; if file opened by GETFIL (or variant). + sta eoflag ;[MF]... + lxi h,cfcbs ;[MF]Copy source fcb to default fcb + lxi d,fcb ;[MF]since INBUF uses the default fcb + lxi b,33 ;[MF]... + call mover ;[MF]... +copy6: +; INBUF returns a pointer to the next logical bufferful via bufpnt, filling +; the Big Buffer as necessary, with skip return for success and nonskip on +; error or EOF. + call inbuf ; Start of copy proper: get bufferful. + jmp copy8 ; Nonskip return: treat as EOF. + lhld bufpnt ; Skip return => OK: pick up buffer pointer. + xchg + mvi c, setdma ; Tell system where to write from. + call bdos +; [majoc 910128: end] + lxi d,cfcbd ; send sector to destination + mvi c,writef + call bdos + ana a ; error on write (disk full?) + jz copy6 ; no error, so do another sector. + lxi d,erms17 ; say disk is full + call prtstr + lxi d,cfcbd ; close the output file... + mvi c,closf + call bdos + lxi d,cfcbd ; ... and then delete it + mvi c,delf + call bdos ; ... and then drop through to... + +copy7: lxi d,cfcbs ; here to close the source FCB + mvi c,closf + call bdos + jmp kermit + +copy8: lxi d,cfcbd ; orderly close of destination file + mvi c,closf + call bdos + jmp copy7 ; now close the source file as well. + +; +;[MF]RENAME - Rename a file +; +rename: mvi a,cmofi ;[MF]Get nonwild filename + lxi d,cfcbs ;[MF]Use "COPY" fcb's + call comnd ;[MF]... + jmp kermit ;[MF]Couldn't get it. + mvi a,cmofi ;[MF]Get filespec to rename it to + lxi d,cfcbd ;[MF]... + call comnd ;[MF]... + jmp kermit ;[MF]Couldn't. +renam0: lxi d,cfcbs ;[MF]See if file to be renamed exists + mvi c,openf ;[MF]by trying to open it + call bdos ;[MF]... + inr a ;[MF]Does the file exist? + jnz renam1 ;[MF]Yes + lxi d,nofile ;[MF]No, inform the user + call prtstr ;[MF]... + jmp kermit ;[MF]and bomb +renam1: lxi d,cfcbd ;[MF]Point to rename filespec + mvi c,openf ;[MF]Set function code to + call bdos ;[MF]See if rename file exists + inr a ;[MF]Does it? + jz renam2 ;[MF]No + lxi d,erms31 ;[MF]Yes, complain + call prtstr ;[MF]... + jmp kermit ;[MF]and depart with tail between legs +renam2: lxi h,cfcbd ;[MF]Now get rename filespec again + lxi d,cfcbs+16 ;[MF]and where to copy it to + lxi b,16 ;[MF]We copy drive, filename, filetype, extent + call mover ;[MF]... + lxi d,cfcbs ;[MF]Point to fcb for rename + mvi c,renam ;[MF]Get rename function + call bdos ;[MF]Try to rename the file + inr a ;[MF]Did we succeed? + jnz kermit ;[MF]Yes, done + lxi d,erms16 ;[MF]No, complain + call prtstr ;[MF]... + jmp kermit ;[MF]and start over + + +IF lasm + LINK CPSWLD +ENDIF;lasm [Toad Hall] diff --git a/cpsdat.asm b/cpsdat.asm new file mode 100644 index 0000000..729ca52 --- /dev/null +++ b/cpsdat.asm @@ -0,0 +1,648 @@ +; CPSDAT.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. +; +; Pure and impure data areas. Previously of CPSUTL.ASM +; +; revision history: +; +;edit 19, 29-Mar-1991 by MF. Add flag "initak" (nonzero) which is cleared +; after the initial automatic TAKE attempt of KERMIT.INI to allow +; "unable to find file" complaints if not doing that initial TAKE. +;edit 18, 21-Mar-1991 by MF. Renamed parameter vermin to revno (revision +; level) since verno is already known as the "minor version number". +;edit 17, 27-Feb-1991 by MF. Corrected typeo in "inms19" and commented out +; "typptr" pointer as the TYPE command now uses the big buffer. +; Also provided for a "minor version number" (1-26=A-Z) and message to +; facilitate display of Kermit version in VERSION command (modmsg) +;edit 16, 12-Feb-1991 by MF. Eliminated storage (message and variable) +; for case sensitivity by commenting it out. +;edit 15, 9-Dec-1990 by MF. Modified message for "directory file size" +; status report to make it clearer when spoken by a speech synthesizer. +;edit 14, 4-Dec-1990 by MF. Added message for Autoreceive status report. +;edit 13, 30-Nov-1990 by MF. Added messages to display regular/quiet status +; of terminal in SHOW and STATUS commands. +;edit 12, 8-Nov-1990 by MF. Added a new message for Set Autoreceive. +;edit 11, 2-Nov-1990 by MF. Moved overlay address to 7000H -- I didn't +; realize I was **that** close to the limit until I made a couple of +; cosmetic changes and REM CD bombed. This is still ver. 4.10 as it +; hasn''t been released yet. +;edit 10, 1-Nov-1990 by MF. Changed message at "spdst" to conform with +; the change of "SET BAUD-RATE" to "SET SPEED". +; Also added message "sdpst2" for speed status (staspd) routine +;edit 9, 17-Oct-1990 by MF. Changed "packet-size" messages to use the +; word "length" to conform with the nomenclature suggested in the +; 6th edition of the Kermit Protocol Manual. +;edit 8, 19-Sep-1990 by MF. Added error message for FRENAME command. +;edit 7, 14-Sep-1990 by MF. Added storage/strings for SET COLLISION command. +; Also added strings/storage for SET INCOMPLETE-FILE command. +;edit 6, 9-Sep-1990 by MF. Added messages and storage for Remote commands. +; and display of packet sizes +; Moved overlay address to 06C00H for Version 4.10. +; edit 5, 8 April, 1987 by OBSchou. Added new entry in jump table to call +; code for an external terminal type. Added some new error messages +; and added more to the packet space. +; +; edit 4, 30 March by OBSchou. Added in space for autoreceive. +; +; edit 3, 19 March, 1987 by OBSchou. Added some more strings etc, and +; increased the stack space fro 32 entries to 64. +; +; edit 2, 11 March, 1987 by OBSchou. +; Added in some more data and strings and things. Nothing special +; +; edit 1, 28 January, 1987 by OBSchou +; Following file the data section of CPSUTL.ASM. This part of the +; CPSUTL.ASM file now seperate as it ws getting too larg. Link to here +; from CPSUTL.ASM (which now has only the utlity routines). +; Also added in bits submitted by Dave Roberts of Leicester: +; DJR 18th January 1987 - David J. Roberts. +; Support for cosmetic changes in CPSMIT: +; New strings DBGST and CURDST +; CRLF in front of TIMMSG +; LOGST changed, and new LOGST2 +; +; +datver: db 'CPSDAT.ASM (19) 29-Mar-1991$' + + + +; + +version:db 'Kermit-80 v4.' + db (verno/10) + '0' ; tenth's digit of version number + db (verno MOD 10) + '0' ; hundredth's digit +IF revno ;[MF]If a revision level, + db revno+'@' ;[MF]put it in (range 1-26=A-Z) +ENDIF ;revno [MF] + db ' $' +modmsg: db ' has been built from the following modules:$';[MF] +kerm: db 'Kermit-80 ' +kerm1: db 'nnx:>$' ;'x' filled in at startup with DRIVE name + ;'nn filled at startup and user with user number +crlf: db cr,lf,'$' +ermes1: db cr,lf,'?Unrecognized command$' +ermes3: db cr,lf,'?Not confirmed$' +ermes4: db '?Unable to receive initiate',cr,lf,'$' +ermes5: db '?Unable to receive file name',cr,lf,'$' +ermes6: db '?Unable to receive end of file',cr,lf,'$' +erms10: db '?Unable to receive data',cr,lf,'$' +erms11: db '?Disk full',cr,lf,'$' +erms12: db '?Directory full',cr,lf,'$' +erms14: db '?Unable to receive an acknowledgement from the host',cr,lf,'$' +erms15: db cr,lf,'?Unable to find file',cr,lf,'$' +erms16: db '?Unable to rename file$' +erms17: db cr,lf,'?Disk full$' +erms18: db cr,lf,'?Unable to tell host that the session is finished$' +erms19: db cr,lf,'?Unable to tell host to logout$' +erms20: db cr,lf,'?Kermit has not been configured for a target system$' +erms21: db cr,lf,'?Consistency check on configuration failed$' +erms22: db cr,lf,'?Error writing to log file',cr,lf,'$' ;[pcc005] +erms23: db cr,lf,'?Invalid user number$' +erms24: db cr,lf,'?Invalid Pause parameter$' +erms25: db cr,lf,'?Invalid BUFFER-SIZE parameter$' +erms26: db cr,lf,'?Invalid packet length (too long)$' +erms27: db cr,lf,'?Invalid Checktype$' +erms28: db cr,lf,'?Too many retries$' +erms29: db cr,lf,'?Failed to exchange parameters$' +erms30: db cr,lf,'?Failed to receive input string in alloted time$' +erms31: db cr,lf,'?File already exists$' ;[MF] + +infms3: db bell,'Completed$' +infms4: db bell,'Failed$' +infms5: db '%Renaming file to $' +infms6: db cr,lf,'[Closing the log file]$' +infms7: db cr,lf,'[Connected to remote host. Type $' +infms8: db 'C to return;',cr,lf,' type $' +inms8a: db '? for command list]',cr,lf,'$' +infms9: db cr,lf,'[Connection closed, back at micro]$' +inms10: db 'Control-$' +inms11: db ' Not implemented.$' +inms12: db ' (Not implemented)',cr,lf,'$' +inms13: db bell,'Interrupted$' +inms14: db TAB,TAB,' Directory for drive ' +dnam14: db 'nnx:',cr,lf,'$' ;filled in by dir routine. +inms15: DB CR,LF,TAB,TAB,'Drive $' +inms16: DB ' has $';filled in by summary code with drive letter +inms17: DB 'K bytes free',CR,LF,'$' +inms18: DB CR,LF,'File(s) erased$',CR,LF +inms19: db cr,lf,'[Transmitting file to host:' + db cr,lf,' 1. Lines automatically sent, and wait for possible reply' + db cr,lf,' 2. CONTROL-C aborts transfer' + db cr,lf,' 3. If transfer hangs, try a return to continue' + db cr,lf,' 4. on exit, you will be placed in CONNECT state.' + db cr,lf,'$' +inms20: db 'R to send the same line again,' + db cr,lf,' or type $' +inms21: db 'C to abort transmission.]',cr,lf,'$' +inms22: db cr,lf,'[Transmission done. Connected normally ' + db 'to remote host,' + db cr,lf,' type $' +inms23: db 'Sending...$' +inms24: db 'Receiving...$' +inms25: db bell,'Warning: eighth bit cannot be sent$' +inms26: db cr,lf,'For help, type ? at any point in a command$' +inms27: db cr,lf,'[Logging suspended]',cr,lf,'$' ;[pcc003] +inms28: db cr,lf,'[Logging resumed]',cr,lf,'$' ;[pcc003] +inms29: db cr,lf,'[Transmission Aborted. Connected normally ' + db 'to remote host,' + db cr,lf,' type $' +autmes: db cr,lf,cr,lf,'[Automatically receiving; type ^C to abort]' + db cr,lf,cr,lf,'$' ;[MF] +anymes: db cr,lf,cr,lf,' * * * Press any key to continue * * * ' + db cr,lf,cr,lf,'$' +escmes: db cr,lf,'Type the new escape character: $' +tacmes: db cr,lf,'Type the new TAC intercept character: $' +sopmes: db cr,lf,'Give the start-of-packet character: $' ;[gnn] +padcms: db cr,lf,'Type the new padding character: $' ;[obs] +xmthlp: db cr,lf,'R Send the same line again$' +loghlp: db cr,lf,'Q Suspend logging' ;[pcc003] + db cr,lf,'R Resume logging$' ;[pcc003] +inthlp: db cr,lf,'? This message' + db cr,lf,'C Close the connection' + db cr,lf,'0 (zero) Transmit a NULL' + db cr,lf,'P Toggle printer on/off' ;[pcc002] + db cr,lf,'S Status of the connection$' +inhlp1: db cr,lf,'Typing another $' +inhlp2: db ' will send it to the host' + db cr,lf,cr,lf,'Command>$' + +xmtst: db cr,lf,'Transmitting a file$' +autrst: db cr,lf,'Autoreceive is$' +locst: db cr,lf,'Local echo$' +onstr: db ' on$' +offstr: db ' off$' +flost: db cr,lf,'Flow control$' +;senst: db cr,lf,'Case sensetivity$' +vtdpst: db cr,lf,'Terminal display is $' +vtdpsr: db 'REGULAR$' +vtdpsq: db 'QUIET$' +vtemst: db cr,lf,'Terminal emulation is $' +cpmst: db cr,lf,'File Mode$' +defstr: db ' default$' +ascstr: db ' ASCII$' +binstr: db ' binary$' +hfsod: db cr,lf,'Display file size on DIRECTORY command$' +ibmst: db cr,lf,'IBM flag$' +incst: db cr,lf,'Disposition for incomplete files is$' +dscstr: db ' discard$' +kepstr: db ' keep$' +filst: db cr,lf,'File warning$' +prst: db cr,lf,'Printer copy$' +logst: db cr,lf,'Logging to $' ;[pcc003][DJR] +logst2: db ' is$' ;[DJR] +susstr: db ' suspended$' ;[pcc003] +sspmsg: db cr,lf,'SEND start-of-pkt char ^$' ;[gnn] +rspmsg: db cr,lf,'RECEIVE start-of-pkt char ^$' ;[gnn] +spsmsg: db cr,lf,'SEND packet length $' ;[MF] +rpsmsg: db cr,lf,'RECEIVE packet length $' ;[MF] +escst: db cr,lf,'Escape char: $' +bufsz1: db cr,lf,'Multi-sector buffering at $' +bufsz2: db ' of a maximum of $' +xmitst: db cr,lf,'Transmit protocol char: $' +bckst: db cr,lf,'Block check type: $' +bckst1: db '-character$' +collst: db cr,lf,'File COLLISION: $';[MF] +parst: db cr,lf,'Parity: $' +pnonst: db 'none$' +pmrkst: db 'mark$' +pspcst: db 'space$' +poddst: db 'odd$' +pevnst: db 'even$' +porst: db cr,lf,'Port in use is: $' +spdst: db cr,lf,'Current speed is: $' +spdst2: db ' bps$' ;[MF] +spdust: db 'indeterminate (not SET)$' +timmsg: db cr,lf,'Timer$' ;[DJR] Added CRLF like the others +tacst: db cr,lf,'Current TACTrap Status/Intercept Character: $' +usrst: db cr,lf,'Current user number: $' +dbgst: db cr,lf,'Debugging$' ;[DJR] +curdst: db cr,lf,'Current default disk: $' ;[DJR] +spac15: db ' $' ; *** 15 spaces *** +samems: db cr,lf,'?Source and destination files the same$' +nofile: db cr,lf,'?File not found$' +cmer00: db cr,lf,'?Program error: Invalid COMND call$' +cmer01: db cr,lf,'?Ambiguous$' +cmer02: db cr,lf,'?Illegal CP/M file specification$' +cmer03: db cr,lf,'?Wild-cards not allowed in file specification$' ;[pcc006] +cmer04: db cr,lf,'?Invalid user number$' +cmer05: db cr,lf,'?Invalid \ parameter$' +cmin00: db ' Confirm with carriage return$' +cmin01: db ' Enter a number$' +cmin02: db ' Confirm with carriage return or enter more$' + +; Diagnostic messages +sstatm: db '<SState:> ',0 +rstatm: db '<RState:> ',0 +spackm: db '<Data transmitted> ',0 +rpackm: db '<Data received > ',0 +princr: db cr,lf,0 +; +; Remote command messages [MF] +; +newfms: db cr,lf,'New file: $' +pswdms: db cr,lf,'Password: $' +acctms: db cr,lf,'Account: $' +newnms: db cr,lf,'New name: $' +msgms: db cr,lf,'Message: $' +optms: db cr,lf,'Options: $' + +; + ;Impure data + +;COMND storage + +comchr: ds 1 ;[8] save space +floctl: db 0 ;[8] flow control on/off flag +;casens: db 0 ;[8] Upper/lower case sensitive +cmstat: ds 1 ;What is presently being parsed. +cmaflg: ds 1 ;Non-zero when an action char has been found. +cmbflg: ds 1 ;[MF]Nonzero to allow a blank initial keyword +cmqflg: ds 1 ;[MF]Nonzero to prevent character echoing + ;[MF]when entering commands +cmccnt: ds 1 ;Non-zero if a significant char is found. +cmsflg: ds 1 ;Non-zero when the last char was a space. +cmostp: ds 2 ;Old stack pointer for reparse. +cmrprs: ds 2 ;Address to go to on reparse. +cmprmp: ds 2 ;Address of prompt. +cmptab: ds 2 ;Address of present keyword table. +cmhlp: ds 2 ;Address of present help. +cmdbuf: ds 80H ;Buffer for command parsing. +cmbufl equ $-cmdbuf-3 ; set a limit on the command buffer +cmfcb: ds 2 ;Pointer to FCB. +cmfcb2: ds 2 ;Pointer to position in FCB. +cmfwld: ds 1 ;Wildcard flag +cmcptr: ds 2 ;Pointer for next char input. +cmdptr: ds 2 ;Pointer into the command buffer. +cmkptr: ds 2 ;Pointer to keyword. +cmsptr: ds 2 ;Place to save a pointer. +slshsn: db 0 ; slash seen in command line +slashc: db 0 ; count for number of characters in slash sequence +slashn: db 0 ; number to be built for \xxx +; +oldsp: ds 2 ;Room for old system stack. + ds 80H ;Room for 64 levels of calls.[obs] +stack: ds 2 +eoflag: ds 1 ;EOF flag;non-zero on EOF. +curdsk: db 0 ;holds "logged" disk +curusr: db 0 ;[8] holds "user" number +rcvsop: db SOH ;[gnn] receive start-of-packet +sndsop: db SOH ;[gnn] send start-of-packet +prtcnt: db 0 ;[pcc008] prtchr fairness count +timflg: db 0 ;[jd] timer flag: 0 -> no timer +timval: dw 0 ;[jd] timer value +wrn8: db 0 ;[jd] non-zero if 8-bit-lost warning sent +qbchr: db '&' ;[jd] binary quote character. +quot8: db 0 ;[jd] non-zero if doing 8-bit quoting +logflg: db 0 ;Flag for a log file. + ;[pcc005] 0 = no log + ;[pcc005] x1 = logging on + ;[pcc005] x2 = suspended + ;[pcc005] 8xH (bit 7) = file open +lognam: db 0 ;[pcc013] File to use for session logging + db 'KERMIT ' ;[pcc013] + db 'LOG' ;[pcc013] +nexitf: db 0 ; set to 1 for exit to CPM after command tail +takflg: db 0 ;[8] TAKE flag. + ; Bit zero = 1 for take file in progress + ; bit 4 = 1 if command line present/in progress + ; Note: Take has priority over command line. +initak: db 0ffh ;[MF]Cleared after initial TAKE (KERMIT.INI) +taknam: db 0 ;[8] use default drive + db 'KERMIT ' + db 'INI' ;[8] Inital file to TAKE KERMIT.INI +takptr: ds 2 ;[8] Pointer to position in TAKE file input +takfcb: ds 12 ;[8] fcb space for take file + dw 0 ;[8] fill up extents etc with 00 + dw 0 + ds 16 ;[8] used by dos + dw 0 + dw 0 +takdma: ds 128 ;[8]space to read TAKE file... +prnbuf: ds 1 ; printer buffer. Output pointer + ds 1 ; input offset pointer + ds 256 ; give a large buffer + ds 10 ; and a little spare +; +; +; +; Transmit space +; +repcnt: db 0 ; repeat counter +starc: db 0 ; star count +rexbfl: db 0 ; retransmit flag (1=> retransmit) +rexcnt: db 0 ; retransmit character count +rexbuf: ds 128 ; max retransmit line length 128 characters +xmtbuff: + ds 128 ; 128 byte sector buffer +xmtptr: db 0 ; offset pointer to xmtbuff above +xmtfcb: ds 36 ; fcb for transmit file. +; +;INPUT and STRING space +strlen: db 0 ; length of the string from INPUT and STRING + +; Assorted other space +errorc: db 0 ; error level set to xxx +errorl: db 0 ; error level to test against + +remtxt: db 0 ; set <> 0 if D packets to screen + +hosths: ds 1 ; have we told the host to xoff? (is this duplicated) +stbuff: ds 80h ; some space or the string buffer +waitp: ds 2 ; wait command timer +waitp1: ds 2 ; wait/input timer (copy of waitp) +prntmp: ds 1 ; temporary space to put the caracter to print +prnfl: db 0 ; printer flag. Used by TYPE/PRINT +;[MF][17]Following line no longer needed as TYPE uses the big buffer +;typptr: ds 2 ; pointer used by TYPE/PRINT +equflg: db 0 ; set to non zero if copy files same +nquiet: db 0 ; If non zero print from NOUT to display + +escflg: db 0 ;Escape flag (start off). +fileio: db 0 ;Line-by-line from file (default off). +xofflg: db 0 ;X-OFF (=^S) received from COMM-line + ;X-ON (=^Q) received resets this +clkbit: dw 0 ; 32 bit pseudo clock + dw 0 ; MS bits of clock +number: ds 2 ; Number in binary form from user input +initflg:db 0 ; set to non zero when system initialised +maxbsc: ds 1 ; save space to know how big system allows + ; for multi-sector buffering. (Usually 8k?) +; +; Multiple FCB storage space. Used for the DIR command +; Later on, I want to shift this into space after the system +; dependent stuff, but then it becomes messy with pointers +; to pointers etc... [OBS] +; +xfcbptr: + ds 2 ; pointer to current fcb space +fcbcnt: ds 1 ; Number of valid fcbs in space +; +fcb0: ds 12 ; 36 bytes requred for a single fcb +fcblen EQU $-fcb0 ; length of a single fcb + ds maxfcb*fcblen ; space for maximum fcbs + 1 +; +hidefs: db 0ffh ; flag <> 0 if we show file size in DIR + +; FCB sapce for COPY command +cfcbs: ds 33 ; source fcb for copy file ops. + ;[MF]and FRENAME ops. +cfcbd: ds 33 ; destination fcb for copy ops. + ;[MF]and FRENAME ops. + +colfcb: ds 33 ;[MF]Rename fcb for SET COLLISION + +; Command tail data space etc +cbptr: db 2 ; command tail pointer (0= length of tail) +cbuff: ds 128 ; temp. space for potential command tail + +strcnt: db 0 ; string count for string operations... + +vtyval: ds 1 ; holds row number for VT52 cursor positioning +chrcnt: ds 1 ;Number of chars in the file buffer. + +; Various packet variables etc +bytes: dw 0 ; 4 byte 'byte count' space + dw 0 +filcnt: ds 1 ;Number of chars left to fill. +outpnt: ds 2 ;Position in packet. +bufpnt: ds 2 ;Position in file buffer. +fcbptr: ds 2 ;Position in FCB. +datptr: ds 2 ;Position in packet data buffer. +cbfptr: ds 2 ;Position in character buffer. +pktptr: ds 2 ;Position in receive packet. +size: ds 1 ;Size of data from gtchr. +curchk: ds 1 ;Current checksum type +inichk: ds 1 ;Agreed upon checksum type +czseen: ds 1 ;Flag that control-Z was typed +dscflg: ds 1 ;[MF]Discard file if nonzero +pktnum: ds 1 ;Packet number. +numpkt: ds 2 ;Total number of packets sent. +numrtr: ds 2 ;Total number of retries. +numtry: ds 1 ;Number of tries on this packet. +oldtry: ds 1 ;Number of tries on previous packet. +state: ds 1 ;Present state of the automaton. +;*** start of new flags. Do not assume that just because these flags are +; present that the feature is available. I simply put them in 'for future use' +rcapas: +rcap1: db 0 ; receive capabilties byte 0 +rcap2: db 0 ; receive cpabilities byte 1 +scapas: +scap1: db 0 ; send capabilities byte 0 +scap2: db 0 ; send capabilities byte 1 +rtimeo: db 0 ; receive timeout +stimeo: db 0 ; send timeout +rpadc: db 0 ; receive pad character +spadc: db 0 ; send pad character +rrept: db 0 ; receive repeat prefix +srept: db 0 ; send repeat prefix +rwindo: db 0 ; receive window size +swindo: db 0 ; send window size +rdpkt: +rlpkt: dw 0 ; receive long packet length +sdpkt: +slpkt: dw 0 ; send long packet length +sdckt: db 0 ; send default checktype +rdckt: db 0 ; receive checktype (should be same as sdckt) +;*** end of new flags +sohchr: db 1 ;Default Start-of-header chr is cntl-a +; Kermit packet starts here +; Byte 0 = start of packe character +; 1 = length of packet +; 2 = packet number +; 3 = packet type (S R I Z E B etc) +packet: ds 4 ;Packet (data is part of it). +; Data part of packet (variable length - include checksum) +data: ds 5AH ;Data and checksum field of packet. +recpkt: ds 65H ;Receive packet storage (use the following). +recpkx: db cr,'$' ;= = = buffer limit +filbuf: ds 65H ;Character buffer. +fnbuf: ds 20h ;[jd] file name buffer +autorc: db 0 ;[obs] set to ON for autoreceive + +; Temporary data space. Sometimes accesses as 16 bits (eg temp1/2) +;** Temp 1 & 2 must be in order +lstchr: ;Last console input character. +temp1: ds 1 ;Temporary storage. +temp2: ds 1 +lincnt: ; used for counting lines in p20ln +temp3: ds 1 +temp4: ds 1 +temp5: ds 1 +temp6: ds 1 +temp7: ds 1 +temp8: ds 1 +temp9: ds 1 +temp10: ds 1 +temp11: ds 1 + + +getrxflg: + ds 1 ;[obs 22] +quietd: db 0 ;loud display during file transfers +argblk: ds 20H ;Used for subroutine arguments + +maxfil EQU 2 ; currently, only two names used. +fcbblk: ds maxfil*10H ;Used for a list of FCB's + +; [gnn] secondary filename storage (remote on send, local on get) +remnam: ds 60 ;[gnn] +remlen: ds 1 ;[gnn] length of name + +; Bookkeeping storage for multiple-sector buffering. The actual buffer +; is somewhere in the system-dependent overlay. (at the end, I hope). +nxtbuf: ds 2 ; Pointer to next sector +seccnt: ds 1 ; Number of sectors buffered +endsts: ds 1 ; Status for last read into buffer +; +; +; [MF] Storage for Remote Command processing +; +; +rdl: ds 1 ;[MF]Holds accumulated length of remote data +; +rcl: ds 1 ;[MF]Holds length of Remote command line arg +; +remdat: ds 95 ;[MF]Packet data buffer (plenty big) +; +rcom: ds 1 ;[MF] Remote Command type +; +rprmpt: dw 0 ;[MF]Address of prompt strings +; +rptr: dw 0 ;[MF]Remote command packet data pointer +; +rscode: ds 3 ;[MF]Holds Remote Set command ASCII code +; +; + org 7000h ; address for Kermit 4.11 +; ORG ($ + 0ffH) AND 0ff00H ; move to start of next page + +; +; hooks for system-dependent routines: +; This area is overwritten by the system-dependent overlay. +; +lnkflg: dw 0 ; linkage information for consistency check. +lnkent: dw 0 ; more of the same. +ovlver: dw 0 ; pointer to overlay's version string +family: dw 0 ;*NEW* [10] address of the family overlay (not CPSSYS) +; +; Input/output routines. Note that outmdm and outcon may actually be the +; same routine if selmdm and selcon do anything. (the same is true +; of inpmdm and inpcon). +; +selmdm: jmp $-$ ; select modem for I/O +outmdm: jmp $-$ ; output character in E to modem +inpmdm: jmp $-$ ; read character from modem. return character or 0 in A. +flsmdm: jmp $-$ ; flush pending input from modem +selcon: jmp $-$ ; select console for I/O +outcon: jmp $-$ ; output character in E to console +inpcon: jmp $-$ ; read char from console. return character or 0 in A +outlpt: jmp $-$ ; output character in E to printer +lptstat:jmp $-$ ;*NEW*[10] see if printer ready to print a character + ; If 0ffh then ok, if 0h then not ok. +extern: jmp $-$ ;*NEW for 4.09* If $-$ is not zero, then its a jump to + ; a routine to emulate any terminal type the user + ; wants to implement. +xbdos: jmp 0 ;*NEW* address of the bdos trap in this section + ; of code. It is filled in initialisation. +; +; screen formatting routines +clrlin: jmp $-$ ; erase current line +clrspc: jmp $-$ ; erase current position (after backspace) +delchr: jmp $-$ ; make delete look like backspace +clrtop: jmp $-$ ; erase screen and go home +; +; these routines are called to display a field on the screen. +scrend: jmp $-$ ; move to prompt field +screrr: jmp $-$ ; move to error message field +scrfln: jmp $-$ ; move to filename field +scrnp: jmp $-$ ; move to packet count field +scrnrt: jmp $-$ ; move to retry count field +scrst: jmp $-$ ; move to status field +rppos: jmp $-$ ; move to receive packet field (debug) +sppos: jmp $-$ ; move to send packet field (debug) +; +sysinit: jmp $-$ ; program initialization +sysexit: jmp $-$ ; program termination +syscon: jmp $-$ ; remote session initialization +syscls: jmp $-$ ; return to local command level +sysinh: jmp $-$ ; help text for interrupt (escape) extensions +sysint: jmp $-$ ; interrupt (escape) extensions, including break +sysflt: jmp $-$ ; filter for incoming characters. + ; called with character in E. +sysbye: jmp $-$ ; terminate remote session +sysspd: jmp $-$ ; baud rate change routine. + ; called with value from table in DE +sysprt: jmp $-$ ; port change routine. + ; called with value from table in HL +sysscr: jmp $-$ ; screen setup for file transfer + ; called with Kermit's version string in DE +csrpos: jmp $-$ ; move cursor to row B, column C +sysspc: jmp $-$ ; calculate free space for current disk +mover: jmp $-$ ; block move +prtstr: jmp $-$ ; *** NEW *** prtstr moved to overlay +; +; Data initialized by system-dependent overlay: +; +pttab: ds 2 ; points to local equivalents to VT52 escape sequences +spdtab: ds 2 ; address of baud rate command table, or zero +spdhlp: ds 2 ; address of baud rate help table, or zero +prttab: ds 2 ; address of port command table, or zero +prthlp: ds 2 ; address of port help table, or zero +timout: ds 2 ; Initial value for fuzzy timeout +vtflg: ds 1 ; VT52 emulation flag +escchr: ds 1 ; Storage for the escape character. +speed: ds 2 ; storage for the baud rate +port: ds 2 ; storage for port value +prnflg: ds 1 ;[hh] printer copy flag (overlay may need it) +dbgflg: ds 1 ; debugging flag +ecoflg: ds 1 ; Local echo flag (default off). +flwflg: ds 1 ; File warning flag (default on). +ibmflg: ds 1 ; IBM flag (default off). +cpmflg: ds 1 ; File mode flag (ascii/binary/default) +incflg: ds 1 ;[MF]Incomplete flag (keep/discard) + ;[MF](default discard) +parity: ds 1 ; Current parity. +spsiz: ds 1 ; Send packet size. +rpsiz: ds 1 ; Receive packet size. +stime: ds 1 ; Send time out. +rtime: ds 1 ; Receive time out. +spad: ds 1 ; Send padding. +rpad: ds 1 ; Receive padding. +spadch: ds 1 ; Send padding char. +rpadch: ds 1 ; Receive padding char. +seol: ds 1 ; Send EOL char. +reol: ds 1 ; Receive EOL char. +squote: ds 1 ; Send quote char. +rquote: ds 1 ; Receive quote char. +chktyp: ds 1 ; Checksum type desired +tacflg: ds 1 ; TACTrap flag (zero=off, nonzero=on; when non-zero, + ; contains current TAC intercept character) +tacchr: ds 1 ; TAC intercept character +bufadr: ds 2 ; Pointer to big buffer for multiple-sector I/O +bufsec: ds 1 ; Number of sectors big buffer can hold (0 means 256) +ffussy: ds 1 ; if nonzero, don't permit <>.,;?*[] in CP/M filespec. +; space used by directory command; here because space calculation is +; (operating) system-dependent +bmax: ds 2 ; highest block number on drive +bmask: ds 1 ; (records/block)-1 +bshiftf: ds 1 ; number of shifts to multiply by rec/block +nnams: ds 1 ; counter for filenames per line + +lnksiz equ $-lnkflg ; length of linkage section, for consistency check. + + END START diff --git a/cpsdef.asm b/cpsdef.asm new file mode 100644 index 0000000..46e3ba6 --- /dev/null +++ b/cpsdef.asm @@ -0,0 +1,287 @@ +; 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 file contains definitions used by both modules of Kermit. +; +; revision history: +; +;edit 9, 30-Nov-1990 by MF. Make "fairness" count "prfair" be 50 so +; console gets checked a bit more often. +; edit 8, 11-Sep-1990 by MF. Make default RECEIVE and SEND packet-size +; 80 (per Kermit standard) as packet size is adjustable in Version +; 4.10. +; edit 7 16-Jun-86 OBSchou. Added cmnum in the command opcodes. This gets a +; number from the user inot variable number. No checking on overflow. +; +; edit 6 13-May-86 OBSchou. BDOS calls trapped to check for console use +; as we want to substitute in commands from a TAKE file. Trapping +; means I dont have to go through an check ever BDOS call... +; +; edit 5: 22-Apr-86 by Bertil Schou, Loughborough University, UK +; moved some definitions from the CP4SYS.ASM file to here for +; Kermit version 4.06 +; +; edit 4: 6-Feb-85 by Charles Carvalho +; modify pcc007: replace ffussy assembly switch with runtime test. +; add "getvnm" - get CP/M version number. +; +; edit 3: 13-Jan-85 by Vanya J.Cooper Pima Commun. College Tel: 602-884-6809 +; +;pcc007 2-Jan-85 vjc modules:cp4def,cp4cmd +; Cmifil is too fussy about what characters to accept in a +; filespec. My CP/M manual says any printable character is ok +; except <>.,;:?*[], and lower case. In practice, even those work +; sometimes. Kermit itself uses '&' if file warning is on, +; and then won't let you reference the file. Allow all +; printable characters except those above. Add conditional +; ffussy, so that if not ffussy, all special characters will be +; allowed, just convert lower to upper-case. +; +;pcc008 2-Jan-85 vjc modules:cp4def,cp4tt,cp4utl +; Keyboard input during CONNECT mode can get locked out if +; there is enough input from the modem port to keep prtchr +; busy. This can happen for example, if the printer is running +; at the same speed as the modem line, leaving you helpless to +; turn it off or abort the host. Add a fairness count, so that +; at least every prfair characters we look at console input. +; +; edit 2: July 10, 1984 (CJC) +; Remove defines for TRUE and FALSE, during reorganization for LASM +; compatibility. If we're using LASM, this file is linked by CP4KER +; or CP4TYP, and links to CP4MIT or CP4LNK. Also, push comments around +; a little. +; +; edit 1: May, 1984 (CJC) +; extracted from CPMBASE.M80 version 3.9; modifications are described +; in the accompanying .UPD file. +; + +;Symbolic Definitions for some ASCII characters +; +soh EQU 01O ;ASCII SOH (Control-A) +cntlc EQU 03O ;ASCII ETX (Control-C) +ctrlc EQU 03O ;ASCII ETX (Control-C) +bell EQU 07O ;ASCII BEL (Control-G) +bs EQU 10O ;ASCII backspace (Control-H) +tab EQU 11O ;ASCII Tab (Control-I) +lf EQU 12O ;ASCII Line Feed (CTRL-J) +ff EQU 14O ;ASCII Form Feed (CTRL-L) +cr EQU 15O ;ASCII Carriage Return (CTRL-M) +space EQU 20h ;ASCII Space +xon EQU 21O ;ASCII XON (Control-Q) +xoff EQU 23O ;ASCII XOFF (Control-S) +esc EQU 33O ;ASCII ESCape +semico EQU 3bh ;ASCII Semicolon +subt EQU 32O ;ASCII SUB (CTRL-Z) +cntlz EQU subt ;ASCII SUB (Control-z) [6] +ctrlz EQU subt ;ASCII SUB (Control-z) +del EQU 177O ;ASCII DELete (rubout) +; +;BDOS calls +IF NOT cpsker ;[6] If CPSKER is truem then system indep. stuff. We want + ;to trap BDOS calls and test for console activity +bdos EQU 0005H ;BDOS entry point, for the following functions: +ENDIF ;NOT cpsker [6] +; +;Function Name Function Input Parameters Output Parameter +;============= ======== ================ ================ +; (ALL Function Numbers are passed in Register C) +conin EQU 01H ;Read Console NONE ASCII Char in A +conout EQU 02H ;Write Console ASCII Char in E NONE +auxin EQU 03H ;Auxiliary input +rdrin EQU 03H ;Read Reader NONE ASCII Char in A +lstout EQU 05H ;Write List ASCII Char in E NONE +dconio EQU 06H ;Direct Con I/O ASCII Char in E I/O Status in A + ; if E=0FEH, + ; Input if E=0FFH +prstr EQU 09H ;Print String String-Address NONE + ; in DE (term=$) +rdstr EQU 0AH ;Read Buffer Buffer-Address Read Buffer filled +; in DE +; Read Buffer Byte Function +; 1 Maximum Buffer Length +; 2 Current Buffer Length (returned value) +; 3-n Data (returned values) +; +consta EQU 0BH ;Console Stat NONE LSB(A)=1 if char ready +getvnm EQU 0CH ;Version Number NONE H=0 (CP/M), L=BDOS ver +inbdos EQU 0DH ;Init BDOS NONE NONE +logdsk EQU 0EH ;LOG-In disk Value in E NONE + ; A=0,B=1,... +openf EQU 0FH ;Open File FCB-Addr in DE Byte Addr.of FCB, + ; or 0FFH if not +closf EQU 10H ;Close File FCB-Addr in DE Byte Addr.of FCB, + ; or 0FFH if not +sfirst EQU 11H ;Search File FCB-Addr in DE Byte Addr.of FCB(0-3), + ; or 0FFH if not +snext EQU 12H ;Search next FCB-Addr in DE Byte Addr.of next FCB, + ; or 0FFH if not +delf EQU 13H ;Delete File FCB-Addr in DE Byte Addr.of FCB(0-3), + ; or 0FFH if not +readf EQU 14H ;Read Record FCB-Addr in DE 0=successful read + ; 1=read past EOF + ; 2=reading random data +writef EQU 15H ;Write Record FCB-Addr in DE 0=successful write + ; 1=ERROR extending + ; 2=End of disk data + ; 255=No more DIR space +makef EQU 16H ;Make File FCB-Addr in DE 0-3= success, + ; 255= no more dir space +renam EQU 17H ;Rename File FCB-Addr in DE 0-3= success, + ; 255= file not found +rdlog EQU 18H ;Ret. Log Code NONE Login Vector in HL +rddrv EQU 19H ;Read Drive # NONE # of logged in drive in + ; (A=0,B=1,C=2....) +setdma EQU 1AH ;Set DMA Addr. Addr. of 128 NONE + ; byte buffer in DE +wrtprt EQU 1CH ;Write prot dsk NONE NONE +getrov EQU 1DH ;Get R/O Vect. NONE HL= R/O Vect. value +setfat EQU 1EH ;Set File Attr. FCB-Addr.in DE Dir. code in A +gtdpar EQU 1FH ;Get DSK par. NONE HL=DPB Address +usrcod EQU 20H ;Get/Set Usr.Cd E=0FFH (get) A=current code (get) + ; E-code (set) A=no value (set) +rrand EQU 21H ;Read Random FCB-Addr in DE A=Return code +wrand EQU 22H ;Write Random FCB-Addr in DE 1=read'g unwritten data + ; 2=(not used) + ; 3=can't close curr. ext + ; 4=seek to unwr. ext. + ; 5=dir overflow(write) + ; 6=seek past End of DSK +cflsz EQU 23H ;Comp File Sz. FCB Addr.in DE Rand.Rec.field set to + ; File size +setrar EQU 24H ;Set Rand. Rec. FCB-Addr.in DE Rand.Rec.field set + +; CPM 2 only: +punout EQU 04H ;Write Punch ASCII Char in E NONE +gtiob EQU 07H ;Get I/O status NONE I/O Status in A +ptiob EQU 08H ;Put I/O status I/O Status in E NONE +getalv EQU 1BH ;Get All.Vect. NONE All.Vect in HL + +; CPM 3 only: +auxout EQU 04H ;Auxiliary output +auxist EQU 07H ;Get AUXIN: status A=FF if character + ; ready, A=0 if none +auxost EQU 08H ;Get AUXOUT: status A=FF if ready, A=0 + ; if not ready +getfs EQU 2EH ;Get free space E=drive # rec free in dma addr +; +parevn EQU 00H ;Even parity. +parmrk EQU 03H ;Mark parity. +parnon EQU 06H ;No parity (eighth bit is data). +parodd EQU 09H ;Odd parity. +parspc EQU 0CH ;Space parity. + +defpar EQU parnon ;Default parity. +ibmpar EQU parmrk ;IBM COMTEN's parity. + +fcb EQU 5CH ;Location of File Control Block. +fcbext equ fcb+12 +fcbrno equ fcb+33 +buff EQU 80H ;Location of file output buffer (DMA). +bufsiz EQU 80H ;Size of DMA. + +maxfcb equ 64 ; maximum of 64 fcbs to be stored in multiple fcb bock + +maxpkt EQU '~'-' '+2O;Maximum size of a packet. +maxtry EQU 05O ; Number of retries on a packet. +imxtry EQU 20O ; Number of retries send initiate. +prfair EQU 50 ;[pcc008] Prtchr fairness count + +; opcodes for command parser +cmkey EQU 01H ;Parse a keyword. +cmifi EQU 02H ;Parse an input file spec (can be wild). +cmofi EQU 03H ;Parse an output file spec. +cmcfm EQU 04H ;Parse a confirm. +cmtxt EQU 05H ;Parse text. +cmnum EQU 06h ;Parse a number +cmifin EQU 10H ;Parse an input file spec (but no + ;Error output + +;[4] from CP4SYS.ASM +; +;========================================================================= +; I/O Byte assignments (2-bit fields for 4 devices at loc 3) +; +;bits 6+7 LIST field +; 0 LIST is Teletype device (TTY:) +; 1 LIST is CRT device (CRT:) +; 2 LIST is Lineprinter (LPT:) +; 3 LIST is user defined (UL1:) +; +;bits 4+5 PUNCH field +; 0 PUNCH is Teletype device (TTY:) +; 1 PUNCH is high speed punch (PUN:) +; 2 PUNCH is user defined #1 (UP1:) +; 3 PUNCH is user defined #2 (UP2:) +; +;bits 2+3 READER field +; 0 READER is Teletype device (TTY:) +; 1 READER is high speed reader (RDR:) +; 2 READER is user defined #1 (UR1:) +; 3 READER is user defined #2 (UR2:) +; +;bits 0+1 CONSOLE field +; 0 CONSOLE is console printer (TTY:) +; 1 CONSOLE is CRT device (CRT:) +; 2 CONSOLE is in Batch-mode (BAT:);READER = Input, +; LIST = Output +; 3 CONSOLE is user defined (UC1:) +; +;========================================================================= + +iobyte EQU 03H ;Location of I/O byte + +;[4] From CP4SYS.ASM +; +; +; +; Protocol parameters. Some of these can be changed with commands. +; + +drpsiz SET 50H ;Default receive packet size. (maximum is 5EH) +dspsiz SET 50H ;Default send packet size. (maximum is 5EH) +dstime SET 08H ;Default send time out interval. +drtime SET 05 ;Default receive time out interval + +dspad EQU 00H ;Default send padding. +drpad EQU 00H ;Default receive padding. +dspadc EQU 00H ;Default send padding char. +drpadc EQU 00H ;Default receive padding char. +dseol EQU CR ;Default send EOL char. +dreol EQU CR ;Default receive EOL char. +dsquot EQU '#' ;Default send quote char. +drquot EQU '#' ;Default receive quote char. +dschkt EQU '1' ;Default checksum type +; + +; Define VT or Terminal type values +vtdefo EQU 0 ;VT52 emulation by terminal itself. +vtdefv EQU 1 ;VT52 emulation by ttab tables in CPXVDU.ASM etc +vtdefd EQU 2 ;Dumb Terminal (Just prints) +vtdefe EQU 3 ;Termianl emulation done outside (in overlay) + + +; If this is being assembled by LASM, we need to LINK to one of two modules; +; if we're not using LASM, no problem. +; CPSKER.ASM defines "cpsker" TRUE, and CPXTYP.ASM defines it FALSE, so we can +; determine what's going on. +IF lasm AND cpsker ; building CP4KER with LASM? + LINK CPSMIT ; yes, chain to next piece. +ENDIF;lasm AND cpsker +IF lasm AND NOT cpsker ; LASM, but not building CP4KER? + LINK CPXLNK ; yes, chain to different piece. +ENDIF;lasm AND NOT cpsker diff --git a/cpsker.asm b/cpsker.asm new file mode 100644 index 0000000..254d056 --- /dev/null +++ b/cpsker.asm @@ -0,0 +1,315 @@ +; CPSKER.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 +; 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 for the system-independent portion of KERMIT, which +; consists of the following files (in this order): +; +; CPSKER.ASM - this file +; CPSDEF.ASM - definitions for both KERMIT and KERSYS +; CPSMIT.ASM - \initialization, main loop, miscellaneous commands +; CPSCOM.ASM - /(BYE, EXIT, LOG, SET, SHOW, and STATUS) (Part1 of 2) +; CPSPK1.ASM - \the KERMIT protocol handler (SEND, RECEIVE, LOGOUT, +; CPSPK2.ASM - / and FINISH commands) (In two parts) +; CPSREM.ASM - REMOTE commands etc +; CPSSER.ASM - SERVER commands etc (Empty as yet) +; CPSTT.ASM - the transparent commands (TRANSMIT, CONNECT) +; CPSCPM.ASM - CP/M commands (DIR, ERA) +; CPSWLD.ASM - the wildcard handler +; CPSCMD.ASM - the command parser +; CPSUTL.ASM - utility routines +; CPSDAT.ASM - Data space and the overlay link space +; +; When building the system-independent part with M80 or MAC80, CPSKER +; INCLUDEs the other files; when building with LASM, each file LINKs to +; the next file. +; +; For now, the system-dependent routines are all in CPSSYS.ASM, with +; the actual configuration defined in CPSTYP.ASM. +; +; revision history (latest first): +; +; Begin CP/M Kermit-80 version 4.11. +;edit 32, 1-Apr-1991 by MF. Official release of work to date as CP/M Kermit +; (Kermit-80) Version 4.11. +; Modified edit level of cpscpm.asm to reflect a bug fix for the TYPE +; command introduced with edit 13. +;edit 31, 29-Mar-1991 by MF. Modified edit levels of cpsker.asm, +; cpscom.asm and cpsdat.asm to reflect rename of parameter vermin to +; revno (revision level) and change of SET COLLISION REPLACE to +; SET COLLISION OVERWRITE to conform with C-Kermit. Modified +; edit level of cpsrem.asm to reflect change from REMOTE SET FILE +; COLLISION REPLACE to REMOTE SET FILE COLLISION OVERWRITE. +; Modified edit level of cpsutl.asm to reflect code tightening and +; edit levels of cpsmit.asm and cpspk2.asm to close any open TAKE-file +; and abort take-file processing if ^C is typed from the console +; Also corrected ^Z test in cpsmit.asm in INPUT command ("inp2b") +; Implement "file not found" complaint if a TAKE command can't find +; the TAKE-file and it's not the initial TAKE (KERMIT.INI) +; Modified edit level of cpscpm.asm to reflect modification of the +; TYPE and PRINT commands to cancel file typeout/printout completely +; if ^C is entered on the console (either immediately or after a key +; has been pressed to induce a pause) and to immediately begin +; typeout/printout of the next file (if the filespec was wild-carded) +; if ^X is entered (either immediately or after a key has been pressed +; to induce a pause). +; Modified edit levels of cpsmit.asm and cpscom.asm to reflect addition +; of the STAY command as a synonym for SET NO-EXIT. +;edit 30, 27-Feb-1991 by MF. Modified edit levels of cpscom.asm, +; cpsmit.asm, cpsutl.asm and cpsdat.asm to reflect provision for +; a "revision level" field (1-26=A-Z), addition of QUIT as a synonym +; for the EXIT command, recognition of C, R and S as abbreviations +; for the CONNECT, RECEIVE and SEND commands, respectively, display +; of Kermit version in the VERSION command and a fix to the TAKE-file +; input routine "r1tchr" to prevent semicolons from being interpreted +; as command separators during TAKE-file execution. This last fix +; allows such commands as REMOTE DELETE *.*;* to Kermit-32 to +; operate as expected. +;edit 29, 14-Feb-1991 by MF. Updated edit levels of cpscom.asm, +; cpscpm.asm, cpsdat.asm and cpsrem.asm to reflect bug fixes, +; code tightening and simplified routine "remcli" (in cpsrem.asm) +; which gets text to be passed on to a remote Kermit in REMOTE +; Kermit commands. +;edit 28, 8-Feb-1991 by MF. Changed edit level of cpscpm.asm to reflect +; a bug fix to make TAKE-files work properly with commands such as +; INPUT which check the keyboard for input. +;edit 27, 30-Jan-1991 by MF. Changed edit levels of cpscpm.asm, cpsrem.asm, +; cpstt.asm and cpsutl.asm to reflect bug fixes and enhancements +;edit 26, 17-Jan-1991 by MF. Changed edit level of cpscmd.asm to +; reflect fixes to allow leading spaces/tabs to be ignored when +; parsing keywords (this was the intent but the code never worked +; correctly) and to blank the entire fcb in "cmifil" to allow successive +; COPY commands to function properly. Also changed edit level of +; cpspk1.asm to reflect further work on "disk full" error reporting. +;edit 25, 14-Jan-1991 by MF. Incremented edit level of cpspk1.asm to +; reflect bug fix to "disk full" error reporting code so <cr><lf> +; is not sent directly to the Remote Kermit. This per a report from +; Russell Lang of Australia's Monash University. +;edit 24, 10-Jan-1991 by MF. Modified edit level of cpxtyp.asm to +; reflect addition of "terminal required" message for some. +; machines. +;edit 23, 7-Jan-1991 by MF. Modified edit levels of cpxtyp.asm, cpxswt.asm, +; cpxbbi.asm to reflect addition of Ampro Little Board support. +;edit 22, 3-Jan-1991 by MF. Incremented edit levels of cpspk1.asm/cpspk2.asm +; to reflect further mods to "sdata" and "inchr" routines. +;edit 21, 2-Jan-1991 by MF. Incremented edit level of cpspk1.asm to reflect +; code cleanup in "sdata" routine. +;edit 20, 26-Dec-1990 by MF. Modified edit level of CPSCMD.ASM to reflect +; fix to allow leading white space to be skipped in lines from +; TAKE-files as well as from the CP/M command-line tail; this per a +; phoned-in bug-report to Dr. Martin J. Carter of Nottingham +; University in the U.K. (PPZMAJOC@vax.ccc.nottingham.ac.uk) +;edit 19, 14-Dec-1990 by MF. Modified edit level of cpspk2.asm to reflect +; modification to "gofil" to allow drive specifications in 2nd +; filename of GET and RECEIVE commands; also modified edit levels of +; cpspk1.asm and cpsrem.asm to reflect addition of "<<>>" around +; "X" or "F" packets coming as a reply to a REMOTE command and +; deletion of an unnecessary instruction before label remc2d +; in cpsrem.asm. +;edit 18, 9-Dec-1990 by MF. Modified edit levels for Version 4.10 +; yet another time to reflect changes in CPSDAT.ASM to clarify +; "File size on DIR" status message. +;edit 17, 4-Dec-1990 by MF. Adjusted edit levels of cpscom.asm/cpsdat.asm +; to reflect addition of Autoreceive status to SHOW/STATUS display. +;edit 16, 30-Nov-1990 by MF. Adjusted edit levels of cpscom.asm/cpsdat.asm +; to reflect fix to SHOW/STATUS routines to show terminal display +; mode (quiet/regular). Also adjusted edit level of cpsutl.asm to reflect +; change to routine "p20ln" to use "pausit" to save code space. +; Adjusted edit level of cpsdef.asm to reflect change in "fairness" +; counter prfair from 100 to 50 to make terminal a bit more responsive +; during CONNECTs. +;edit 15, 27-Nov-1990 by MF. Adjusted edit level of cpspk1.asm to reflect +; a bug fix. +;edit 14, 27-Nov-1990 by MF. Again adjusted edit level of cpspk1.asm to +; reflect modifications of "disk-full"and SET INCOMPLETE-FILES behavior. +;edit 13, 23 Nov-1990 by MF. Adjusted edit level of cpspk1.asm to reflect +; code changes for "disk full" processing. +;edit 12, 8-Nov-1990 by MF. +; Adjusted edit levels shown for cpscom.asm/cpspk1.asm/cpsdat.asm to +; reflect bug fixes and code revisions. +;edit 11, 5-Nov-1990 by MF. +; Cosmetic changes for main help text for COPY and RENAME commands. +; Begin CP/M Kermit-80 version 4.10. +;edit 10, 2-Nov-1990 by MF. Moved Overlay address to 7000H (cpsdat.asm). +;edit 9, 1-Nov-1990 by Mike Freeman (BPA). Cosmetic changes (command-name +; changes: SET BAUD-RATE==>SET SPEED, FCOPY==>COPY, FRENAME==>RENAME, +; STRING==>OUTPUT, REMOTE CWD==>REMOTE CD per suggestions of FDC +; to aid in uniformity of nomenclature for various Kermits. +;edit 8, 30-Oct-1990 by Michael Freeman; 301 N.E. 107th Street; +; Vancouver, WA 98685 USA; Telephone (206)574-8221. +; Work: Bonneville Power Administration +; P.O. Box 491 M/S MORF +; Vancouver, WA USA 98666 +; Telephone (206)690-2307 +; Implemented FRENAME command to rename a CP/M file. +; Implemented many Remote commands, variable-length packets up thru +; 94 characters in length. Fixed a bug in CPSCOM.ASM in the +; routine "getnp" and a bug in CPSCOM.ASM which caused garbage to appear +; on the screen when PRTSTR was called with QUIETD flag set. +; Modified code in module CPSCMD.ASM to skip leading spaces and tabs +; when getting Kermit commands from the CP/M command line. This also +; obviates the necessity to type a leading semicolon to separate the +; Kermit command from the Kermit commands on the CP/M command line. +; Fixed code in CPSPK2.ASM which handles file collision detection +; and resulting file rename per my entries in CPKERM.BWR. +; and included fix by Russell Lang of Dept. of Electrical and Computer +; Engineering, Monash University, Australia, to prevent renamed +; files with SET WARNING ON from having the attributes (e.g., R/O) +; copied from original file. Mr. Lang's E-mail address is: +; Russell Lang Email: rjl@monu1.cc.monash.edu.au Phone: (03) 565 3460 +; Department of Electrical and Computer Systems Engineering +; Monash University, Australia +; Also fixed a bug in CPSPK2.ASM which prevented completion messages +; from being displayed if terminal was set to QUIET. +; Implemented most proposed SET FILE-COLLISION (COLLISION) commands. +; Implemented SET INCOMPLETE file disposition command. +; Implemented a few of the proposed REMOTE SET commands. +; Implemented other fixes suggested in CPKERM.BWR. +; Moved overlay address to 6C00H. +; Changed location of .printx in this file so LASM doesn't complain. +; In system-dependent modules, included HP-125 support. +; Also modified Telcon Zorba code in CPXHEA.ASM to enable setting +; of baud-rates and sending of a break. +; Included Russell Lang of Monash Univ. Australia's implementation +; for the Microbee series of computers (CPXBEE.ASM). +; Fixed COMPUPRO version of Kermit to compile correctly and to +; conform to current syntax for setting baud-rate. +; edit 7, September, 1987. Added files for SERVER and REMOTE +; modules (CPSSER/CPSREM). SERVER is still empty, and may be +; only wishfull thinking. I have ideas, but I dont think I +; will have the time to implement it. +; +; edit 6: 30 March, 1987 by OBSchou. Start Kermit-80 V4.09 with the +; overlay address at 6000h. Also adjusted the INCLUDEs to allow +; M80 to assmeble these files. +; +; edit 5: 20 June, 1986. Have added so much code etc that the overlay had to +; be moved again.. give it to 5000h. This starts off Kermit-80 V4.08 +; +; edit 4 22 April 1986 +; Start work on 4.06. This should clear up a couple of bugs, add in +; a few features, and split the system dependent stuff into +; smaller units. +; +; edit 3a 7 March 86 OBSchou Loughborough england. Minor additions +; to cpsker.asm, cpscmd.asm and cpspkt.asm. +; +; edit 3: February 10, 1985 (CJC) +; Update for v4.05; add "verno" so CPSUTL doesn't have to change +; just because some other module did. +; +; edit 2: September 10, 1984 (CJC) +; Update for v4.03. +; +; edit 1: July 27, 1984 (CJC) +; Created to allow assembly of Kermit by LASM as well as MAC80 and M80. + +verno EQU 11 ; minor version number +revno EQU 0 ;[MF]Revision level + ;[MF]0-26 yields A-Z + +; Version 4.10 of Kermit consists of the following edit levels: +; cpsker.asm edit 32 +; cpsdef.asm edit 9 +; cpsmit.asm edit 30 +; cpscom.asm edit 13 +; cpspk1.asm edit 23 +; cpspk2.asm edit 11 +; cpsrem.asm edit 13 +; cpsser.asm edit 1 +; cpstt.asm edit 12 +; cpscpm.asm edit 14 +; cpswld.asm edit 4 +; cpscmd.asm edit 13 +; cpsutl.asm edit 30 +; cpsdat.asm edit 19 +; cpxlnk.asm edit 8 (cpslnk.asm is not assembled with cpsker, but it +; defines the linkage area expected by cpsker, and so must +; match the description in cpsutl.asm) +; cpxswt.asm edit 10 +; +; Version 4.10 of Kermit has been tested with the following edit levels of +; the system-dependent files: +; cpxtyp.asm edit 34 +; cpxsys.asm edit 40 +; cpxhea.asm edit 4 +; cpxtor.asm edit 4 +; cpxbbi.asm edit 4 (Ampro Little Board) +; +; Version 4.10 of Kermit is still to be tested fully against all known systems +; so far included in the system dependent overlays. +; + + +FALSE equ 0 +TRUE equ NOT FALSE + +cpsker equ TRUE ; building system-independent part +debug equ FALSE ; set false for running system. True => does some + ; unusual or unexpected things. +; +; 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. +; +; Get the other modules... + +IF lasm ; If we're linking, go on to the next file. + LINK CPSDEF +ENDIF;lasm + +; If we're still here, we must be using M80 or MAC80. M80 doesn't +; like ENDs inside conditionals, but the END statement has to be +; in CPSUTL for LASM (otherwise, we'd need a file containing just an +; END statement). So, we leave off the IF m80 OR mac80 conditional +; that ought to be around these INCLUDEs. No problem until the next +; incompatible assembler comes along... +; Let's first say where we are: +; +.printx * CPSKER.ASM (or nearest offer) * +; +.printx * CPSDEF.ASM * + INCLUDE CPSDEF.ASM ; definitions +.printx * CPSMIT.ASM * + INCLUDE CPSMIT.ASM ; initialization, main loop, some commands +.printx * CPSCOM.ASM * + INCLUDE CPSCOM.ASM ; part of command/status/set etc +.printx * CPSPK1.ASM * + INCLUDE CPSPK1.ASM ; KERMIT protocol handler (Part 1) +.printx * CPSPK2.ASM * + INCLUDE CPSPK2.ASM ; KERMIT protocol handler (Part 2) +.printx * CPSREM.ASM * + INCLUDE CPSREM.ASM ; Kermit REMOTE code (little in it, as yet) +.printx * CPSSER.ASM * + INCLUDE CPSSER.ASM ; Kermit SERVER code (As yet, empty) +.printx * CPSTT.ASM * + INCLUDE CPSTT.ASM ; transparent communication handler +.printx * CPSCPM.ASM * + INCLUDE CPSCPM.ASM ; CP/M command support (DIR, ERA) +.printx * CPSWLD.ASM * + INCLUDE CPSWLD.ASM ; wildcard handler +.printx * CPSCMD.ASM * + INCLUDE CPSCMD.ASM ; command parser +.printx * CPSUTL.ASM * + INCLUDE CPSUTL.ASM ; Various utilities and data, and END [ToadHall] +.printx * CPSDAT.ASM * + INCLUDE CPSDAT.ASM + END ; MAC80 ignores END's in included files... diff --git a/cpsker.hex b/cpsker.hex new file mode 100644 index 0000000..9120b31 --- /dev/null +++ b/cpsker.hex @@ -0,0 +1,1589 @@ +:100100000000C32701C3C201C3234F4350534D49CD +:10011000542E41534D20283330292032392D4D6142 +:10012000722D313939312421000039220F63319188 +:1001300063117C54CD554F0E19CD82513C329463DE +:100140003A8670FEFF3E00C24D013286702A007072 +:100150007CB5CAB0011154FF197CB5C2B9012A029D +:100160007011FAFF197CB5C2B901218251222770A2 +:10017000CD4D703AA570322D6711C95ACD777021D7 +:10018000800011A26A018000CD74703A8000A7CA75 +:10019000A1013DCAA1013AAD63F61032AD6332ACA4 +:1001A000633EFF322C67CD1A08AF32AE63C3C20183 +:1001B000115556CD554FC3D006118B56CD554FC353 +:1001C000D006319163CD1470AF32324732334732AB +:1001D000344732AC6C3271623272623299663A9450 +:1001E00063C64032C654CD09543AA26CFE30C2F305 +:1001F000013E2032C4543AA16C32C5543AAD63E694 +:1002000011C20B023AAC63A7C2CA0611B954CD524F +:1002100047112502213C03CD084FEBE911E554CDF0 +:100220007770C3C2012005425245414B24AA060300 +:1002300042594524BB06014324CA3D07434F4E4E55 +:1002400045435424CA3D04434F5059249344094420 +:1002500049524543544F525924E4400545524153B5 +:100260004524C042044558495424CA060646494E0E +:10027000495348240F270347455424371904484558 +:100280004C5024850705494E50555424D306034C41 +:100290004F47249107064C4F474F55542465270676 +:1002A0004F555450555424DC18055041555345249E +:1002B000B307055052494E5424F60704515549548A +:1002C00024CA060152246D19075245434549564533 +:1002D000246D190652454D4F544524542D06524560 +:1002E0004E414D45248345015324A31D0453454EDF +:1002F0004424A31D035345542484080453484F57F2 +:100300002449150653544154555324551504535448 +:1003100041592458100454414B45240908085452AB +:10032000414E534D495424283C04545950452447C8 +:10033000430756455253494F4E241D180D0A425249 +:1003400045414B20746F2073656E6420612062729A +:1003500065616B20746F2074686520686F73740D1D +:100360000A42594520746F20686F737420284C4FDF +:10037000474F55542920616E642065786974207454 +:100380006F2043502F4D0D0A434F4E4E454354208E +:10039000746F20686F7374206F6E2073656C656373 +:1003A00074656420706F72740D0A434F5059207445 +:1003B0006F20636F707920612043502F4D20666954 +:1003C0006C650D0A4449524543544F5259206F669B +:1003D0002063757272656E742075736564204D6953 +:1003E00063726F2D6469736B0D0A4552415345204A +:1003F000612043502F4D2066696C650D0A455849B0 +:100400005420746F2043502F4D0D0A46494E4953D6 +:10041000482072756E6E696E67204B65726D6974E7 +:10042000206F6E2074686520686F73740D0A4745ED +:100430005420612066696C652066726F6D20746857 +:100440006520686F73740D0A48454C50206279200E +:10045000676976696E672074686973206D65737368 +:100460006167650D0A494E50555420746F206D61C7 +:100470006B6520746865206D6963726F20776169B0 +:100480007420666F72206120737472696E672066D3 +:10049000726F6D2074686520686F73740D0A4C4F1D +:1004A0004720746865207465726D696E616C207395 +:1004B000657373696F6E7320746F20612066696C59 +:1004C000650D0A4C4F474F55542074686520686F7E +:1004D00073740D0A4F555450555420746F20736532 +:1004E0006E6420612073706563696669656420735A +:1004F0007472696E6720746F2074686520686F730A +:10050000740D0A504155534520746F20776169740A +:1005100020666F722061206C6974746C6520746948 +:100520006D650D0A5052494E5420612066696C6514 +:1005300020746F20746865207072696E7465720D26 +:100540000A5155495420746F2043502F4D0D0A52C3 +:100550004543454956452066696C652066726F6D56 +:1005600020686F73740D0A52454D4F544520746FC7 +:100570002073656E6420636F6D6D616E64732074AB +:100580006F20612072656D6F74652073657276658A +:10059000720D0A52454E414D4520746F2072656EB2 +:1005A000616D6520612043502F4D2066696C650D9B +:1005B0000A53454E442066696C6520746F20686F4D +:1005C00073740D0A534554206120706172616D652A +:1005D0007465720D0A53484F572074686520706126 +:1005E00072616D65746572730D0A535441545553AD +:1005F000206F66204B65726D69740D0A5354415922 +:10060000206174204B65726D697420636F6D6D613C +:100610006E642D6C6576656C206166746572206110 +:1006200020636F6D6D616E64207461696C0D0A5496 +:10063000414B4520636F6D6D616E64732066726F10 +:100640006D20612066696C650D0A5452414E534D10 +:1006500049542066696C6520746F20686F7374203C +:1006600028696E20636F6E6E6563742073746174A5 +:1006700065290D0A5459504520612066696C652032 +:10068000746F2074686520636F6E736F6C650D0AFC +:1006900056455253494F4E206F66204B65726D6927 +:1006A000742072756E6E696E6724CD1A4F3E42CD0E +:1006B0005C70C3C20111AF58C3C201CD1A4FCD71D6 +:1006C00027C3C201CD6270C3CD06CD1A4FCD507085 +:1006D000C300003E06CDA547C3C2012A2A67221BDC +:1006E00067119B663E05CDA547C3C20132226BCD83 +:1006F0001A4F2A1B6729292923221B67221D67AF4E +:10070000326D652A1B672B221B677CB5C217073E1B +:1007100003329766C37C07CDA63DE67FC24E07CD68 +:100720008844F5CD0870F1E67FC236073A226BA700 +:10073000C20307C3C201FE03C246073AAD63E60126 +:10074000C47752C3C201FE1ACAC201C303075F3A8B +:100750006D65219B66856F3E008C677BBEC2FF0680 +:100760003A6D653C326D652A1D67221B675F3A2230 +:100770006B93C20307AF329766C3C201119857CD7E +:100780007770C3C201CD1A4F113C03CD3554C3C29B +:10079000013E03115C00CDA547C31C02CD1A4F21B9 +:1007A0005C0011A063010C00CD74703E01329F63A8 +:1007B000C3C2013E06CDA547C3C2012A2A67EB2A60 +:1007C00027677CE67F6719222A67CD8B523AAD6393 +:1007D000A7C2DF070E061EFFCD8251A7C2C2012AA3 +:1007E0002A67EB2A27677CE67F677B955F7A9CB355 +:1007F000C2CA07C3C2013EFF322067CD4743AF32B2 +:100800002067C3C201AFC3F8073E0211BD63CDA587 +:1008100047C3C201CD2608C3C201010C0011BD634C +:1008200021AF63CD74703AAD63E601C477520E1AFE +:1008300011E163CD8251AF32CB6332DD6311BD6311 +:100840000E0FCD82513CCA5A0821000022BB633AE8 +:10085000AD63F60132AD63C353523AAE63B7C01114 +:10086000C355CD7770C37A51435053434F4D2E41FA +:10087000534D20283133292032352D4D61722D31D1 +:1008800039393124118F0821D109CD084FEBE91AEC +:100890000B4155544F52454345495645241A0D10B6 +:1008A000424C4F434B2D434845434B2D54595045E3 +:1008B00024230D0B4255464645522D53495A452493 +:1008C000C00D09434F4C4C4953494F4E2463110509 +:1008D00044454255472491100C44454641554C54DB +:1008E0002D4449534B24E70D134449524543544F7B +:1008F00052592D46494C452D53495A45247B1106E2 +:10090000455343415045246B100946494C452D4DF4 +:100910004F444524B4110C464C4F572D434F4E5471 +:10092000524F4C2472110349424D24841110494EF8 +:10093000434F4D504C4554452D46494C455324F9A1 +:10094000110A4C4F43414C2D4543484F247F10071B +:100950004C4F4747494E47246210074E4F2D45588C +:10096000495424581006504152495459242B12041A +:10097000504F525424D314075052494E54455224D8 +:100980008810075245434549564524830F04534573 +:100990004E4424110E05535045454424B5140754C4 +:1009A000414354524150247E12085445524D494E01 +:1009B000414C2431130554494D4552249A10045595 +:1009C00053455224F942075741524E494E4724A3FA +:1009D000100D0A4155544F52454345495645207420 +:1009E0006F206175746F6D61746963616C6C7920DF +:1009F00072652D726563656976652066696C6573DD +:100A00000D0A424C4F434B2D434845434B2D5459FF +:100A1000504520666F72206572726F722064657433 +:100A2000656374696F6E0D0A4255464645522D53F3 +:100A3000495A4520666F72206D756C74692D736517 +:100A400063746F7220627566666572696E670D0AFF +:100A5000434F4C4C4953494F4E20746F207370657F +:100A60006369667920616374696F6E20666F7220B6 +:100A700066696C656E616D6520636F6E666C696337 +:100A800074730D0A4445425547206D657373616761 +:100A90006520636F6E74726F6C0D0A444546415554 +:100AA0004C542D4449534B20746F20726563656923 +:100AB000766520646174610D0A4449524543544F80 +:100AC00052592D46494C452D53495A452077686562 +:100AD0006E20646973706C6179696E6720646972F5 +:100AE0006563746F726965730D0A455343415045E0 +:100AF0002063686172616374657220647572696EE7 +:100B00006720434F4E4E4543540D0A46494C452DF0 +:100B10004D4F444520666F72206F7574676F696E24 +:100B2000672066696C65730D0A464C4F572D434F1D +:100B30004E54524F4C20746F2073657420584F4EA2 +:100B40002F584F464620666C6F7720636F6E747225 +:100B50006F6C0D0A49424D206D6F64653A207061DB +:100B60007269747920616E64207475726E2061728E +:100B70006F756E642068616E646C696E670D0A49FA +:100B80004E434F4D504C4554452D46494C452064ED +:100B90006973706F736974696F6E0D0A4C4F4341CE +:100BA0004C2D4543484F202868616C662D64757054 +:100BB0006C6578290D0A4C4F4747494E47206F66B0 +:100BC000207465726D696E616C2073657373696FF3 +:100BD0006E730D0A4E4F2D4558495420746F207086 +:100BE000726576656E74206578697420746F204331 +:100BF000502F4D206166746572206120636F6D6DAA +:100C0000616E64207461696C0D0A504152495459F7 +:100C100020666F7220636F6D6D756E6963617469B4 +:100C20006F6E206C696E650D0A504F525420746FC0 +:100C300020636F6D6D756E6963617465206F6E0DF5 +:100C40000A5052494E54455220636F707920636FA9 +:100C50006E74726F6C0D0A524543454956452070BB +:100C60006172616D65746572730D0A53454E44205F +:100C7000706172616D65746572730D0A53504545FC +:100C800044206F6620636F6D6D756E696361746972 +:100C90006F6E206C696E650D0A54414320696E7455 +:100CA00065726661636520737570706F72740D0A8A +:100CB0005445524D494E414C20746F207365742049 +:100CC00061207465726D696E616C20747970650D58 +:100CD0000A54494D455220636F6E74726F6C0D0A51 +:100CE0005553455220746F207365742061207573CD +:100CF0006572206E756D6265720D0A5741524E49DC +:100D00004E4720666F722066696C656E616D652066 +:100D1000636F6E666C6963747324CD071532A06CC3 +:100D2000C3C20111320D217C0DCD0D1532A070C34F +:100D3000C2010314312D4348415241435445522DC1 +:100D4000434845434B53554D24313114322D4348CC +:100D5000415241435445522D434845434B53554D11 +:100D600024323215332D4348415241435445522DCC +:100D70004352432D43434954542433330D0A312DF8 +:100D80004348415241435445522D434845434B53F8 +:100D9000554D0D0A322D4348415241435445522D81 +:100DA000434845434B53554D0D0A332D434841525B +:100DB00041435445522D4352432D434349545424F7 +:100DC0003E06CDA547C3C2012A2A677CA7C2DE0D15 +:100DD0003A2D67BDFADE0D7D32A570C3C20111093F +:100DE00057CD7770C3C201115C003E10CDA547C33B +:100DF000F20D3A5C00B7C2FC0D3A94633294630E74 +:100E00000DCD82513A94633D5F0E0ECD8251C3C227 +:100E100001111C0E21580ECD084FEBE9040850417A +:100E2000442D4348415224410F0750414444494E08 +:100E30004724380F0F53544152542D4F462D5041E3 +:100E4000434B455424240F0D5041434B45542D4CE6 +:100E5000454E475448244A0F0D0A5041442D4348FB +:100E6000415220746F20646566696E652074686500 +:100E700020706164206368617261637465722074BC +:100E80006F207573650D0A50414444494E472074E4 +:100E90006F20646566696E6520746865206E756D87 +:100EA000626572206F66205041442D4348415220B4 +:100EB000746F207573650D0A53544152542D4F467B +:100EC0002D5041434B455420746F20646566696E14 +:100ED0006520746865207374617274206F66207079 +:100EE00061636B6574206368617261637465720D20 +:100EF0000A5041434B45542D4C454E4754482066BB +:100F00006F7220746865206C656E677468206F6608 +:100F1000207472616E736D697474656420706163AE +:100F20006B657424CD1A4F11195CCD77700E01CD0D +:100F30008251329763C3C201CD4310320000C3C255 +:100F400001CDF20F320000C3C201CD4310015F009A +:100F5000E5CD2854E1112A57D2620F7D329470C337 +:100F6000C201CD7770C3C201CD4310FE04C2760F1B +:100F7000114E57C3C201FE00CA700FC63032536B08 +:100F8000C3C201118E0F21580ECD084FEBE90408A2 +:100F90005041442D434841522401100750414444DC +:100FA000494E4724DE0F0F53544152542D4F462DC6 +:100FB0005041434B455424CA0F0D5041434B4554B7 +:100FC0002D4C454E475448240A10CD1A4F11195C38 +:100FD000CD77700E01CD8251329663C3C2013E06B9 +:100FE000CDA547C3C2013E04CDA5472A2A677D325D +:100FF0000000CD1A4F11405CCD77700E01CD8251AB +:10100000C9CDF20F320000C3C201CD4310015F0011 +:10101000E5CD2854E1112A57D222107D329570C3B4 +:10102000C201CD7770C3C201CD4310FE04C2361099 +:10103000114E57C3C201FE00CA3010C63032546B85 +:10104000C3C2013E06CDA547C3C2013E04CDA5479C +:10105000C3C2012A2A677DC9CD1A4FAF32AC63C320 +:10106000C201CD0715329F63C3C201CD1A4F11CC07 +:101070005BCD77700E01CD8251328770C3C201CD36 +:101080000715328E70C3C201CD0715328C70C3C2F2 +:1010900001CD0715328D70C3C201CD07153299639A +:1010A000C3C201CD0715328F70C3C201040642418D +:1010B000434B5550240202074449534341524424B0 +:1010C0000303094F56455257524954452400000620 +:1010D00052454E414D452401010D0A4241434B55B5 +:1010E00050202872656E616D65292065786973747A +:1010F000696E672066696C65730D0A444953434104 +:101100005244206E65772076657273696F6E732026 +:101110006F66206578697374696E672066696C65AF +:10112000730D0A4F56455257524954452065786908 +:101130007374696E672066696C65730D0A52454E5B +:10114000414D45206E65772076657273696F6E73C9 +:10115000206F66206578697374696E672066696CB4 +:1011600065732411AC1021D910CD0D15328F70C3C9 +:10117000C201CD0715326E62C3C201CD0715323DE3 +:101180006AC3C201CD0715329070B7CAA2113E03DF +:101190003293703E01328E70329963AF326E62C309 +:1011A000B1113E06329370AF328E70329963326E57 +:1011B00062C3C20111C31121E211CD0D153291702C +:1011C000C3C2010305415343494924010106424971 +:1011D0004E4152592402020744454641554C54247D +:1011E00000000D0A41534349490942494E415259B1 +:1011F0000944454641554C5424110812211C12CD76 +:101200000D15329270C3C201020744495343415243 +:1012100044240000044B4545502401010D0A444973 +:101220005343415244094B45455024113A1221631E +:1012300012CD0D15329370C3C20105044556454EBB +:10124000240000044D41524B240303044E4F4E45ED +:10125000240606034F4444240909055350414345DD +:10126000240C0C0D0A4556454E094D41524B094E72 +:101270004F4E45094F44440953504143452411A75B +:101280001221C212CD0D15B7CAA112FE01CA9E12BB +:1012900011EF5BCD77700E01CD825132A2703AA270 +:1012A0007032A170C3C20103094348415241435403 +:1012B0004552240202034F4646240000024F4E24AA +:1012C00001010D0A4F4E20746F20656E61626C65DE +:1012D0002054414320747261700D0A4F46462074B9 +:1012E0006F2064697361626C65205441432074729D +:1012F00061700D0A43484152414354455220746F76 +:1013000020656E61626C6520544143207472617087 +:1013100020616E64207370656369667920696E74FC +:10132000657263657074206368617261637465726D +:101330002411731321AB13CD0D157AFE03C256137E +:101340002A24707CB53E03C25613CD4F4F119D58D1 +:10135000CD7770C3C201FE40C2611332AD6CC3C20F +:1013600001FE80C26D13AF32AD6CC3C20132867014 +:10137000C3C201060444554D422402020845585494 +:1013800045524E414C2403030551554945542440D0 +:101390004007524547554C4152248080034F4646F2 +:1013A00024000004565435322401010D0A44554DE1 +:1013B00042202D206F6E6C79207072696E746162AC +:1013C0006C6520636861726163746572732070611B +:1013D0007373656420746F207465726D696E616CDF +:1013E0000D0A45585445524E414C202D20776974C2 +:1013F0006820656D756C6174696F6E20636F6465DC +:101400002073797374656D207370656369666963B1 +:101410000D0A4F4646202D20616C6C206368617276 +:101420006163746572732070617373656420746F97 +:10143000207465726D696E616C0D0A515549455491 +:10144000202D20646973706C6179206E6F746869F7 +:101450006E6720647572696E67207472616E736660 +:101460006572730D0A524547554C4152202D206E2E +:101470006F726D616C20646973706C617920666F46 +:1014800072207472616E73666572730D0A565435FC +:1014900032202D20617373756D65204B65726D6907 +:1014A000742063616E20656D756C617465206120C8 +:1014B00056543532242A7C707CB5CA1219EB2A7E28 +:1014C00070CD084FD5CD1A4FE1228870EBCD6570F5 +:1014D000C3C2012A80707CB5CA1219EB2A8270CD72 +:1014E000084FD5CD1A4FE1228A70CD6870C3C20172 +:1014F00002034F4646240000024F4E2401010D0A0C +:101500004F4646094F4E2411F01421FE14CD084FCA +:1015100032A16CCD1A4F3AA16CC95623460423223E +:10152000A16C2305C222154EB9CA3715232315C253 +:101530001C15213C1537C9B72AA16CC90D0A3F4EAD +:101540006F7420666F756E6424CD1A4FCD3270CDE6 +:101550006115C3C201CD1A4FCD3270CD6115C3C222 +:10156000013A2467B7CA6E15115D5DCD7770CDCD98 +:1015700015CDBE17CDF017CDD317CDB218CDBE18EF +:10158000CD5D16CDE617CD2916CD9018CD6916CDB7 +:101590004716CD604FCDD915CD8D16CDEF162A80CB +:1015A000707CB5C45E17CD8116CD4017CD2F17CDF9 +:1015B0004F17CD1E172A7C707CB5C47E17CD7718C7 +:1015C000CD1118CD9C18CDE515CD7516C911735DDB +:1015D000CD77703AA06CC3CF1811845DCD77703A87 +:1015E0008E70C3CF1811A95DCD777011C05D3AAD73 +:1015F0006CB7CAF81511C85DCD777011CE5DCD7787 +:10160000703A8670FEFFC20F16219D58C326164FF2 +:1016100021731346235E160023EB192323BECA262B +:101620001605C8C31416C3777011E75DCD77703AFD +:10163000917011F35DB7CA777011FC5DFE01CA7736 +:101640007011035EC37770113F5ECD777011655ED8 +:101650003A9270B7CA7770116E5EC37770110B5EE5 +:10166000CD77703A3D6AC3CF1811345ECD77703AAA +:101670009070C3CF1811745ECD77703A8F70C3CF5E +:101680001811835ECD77703A8C70C3CF1811925EBB +:10169000CD777011806C21A0637EB7C2A1163A94F9 +:1016A00063C64012133E3A12130E0821A1630600CE +:1016B0007E23FE20CABD1612130DC2B01678B7C223 +:1016C000D0163E2E121306FF0E0321A963C3B016D7 +:1016D0003E241211806CCD777011A05ECD77703AE8 +:1016E0009F63E67FFE02C2CF1811A45EF2777011ED +:1016F000A95FCD77703A937011B45FFE06CA777018 +:1017000011B95FFE03CA777011BE5FFE0CCA777015 +:1017100011C45FFE09CA777011C85FC3777011AF3B +:101720005ECD77703A9763C6405F0E02C382511157 +:10173000CB5ECD77703A9663C6405F0E02C382518E +:1017400011015FCD77703A95706F2600C3234F115A +:10175000EA5ECD77703A94706F2600C3234F11CDA7 +:101760005FCD77703A8A7021FA5FFEFFCABA172AF6 +:101770008070CD1A15D27B1721FA5FC3BA1711E01A +:101780005FCD77703A887021FA5FFEFFCABA172AD8 +:101790007C70562346042322A16C2305C29A174E5F +:1017A000B9CAB017232315C2941721FA5FC3BA1719 +:1017B0002AA16CEBCD777021F55FEBC377701175C3 +:1017C0005FCD77703AA0705F0E02CD8251118A5FB3 +:1017D000C3777011955FCD777021AC103A8F70CDC3 +:1017E0001A15EBC37770111B5FCD7770CDEF4EC923 +:1017F000112B5FCD77702100003AA5706FCD234F7C +:1018000011485FCD77702100003A2D676FCD234FCF +:10181000C9111260CD77703A9963C3CF18CD1A4FB2 +:10182000CD4F4F117C54CD7770118D54CD7770CD45 +:101830004F4F215D185E2356237AB3CA4918E5CD70 +:101840007770CD4F4FE1C335182A0470EBCD777018 +:10185000CD4F4F2A0670EBCD7770C3C2010B0168E4 +:10186000081B192925372DF33B0C3CC840E44535AE +:1018700047934E5F540000111A60CD777011955D4B +:101880003AA170B7CA77700E025FCD8251C34F4F35 +:10189000119A5DCD77703A6E62C3CF180E201EFF8D +:1018A000CD82516F2600E5114A60CD7770E1CD23DE +:1018B0004FC9116360CD77703A8D70C3CF18116F27 +:1018C00060CD77703A9463C6405F0E02C3825111B7 +:1018D000915DB7C2777011955DC377703E05119B1E +:1018E00066CDA547C3C20132226BA7CAC201CD1A79 +:1018F0004FCD0870119B661A13D5CDAF4E5FCD0B3F +:1019000070D13A226B3D32226BC2F718CD1470C3EE +:10191000C20111AF58CD7770C3C201435053504B31 +:10192000312E41534D20283233292031362D4A6142 +:101930006E2D31393931243EFF32AC6C11316D3EA0 +:1019400005CDA547C31C02B7CA1C02322F6DEB366A +:1019500024CD362C3AAD6CA7CA6119CD4F4FC36464 +:1019600019CD3B7011316DCD7770C378193E0032BF +:101970002F6D32AC6CCD362C11EE6C3E05CDA547EB +:10198000C31C02322A6D32AC6C3A2F6DB7CA95195E +:101990003E4932426BAF32396B210000223C6B2250 +:1019A0003E6B323B6B32406B3AAD6CA7C2B819CD7F +:1019B0004170210000CD234F3A2F6DB7C2C4193EAC +:1019C0005232426B3AAD6CA7C2DB193A9966B7C284 +:1019D000DB19CD3E702A3C6BCD234F3A426BFE445F +:1019E000C2E919CD4F1CC3C419FE58C2F419CD1851 +:1019F0001BC3C419FE46C2FF19CD181BC3C419FE70 +:101A000052C2181ACDB21A3A426BFE46C2C419111C +:101A1000985ACD912CC3C419FE43C24C1A11E157F8 +:101A20003A396BB7CA2E1AAF32396B11C4583A998A +:101A300066B7CC912C3A2F6DB7C2C2013AA06CA701 +:101A4000CAC20111685BCD7770C39519FE59CAC22D +:101A500001FE49C2A41ACD951E3A426BFE58CA69CE +:101A60001AFE41C2C419C3C2013A2F6D32AF6C4F86 +:101A7000060021316D115A6BCD74703E3132376BD7 +:101A8000AF32AE6C3E52CDC027C31C02AF32396BB1 +:101A9000210000223C6B323B6B32406B3E523242A3 +:101AA0006BC3DB19FE41C2A91A11EC57CD912CC3AF +:101AB000C2013A406BFE10FAC31A11F654CD212C24 +:101AC000C34D2C3C32406B3E3132376BCDEF28C3D7 +:101AD000562CFE53C20D1B3A406B32416BAF324065 +:101AE0006B3AAE6CCDDD2C3AAF6C215A6BCD8E22A9 +:101AF000215A6BCD4D2232AF6C3E59CDC027C34D1C +:101B00002C3A386B32376B3E4632426BC9FE45C2C7 +:101B1000532CCDDC2BC34D2C3A406BFE05FA291B10 +:101B2000111455CD212CC34D2C3C32406BCDEF28E8 +:101B3000C3562CFE53C2741B3A416BFE10FA491B6C +:101B400011F654CD212CC34D2C3C32416B3A3B6BEA +:101B50003DE63F473AAE6CB8C2532CCD692CAF324C +:101B6000406B215A6BCD4D2232AF6C3E59CDC02710 +:101B7000C34D2CC9FE5AC28E1B3A416BFE05FA8A30 +:101B80001B113355CD212CC34D2CCDFB2CC9FE464A +:101B9000C2CD1B4F3A9966B779C2D21BCDD42CC2A5 +:101BA000532CCDDD2C4F3A9966B779C2B41BCD4684 +:101BB00025C34D2C3A406B32416BCDEB2C3E443269 +:101BC000426B3A396BFE5AC8AF32396BC9FE58C204 +:101BD000271CCDD42CC2532CCDDD2CCD14703AAFA4 +:101BE0006CB7CA0E1CF51E3CD5CD1770D1CD177041 +:101BF000F1215A6BF55E23E5CD1770E1F13DC2F49A +:101C00001B1E3ED5CD1770D1CD1770CD4F4F3A402A +:101C10006B32416BCDEB2C3E4432426B3A396BFE5A +:101C20005AC8AF32396BC9FE42C2441CCDD42CC253 +:101C3000532CAF32AF6C3E59CDC027C34D2C3E4321 +:101C400032426BC9FE45C24D2CCDDC2BC34D2C3A24 +:101C5000406BFE05FA861C115455CD212C3A99662D +:101C6000B7C24D2C3A9270B7C27D1C115C00D50EE4 +:101C700010CD8251D10E13CD8251C34D2CCD475181 +:101C8000C3751DC34D2C3C32406BCDEF28C3562C81 +:101C9000FE44C2E41CCDD42CCAB01C3A416BFE05F4 +:101CA000FAAC1C115455CD212CC35D1CCDFB2CC9A5 +:101CB000CDDD2C3A406B32416B3AAF6CCD2623C35D +:101CC000781DAF32406B32AF6C4F3A396BB7CADB1D +:101CD0001C4F3E0132AF6C79325A6B3E59CDC02752 +:101CE000C35D1CC9FE46C2FE1C3A416BFE05FAFAF2 +:101CF0001C111455CD212CC35D1CCDFB2CC9FE5AE3 +:101D0000C2981DCDD42CC2532CCDDD2C3AAF6CFE25 +:101D100001C21C1D3A5A6BFE44CA391D3A9966B776 +:101D2000C2291DCD4751C3751DAF32396B3A406B87 +:101D300032416BCDEB2CC36F1D3A406B32416BCD02 +:101D4000EB2C3A9966B7C26F1D3A3A6BB7C26F1D5A +:101D50003A9270B7C2691D115C000E10D5CD825148 +:101D6000D10E13CD8251C36F1DCD4751C3751D3E9A +:101D70004632426BC9CDDF233A9966B7C24D2C116A +:101D80005C00D50E10CD8251D13A9270B7C24D2C65 +:101D90000E13CD8251C34D2CFE45C25D1CCDDC2BF4 +:101DA000C35D1C3E02115C00CDA547C3C20111EE0C +:101DB0006C3E05CDA547C31C02322A6DAF323247B7 +:101DC000323347323447323067213167222E67CDB4 +:101DD000FE45D2DE1D11C355CD7770C3C201CD368D +:101DE0002CAF323B6B32406B329C63210000223CB3 +:101DF0006B223E6B3AAD6CA7C2041ECD4170210030 +:101E000000CD234F3E3132376B3E5332426B3AADF9 +:101E10006CA7C21E1ECD3E702A3C6BCD234F3A42AA +:101E20006BFE44C22C1ECD4620C30E1EFE46C2379A +:101E30001ECD401FC30E1EFE5AC2421ECD4321C3FB +:101E40000E1EFE53C25B1ECD951E3A426BFE46C26D +:101E50000E1E118D5ACD912CC30E1EFE42C2661E5F +:101E6000CDE221C30E1EFE43C27E1E11E1573A3958 +:101E70006BB7CA781E11C458CD912CC3C201FE4164 +:101E8000C28C1E11EC57CD912CC3C20111EC57CD61 +:101E9000912CC3C2013A406BFE10FAA61E118D555B +:101EA000CD212CC34D2C3C32406B3E3132376B3A46 +:101EB000A07032386B215A6BCD4D2232AF6C3A3C58 +:101EC0006B32AE6C3A426BCDC027C34D2CCDEF28A0 +:101ED000C35F4FFE59C20F1FCDD42CC0CDDD2C3AAD +:101EE000AF6C215A6BCD8E223A406B32416BAF32D0 +:101EF000406B3A426BFE49C2001F3E5832426BC9EA +:101F00003A386B32376B3E4632426BCD6E4FC9FE6C +:101F10004EC22D1FCD692C3A3B6B3CE63F473AAE93 +:101F20006CB8C0AF32406B3E4632426BC9FE45C210 +:101F30004D2C3A426BFE49CAFA1ECDDC2BC34D2C08 +:101F40003A406BFE05FA511F118D55CD212CC34D22 +:101F50002C3C32406BAF32396B215A6B22306B3ADA +:101F60002A6DB7C22F20215D00222E6B06000E00C5 +:101F700078FE08C2811F3E2E2A306B772322306BF9 +:101F80000C0478FE0CF2A31F2A2E6B7EE67F232220 +:101F90002E6BFE21FA701F2A306B772322306B0CD8 +:101FA000C3701F7932AF6C2A306B3E24773AAD6C28 +:101FB000A7C2B71FCD3B70115A6BCD77703A3B6B00 +:101FC00032AE6C3E46CDC027C34D2CCDEF28C35F4B +:101FD0004FFE59C20D20CDD42CC0CDDD2C3A406B24 +:101FE00032416BAF32406B32256B32266B32276B3E +:101FF00032286BCD1B24C3022032366B3E44324262 +:102000006BC9FEFFC24D2C3E5A32426BC9FE4EC216 +:102010002420CD692C3A3B6B3CE63F473AAE6CB886 +:10202000C0C3DA1FFE45C24D2CCDDC2BC34D2CEBBB +:1020300021EE6C4F477E1223130578B7C23520EB93 +:1020400022306BC3A31F3A406BFE05FA5720118D57 +:1020500055CD212CC34D2C3C32406B215A6B223084 +:102060006B211B6C22326B06012A326B7E232232DB +:102070006B4F3A9E63B779C29B203A9370FE067904 +:10208000CA9B203A9C63B7C2982079E680CA982000 +:10209000CD842C3EFF329C6379E67F2A306B772318 +:1020A00022306B043A366BB8F269203A366B32AFA5 +:1020B0006C3A3B6B32AE6C3E44CDC027C34D2CCD49 +:1020C000EF28C35F4FFE59C22121CDD42CC03AAEB8 +:1020D0006CCDDD2C3A406B32416BAF32406B3AAF86 +:1020E0006CFE01C2FF203A5A6BFE5AC2F42032390C +:1020F0006BC30621FE58C2FF2032396BC306213A5A +:10210000396BB7CA0C213E5A32426BC9CD1B24C36E +:10211000162132366BC9FEFFC24D2C3E5A32426B3D +:10212000C9FE4EC23821CD692C3A3B6B3CE63F4795 +:102130003AAE6CB8C0C30C21FE45C24D2CCDDC2B91 +:10214000C34D2C3A406BFE05FA5421118D55CD211B +:102150002CC34D2C3C32406B3A3B6B32AE6CAF32F1 +:10216000AF6C3A396BB7CA73213E44325A6B3E01A9 +:1021700032AF6C3E5ACDC027C34D2CCDEF28C35F84 +:102180004FFE59C2C021CDD42CC0CDDD2C3A406BBE +:1021900032416BAF32406B0E10115C00CD82513A70 +:1021A000396BFE5ACABA21CDFE45DABA21CD6E4F3F +:1021B000AF32396B3E4632426BC93E4232426BC946 +:1021C000FE4EC2D721CD692C3A3B6B3CE63F473AE5 +:1021D000AE6CB8C0C38A21FE45C24D2CCDDC2BC3EA +:1021E0004D2C3A406BFE05FAF321118D55CD212C73 +:1021F000C34D2C3C32406B3A3B6B32AE6CAF32AFCE +:102200006C3E42CDC027C34D2CCDEF28C35F4FFE9F +:1022100059C22B22CDD42CC0CDDD2C3A406B32419B +:102220006BAF32406B3E4332426BC9FE4EC242221C +:10223000CD692C3A3B6B3CE63F473AAE6CB8C0C325 +:102240001822FE45C24D2CCDDC2BC34D2C3A957087 +:10225000C62077233A9770C62077233A9970C62014 +:1022600077233A9B70C640E67F77233A9D70C6205D +:1022700077233A9F70772336593A9370FE06CA85C2 +:10228000223A9D6377233AA07077233E08C932A48F +:102290006C3E0D329C703E23329E703E26329D6312 +:1022A0003E3132386B7EDE203294703AA46CFE03ED +:1022B000F823237EDE203298703AA46CFE04F823C3 +:1022C0007EC640E67F329A703AA46CFE05F8237E03 +:1022D000DE20329C703AA46CFE06F8237E329E709B +:1022E0003AA46CFE07F8233E00329E637EFE4ECA7F +:1022F0001423FE20CA1423FE59C20C233A9370FE05 +:1023000006CA14233EFF329E63C31423329D633EEC +:10231000FF329E633AA46CFE08F8237E473AA07011 +:10232000B8C032386BC932A16C3A9966B7C247233C +:102330003A8F70FE03C247233A3A6BB7CA47233E2F +:102340005832396BC35A4F215A6B222A6B3A9F700D +:10235000470E003A9E63B7CA5E233A9D634F21A1A0 +:102360006C35FA5A4F3A9966A7C2792321246B3506 +:10237000F27923CDEB50C3DF232A2A6B7E23222A56 +:102380006B1E00B9C295231E803AA16C3D32A16C30 +:102390007E23222A6BB8C2B7237E23222A6B21A177 +:1023A0006C3557E680B35F7AE67FB8CAB723B9CAFF +:1023B000B7237AC640E67FB332A36C3A9966A73A50 +:1023C000A36CCAD423E5D5C55F0E06CD8251C1D119 +:1023D000E1C35E232A2C6B7723222C6BC35E23116F +:1023E0006E55D5CD212CD1215A6B3AAE6CCDDD2C5A +:1023F00032AE6CAF32A16C1AFE0DCA0A24771323D9 +:102400003AA16C3C32A16CC3F72336003AA16C327E +:10241000AF6C3E45CDC027000000C93A9E704F3AD0 +:10242000376BD631473A9470D6059032A16C211B98 +:102430006C22326B06003AA16C3DF2412478C35AFB +:102440004F32A16C3A246B3DFA512432246BC362A3 +:1024500024CD8D4FC35A24C3622478B7C25A4FC3C8 +:1024600026252A2C6B7E23222C6B57E6805FCA928E +:10247000243A9E63B7CA92243AA16CFE02FA172549 +:102480003D32A16C2A326B3A9D63772322326B0472 +:102490001E007AE67F57FE20FAC424FE7FCAC424B9 +:1024A0003A9E63B7CAAE243A9D63BACAB3247AB9D6 +:1024B000C20A2521A16C352A326B712322326B04AA +:1024C0007AC30A25FE1AC2F3243A9170FE01CAE2C9 +:1024D00024FE02CAF1242A2C6B3A246B57157AF297 +:1024E000EA24AF32246B78C35A4F7E23FE1ACADD2A +:1024F000243E1A32A26C21A16C352A326B71232240 +:10250000326B043AA26CC640E67F2A326BB3772363 +:1025100022326B04C336242A2C6B2B222C6B2124F1 +:102520006B3478C35A4F3EFFC9435053504B322E41 +:1025300041534D2028313129202032312D4D6172F7 +:102540002D3139393124AF325C00215A6B3A2A6D72 +:10255000B7CA692521EE6C3AEF6CFE3AC269257E56 +:10256000E65FD640325C00232322306B215D0022DF +:102570002E6BAF32A16C32A26C062070233CFE0B96 +:10258000FA7B2536002A306B7EFE61FA9025E65FE5 +:1025900023FE2EC2AD2522306B216500222E6B3A20 +:1025A000A16C32A26C3E0932A16CC3DC25B7CA0310 +:1025B0002622306B2A2E6B7723222E6B3AA16C3C9D +:1025C00032A16CFE08FA852532A26C2A306B7E237C +:1025D00022306BB7CA0326FE2EC2C8252A306B7E76 +:1025E000FE61FAE725E65FB7CA03262322306B2A8D +:1025F0002E6B7723222E6B3AA16C3C32A16CFE0C21 +:10260000FADC252A306B36243AAD6CA7C21226CDEF +:102610003B70115A6B3AAC6CA7CA1F2611EE6CCDF9 +:102620007770AF323A6B3A8F70B7CAFF260E0F1130 +:102630005C00CD8251FEFFCAFF263A8F70FE03C2B6 +:102640004A263EFF323A6BC35A4FF511F457CD215B +:102650002CF1FE01CA6326215C0011806A01210071 +:10266000CD74700E083E30216400770DCA78262B99 +:102670007EFE203E30CA6A26215D000E0B7EE67F7C +:1026800077230DC27D26115C000E0FCD82513CCA0E +:10269000A5263A64003C326400FE3AC2782611DC7A +:1026A00055CD7770C911806C215D000E087E122314 +:1026B000130DC2AD263E2E12130E037E1223130DF0 +:1026C000C2BB263E241211806CCD77703A8F70FE0B +:1026D00002C2FF26215C0011906A011000CD7470C7 +:1026E00011806A0E17CD8251FEFFC2F32611DC5510 +:1026F000C3212C21806A115C00011000CD7470CDC3 +:10270000A750C30827C35A4F116E55CD212CC9CDF0 +:102710001A4FCD0870CD1170CD1470AF32406B3EA2 +:102720003132376B3A406BFE05FA3527110056CD32 +:102730007770C3C2013C32406BAF32AE6C3E0132A7 +:10274000AF6C215A6B36463E47CDC027C32C27CDF0 +:10275000EF28C32427FE59CAC201FE45C22427CD53 +:10276000F52BC3C201CD1A4FCD7127C3C201C3C21D +:1027700001CD0870CD1170CD1470AF32406B3E3179 +:1027800032376B3A406BFE05FA9227113456CD77FB +:1027900070C93C32406BAF32AE6C3E0132AF6C213F +:1027A0005A6B364C3E47CDC027C38B27CDEF28C38D +:1027B0008327FE59CA5A4FFE45C28327CDF52BC940 +:1027C00032B06C21566B3A976377233A376BD63128 +:1027D000473AAF6CC6238077230100004F3AAE6CB6 +:1027E000C6207723814F3E0088473AB06C7723811B +:1027F0004F3E0088473AAF6CB7CA0B283D32AF6CEA +:102800007E23814F3E008847C3F5273A376BFE325F +:10281000CA3C28D2252879E6C0070781E63FC620B2 +:102820007723C353283600E521576BCD662BE14B48 +:10283000427A07070707E60FC620772378E60F07D7 +:102840000747790707E603B0C620772379E63FC636 +:102850002077233A8D70B7CAA028E536003AAD6CD0 +:10286000A7C29F28CD4A7021576BCD142D3A8C708A +:10287000A7CA9F2821E161CD212D3A426B5FCDC1CE +:1028800052211F62CD212D21F761CD212D21576BC2 +:10289000CD212D211F62CD212D211F62CD212DE1C2 +:1028A0003A9C707723AF77CD08703A987032A16C5C +:1028B0003AA16C3DB7FAC82832A16C3A9A70CDAFF4 +:1028C0004E5FCD0B70C3B02821566B7EB7CAE92886 +:1028D000CDAF4E5FCD0B703AA170BEC2E528CDAF33 +:1028E0004E5FCD0B7023C3CB28CD1470C35A4FCD90 +:1028F000262AC35F4FCDE62AC3EF28219663BEC2C6 +:10290000F528CDE62AC35F4F219663BECA0229325D +:10291000576B4F3A376BD6314779D6239032AF6C2D +:102920000600CDE62AC35F4F219663BECA02293254 +:10293000AE6C32586B814F3E0088473AAE6CD62061 +:1029400032AE6CCDE62AC35F4F219663BECA022920 +:1029500032A16C32596B814F3E0088473AAF6C32DE +:10296000A26C215A6B22306B3AA26CD601FA9129E3 +:1029700032A26CCDE62AC35F4F219663BECA0229FC +:102980002A306B772322306B814F3E008847C36823 +:1029900029CDE62AC35F4F219663BECA0229D620FD +:1029A00032A36C3A376BFE32CAF029D2C22979E6DB +:1029B000C0070781E63F473AA36CB8CA1B2ACD6916 +:1029C0002CC92A306B360021576BCD662B4B427ACF +:1029D00007070707E60F573AA36CBAC2BE29CDE630 +:1029E0002AC35F4F219663BECA0229D62032A36C48 +:1029F00078E60F070747790707E603B0473AA36C65 +:102A0000B8C2BE29CDE62AC35F4F219663BECA0273 +:102A100029D6204779E63FB8C2BE292A306B360056 +:102A20003AA16CC35A4F21B46B22346BCDF32AC345 +:102A30005F4F219663BEC22C2AC34F2ACDF32AC30F +:102A40005F4F219663BEC24F2A21B46B22346B2A9A +:102A5000346B772322346B4711E79319DA262A3A2D +:102A60009D70B8C23C2A21B76B3A596BBECA262A60 +:102A70003A9070B7CA8A2A3A426BFE53CA8A2ACD64 +:102A8000F32AC38A2AFE11C27F2A2A346B2B36000E +:102A9000CD14703A8D70B7CADD2A233AAD6CA7C247 +:102AA000DD2ACD477021B56BCD142D3A8C70A7CAA5 +:102AB000DD2A21EC61CD212D3A426B5FCDC152213F +:102AC0001F62CD212D210B62CD212D21B56BCD2192 +:102AD0002D211F62CD212D211F62CD212D21B46B0F +:102AE00022346BC35A4F2A346B7E2322346BB7C215 +:102AF0005A4FC9E5C52A8470229A63CD0870CD0E5D +:102B000070B7CA162B473A9370FE0678CA112BE6A7 +:102B10007FC1E1C35A4FCD1470CD1A70B7CA3F2B95 +:102B2000FE0DCA3C2BFE1ACA342BFE03CA582BFEDC +:102B300018C23F2BC64032396BC33F2BC1E1C93AA3 +:102B40009963B7CAFB2A2A9A632B229A637CB5C27F +:102B5000FB2ACD692CC1E1C9CD32703AAD63E601E3 +:102B6000C47752C3C201E5C51100007EB7CA992BD4 +:102B7000E5AB5FE60F4F060021BC2B0909E57B0F93 +:102B80000F0FE61E4F219C2B097EAA2356E1AE5F54 +:102B9000237EAA57E123C36B2BC1E1C9000081103A +:102BA0000221833104428552066387730884899425 +:102BB0000AA58BB50CC68DD60EE78FF700008911DC +:102BC00012239B322446AD573665BF74488CC19D95 +:102BD0005AAFD3BE6CCAE5DB7EE9F7F83AAD6CA715 +:102BE000C2ED2B3A9966B7C2ED2BCD38703E41321B +:102BF000426BC3022C11CA543AAD6CA7C2022CCD51 +:102C000077703AAF6C4F0600215A6B093624115A7F +:102C10006B3A9966B7C21D2C3AAD6CA7C0CD7770E0 +:102C2000C93AAD6CA7C03A9966B7C2322CD5CD3837 +:102C300070D1CD7770C9117C543AAD6CA7C2432CCA +:102C4000CD6B70CD0870CD1170CD1470C93E41327E +:102C5000426BC9CD692C3A3B6B32AE6CAF32AF6C74 +:102C60003E4ECDC027C34D2CC92A3E6B23223E6B5E +:102C70003A9966B7C03AAD6CA7C0CD41702A3E6B99 +:102C8000CD234FC9C5D5E511A55ACD212CE1D1C120 +:102C9000C93AAD6CA7CAAF2CD5CD4F4FD1CD777007 +:102CA0001E200E06C5D5CD8251D1C1CD8251C9D5C8 +:102CB000CD4470D1CD7770C90E0421C4545EE5C5F2 +:102CC000CD0200C1E1230DC2BD2C118860CD77700B +:102CD000CD3570C93A3B6B473AAE6CB8C93CE63F5C +:102CE000323B6B2A3C6B23223C6BC9AF32406B32C8 +:102CF000AF6C3E59CDC027C34D2CC93C32416B3A15 +:102D00003B6B3DE63F473AAE6CB8C2532CCD692CC5 +:102D1000CDEB2CC97EB7C8E55FCD1770E123C31496 +:102D20002D7EB7C8E55FCDC152E123C3212DC54F2C +:102D30003A556BB979C1C943505352454D2E415351 +:102D40004D2028313329202032312D4D61722D3113 +:102D500039393124CD0870CD1170CD147011682D22 +:102D6000211A2ECD084FEBE913024344248E31047F +:102D7000434F5059243D310644454C45544524F8B1 +:102D800031094449524543544F52592436320A447A +:102D900049534B2D5553414745243B32054552413C +:102DA000534524F8310646494E495348240F270419 +:102DB00048454C5024403204484F53542445320671 +:102DC0004B45524D4954245E32054C4F47494E24E1 +:102DD0006332064C4F474F5554246527074D4553E2 +:102DE0005341474524F1320652454E414D4524E6B4 +:102DF000320353455424FC32055350414345243B90 +:102E000032065354415455532453330454595045B6 +:102E10002468330357484F246D330D0A4344202D53 +:102E2000206368616E67652064656661756C7420F7 +:102E30006469726563746F727920666F722072655F +:102E40006D6F746520736572766572206F70657240 +:102E50006174696F6E730D0A434F5059202D2063C2 +:102E60006F70792066696C6573206F6E20612072C7 +:102E7000656D6F74652073797374656D0D0A4445D3 +:102E80004C455445202D2064656C65746520666949 +:102E90006C6573206F6E20612072656D6F746520A4 +:102EA00073797374656D0D0A4449524543544F520A +:102EB00059202D206C6973742061206469726563E8 +:102EC000746F7279206F6E20612072656D6F74650A +:102ED0002073797374656D0D0A4449534B2D555316 +:102EE000414745202D2073686F77206469736B20FC +:102EF0007573616765206F6E20612072656D6F74F8 +:102F0000652073797374656D0D0A46494E495348BF +:102F1000202D2073746F7020612072656D6F746551 +:102F2000207365727665720D0A48454C50202D203D +:102F30006765742068656C702066726F6D20612013 +:102F400072656D6F7465207365727665720D0A48DF +:102F50004F5354202D20657865637574652061207A +:102F6000636F6D6D616E64206F6E20612072656DA0 +:102F70006F74652073797374656D0D0A4B45524DFE +:102F80004954202D2074656C6C20612072656D6F32 +:102F900074652073657276657220746F206578653C +:102FA000637574652061204B65726D697420636F71 +:102FB0006D6D616E640D0A4C4F47494E202D207394 +:102FC000656E6420757365722D6964656E746966DB +:102FD00069636174696F6E20746F20612072656D22 +:102FE0006F7465207365727665720D0A4C4F474F9A +:102FF0005554202D202073746F7020616E64206CF6 +:103000006F676F757420612072656D6F74652073D2 +:1030100065727665720D0A4D455353414745202D23 +:103020002073656E642061206D6573736167652030 +:10303000746F20612072656D6F746520737973748D +:10304000656D20757365720D0A52454E414D4520E0 +:103050002D2072656E616D652066696C6573206FE9 +:103060006E20612072656D6F74652073797374656D +:103070006D0D0A534554202D207365742072656DC3 +:103080006F74652073657276657220706172616D10 +:1030900065746572730D0A5350414345202D2073AA +:1030A000686F77206469736B2D7573616765206F36 +:1030B0006E20612072656D6F74652073797374651D +:1030C0006D0D0A535441545553202D2047657420EB +:1030D000737461747573206F6620612072656D6F03 +:1030E0007465207365727665720D0A5459504520D7 +:1030F0002D20747970652066696C6573206F6E2071 +:10310000612072656D6F74652073797374656D0DE0 +:103110000A57484F202D2073686F772063757272AD +:10312000656E74207573657273206F6E20612072F6 +:10313000656D6F74652073797374656D24212262E7 +:1031400022916D3E4B32316D3E02322F6D3E473241 +:10315000906D11336DCD0035B7CA1C0247C62032C1 +:10316000326D3A2F6D80322F6D2A916DEB22936D67 +:10317000CD52472A936D23EBCD00352A936D4FC670 +:1031800020773A2F6D81C601322F6DC37833212FFE +:103190006222916D3E4332316D3E01322F6D3E47CA +:1031A00032906D11336DCD003547C62032326D3A05 +:1031B0002F6D80C601322F6D3A316DFE43C2CA3188 +:1031C00078B7CA78333EFF3272622A916DEB229350 +:1031D0006D3EFF327162CD52472A936DEB13CD00E5 +:1031E00035B7CA78334FC6202A936D773A2F6DC60C +:1031F0000181322F6DC378333E4532316D3E01324D +:103200002F6D3E4732906D11336DCD0035473A3109 +:103210006DFE45CA2032FE54CA203278B7CA7833D0 +:1032200078B7CA1C02C62032326D3A2F6D80C601B3 +:10323000322F6DC378333E44C3FA313E55C3FA3161 +:103240003E48C3FA313E4332906DAF322F6D11319B +:103250006DCD0035B7CA1C02322F6DC378333E4B9B +:10326000C347323E4732906D3E4932316D3E0132A6 +:103270002F6D11336DCD0035B7CA783347C6203274 +:10328000326D3A2F6D80C601322F6DEB22936D3E69 +:10329000FF327162327262112F62CD52472A936DF2 +:1032A000EB13CD0035B7CA78334FC6202A936D771C +:1032B0003A2F6DC60181322F6DEB22936DAF3272C2 +:1032C00062113C62CD52472A936DEB13CD0035B7A6 +:1032D000CA78334FC6202A936D773A2F6DC6018185 +:1032E000322F6DC3783321226222916D3E52C34545 +:1032F0003121556222916D3E4DC345313E06322F3C +:103300006D3E5332316D3E4732906D3E2332326D09 +:10331000113D35219935CD084FEBE911376D3E054B +:10332000CDA547C31C02B7CA1C024FC62032366D5A +:103330003A2F6D81322F6DCD1A4FC37833CD0D15D5 +:1033400032376D3E2132366D3A2F6DC601322F6D08 +:10335000C37833CD1A4F3E5132316D3E4732906DB6 +:103360003E01322F6DC378333E54C3FA312161627E +:1033700022916D3E57C396313EFF3299663A906D69 +:10338000FE47C28D333A316DFE53CA9033CD327051 +:10339000AF32406B32396B323B6B210000223C6B09 +:1033A000223E6B3E3132376B3E4932426BCD951E29 +:1033B0003A426BFE58CAC033FE41C2A833C3C201B1 +:1033C000AF32406B32396B323B6B210000223C6BD9 +:1033D000223E6B3E3132376B3A2F6DB7CA423432E0 +:1033E000A16C3A9470D60532A26C11316D215A6BE2 +:1033F0003A9D63473A9E704F3AA26C3D32A26CFAF6 +:1034000038341AFE20FA1834B9CA18343A9E63B711 +:10341000CA2B341AB8C2353471233AA26C3D32A299 +:103420006CFA38343A2F6D3C322F6D1AFE20F2358B +:1034300034C640E67F7723133AA16C3D32A16CC2BB +:10344000F833AF32AE6C3A2F6D32AF6C3A906DCD2F +:10345000C027C31C02C35B34CD532C3A406B3CFEE7 +:1034600005FA6D34116357CD7770C3C20132406BDA +:10347000CDEF28C35834FE45C291343A906DFE47D3 +:10348000C28B343A316DFE53CC4F4FCDED2BC3C2BE +:1034900001FE53C2A934CDD71A3A426BFE41CAC2CB +:1034A000013E5832426BC3C419FE4ECA5B343242ED +:1034B0006BCD1470215A6B3AAF6CB7CAEA34E5F59C +:1034C0001E3CD5CD1770D1CD1770F1E1B7CADD34F0 +:1034D0003D5E23F5E5CD1770E1F1C3CC341E3ED53A +:1034E000CD1770D1CD1770CD4F4F3A426BFE59CAF0 +:1034F000C201CDEB2CCDDD2C3E4432426BC3C4194E +:10350000AF32306D47CD4F4DE67FFE0DCA3835FEE8 +:103510000ACA3835120413FE1BCA2F35FE0CCA2600 +:1035200035FE3FC20535E52A066323220663E1F531 +:10353000AF327062F1C305357832306DC907104281 +:103540004C4F434B2D434845434B2D545950452434 +:10355000FF3A0446494C4524133B0A494E434F4D1C +:10356000504C45544524493B07524543454956452F +:10357000241E3B075245504C41434524933B055282 +:103580004554525924D73B0E5345525645522D545B +:10359000494D454F555424E53B0D0A424C4F434B92 +:1035A0002D434845434B2D5459504520666F72209A +:1035B000612072656D6F7465207365727665720D3A +:1035C0000A46494C4520706172616D65746572737D +:1035D00020666F7220612072656D6F74652073655F +:1035E000727665720D0A494E434F4D504C45544515 +:1035F0002066696C6520646973706F736974696FA4 +:103600006E20666F7220612072656D6F7465207325 +:1036100065727665720D0A524543454956452070DC +:103620006172616D657465727320666F72206120CE +:1036300072656D6F7465207365727665720D0A52DE +:1036400045504C4143452066696C65206174747235 +:1036500069627574652068616E646C696E67206666 +:103660006F7220612072656D6F746520736572766C +:1036700065720D0A5245545259206D6178696D7515 +:103680006D20666F7220612072656D6F74652073A6 +:1036900065727665720D0A5345525645522D54494E +:1036A0004D454F555420696E74657276616C206685 +:1036B0006F7220612072656D6F746520736572761C +:1036C000657224080A424C4F434B2D53495A4524F6 +:1036D000273B09434F4C4C4953494F4E24353B0A35 +:1036E000494E434F4D504C45544524493B054E41AE +:1036F0004D4553245D3B0D5245434F52442D464F9B +:10370000524D415424713B0D5245434F52442D4C70 +:10371000454E47544824853B075245504C4143454C +:1037200024933B045459504524A73B0D0A424C4F67 +:10373000434B2D53495A45206F662066696C65736B +:1037400020666F7220612072656D6F7465207365ED +:10375000727665720D0A434F4C4C4953494F4E20C7 +:10376000616374696F6E206F6E2066696C656E614F +:103770006D6520636F6E666C6963747320666F722B +:1037800020612072656D6F74652073657276657255 +:103790000D0A494E434F4D504C4554452066696CC7 +:1037A0006520646973706F736974696F6E20666FEA +:1037B0007220612072656D6F746520736572766525 +:1037C000720D0A4E414D4553207472616E736C61E7 +:1037D00074696F6E206F662066696C657320666F12 +:1037E0007220612072656D6F7465207365727665F5 +:1037F000720D0A5245434F52442D464F524D41548B +:10380000206F662066696C657320666F7220612088 +:1038100072656D6F7465207365727665720D0A52FC +:1038200045434F52442D4C454E47544820666F72D5 +:1038300020612072656D6F746520736572766572A4 +:103840000D0A5245504C4143452066696C65206124 +:1038500074747269627574652068616E646C696EF7 +:103860006720666F7220612072656D6F74652073CA +:1038700065727665720D0A54595045206F66206650 +:10388000696C657320666F7220612072656D6F745C +:103890006520736572766572240205464958454471 +:1038A000244646085641524941424C452456560D3D +:1038B0000A4649584544095641524941424C45241B +:1038C000020D5041434B45542D4C454E475448241E +:1038D000BB3B0754494D454F555424C93B0D0A5035 +:1038E00041434B45542D6C656E6774680954494DCE +:1038F000454F5554240606415050454E4424333319 +:103900000341534B243535064241434B5550243235 +:10391000320744495343415244243434094F5645F5 +:103920005257524954452431310652454E414D4576 +:103930002430300D0A41534B2061626F757420654D +:1039400078697374696E672066696C6573206F6E41 +:1039500020612072656D6F74652073797374656D75 +:103960000D0A415050454E4420746F2065786973AC +:1039700074696E672066696C6573206F6E206120C4 +:1039800072656D6F74652073797374656D0D0A428D +:1039900041434B5550202872656E616D6529206545 +:1039A00078697374696E672066696C6573206F6EE1 +:1039B00020612072656D6F74652073797374656D15 +:1039C0000D0A44495343415244206E657720766581 +:1039D0007273696F6E73206F66206578697374699E +:1039E0006E672066696C6573206F6E20612072655A +:1039F0006D6F74652073797374656D0D0A4F56454C +:103A0000525752495445206578697374696E67202E +:103A100066696C6573206F6E20612072656D6F74CE +:103A2000652073797374656D0D0A52454E414D459D +:103A3000206E65772076657273696F6E73206F668E +:103A4000206578697374696E672066696C65732098 +:103A50006F6E20612072656D6F7465207379737469 +:103A6000656D2402074449534341524424303004D5 +:103A70004B4545502431310D0A444953434152448A +:103A8000094B454550240209434F4E564552544573 +:103A900044243030074C49544552414C2431310DB7 +:103AA0000A434F4E564552544544094C49544552D9 +:103AB000414C24020850524553455256452430305B +:103AC0000744454641554C542431310D0A50524566 +:103AD00053455256450944454641554C5424020627 +:103AE00042494E41525924313104544558542430EE +:103AF000300D0A42494E4152590954455854242127 +:103B0000343022336D3E3032356D11320D217C0D53 +:103B1000C33D3311C336212B37CD084FEBE911C01C +:103B20003821DD38C3193B21333122336D3E313228 +:103B3000356DC31B3321333022336D3E3232356D48 +:103B400011F538213339C33D3321333122336D3EF2 +:103B50003032356D11633A21773AC33D332133302A +:103B600022336D3E3132356D11863A219F3AC33D85 +:103B70003321333122336D3E3332356D1199382183 +:103B8000AF38C33D3321333122336D3E3232356D90 +:103B9000C31B3321333022336D3E3332356D11B3C5 +:103BA0003A21CB3AC33D3321333022336D3E30329C +:103BB000356D11DE3A21F13AC33D332134302233E1 +:103BC0006D3E3132356DC31B3321343022336D3EAF +:103BD0003232356DC31B3321343022336D3E3332E4 +:103BE000356DC31B3321343022336D3E3432356D95 +:103BF000C31B334350535345522E41534D2028315C +:103C0000292020382D5345502D3837244350535404 +:103C1000542E41534D2020283132292033312D4A52 +:103C2000616E2D31393931243E03115C00CDA54739 +:103C3000C3C201119B663E05CDA547C3C201322216 +:103C40006BA7C24F3C3E0132226B3E0D329B66CDCC +:103C50001A4FCD6E4FFEFFC2633C11C355CD777036 +:103C6000C3C201112659CD7770AF326D65326E65D2 +:103C7000AF326F65327065CD333DE67FFE0DC277A2 +:103C80003CAF327065CD14701E2ACD17703A6E6548 +:103C90003C326E65FE3CC2A03CAF326E65CD4F4FEC +:103CA0003A9363A7C2AF3DAF326D65CDA63DE67FC7 +:103CB000C2EC3CCD8844F5CD0870F1E67FC2CA3C29 +:103CC0003A226BA7CA773CC3EC3CFE03CAAF3DFE69 +:103CD0001AC2DF3C115C000E10CD8251C3C201FE3E +:103CE0000DC2AB3C3E01326F65C3773CC30F3DFE56 +:103CF00013C20F3DCDA63DE67FC20F3DCD8844F5F2 +:103D0000CD0870F1E67FFE03CAAF3DA7CAF43C5F61 +:103D10003A6D65219B66856F3E008C677BBEC2A0B5 +:103D20003C3A6D653C326D655F3A226B93CA703CDC +:103D3000C3AB3CCD08703A9363A7C23F3D3E0DCD67 +:103D40007A3DFE0AFE1ACAAF3DFE20F25B3DFE0D33 +:103D5000CA5B3DFE09CA5B3DC33F3DCDAF4EF55F3B +:103D6000CD0B70F15F3AA170A77BCA793D3AA27082 +:103D7000BBC2793DF5CD0B70F1C93A6F65A7CA9109 +:103D80003D2171653A706516005F193C3270657EA1 +:103D9000C9CD0C504F3A70655F1600217165193C12 +:103DA0003270657971C9CD0870CD0E70E67FC9118A +:103DB0005C000E10CD8251CD14703A9363114C5AB1 +:103DC000A7CAC73D11245BC3D03DCD1A4F1120585F +:103DD000CD7770CDEF4E114458CD7770CDEF4E11A9 +:103DE0005958CD7770CD53703A9F63B7C4B03ECD6C +:103DF000FB3DCDA53FC3C201C3EF3DCD0870CD0E45 +:103E000070F5CD1470F1B7C20E3E329863C9E67FEB +:103E1000326D623A8670FE033A6D62CA2370A7CA99 +:103E2000FB3DFE7FCAFB3DFE11CAA93EFE13CAAA96 +:103E30003E5F3A8670FE01C2553E3A2367B7CA47D5 +:103E40003ECD2C3FC3FB3D7BFE1BC2553E3E0132A7 +:103E50002367C3FB3DFE03C2633E2124707CB5CAC9 +:103E6000633EE9FE02C27D3E3A6D62FE0DCA7D3EB2 +:103E7000FE0ACA7D3EFE09CA7D3EFE20F8CD5F7077 +:103E8000B7CAFB3D3A9F63FE81CCDB3ECD14703A4E +:103E90008C70B7C41D70CD1770219863347EFE33CB +:103EA000FAFB3D36003A6D62C9AF322567C3FB3D70 +:103EB0003E1ABBC821A063115C00010C00CD7470D8 +:103EC000CD4150C3193F219F633E80B677110E5BF1 +:103ED000FE81CA777011F65AC3777021246B35F2D0 +:103EE000EF3ED5CDDC50CDF83ED13A9F63B7C82A1E +:103EF0002C6B7323222C6BC9CD6A53CDEB50CD199B +:103F00003FCDA453C9110758CD7770CD4751C31980 +:103F10003F219F637EE67F77C911B856CD77700E3B +:103F200010115C00CD8251AF329F63C9FE01C28186 +:103F30003F7BFE59C23D3F3E02322367C9FE5ACA4B +:103F4000633FFE41FA5E3FFE4CF25E3FD6410707FB +:103F50002A7A705F160019EBCD1470CD7770AF32EE +:103F60002367C93E1BCDAF4E5FCD0B703E2FCDAF4B +:103F70004E5FCD0B703E4BCDAF4E5FCD0B70C35E31 +:103F80003FFE02C2923F7BD61F32236B3E03322399 +:103F900067C9AF3223677BD61F4F3A236B47CD14D7 +:103FA00070CD6E70C9CD1A70E67FCA5A4F5F32A1CC +:103FB0006C3A8770BBCAD93FCD08707BCDAF4E5FDE +:103FC000D5CD0B70D1CD14703A8E70B7CA5A4F7BD5 +:103FD000E67F5FCD1770C35A4FCD1A70B7CAD93F6D +:103FE00047FE03CAED3FE65FFE43C2FE3F116F5836 +:103FF000CD7770CD56703A9F63B7FC053FC9FE532D +:10400000C20C40CD6115CD4F4FC35A4F78FE3FC211 +:104010003A403A9F63B7F21F4011805CCD77701130 +:10402000A85CCD7770CD597011255DCD7770CDEF3F +:104030004E11375DCD7770C3D93F78FE30C2514005 +:10404000AFCDAF4E5FCD0870CD0B70CD1470C35A9D +:104050004F3A8770B8C2694078CDAF4E5FCD0870D7 +:10406000CD0B70CD1470C35A4F78E65FFE50C27C02 +:10407000403A8C70EE01328C70C35A4F3A9F63B74E +:10408000F2AC4078E65FFE52C299403E81329F63B7 +:10409000110E5BCD7770C35A4FFE51C2AC403E82C9 +:1040A000329F6311F65ACD7770C35A4F78F5CD5CC5 +:1040B00070C3BD40F11E07CD1770C35A4FF1E65FC4 +:1040C000FE44CAED3FC35A4F43505343504D2E4117 +:1040D000534D20283134292020312D4170722D314B +:1040E00039393124115C003E10CDA547C3F240C3DD +:1040F0000A413A5C00FE20C2FE40AF325C00215D06 +:1041000000060B363F2305C20341CD09543A5C003B +:10411000B7C217413A9463C64032ED583AA26CFEDA +:1041200030C226413E2032EB583AA16C32EC58CDD9 +:104130004F4F11D158CD77703E0432AB703A3D6A83 +:10414000A7C24B413AAB703C32AB70AF32306732F2 +:104150003247323347323447213167222E67CDA6AA +:1041600042AF323067CDFE45D26E41C3F5413AAD24 +:1041700063A7C286410E0BCD8251B7CA86410E019C +:10418000CD8251C3F541215D000608CDC7413E2EC9 +:10419000CDBA410603CDC741CD394221AB7035F5CB +:1041A000C4AA41F1CCD341C36541CDB8413E3ACD1B +:1041B000BA41C3B841CDB8413E20C5D5E55F0E0236 +:1041C000CD8251E1D1C1C97EE67FCDBA412305C27E +:1041D000C741C9C5D5E5CD4F4FE1D1C136043A3D00 +:1041E0006AA7C034C9CD4F4F3A94633D5F0E0ECDE0 +:1041F0008251C3C201AF3232473233473A5C00B713 +:10420000CA0A423D5F0E0ECD8251CD7170E511F2AA +:1042100058CD77703A5C00B7C221420E19CD825159 +:104220003CC64032FD5811FD58CD7770E1CD234F8B +:10423000110459CD7770C3E5413A3D6AA7C80E23F2 +:10424000115C00CD82513A7D000100006FE607CA83 +:104250005542010100C50603AF3A7E001F327E00C1 +:104260003A7D001F327D0005C258426F3A7E0067DA +:10427000C1093AA9700F0F0FE61F4F092FA56FE56F +:1042800001F6FF09DA8D42CDB541C39942E1E5015E +:104290009CFF09DA9942CDB841CDB841E1CD234F19 +:1042A0003E6BCDBA41C90E1FCD825123237E32AA67 +:1042B00070237E32A97023235E2356EB22A770C998 +:1042C0003E02115C00CDA547C3C2013E04CDA54707 +:1042D000C3C201115C000E11CD82513CC2E84211F3 +:1042E000C355CD7770C3C201115C000E13CD82514E +:1042F000111359CD7770C3C2013E06CDA547C3C285 +:10430000013E04CDA547C3C2012A2A67EB21E0FF85 +:1043100019DA3E43EB7D3295635D0E20CD8251CD9F +:1043200009543AA26CFE30C22C433E2032C45432AF +:10433000EB583AA16C32C55432EC58C3C20111D7C4 +:1043400056CD7770C3C2013E02115C00CDA547C3B4 +:104350002244AF323247323347323447323067215A +:104360003167222E6BCDFE45DA2244CD3270AF325A +:10437000A16C115C00CD6E4FCD8D4FC3E243C3885D +:10438000433A246B3DFA784332246B2A2C6B7E230C +:10439000222C6BE67FFE20F2DC43FE09C2AF433ED7 +:1043A00020CD2F443AA16CE607C29F43C38143FE50 +:1043B0000DC2BE43CD2F44AF32A16CC38143FE0A70 +:1043C000C2CD43CD2F44AF32A16CC38143FE1AC28C +:1043D000D543C3E243F53E5ECD2F44F1CD2F44C318 +:1043E00081430E10115C00CD82513E0DCD2F443E15 +:1043F0000ACD2F44CDFE45D26B43AF322067C3C2F6 +:10440000010E10115C00CD82513E0DCD2F443E0AAD +:10441000CD2F44AF3220673AAD63E601C47752C373 +:10442000C20111C160CD7770AF322067C3C2015F96 +:10443000CD5644C35244DA4E44D5CD17703AA16CE0 +:104440003C32A16CD13A2067A7C8CDC152C9D1C3B3 +:10445000E243D1C30144D5CD8844E67FCA7B44FE04 +:1044600003CA8644FE18CA8144CD8844E67FCA69DF +:1044700044FE03CA8644FE18CA8144D1373FC35A5A +:104480004FD137C35A4FD1C9CD14701EFF0E06CD80 +:104490000500C93E03113E6ACDA547C3C2013E03D4 +:1044A000115F6ACDA547C3C2013E04CDA547C3C273 +:1044B00001060C113E6A215F6AAF3221671ABECA3B +:1044C000C9443A21673C322167231305C2BD443AEF +:1044D0002167A7C2DF44119860CD7770C3C2011174 +:1044E0003E6A0E0FCD82513CC2F44411C160CD77BB +:1044F00070C3C201115F6A0E13CD8251115F6A0E43 +:1045000016CD82513CC21145117B55CD7770C36DDC +:1045100045115F6A0E0FCD82513CC2264511C3552D +:10452000CD7770C36D45AF322D6D322E6D329363F2 +:10453000213E6A115C00012100CD7470CD8D4FC306 +:1045400078452A2C6BEB0E1ACD8251115F6A0E153D +:10455000CD8251A7CA3C4511F355CD7770115F6AE2 +:104560000E10CD8251115F6A0E13CD8251113E6A39 +:104570000E10CD8251C3C201115F6A0E10CD82515F +:10458000C36D453E03113E6ACDA547C3C2013E033C +:10459000115F6ACDA547C3C201113E6A0E0FCD82DD +:1045A000513CC2AE4511C160CD7770C3C201115FED +:1045B0006A0E0FCD82513CCAC34511CA57CD7770E0 +:1045C000C3C201215F6A114E6A011000CD747011DF +:1045D0003E6A0E17CD82513CC2C20111DC55CD7727 +:1045E00070C3C201435053574C442E41534D2028B1 +:1045F0003429202032302D4A756E2D383624B7C527 +:10460000D5E5C30B46213167222E673A3067A7CA2A +:104610003A462A2E67115C00010C00CD7470AF324F +:104620006800327D002A2E67110C0019222E673A8D +:1046300030673D323067AFC3F4463A3447A7C20211 +:1046400047213167222E67AF3230670E1A11800082 +:10465000CD8251AF3268003A3247B7C27846323322 +:1046600047215C00112647010C00CD74700E11111A +:104670005C00CD8251C395463D3233472126471118 +:104680005C00010C00CD74700E11115C00CD8251E4 +:104690000E12CD8251F53A3347B7CAA5463D3233A3 +:1046A00047F1C39046F1B7FAF846CD10473A26478E +:1046B000325C003A32473C3232473E0032680032C8 +:1046C0007D002A2E67EB215C00010C00CD74702A5E +:1046D0002E67110C0019222E673A30673C32306782 +:1046E000FE40F20546115C00212647010C00CD7406 +:1046F00070C39046E1D1C1C93234473A3067A7C28E +:104700000546AF32344732334732324737C3F44677 +:1047100087878787874F060021800009115C000189 +:064720000C00CD7470C90D +:10473200000000435053434D442E41534D20283135 +:104742003329202031372D4A616E2D3139393124F8 +:10475200E1E522776221000039227562EB2279625B +:10476200EB217F62220463220663AF3270623273EE +:1047720062CD4F4FC3844E2A7562F9217F622206B1 +:10478200632A7762E92A7562F9217F622204632231 +:104792000663AF327062327362CD4F4FCD844E2AC0 +:1047A2007762E9326F62CDA84DF53EFF327462F155 +:1047B200FE04CA6549FE01CAC049FE02CA154BFE83 +:1047C20010CA154BFE03CA134BFE05CADC47FE0690 +:1047D200CACB4811D360CD7770C9AF320C63320EA9 +:1047E20063320D63EB227B620600CD4F4DB7F22898 +:1047F20048E67FFE1BC216480E021E07CD8251AF4D +:104802003270622A04632B220463220663217362DC +:1048120035C3EC47FE3FCA7648FE0CCC3270782A8C +:104822007B62EBC35A4FFE5CC23B483A0C63A72F34 +:10483200C23B48320C63C3EC475F3A0C63A77BCAA6 +:104842007D48FE5CC24F483A0E63C38348D630FAB5 +:10485200A248FE08F2A2485F3A0E63878787833236 +:104862000E633A0D633C320D63FE033A0E63CA7D5A +:1048720048C3EC472A066323220663CD8E48C3EC65 +:1048820047CD8E483E5C320C63C3EC47042A7B6200 +:104892007723227B62AF320D63320E63320C63C91F +:0948A200117061CD7770C3C201F1 +:1048CB00210000222A67CD4F4DB7F23C49E67FFE0F +:1048DB001BFE20C2EA48C35A4F000000000000FE36 +:1048EB003FCAFE48FE0DCAF748C3874700000000C9 +:1048FB00C35A4F2A2A677DB411B561C20C4911A561 +:10490B0061CD7770CD4F4FCD844E2A066336242A66 +:10491B0004632B220463117F62CD7770AF32706218 +:10492B00C379473E040000000000000000000000B7 +:10493B0000E67FD630DA5C49FE0AD25C493F2A2A70 +:10494B0067E5D12929192916005F19222A67C3D1D6 +:10495B0048115961CD7770C35A4FCD4F4DB7F0E623 +:10496B007FFE1BC28D490E021E07CD8251AF3270E6 +:10497B00622A04632B22046322066321736235C30C +:10498B006549FE3FC2B849118761CD7770CD4F4F56 +:10499B00CD844E2A06633E24772A04632B220463BC +:1049AB00117F62CD7770AF327062C37947FE0CCC4A +:1049BB003270C35A4F227D62EB227B624623220860 +:1049CB00632A0663220A6378B7C83EFF3274622AF1 +:1049DB0008635E231D7BFEFFFABF4ACD4F4DB7F236 +:1049EB00AD4AE67FFE3FC21F4AAF3270622173624F +:1049FB00352A7D62EBCD3554CD4F4FCD844E2A06F3 +:104A0B00633E24772A04632B220463117F62CD77E4 +:104A1B0070C37947FE1BC28E4AAF327062D5C5E5B3 +:104A2B00CDDA4AC34D4A0E021E07CD82512A0463CA +:104A3B002B22046322066321736235E1C1D11CC3AF +:104A4B00DF492A04632BEBE1E57EFE24CA694A2386 +:104A5B00EB7723EB3A73623C327362C3544A3A737B +:104A6B00623C327362EB3E2077232204632206639F +:104A7B00E1E5EBCD77700E021E20CD8251E1C1D165 +:104A8B00C3A14AE5D5CDDA4AC39F4A11F960CD7768 +:104A9B0070C38747D1E11C160019235E23567BC3D5 +:104AAB005A4FFE61FAB94AFE7BF2B94AE65F5623CA +:104ABB00BACADF4916007BB7F2C84A16FF191103B1 +:104ACB000019220863052A0A63220663C3D249052B +:104ADB00F81C4B7BB7C81600191E03194623EB2A8B +:104AEB0008637E914FB8CAF54AF02A0A630DFA5A49 +:104AFB004FEB4623EB7E23FE61FA0E4BFE7BF20E51 +:104B0B004BE65FB8C0C3F84A3E00320363EB22FFAB +:104B1B00621E00360023220163AF3620233CFE0BBE +:104B2B00FA254B3600233CFE20FA2E4BCD4F4DB7CA +:104B3B00F2444CE67FFE3FC2634B3A0363B7CA2293 +:104B4B004D2A0663232206633A0463BDC25E4BAF54 +:104B5B003270623E3FC3054DFE1BC2374CAF327005 +:104B6B00622A04632B220463220663217362357B62 +:104B7B0032A16CFE09FA844B3D2A0163FE0BF293C2 +:104B8B004B363F233CC3874B0E112AFF62EBCD8282 +:104B9B0051FEFFCA2D4C21CE6CCD284D21DE6CCDA4 +:104BAB00284D0E122AFF62EBCD8251FEFFCAC14B7C +:104BBB0021DE6CCD284D11CE6C21DE6C3AA16CFE42 +:104BCB0009FAD04B3D0E00B9CADC4B13230CC3D2F0 +:104BDB004B79FE0BCA084CFE08C2F44B3AA16CFE93 +:104BEB0009CAF44B3E2ECD404D1A134623B8C208CA +:104BFB004C0CFE20CADC4BCD404DC3DC4B7932A1B3 +:104C0B006C3E24CD404D2A0663EB0E09CD82512A12 +:104C1B0004632B220463217362353AA16CFE0BCA29 +:104C2B0079470E021E07CD8251C379477BB7CA1154 +:104C3B004DFE0DF2114DC35A4FFE2EC2654C1C7B1F +:104C4B00FE01CA114DFE0AF2114D0E0906002AFF94 +:104C5B0062092201631E09C3374BFE3AC2844C1C06 +:104C6B007BFE02C2114D2A01632B7ED640220163CB +:104C7B0036202B771E00C3374BFE2AC2B44C3A03A7 +:104C8B0063FE00CA224D7BFE08CA114DF29F4C06F3 +:104C9B0008C3A14C060C2A01633E3F772322016314 +:104CAB001C7BB8FAA14CC3374BFE21FA114D673A66 +:104CBB00A670B77CCAF94CFE25CA114DFE28CA1145 +:104CCB004DFE29CA114DFE2CCA114DFE2FCA114D96 +:104CDB00FE3AFA054DFE40FA114DFE5BFA054DFE0C +:104CEB005EFA114DFE5FCA114DFE7CCA114DFE617D +:104CFB00FA054DFE7BF2054DE65F2A016377232211 +:104D0B0001631CC3374B3A6F62FE10CA5F4F11062B +:104D1B00610E09CD8251C9112961C31C4DF511805A +:104D2B00000707070707833C5F060B1A137723055A +:104D3B00C2364DF1C9E52A0463772322046321733C +:104D4B006234E1C9E5C53A7062B7CCA84D2A066357 +:104D5B007E23220663FE20CA6A4DFE09C27D4D3AB0 +:104D6B007462B7C2514D3EFF3274623E20C1E1C343 +:104D7B00A54DF5AF327462F1C1E1FE1BCAA54DFE24 +:104D8B003FCA9C4DFE0DCA9C4DFE0ACA9C4DFE0CA3 +:104D9B00C0E52A06632B220663E1F680C9F5D5E54B +:104DAB003A7062B7C2804E217362340E013A72625E +:104DBB00B7CACD4D1EFF0E06CD8251B7CABF4DC32C +:104DCB00D04DCD82512A04637723220463FE15CA8A +:104DDB00E24DFE18C2F64DCD2970CD844E217F6277 +:104DEB002204632173623600C37947FE08CA074E5B +:104DFB00FE7FC22F4E3A7262B7CC2F703A73623D70 +:104E0B003DB7F21A4E0E021E07CD8251C3E24D3250 +:104E1B0073623A7262B7CC2C702A04632B2B220478 +:104E2B0063C37947FE3FCA5A4EFE1BCA5A4EFE0D4C +:104E3B00CA4B4EFE0ACA4B4EFE0CC2624ECD3270AE +:104E4B003A7162B7C25A4E3A7362FE01CA87473E45 +:104E5B00FF327062C3804E3A7362FE7DFAB24D1E12 +:104E6B0007CD17703A73623D3273622A04632B22AB +:104E7B000463C3B24DE1D1F1C91E0D0E06CD8251B3 +:104E8B002A7962EBCD7770C943505355544C2E4160 +:104E9B00534D20283331292032312D4D61722D3164 +:104EAB0039393124E5C52193704E060021BC4E09DA +:104EBB00E9C3CE4EC3D84EC3CB4EC3DD4EC3E74E74 +:104ECB00C3EC4EE67FEAEC4EF680C3EC4EF680C3A5 +:104EDB00EC4EE67FE2EC4EF680C3EC4EE67FC3EC85 +:104EEB004EC1E1C93A8770FE20F2014FF51194587B +:104EFB00CD7770F1F6400E025FCD8251C93E01CDE8 +:104F0B00A547C3114FC911CD54CD7770C3C2013E14 +:104F1B0004CDA547C31C02C93E30CDDE5301F6FFBD +:104F2B0011FFFF0913DA2E4FE5EB7CB5C42B4FE1D4 +:104F3B007DC63ACDF05332A16C5F3A2267A7C00E03 +:104F4B0002C3825111CA54C377700E09C38251E157 +:104F5B00232323E9C9119C5BCD7770CD2054A7CABD +:104F6B00664FC9AF32246B322D6D329363322E6D87 +:104F7B00326800326A00327C000E0F115C00CD8269 +:104F8B0051C93A9363B7C0C5D5E53A2D6DB7CAB8C9 +:104F9B004F2A2B6D222C6B01800009222B6D3D3289 +:104FAB002D6D3E7F32246BE1D1C1C35A4F3A2E6D2A +:104FBB00B7CACA4F329363AF32246BE1D1C1C92A4E +:104FCB00A370222B6D222C6BEB0E1ACD82510E147B +:104FDB00115C00CD8251322E6DB7C2FD4F212D6D6C +:104FEB00343AA570BECA03502A2C6B11800019C32A +:104FFB00D04FCD7A51C3954FCD7A513A2D6DC39C7D +:10500B004F3A9363B7C0117F622A2C6B3A246B47DC +:10501B0005F22C50CD8D4FC33B502A2C6B3A246B91 +:10502B00477832246B7E23222C6BE67FCA1B50C938 +:10503B003EFF329363C9AF326800326A00327C00A4 +:10504B000E0F115C00CD8251FEFFCAB9500E231119 +:10505B005C00CD82512A7D007CB5CAC4502B227DC9 +:10506B00002AA370EB0E1ACD82510E21115C00CDDC +:10507B008251B7C27A512AA3701180003E1ABECA60 +:10508B009250231DC28950222C6B19222B6D7B321F +:10509B00246BAF322D6DCD7A51C35A4F0E13115C69 +:1050AB0000CD8251AF326800326A00327C000E169E +:1050BB00115C00CD8251FEFFC82AA370222C6B110C +:1050CB00800019222B6D7B32246BAF322D6DC35AAE +:1050DB004FC5212D6D343AA570BEC2FD5035C1C9E7 +:1050EB00C5212D6D343AA570BEC2FD50CD1551C3EF +:1050FB0013512A2B6D222C6B11800019222B6D3E24 +:10510B007F32246BC1C35A4FC1C92AA370222B6DA6 +:10511B00222C6B2A2C6BEB21800019222C6B0E1A84 +:10512B00CD8251115C000E15CD8251B7C27A51213F +:10513B002D6D35C21E51CD7A51C35A4F3A246BFE99 +:10514B0080CA62512A2C6B3DFA5C51361A23C3522A +:10515B0051CDEB50C35F4F3A2D6DB7CA6F51CD1583 +:10516B0051C35F4F0E10115C00CD8251C35A4F11CA +:10517B0080000E1AC38251F53AAD63A7CA9F5179CD +:10518B00FE01CAA351FE06CAA851FE0ACAB251FEBD +:10519B000BCAD551F1C30500F1CDEA51C97B3CC215 +:1051AB009F51F1CDEA51C9F113CDEA51FE0DCAD38E +:1051BB0051FE0ACAB451F526001A6F26001319F1D5 +:1051CB00771BEB34EBC3B4511BC9F1E5D511E1638C +:1051DB002ABB63197ED1E1FE1A3EFFC0C37752E5AD +:1051EB00D53AAD63E601CA205211E1632ABB6319BC +:1051FB007E2ABB632322BB63CDA352F57DA7F20F9F +:10520B0052CD5352F1D1E1FE0ACAEA51FE1AC0CD7A +:10521B0077523E0DC911A26A3AA16A6F3AA26ABDD2 +:10522B00F23C523AAD63E6EF32AD633E1AF5C30F73 +:10523B00527D2600193C32A16A7EFE3BC24C523E87 +:10524B000DCDA352F5C30F52C5D5E50E1A11E1636F +:10525B00CD82510E1411BD63CD8251A7C47752215B +:10526B00000022BB63CD7A51E1D1C1C93AAD63E6EF +:10527B00FE32AD630E1011BD63CD8251CD7A51C993 +:10528B00F5E52A2667232226677CB5C2A0522A2879 +:10529B006723222867E1F1C9FE0ACAC052FE0DCA74 +:1052AB00C052FE1ACAC052F5C5D5E55F0E02CD0538 +:1052BB0000E1D1C1F1C97B321F67C3EE52CDF3526E +:1052CB00FE02F2D652CD0A53C3C852FE04FC6A53F7 +:1052DB0078CD5F5347326264216364CD56533A1FD6 +:1052EB006777C95FCD1D70C93A61644F3A626447F5 +:1052FB007891FA07533E7F9081C309537990C9E5A2 +:10530B00D5C5F53A2C67A7CA4D53CD5253A7CA4DF5 +:10531B00532161647E23BECA4D532BCD5F53326143 +:10532B00642323CD56534E3A9A66FE13C24953C596 +:10533B00CDF352C1FE04CA4D53C5CDA453C179CD93 +:10534B00EE52F1C1D1E1C9CD2070C9F5856F3E0098 +:10535B008C67F1C9C53C473E7F9078C1C0AFC9F59A +:10536B00C5D5E53A6E62A7CA87533E13329A66CD0E +:10537B00AF4E5FCD0B70118C53CD7770E1D1C1F176 +:10538B00C90D0A5B584F46462073656E7420746FC7 +:10539B0020686F73745D0D0A24F5C5D5E53A6E620E +:1053AB00A7CAC253AF329A663E11CDAF4E5FCD0B3B +:1053BB007011C753CD7770E1D1C1F1C90D0A5B589C +:1053CB004F4E2073656E7420746F20686F73745D1D +:1053DB000D0A24C5D5E521A16C060A772305C2E683 +:1053EB0053E1D1C1C9F5C5D5E511A96C21AA6C064C +:1053FB00091A771B2B05C2FC53E1D1C1F1C93EFF42 +:10540B003222670E201EFFCD82516F2600CD234F17 +:10541B00AF322267C91EFF0E06CD8251C932A16C75 +:10542B007D916F7C98673AA16CC9AF32A36C1A134C +:10543B00FE24C8D5F55FCD1770F1D1FE0AC23954E1 +:10544B003AA36C3C32A36CFE14C23954D5CD604FD9 +:10545B00D1C335544350534441542E41534D20280E +:10546B00313929202032392D4D61722D31393931A5 +:10547B00244B65726D69742D38302076342E3131A2 +:10548B00202420686173206265656E206275696CEB +:10549B00742066726F6D2074686520666F6C6C6F1C +:1054AB0077696E67206D6F64756C65733A244B6515 +:1054BB00726D69742D383020206E6E783A3E240D53 +:1054CB000A240D0A3F556E7265636F676E697A65C4 +:1054DB006420636F6D6D616E64240D0A3F4E6F74B3 +:1054EB0020636F6E6669726D6564243F556E6162F1 +:1054FB006C6520746F207265636569766520696ED3 +:10550B006974696174650D0A243F556E61626C653F +:10551B0020746F20726563656976652066696C65BA +:10552B00206E616D650D0A243F556E61626C6520BE +:10553B00746F207265636569766520656E64206F94 +:10554B00662066696C650D0A243F556E61626C6559 +:10555B0020746F2072656365697665206461746180 +:10556B000D0A243F4469736B2066756C6C0D0A241D +:10557B003F4469726563746F72792066756C6C0D4C +:10558B000A243F556E61626C6520746F20726563EF +:10559B006569766520616E2061636B6E6F776C65F4 +:1055AB006467656D656E742066726F6D20746865D7 +:1055BB0020686F73740D0A240D0A3F556E61626C7F +:1055CB006520746F2066696E642066696C650D0AD0 +:1055DB00243F556E61626C6520746F2072656E613D +:1055EB006D652066696C65240D0A3F4469736B20F9 +:1055FB0066756C6C240D0A3F556E61626C65207488 +:10560B006F2074656C6C20686F73742074686174A0 +:10561B00207468652073657373696F6E20697320DE +:10562B0066696E6973686564240D0A3F556E616225 +:10563B006C6520746F2074656C6C20686F737420BC +:10564B00746F206C6F676F7574240D0A3F4B657216 +:10565B006D697420686173206E6F74206265656E6E +:10566B0020636F6E6669677572656420666F722062 +:10567B0061207461726765742073797374656D242E +:10568B000D0A3F436F6E73697374656E63792063A4 +:10569B006865636B206F6E20636F6E6669677572EA +:1056AB006174696F6E206661696C6564240D0A3FD5 +:1056BB004572726F722077726974696E6720746FAE +:1056CB00206C6F672066696C650D0A240D0A3F49D3 +:1056DB006E76616C69642075736572206E756D6290 +:1056EB006572240D0A3F496E76616C6964205061C6 +:1056FB0075736520706172616D65746572240D0A36 +:10570B003F496E76616C6964204255464645522D81 +:10571B0053495A4520706172616D65746572240D31 +:10572B000A3F496E76616C6964207061636B6574C6 +:10573B00206C656E6774682028746F6F206C6F6EB9 +:10574B006729240D0A3F496E76616C6964204368B2 +:10575B0065636B74797065240D0A3F546F6F206D10 +:10576B00616E792072657472696573240D0A3F4608 +:10577B0061696C656420746F2065786368616E671E +:10578B006520706172616D6574657273240D0A3FDB +:10579B004661696C656420746F2072656365697618 +:1057AB006520696E70757420737472696E672069F9 +:1057BB006E20616C6C6F7465642074696D65240D6B +:1057CB000A3F46696C6520616C726561647920657E +:1057DB0078697374732407436F6D706C65746564BB +:1057EB0024074661696C6564242552656E616D6999 +:1057FB006E672066696C6520746F20240D0A5B430D +:10580B006C6F73696E6720746865206C6F672066B8 +:10581B00696C655D240D0A5B436F6E6E6563746521 +:10582B006420746F2072656D6F746520686F73747C +:10583B002E20205479706520244320746F207265CC +:10584B007475726E3B0D0A207479706520243F20AD +:10585B00666F7220636F6D6D616E64206C6973741B +:10586B005D0D0A240D0A5B436F6E6E656374696F81 +:10587B006E20636C6F7365642C206261636B2061B7 +:10588B0074206D6963726F5D24436F6E74726F6CFD +:10589B002D24204E6F7420696D706C656D656E7470 +:1058AB0065642E2420284E6F7420696D706C656DB5 +:1058BB00656E746564290D0A2407496E74657272EE +:1058CB007570746564240909202020204469726571 +:1058DB0063746F727920666F7220647269766520CB +:1058EB006E6E783A0D0A240D0A09094472697665C1 +:1058FB002024202068617320244B20627974657307 +:10590B0020667265650D0A240D0A46696C6528735D +:10591B002920657261736564240D0A0D0A5B54724C +:10592B00616E736D697474696E672066696C65204E +:10593B00746F20686F73743A0D0A20312E204C69F6 +:10594B006E6573206175746F6D61746963616C6CE6 +:10595B00792073656E742C20616E64207761697495 +:10596B0020666F7220706F737369626C652072654D +:10597B00706C790D0A20322E20434F4E54524F4CEF +:10598B002D432061626F727473207472616E736643 +:10599B0065720D0A20332E204966207472616E7376 +:1059AB006665722068616E67732C20747279206152 +:1059BB002072657475726E20746F20636F6E7469DC +:1059CB006E75650D0A20342E206F6E206578697414 +:1059DB002C20796F752077696C6C20626520706C58 +:1059EB006163656420696E20434F4E4E45435420DE +:1059FB0073746174652E0D0A245220746F207365C5 +:105A0B006E64207468652073616D65206C696E65CA +:105A1B0020616761696E2C0D0A2020206F72207443 +:105A2B0079706520244320746F2061626F7274203B +:105A3B007472616E736D697373696F6E2E5D0D0A8F +:105A4B00240D0A5B5472616E736D697373696F6EAB +:105A5B0020646F6E652E20436F6E6E656374656494 +:105A6B00206E6F726D616C6C7920746F2072656D36 +:105A7B006F746520686F73742C0D0A2074797065D0 +:105A8B00202453656E64696E672E2E2E2452656337 +:105A9B00656976696E672E2E2E24075761726E69C3 +:105AAB006E673A2065696768746820626974206361 +:105ABB00616E6E6F742062652073656E74240D0ABF +:105ACB00466F722068656C702C2074797065203F6E +:105ADB0020617420616E7920706F696E7420696E1D +:105AEB00206120636F6D6D616E64240D0A5B4C6FDA +:105AFB006767696E672073757370656E6465645D47 +:105B0B000D0A240D0A5B4C6F6767696E672072651F +:105B1B0073756D65645D0D0A240D0A5B5472616EBD +:105B2B00736D697373696F6E2041626F7274656414 +:105B3B002E20436F6E6E6563746564206E6F726D9D +:105B4B00616C6C7920746F2072656D6F7465206861 +:105B5B006F73742C0D0A207479706520240D0A0D57 +:105B6B000A5B4175746F6D61746963616C6C79204C +:105B7B00726563656976696E673B20747970652021 +:105B8B005E4320746F2061626F72745D0D0A0D0AA3 +:105B9B00240D0A0D0A202A202A202A205072657310 +:105BAB007320616E79206B657920746F20636F6E43 +:105BBB0074696E7565202A202A202A200D0A0D0A89 +:105BCB00240D0A5479706520746865206E65772002 +:105BDB00657363617065206368617261637465727C +:105BEB003A2020240D0A5479706520746865206E64 +:105BFB0065772054414320696E74657263657074D8 +:105C0B00206368617261637465723A2020240D0A07 +:105C1B0047697665207468652073746172742D6FA3 +:105C2B00662D7061636B6574206368617261637468 +:105C3B0065723A20240D0A547970652074686520CA +:105C4B006E65772070616464696E6720636861724A +:105C5B0061637465723A20240D0A522053656E6499 +:105C6B00207468652073616D65206C696E652061B9 +:105C7B006761696E240D0A51202053757370656E30 +:105C8B0064206C6F6767696E670D0A52202052653E +:105C9B0073756D65206C6F6767696E67240D0A3FBE +:105CAB00202054686973206D6573736167650D0AF5 +:105CBB00432020436C6F73652074686520636F6E9F +:105CCB006E656374696F6E0D0A302020287A6572D9 +:105CDB006F29205472616E736D69742061204E556B +:105CEB004C4C0D0A502020546F67676C6520707206 +:105CFB00696E746572206F6E2F6F66660D0A532086 +:105D0B0020537461747573206F662074686520630B +:105D1B006F6E6E656374696F6E240D0A54797069CA +:105D2B006E6720616E6F7468657220242077696CD2 +:105D3B006C2073656E6420697420746F20746865C1 +:105D4B0020686F73740D0A0D0A436F6D6D616E647D +:105D5B003E240D0A5472616E736D697474696E67BB +:105D6B0020612066696C65240D0A4175746F72653C +:105D7B006365697665206973240D0A4C6F63616CEA +:105D8B00206563686F24206F6E24206F6666240D78 +:105D9B000A466C6F7720636F6E74726F6C240D0AFA +:105DAB005465726D696E616C20646973706C617996 +:105DBB002069732024524547554C41522451554973 +:105DCB004554240D0A5465726D696E616C20656DC6 +:105DDB00756C6174696F6E20697320240D0A4669B6 +:105DEB006C65204D6F6465242064656661756C7409 +:105DFB0024204153434949242062696E61727924FE +:105E0B000D0A446973706C61792066696C65207347 +:105E1B00697A65206F6E204449524543544F52595D +:105E2B0020636F6D6D616E64240D0A49424D2066CF +:105E3B006C6167240D0A446973706F736974696FC1 +:105E4B006E20666F7220696E636F6D706C65746522 +:105E5B002066696C657320697324206469736361C0 +:105E6B00726424206B656570240D0A46696C65208D +:105E7B007761726E696E67240D0A5072696E746574 +:105E8B007220636F7079240D0A4C6F6767696E67B8 +:105E9B0020746F2024206973242073757370656ED2 +:105EAB00646564240D0A53454E4420737461727407 +:105EBB002D6F662D706B74206368617220205E24D9 +:105ECB000D0A524543454956452073746172742D32 +:105EDB006F662D706B74206368617220205E240DD9 +:105EEB000A53454E44207061636B6574206C656E7C +:105EFB006774682020240D0A5245434549564520B6 +:105F0B007061636B6574206C656E67746820202408 +:105F1B000D0A45736361706520636861723A2024D2 +:105F2B000D0A4D756C74692D736563746F72206205 +:105F3B007566666572696E672061742024206F66D2 +:105F4B002061206D6178696D756D206F6620240D61 +:105F5B000A5472616E736D69742070726F746F6323 +:105F6B006F6C20636861723A20240D0A426C6F6378 +:105F7B006B20636865636B20747970653A20242D00 +:105F8B00636861726163746572240D0A46696C659E +:105F9B0020434F4C4C4953494F4E3A2020240D0A75 +:105FAB005061726974793A20246E6F6E65246D614D +:105FBB00726B247370616365246F6464246576650A +:105FCB006E240D0A506F727420696E2075736520F4 +:105FDB0069733A20240D0A43757272656E742073CF +:105FEB00706565642069733A20242062707324699C +:105FFB006E64657465726D696E61746520286E6F71 +:10600B00742053455429240D0A54696D6572240D6F +:10601B000A43757272656E742054414354726170F9 +:10602B00205374617475732F496E74657263657058 +:10603B0074204368617261637465723A2020240D89 +:10604B000A43757272656E742075736572206E7576 +:10605B006D6265723A2020240D0A4465627567678C +:10606B00696E67240D0A43757272656E74206465E0 +:10607B006661756C74206469736B3A202420202050 +:10608B00202020202020202020202020240D0A3F0B +:10609B00536F7572636520616E64206465737469F8 +:1060AB006E6174696F6E2066696C657320746865C8 +:1060BB002073616D65240D0A3F46696C65206E6F18 +:1060CB007420666F756E64240D0A3F50726F677291 +:1060DB00616D206572726F723A2020496E76616C29 +:1060EB00696420434F4D4E442063616C6C240D0A50 +:1060FB003F416D626967756F7573240D0A3F496C7B +:10610B006C6567616C2043502F4D2066696C652070 +:10611B0073706563696669636174696F6E240D0AD8 +:10612B003F57696C642D6361726473206E6F7420CA +:10613B00616C6C6F77656420696E2066696C652095 +:10614B0073706563696669636174696F6E240D0AA8 +:10615B003F496E76616C69642075736572206E754C +:10616B006D626572240D0A3F496E76616C6964201D +:10617B005C20706172616D657465722420436F6E73 +:10618B006669726D207769746820636172726961E8 +:10619B0067652072657475726E2420456E74657226 +:1061AB002061206E756D6265722420436F6E666987 +:1061BB00726D2077697468206361727269616765BB +:1061CB002072657475726E206F7220656E746572C5 +:1061DB00206D6F7265243C5353746174653A3E2095 +:1061EB00003C5253746174653A3E20003C44617428 +:1061FB0061207472616E736D69747465643E200006 +:10620B003C44617461207265636569766564202026 +:10621B00203E20000D0A000D0A4E65772066696C42 +:10622B00653A20240D0A50617373776F72643A20BC +:10623B00240D0A4163636F756E743A20240D0A4E68 +:10624B006577206E616D653A20240D0A4D65737379 +:10625B006167653A20240D0A4F7074696F6E733A4B +:02626B002024ED +:01626E00002F +:03630C000000008E +:10639400000001010000000000260000004B4552EF +:1063A4004D495420204C4F470000FF004B45524DAF +:0763B40049542020494E4925 +:0463C90000000000D0 +:0463DD0000000000BC +:04656D00000000002A +:016671000028 +:046696000000000000 +:0A672000000000000000000000006F +:01672C00006C +:016A3D00FF59 +:016AA10002F2 +:016B22000072 +:046B2500000000006C +:106B43000000000000000000000000000000000042 +:036B53000000013E +:026C19000D2448 +:016CA00000F3 +:016CAD0000E6 +:046D910000000000FE +:107000000000000000000000C30000C30000C30037 +:1070100000C30000C30000C30000C30000C30000A1 +:10702000C30000C30000C30000C30000C30000C3CE +:107030000000C30000C30000C30000C30000C30081 +:1070400000C30000C30000C30000C30000C3000071 +:10705000C30000C30000C30000C30000C30000C39E +:107060000000C30000C30000C30000C30000C30051 +:0A70700000C30000C30000C30000CD +:00012700D8 diff --git a/cpsmit.asm b/cpsmit.asm new file mode 100644 index 0000000..f41ee70 --- /dev/null +++ b/cpsmit.asm @@ -0,0 +1,834 @@ +; CPSMIT.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 file contains the system-independent initialization, the main +; loop, and the commands that don't have any place better to go. +; All the SET xxx and status routines now in CPSCOM.ASM as CPSMIT.ASM +; was getting too big. +; +; revision history: +; +;edit 30, 29-Mar-1991 by MF. When looking up a TAKE-file in a TAKE command +; and the file is not found, complain if it's not the first TAKE of +; the current program execution (the automatic TAKE of KERMIT.INI) +;edit 29, 25-Mar-1991 by MF. Add STAY command as a synonym for SET NO-EXIT +; command per Martin J. Carter of Nottingham University in the U.K. +;edit 28, 21-Mar-1991 by MF. Modify code after "inp2a" in INPUT command +; so a ^C will halt TAKE-file processing +;edit 27, 27-Feb-1991 by MF. Add QUIT as a synonym for EXIT per code of +; Dr. Martin J. Carter of Nottingham University, U.K. Recognizing QUIT +; helps those who forget they're not in MS-Kermit, C-Kermit, +; Kermit-32 etc. Also add commands so that CONNECT, RECEIVE and SEND may +; be abbreviated to C, R and S, respectively. +;edit 26, 5-Nov-1990 by MF. Cosmetic changes to main HELP messages for +; COPY and RENAME commands. +;edit 25, 1-Nov-1990 by MF. Made the following command-name changes in the +; interest of uniformity of nomenclature (per suggestions of FDC): +; FCOPY to COPY, FRENAME to RENAME and STRING to OUTPUT. +; This means we'll have to type "CO" for CONNECT and "REC" for +; RECEIVE but with REMOTE now with us we have to do the latter anyway. +;edit 24, 18-Sep-1990 by MF. Implemented FRENAME command to rename a +; CP/M file. +;edit 23, 9-Sep-1990 by MF. Implemented commands to be sent to a +; remote Kermit Server (Remote commands). +; Implemented setting of packet sizes for RECEIVE and SEND. +; Put DIRECTORY/STRING help texts in proper alphabetical position. +; edit 22, July 6th, 1987 by OBSchou. Added a dummy Commandline to be +; loaded for debugging purposes as DDT destroys any command line at 80H +; Also fixed a bug or two... +; +; edit 21, April 8th, 1987. +; Various bits, including more SET SENDRECEIVE options, and make +; PADDING and PADCHAR valid options. Have I wasted my time, or +; there still systems that use padding?? Fixed a bug in the INPUT +; command so we know how many characters there are to check for. Also +; hived off the SET commands to make a new file, CPSCOM.ASM thereby +; reducing the size of CPSMIT.ASM. Also rename COPY command to FCOPY +; hence retaining a single C to imply connect. +; +; edit 20, March 30, 1987 by OBSchou. +; added code for no exit to CPM if a command tail is done (optional) +; by the SET NO-EXIT command. Added bits for SET AUTORECEIVE to enable +; or inhibit automatic receive of several files (if something is coming +; along from the remote side, do a receive. Toss first packet away.) +; This is first step to SERVER??? +; Also added back the INPUT command. +; +; edit 19, March 16, 1987. Moved the code to check for and execute +; command tails (See Richard Russells submission below). +; Added flags to exit to CP/M after executing a command tail. +; The KERMIT.INI file is taken before the command tail is issued. +; +; edit 18, March 11, 1987 by OBSchou. +; Added in code for TYPE <file> and PRINT <file>. Hope to add COPY +; later on. Also added in code submitted by Richard Russel, to accept +; a command tail on entry to kermit (eg KERMIT CONNECT). This facility +; if used, will replace the automatic TAKE function on loading Kermit. +; Unfortunately, you will not be dropped back to CP/M after the command +; In the future, it may be possible to either accept several commands +; on the command tail, and possibly accept the automatic TAKE facility +; as well. Low on my list of things to do. +; +; edit 17, January 28, 1987 by OBSchou for DJ Roberts of Leicester +; Also added a couple of fixes [obs] +; +; DJR January 1987 David J. Roberts. +; USER made a SET option +; STATUS output placed in alphabetical order +; Report DEBUG mode and default disk +; Name of LOG file on SHOW/STATUS display +; +; +; edit 16 December 1st, OBSchou. Fixed bug in that if the overlay is not in +; place or correct then prtstr is not called to print the error message +; (As prtstr has been moved out of the system independent code) +; +; edit 15 November 10, 1986 by OBSchou. Re-inserted Pause and Break +; commands for release. +; +; edit 14 August 29, 1986. Removed PAUSE,BREAK,INPUT and SET CASE as +; these have not been fully coded or debugged. (For next +; version of Kermit-80...). Also tidied up a bit. +; +; 13 by OBSchou for Godfrey Nix. He writes: +; edit August 11,1986 Godfrey Nix, Nottingham University [gnn] +; To insert code for setting the packet start character on +; both send and receive packets (default is still 01H) +; and make GET and RECEIVE to be separate; +; use with edits to CP4PKT, CP4UTL +; +; edit 12: 19 June, 1986 by OBSchou. Added PAUSE and BREAK facility. +; Breaks simulate a call to sysint which tests for a B being passed. +; Note this is only useful if the system dependent code supports breaks, +; and an appropriate message is returned if breaks are not possible. +; Also added is the command entry for INPUT, which waits for a string +; from the host for a given time. The time is a very variable counter +; incremented every BDOS call. Trial and error will give a reasonable +; value. STRING acceps a string from the use and then sends it on +; to the host. These new commands allow a user to (almost) set up auto +; log on files, where BREAKS/INPUT/STRING/STRING partially emulate a user +; (AI LURES OK and all that). Still could do with a test, eg if not a +; correctly returned string go back n steps. This would make a fairly +; simple TAKE command a lot more complicated. +; +;edit 11: 30 May, 1986 OBSchou. Added in a couple of more routines and such +; +;edit 10: 27 May, 1986 OBSchou. Added in support for USER function +; removed XMIT test and routine, but also added SET FLOW-CONTROL +; (set for XON/XOFF flow control in both directions) and a +; SET CASE-SENSITIVE ON/OFF (if on => a # A, if ON => a=A) +; +;edit 9: 13 May, 1986 OBSchou, Loughborough University, UK +; Added in code for SET XMIT character to allow setting of the +; character to wait for from the host during TRANSMIT. It is +; a line feed by default. Also added a TAKE command, to take: commands +; from a named disk file. If a file is TAKEn, then all BDOS calls +; are trapped and tested for console input. If so, we substitute a +; character (or buffer) from the TAKE file specified. +; This may also be used in the future for a CPKERMIT.INI +; to be evaluated during Kermit initialsation. +; +; edit 8: February 6, 1895 +; Add a PORT status/show routine for those machines that have more +; than one they can talk to. It also required a port storage variable +; a la SPEED and the necessary code to handle it in the SET routine. +; [Hal Hostetler] +; +; edit 7: 13-Jan-85 by Vanya J.Cooper Pima Commun. College Tel: 602-884-6809 +; +;pcc003-pcc005 2-Jan-85 vjc modules:cp4mit,cp4tt,cp4utl +; These edits must all be installed together and change the way +; logging is handled. The log file spec is moved to a separate +; fcb, and not opened until an actual CONNECT command is given. +; This takes care of a NASTY bug that if you used any other file +; command between the LOG and CONNECT, the log file would get +; written over the last file used. This also allows logging to +; be "permanently" enabled until an CLOSE (new command) for all +; CONNECT sessions, like most other kermits do. If a log file +; already exists, it will be appended to. Also add two new +; CONNECT mode commands <esc>Q to suspend logging and <esc>R to +; resume. <esc>R means something else during TRANSMIT, but +; logging is never on then, so there shouldn't be any conflict. +; I also changed the write code, so that it can handle one more +; character after the XOFF is send to stop the host. This allows +; a little "slop" for systems that don't stop immediately (such +; as TOPS10), but it didn't help much. +; +;pcc012 4-Jan-85 vjc modules:cp4mit,cp4tt,cp4utl +; Use the big buffer for the log file. Move the log file back +; into the common fcb and only save the drive, name, and +; extension between connects. Add new routines to cp4utl to +; create or append to an existing file, and to conditionally +; advance buffers only if in memory. Remove edit pcc003 that +; allows one more character after the xoff, since it didn't +; really work very well and does not fit in well with the way +; the buffer advancing routines are set up. If someone still +; thinks this would be useful, it could be put back in with a +; little more work. +; +; While testing this edit, I also noticed another bug that +; 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. Maybe this should be put on the bug list +; somewhere. +; +;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 6: September 8, 1984 +; Add VERSION command, to display the internal version strings. +; Move command tables here from CP4UTL, and translate string +; lengths in them to decimal (how many fingers do YOU got?). +; Replace some jump tables with dispatch addresses in tables. +; Make help text for SET command consistent with top level help text. +; +; edit 5: August 21, 1984 +; Add word at 0100H to allow us to exit cleanly from DDT (shifting +; entry section by two bytes). +; +; edit 4: August 3, 1984 (CJC) +; Remove "mover" from entry section, as it now lives in CP4SYS. +; +; edit 3: July 27, 1984 (CJC) +; Merge LASM support from Toad Hall: most of CP4MIT is now in CP4UTL. +; When assembling with LASM, CP4MIT is linked by CP4DEF; it links to +; CP4PKT. Add SET TACTRAP command. Separate out display routines so +; we can eventually do "SHOW <parameter>". Save both bytes of baud +; rate in speed, and check both bytes when displaying baud rate. Move +; header info to CP4KER.ASM. Add onoff and chkkey routines to simplify +; SET command (Toad Hall) +; +; edit 2: June 8, 1984 +; formatting and documentation; delete unreferenced variables and some +; unnecessary labels; move setpar here from cp4pkt; add module version +; string; make this version 4.01. +; +; edit 1: May, 1984 +; extracted from CPMBASE.M80 version 3.9; modifications are described +; in the accompanying .UPD file. + +; + ASEG + ORG 100H + +; The CCP invokes programs with a CALL 100H, with the stack pointer set to +; 100H. When we exit to CP/M, we do so with a RET, avoiding a warm boot. +; Unfortunately, DDT starts programs with a jump, not a call, so when we +; attempt to return to CP/M, we blow the stack and use the word at 100H as +; the new PC. Put a 0 there so we reboot instead of dying horribly. +; (Fortunately, this happens to be two NOP's). + dw 0 + jmp start ; Bypass entry section + +; +; Entry section for system-independent part. This contains +; jumps to routines needed by the system support module. +; +entries: + jmp kermit ; reentry address + jmp nout ; output HL in decimal +entsiz equ $-entries ; length of entry section +; +; End of entry section. As a consistency check, the expected +; length of this section is stored by the system-dependent +; module in the linkage section at the end of Kermit, and +; tested at initialization. + +mitver: db 'CPSMIT.ASM (30) 29-Mar-1991$' ; name, edit number, date +; +; +; Initialization +; +start: lxi h,0 ; Clear out hl pair + dad sp ; and fetch the system stack pointer + shld oldsp ; and save for later restoral + lxi sp,stack ; move in our own stack. + lxi d,version ; print Kermit version + call prtstx ; before we do too much (Use fudged prtstr) + mvi c,rddrv ;Get our logged in drive + call BDOS + inr a ;relative 1 + sta CURDSK ;and save it for later + + lda vtflg ; [OBS] Hangover from VT52 ems not possible... + cpi 0ffh ; ... if 0ff stored, assume terminal = off + mvi a,vtdefo + jnz start0 + sta vtflg ; if 0ffh make it VT52 off +start0: + + +IF debug +;vvvvvvvvvvvvvvvv remove this for run time +; OBS edit 22 - add in a dummy command line to 80H + lxi h,dcomln ;[22] load up dummy command line + lxi d,81h ;[22] where to put it + lxi b,endcoml-dcomln + mov a,c ; get length to a + sta 80h ; ... and save as command line length + call mover ; ... and save rest of line + jmp starta +dcomln: db 'set baud 4800',semico + db 'set dir on',semico + db 'dir' + db 0,0 ; just to make up space +endcoml: +;^^^^^^^^^^^^^^^^ remove this for run time +ENDIF ;debug + + +starta: +; +; Make sure the overlay is in place... +; + lhld lnkflg + mov a,h + ora l ; if lnkflg is still zero, + jz start1 ; the configuration overlay is missing. + lxi d,-lnksiz ; if it's not equal to lnksiz, + dad d ; we've probably got the wrong + mov a,h ; version of the configuration overlay. + ora l + jnz start2 + lhld lnkent ; make sure the overlay knows how long + lxi d,-entsiz ; our entry section is, so they don't miss. + dad d + mov a,h + ora l + jnz start2 + ; might be ok. + lxi h,bdos ; set xbdos address to bdos trap in our code. + shld xbdos+1 ; (they may never use it...) + call sysinit ; do system-dependent initialization + lda bufsec ; get the max no of buffers allowed by system + sta maxbsc ; save for SET BUFFER use to compare + lxi d,inms26 ; offer some advice on getting help + call prtstr + lxi h,buff ;[19] we copy any potential command tail across + lxi d,cbuff + lxi b,80h ;[19] copy all 128 bytes. May use none. + call mover + lda 80h ; see if there is a command tail... + + ana a + + + +; Remove for runtime use +; xra a ; make out there is no command tail +; Runtime => no XRA above + + jz startz + dcr a + jz startz ; one character tail... + lda takflg ; if more characters, say we are have tail + ori 10h ; set bit 4 + sta takflg + sta nexitf ; exit back to CP/M after command line +startz: + mvi a,0ffh ; when here, system basically initiallised,... + sta initflg ; apart from KERMIT.INI, so say initialised. + + call take1 ;[9] take a KERMIT.INI file + xra a ;[MF] Say we've done it + sta initak ;[MF] ... + jmp kermit ; Start main loop. + +start1: lxi d,erms20 ; "Kermit has not been configured" + call prtstx ; print error message (Use bodge for prtstr) + jmp exit2 ; and exit. + +start2: lxi d,erms21 ; "Consistency check on configuration failed" + call prtstx ; print error message + jmp exit2 ; and exit. +; +;This is the main KERMIT loop. It prompts for and gets the users commands. + +kermit: lxi sp,stack ; get new stack pointer, old one might be bad. + call selcon ; make sure console is selected. + xra a + sta mfflg1 ;reset MFNAME + sta mfflg2 ;ditto + sta mfflg3 + sta getrxflg ; clear the get/receive flag + ;0=> receive, non 0 => get + sta cmbflg ;[MF]Initial keyword must not be blank + sta cmqflg ;[MF]Allow character-echoing during commands + sta remtxt ;[MF] Clear remote-text-to-screen flag + lda curdsk ; update the prompt + adi 'A'-1 + sta kerm1+2 + call getun ;[11] get the user number into temp1/2 + lda temp1+1 ;[11] get ms value of user number + cpi '0' ;[11] less than 10 => do a space + jnz kerm4 ;[11] else do MS digit of user number + mvi a,' ' ;[11] +kerm4: sta kerm1 ;[11] + lda temp1 ;[11] get ls digit of user number + sta kerm1+1 ;[11] save that + lda takflg ; are we in TAKE or command line?? + ani 11h ; strip out both bits + jnz kerm5 ; still in either or both... + lda nexitf ; if neither, and no-exit-flag set, we quit. + ana a + jnz exit ;... back to CP/M, else as you were... +kerm5: + lxi d,kerm + call prompt ;Prompt the user. + +kerm7: lxi d,comtab + lxi h,tophlp + call keycmd ; Get a keyword + xchg ; Get result (dispatch address) into HL + pchl ; Dispatch. + +; here from: log, setcom, read, cfmcmd +kermt3: lxi d,ermes3 ;"Not confirmed" + call prtstr + jmp kermit ;Do it again. + +; Structure of command table: +; +; 1) Number of entries. +; 2) Each entry is arranged as follows: +; a) length of command in bytes. +; b) 'name of command and $-sign' +; c) address of routine to process command +; +; ---> Note this command table is in alphabetic order. +; + +comtab: db 32 ; added remote + ;[obs] added in COPY command, now called FCOPY + ;[obs] removed remote simply to issue V4.09 + ;[MF]Make FCOPY/FRENAME COPY/RENAME for + ;[MF]Version 4.10 + ;[MF]Add QUIT as a synonym for EXIT and + ;[MF]C, R and S as abbreviations for + ;[MF]CONNECT, RECEIVE and SEND, respectively + ;[MF]Add STAY as a synonym for SET NO-EXIT + db 5, 'BREAK$' + dw break + db 3, 'BYE$' + dw bye + db 1,'C$' + dw telnet ;[MF]Abbreviation for CONNECT + db 7, 'CONNECT$' + dw telnet + db 4,'COPY$' + dw copy + db 9, 'DIRECTORY$' + dw dir + db 5, 'ERASE$' + dw era + db 4, 'EXIT$' + dw exit + db 6, 'FINISH$' + dw finish + db 3, 'GET$' + dw read ; [gnn] entry for GET + db 4, 'HELP$' + dw help + db 5, 'INPUT$' + dw input + db 3, 'LOG$' + dw log + db 6, 'LOGOUT$' + dw logout + db 6, 'OUTPUT$' + dw string + db 5, 'PAUSE$' + dw pause + db 5, 'PRINT$' + dw printf ;[obs] print a file + db 4,'QUIT$' + dw exit ;[MF]Synonym for EXIT + db 1,'R$' + dw read0 ;[MF]Abbreviation for RECEIVE + db 7, 'RECEIVE$' + dw read0 ; [gnn] not same as GET now + db 6, 'REMOTE$' + dw remote + db 6,'RENAME$' + dw rename ;[MF] + db 1,'S$' + dw send ;[MF]Abbreviation for SEND + db 4, 'SEND$' + dw send + db 3, 'SET$' + dw setcom + db 4, 'SHOW$' + dw show + db 6, 'STATUS$' + dw status + db 4,'STAY$' + dw noexit ;STAY (SET NO-EXIT) + db 4, 'TAKE$' ;[9] + dw take + db 8, 'TRANSMIT$' + dw xmit + db 4, 'TYPE$' + dw type ;[obs] type a file command + db 7, 'VERSION$' + dw shover +; db 4, 'USER$' ; removed [DRJ] +; dw user ;[10] removed [DRJ] +; top-level help message. Caps indicate keywords. +; this text is also printed by the HELP command. + +tophlp: + db cr,lf,'BREAK to send a break to the host' + db cr,lf,'BYE to host (LOGOUT) and exit to CP/M' + db cr,lf,'CONNECT to host on selected port' + db cr,lf,'COPY to copy a CP/M file' + db cr,lf,'DIRECTORY of current used Micro-disk' + db cr,lf,'ERASE a CP/M file' + db cr,lf,'EXIT to CP/M' + db cr,lf,'FINISH running Kermit on the host' + db cr,lf,'GET a file from the host' + db cr,lf,'HELP by giving this message' + db cr,lf,'INPUT to make the micro wait for a string from the host' + db cr,lf,'LOG the terminal sessions to a file' + db cr,lf,'LOGOUT the host' + db cr,lf,'OUTPUT to send a specified string to the host' + db cr,lf,'PAUSE to wait for a little time' + db cr,lf,'PRINT a file to the printer' + db cr,lf,'QUIT to CP/M' + db cr,lf,'RECEIVE file from host' + db cr,lf,'REMOTE to send commands to a remote server' + db cr,lf,'RENAME to rename a CP/M file' + db cr,lf,'SEND file to host' + db cr,lf,'SET a parameter' + db cr,lf,'SHOW the parameters' + db cr,lf,'STATUS of Kermit' + db cr,lf,'STAY at Kermit command-level after a command tail' + db cr,lf,'TAKE commands from a file' ;[9] + db cr,lf,'TRANSMIT file to host (in connect state)' + db cr,lf,'TYPE a file to the console' + db cr,lf,'VERSION of Kermit running' ;[pcc005] +; db cr,lf,'USER to set a different user number' ;removed [DJR] + db '$' ;[obs] added it here to allow for expansion + +; +; This is the BREAK command. It sends a 'B' to the system dependent +; interrupt routines (test for escape-cokebottle xxx) and do a break +; if the overlay can. Else, we tell user not to be so silly. +break: call cfmcmd ; get return + mvi a,'B' ; were gonna do a break if the overlay can + call sysint ; try doing it.. + jmp kermit ; if we can do it, else + lxi d,inms12 ;... say not implemented + jmp kermit + +; +; +; This is the BYE command. It tells the remote KERSRV to logout, +; then exits. + +bye: call cfmcmd + call logo ;Tell the main frame to logout. + jmp kermit ;If it fails, don't exit. + call sysbye ; success. do system-dependent cleanup + jmp exit1 ;Exit Kermit. + +; This is the EXIT command. It leaves KERMIT and returns to CP/M. +; alternate entries: exit1, from BYE command; +; exit2, from initialization (if it fails) + +exit: call cfmcmd ; confirm... +exit1: call sysexit ; do system-dependent termination +exit2: + jmp 0 ; return to CP/M via JUMP instead of RET. + +; lhld oldsp ;Get back the system stack +; sphl ;and restore it. +; ret ;Then return to system. + +; Input command. Syntax: +; INPUT [Wait period] [string] +; where +; Wait period is a time period to wat for +; string is a string to expect back from the host. Control +; characters are entered as \ and an octal number. +; +; I can see uses for this command from other routines... +; +input: mvi a,cmnum ; first get the number + call comnd ; get it + jmp kermit ; if we dont understand it... + lhld number + shld waitp ; and save as the wait period + lxi d,stbuff ; where to put the string + mvi a,cmtxt ; get text + call comnd + jmp kermit ; not quite correct... + sta strcnt ; string count returned in a + call cfmcmd ; get a confirm + + lhld waitp ; multiply the number by + dad h + dad h ; ... 4 + dad h ; ... 8 + inx h ; but make sure it is at least 1 + shld waitp ; and save it away again + shld waitp1 ; save in case we need to reset counter + +; Right, now wait for characters comming from the line, within the +; time allowed (very fuzzy). Compare with STRING buffer +; +inp1: xra a + sta repcnt ; clear the host prompt chars.counter +inp2: lhld waitp ; have we waited long enough + dcx h + shld waitp ; count less one + mov a,h ; test to see if both zero + ora l + jnz inp20 ; nope + mvi a,3 ; error is three ie total failure + sta errorc + jmp inp5 ; take error exit + +inp20: call rd1chl ; read a character from the line + ani 7fh ; set flags + jnz inp4 ; Not zero => we have a character from host + call ckchr ; see if *WE* have a character from console + push psw ; restore to modem + call selmdm ; reselect the modem port + pop psw + ani 7fh ; strip parity (should not be there) + jnz inp2a ; if a null, try again + lda strcnt ; if the string length is zero, dont wait. + ana a + jnz inp2 ; so loop back again + jmp kermit ; else drop out + +inp2a: cpi cntlc ; do we want to abort? +;[MF]Change following line +; jz kermit ; in which case exit back to command loop + jnz inp2b ;[MF] No + lda takflg ;[MF] Yes, are we TAKEing + ani 1 ;[MF] commands from a file? + cnz closet ;[MF] Yes, close and reset to get + ;[MF] commands from the command-line + jmp kermit ;[MF] and exit back to command loop +inp2b: cpi cntlz ; if control z exit back to command loop + jz kermit ; else try for other characters [MF] + jmp inp2 + +inp4: mov e,a ; save it for a while + lda repcnt ; see if this character matches with one in buffer + lxi h,stbuff ; point to string buffer + add l ; make hl = hl + a + mov l,a + mvi a,0 ; ie make hl = hl + character count + adc h + mov h,a ; not using xra, as that clears the Carry flag + mov a,e ; get the character back again + cmp m ; is it = to what we expect? + jnz inp1 ; no, clear counter and try again + lda repcnt ; yes, then update the pointer, and ... + inr a ; ... see if we have received all ... + sta repcnt ; ... we should have received + lhld waitp1 ; get original counter + shld waitp ; and reset the loop (timer) counter + mov e,a ; save length into E again + lda strcnt ; get the length to compare + sub e ; if (e) > string length, we have it + jnz inp2 ; else wait for a little longer + + xra a ; no errors + sta errorc + jmp kermit ; so say nothing +;else if error... + +inp5: lxi d,erms30 ; say message not receive in time... + call prtstr + jmp kermit ; have string, so exit + +; +; + +; This is the HELP command. It gives a list of the commands. + +help: call cfmcmd + lxi d,tophlp ;The address of the help message. + call p20ln ;Print at most 20 lines then pause +; call prtstr + jmp kermit +; +; This is the LOG command. It logs a session to a file. + +log: mvi a,cmofi ;[pcc005] Parse an output file spec. + lxi d,fcb ;[pcc012] where to put it + call comnd + jmp kermt3 + call cfmcmd + lxi h,fcb ;[pcc012] copy file name and ext + lxi d,lognam ;[pcc012] to a safe place + lxi b,12 ;[pcc012] 12 bytes + call mover ;[pcc012] zap ... + mvi a,1 ;[pcc005] set flag for logging + sta logflg ;[pcc005] + jmp kermit ;[pcc005] + +; +; PAUSE [Wait period]. Just wait for a couple of tics... +pause: mvi a,cmnum ; get the number of the wait period + call comnd ; get it + jmp kermit ; we canna do it, so get next command + lhld number + xchg ; move to d + lhld clkbit+1 ; get clock bits 8 to 23 + mov a,h ; strip ms bit so we have space for a possible carry + ani 7fh + mov h,a + dad d ; add the number (ie get the number to wait to + shld number ; save it somewhere +; +; Now, wait for time to be equal to newer NUMBER with Carry +ploop: + call clock ; increment clock + lda takflg ; test if keyboard interrupt.. not for takes + ana a + jnz ploop1 ; do nothing for take command files + mvi c,dconio ; get status from console + mvi e,0ffh ; just get the character + call bdos + ana a ; if non zero return, then quit + jnz kermit ; we got something, so quit +ploop1: lhld number + xchg + lhld clkbit+1 ; get bits 8 to 23 + mov a,h + ani 7fh ; make it 15 bits for a carry... + mov h,a + mov a,e ; now, do (DE with carry) - HL + sub l + mov e,a + mov a,d + sbb h + ora e ; a = OR of result + jnz ploop + jmp kermit ; otherwise we are done. + +; PRINT - Print a file to the console and printer. +; This command is active only from the command level, and not +; from the connect state. Unfortunately, the print command is +; not going to be a background utility. +printf: mvi a,0ffh ; set the print flag on +typent: sta prnfl ; Type file entry. Common for PRINT and TYPE + call type ; and do the rest of the print via type + xra a + sta prnfl ; next clear the print flag + jmp kermit + +; TYPE - Type a file to the console. +; This command is really the same as the print command, but the output +; is not copied to the printer. +typef: xra a ; we want to clear the printer on flag + jmp typent ; go to the type entry in printfile above + + +; +; This is the TAKE command. It take input from a file. +; TAKE1 is the entry for automatically TAKE-ing KERMIT.INI (or whatever +; the file name at taknam is) from the default drive +; [18] code added to accept command tails. See note [18] above +; +take: mvi a,cmifi ;[9] Get filename from user + lxi d,takfcb ;[9] Take file fcb space + call comnd ;[9] get the file spec + jmp kermit ;[9] User failed to specify a good file spec + call take2 ;[MF] Now TAKE the file + jmp kermit ;[MF] Go back to main Kermit command loop +; +take1: lxi b,12 ;[9] copy default drive and file name to take fcb + lxi d,takfcb + lxi h,taknam + call mover ;[9] and do it (all other extents etc are zero) +;[MF][30]No longer need the following line +; jmp take2 ; got the file name, now take it. +; + ;[9] get the file name, now lets open it +; +take2: + lda takflg ; check to see we have not tak-take + ani 1 ; if set, we are in a take already +;[MF]We can do the following test/call more efficiently +; jz take21 +; call closet ; so close current take file + cnz closet ;[MF] So close current take file +take21: + mvi c,setdma + lxi d,takdma ;[9] tell bdos where to send data + call BDOS + xra a ;[9] clear all these extents etc + sta takfcb+14 + sta takfcb+32 + lxi d,takfcb ;[9] open the file + mvi c,openf ;[9] open the file + call BDOS + inr a ;[9] if FF returned, problems +;[MF]Complain if failure and not seeking KERMIT.INI +; jz kermit ;[9] for now, say nowt if no ini file. Else.. + jz ntake ;[9] We'll say file not found + ;[MF] unless the initial TAKE (KERMIT.INI) +; jmp take3 ; a test +; mvi c,readf ;[9] read first bytes from file +; lxi d,takfcb ;[9] +; call BDOS + +take3: lxi h,0 + shld takptr ;[9] point to first byte of take file + lda takflg ; get current flag + ori 1 ;[9] and set flag to tell Kermit we're taking + sta takflg +;[MF][30]Redo next lines so can flag initial TAKE of KERMIT.INI +; call rnsect ;[9] read a sector +; jmp kermit ;(Should use a ret, but this will do) + jmp rnsect ;[9] read a sector and return + +ntake: lda initak ;[MF]Is this the initial TAKE (KERMIT.INI)? + ora a ;[MF]... + rnz ;[MF]Yes, don't complain + lxi d,erms15 ;[9] Say file not found + call prtstr +;[MF][30]Make next line a "jmp" since we've called TAKE2 +; call rstdma ;[9] reset the DMA addres for other files +; jmp kermit + jmp rstdma ;[9] reset the DMA addres for other files + ;[MF] and return + + +; Little code to allow some expansion of code without changing +; every futher address, only up to the end of this file. +; TO BE REMOVED FRO RELEASE! + +; org ($+100h) AND 0FF00H + +IF lasm + LINK CPSCOM +ENDIF ;lasm diff --git a/cpspk1.asm b/cpspk1.asm new file mode 100644 index 0000000..6ea4831 --- /dev/null +++ b/cpspk1.asm @@ -0,0 +1,1904 @@ +; CPSPK1.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 +; 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 file contains the (system-independent) routines that implement +; the KERMIT protocol, and the commands that use them: +; RECEIVE, SEND, FINISH, and LOGOUT. +; +; revision history: +; +;edit 23, 16-Jan-1991 by MF. The bug of (22) was not fixed (although +; the error described needed to be corrected). Really fixed the bug this: +; time. changed "lda 'E'" after "ptch9b" to "mvi a,'E'" -- Zilog +; mnemonic thinking must've addled my brain! +;edit 22, 14-Jan-1991 by MF. Fix bug in the code which sends an "E" packet +; to the remote Kermit on encountering "disk full" so that +; uncontrollified <CR><LF> is not copied to the packet data area (and +; hence sent to the remote Kermit). This should fix a bug reported +; by Russell Lang of Monash University in Australia wherein a PC +; running Kermit in Server mode complained of invalid characters when +; receiving the "disk full" error packet from CP/M Kermit. +;edit 21 of 3-Jan-1991 by MF. Reverse part of edit 20 which flushes comm +; input at EOF send: the problem of multiple copies of packets being +; sent when a stream of files being sent is partially interrupted with +; ^X has been fixed by modifying "inchr" in CPSPK2.ASM. +;edit 20, 2-Jan-1991 by MF. Tightened up code just after "sdata1" and around +; "sdat14". Added code to flush comm input after user has typed ^X +; or ^Z to interrupt file sends so that duplicate packets are not +; sent after the interrupt character (especially ^X) has been typed. +;edit 19, 14-Dec-1990 by MF. Place "<<>>" around "F" and "X" packets coming +; as replies to REMOTE commands a la VMS Bliss Kermit. +; Also type each character of "X" or "F" packet explicitly in case +; dollar-signs are part of the filename (as in VMS Bliss Kermit +; when a REMOTE TYPE is given and SET FILE NAMING FULL is in effect). +; Expanded code is at label rfil3f. +;edit 18, 27-Nov-1990 by MF. Fix bug introduced with edit 17 which resulted +; in "E" packet being sent twice when receiving file(s) and disk-full +; occurred. Sorry about that, folks! +;edit 17, 27-Nov-1990 by MF. When receiving files, make the decision as to +; whether to delete a partially-received file on a "disk full" +; condition subject to the setting of the SET INCOMPLETE-FILES +; switch in conformity with the behavior of MSDOS Kermit. +; An "E" packet is still sent to the remote Kermit. Also try to close +; any incomplete file whether deleting it or not (labels rdat16 and +; rdat3a). If keeping incomplete files, try to write outstanding +; buffers to disk, giving an error if the disk is full. +;edit 16, 23-Nov-1990 by MF. When receiving, cause the file being written +; to disk to **always** be deleted and an "E" packet to be sent when a +; "disk full" condition is encountered (per suggestion of +; RJL@MONU1.CC.MONASH.EDU.AU). +;edit 15, 15-Nov-1990 by MF. Changed code for the Receive Complete state +; to always go into RECEIVE if AUTORECEIVE is on. This will happen +; most of the time anyway as most mainframe Kermits issue a prompt +; after a single SEND command (wild-carded or not), thus guaranteeing +; that the modem status check of Kermit-80 ver. 4.09 would **always** +; have characters ready for input (the mainframe Kermit's prompt), +; defeating the status check and the Console input check (originally +; intended to drop the user out of the loop if he/she typed a key with +; no comm input present). Eliminate "any key" message there also. +; the user can drop out by hitting ^C. +; Of course, none of the foregoing applies if the Receive Complete +; state occurs as the result of a "Get" command where Autoreceive +; is meaningless and we just drop back to Kermit command-level. +;edit 14, 1-Oct-1990 by MF. Added code to send an "I" packet before an +; "R" packet in GET command. +; Modified routine "sinit" to ignore "E" packets when sending an +; "i" packet (per KPROTO.DOC). +;edit 13, 14-Sep-1990 by MF. Added code to implement SET FILE COLLISION +; and SET INCOMPLETE commands. +;edit 12, 9-Sep-1990 by MF. Added code to prevent packet counts +; from being displayed during Remote commands. Fixed +; AUTORECEIVE code, file colision Rename algorithm and eliminated +; multiple display of initial messages during GET/RECEIVE. +; edit 11, 28 July, 1987 by OBSchou. Commented out capas etc support +; (Long packets etc) as this is not worth the effort coding... but +; I have left what WAS done for any enthusiast. Also set in a few +; to NOT write to screen if SET TERMINAL QUIET set. Hopefully speeds +; up transfers on systems taking forever to update screens. +; +; edit 10, 8 April, 1987 by OBSchou. Tarted up all sorts of bits n bobs +; to cope with all the new aditions for Kermit-80 V 4.09 +; Look for the [10] for most cahnges. spar and rpar largely replaced +; +; edit 9, March 30th by OBSchou. Set bits for automatically receiving +; another file if a remote sender sends files in seperate sessions. +; The code simply checks the serial line, and if there is some +; activity, assume its another SEND INIT packet. As there is no +; simple way to go to receive with the control-a, just ignore the +; packet. Causes one retry on the sender, but so what. Really +; should make it a server gizzmo. +; +; edit 8: January 28, 1987 by OBSchou +; Two major issues: firstly split CPSPKT.ASM into CPSPK(1 2).ASM +; making it far easier to handle this file. +; Second, some mode to the GET routines to correctly print the file +; name instead of the fireworks. Trouble was with GET <file> <file> +; and RECEIVE <file>. However, new bugs discovered... +; +; edit 7: August 11, 1986 Godfrey N. Nix [gnn] Nottingham University +; To ignore echoed packets (ie send 'S' receive 'S' before 'A'); +; To allow character other than SOH for packet header (see also +; updates to CP4MIT and CP4UTL for other code needed); +; To permit SEND and RECEIVE to specify a host filename which +; is of a different structure to that of CP/M. +; +; edit 6a: [OBSchou] 7 March, 1985. +; Edited file with additions from MJ Carter. He writes: +; 25th September 1985, M J Carter [majoc], Nottingham University +; Code in gofil() amended, for exactly the same reasons to the +; alteration to cmifil() in cpscmd.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. +; +;edir 6: November 22, 1984 +; Change SEND's 'Unable to find file' error exit from calling +; error3 to calling prtstr instead. I don't know about you, but +; I greatly dislike having messages dumped into pre-existing +; junk on the screen where I have to spend lots of time hunting +; for them. [Hal Hostetler] +; +; edit 5: September 9, 1984 +; Call flsmdm in init to flush old input when starting transfers. +; Select console before returning from inpkt. +; Replace inline code with calls to makfil/clofil to set up for +; multisector buffering on output. +; Remove superfluous call to clrlin in error3. +; +; edit 4: August 21, 1984 (CJC) +; Fix comment in inpkt: packet is terminated by NUL on return, not CR. +; If debugging, display the outgoing packet before putting the EOL +; character on, so the dumped packet doesn't get overwritten. +; +; edit 3: July 27, 1984 +; add link directive for LASM. CP4PKT is linked by CP4MIT, and links +; to CP4TT. Add Toad Hall TACtrap to permit operations through a TAC. +; +; edit 2: June 8, 1984 +; formatting and documentation; remove some unused labels; move setpar +; to cp4mit.m80; add module version string; make all arithmetic on +; 'pktnum' modulo 64; apply defaults correctly for missing parameters +; in send-init packet (and corresponding ack). +; +; edit 1: May, 1984 +; extracted from CPMBASE.M80 version 3.9; modifications are described +; in the accompanying .UPD file. +; +pk1ver: db 'CPSPK1.ASM (23) 16-Jan-1991$' ; name, edit number, date + +; GET command [gnn] +; here from: kermit + +read: mvi a,0ffh ;[obs 8] we are doing a get + sta getrxflg ;[obs 8] so set flag + lxi d,remdat ;Where to put the text (if any.) + mvi a,cmtxt + call comnd ;Get either some text or a confirm. + jmp kermt3 ; Didn't get anything. + ora a ;Get any chars? + jz kermt3 ;[gnn] GET must have a filename + sta rdl ;Store the number of chars. + xchg ;Get pointer into HL. + mvi m,'$' ;Put in a dollar sign for printing. + call init ;Clear the line and initialize the buffers. + lda quietd ; quiet display? + ana a + jz read01 ;[MF]No, go ahead and position cursor + call prcrlf ;[MF]Yes, keep from overwriting the prompt + jmp read00 ;[MF]and write filename +read01: call scrfln ;Position cursor [MF] +read00: lxi d,remdat ;Print the file name, in either case + call prtstr + jmp read0a ;[gnn] go get local name if any + + +; enter here for RECEIVE command [gnn] +read0: mvi a,0 ;[gnn] + sta rdl ;[gnn][MF] flag entry as receive, not get + sta getrxflg ;[obs 8] doing a receive, so reset flag + call init ;clear line, initialise buffers +read0a: lxi d,remnam ;[gnn] save local name here + mvi a,cmtxt ;[gnn] + call comnd ;[gnn] read second filename if present + jmp kermt3 ;[gnn] error exit + sta remlen ;[gnn] save length of name, may be zero + sta getrxflg ;[obs 8] May also be receive <fnam> so + ;[obs 8]pretend get for printing filename + lda rdl ;[gnn] look at first name + ora a ;[gnn] receive or get? + jz read1 ;[gnn] receive + + mvi a,'I' ;[MF]Set state to send "I" packet + sta state ;[MF]... + +; jmp read12 ;[obs] [gnn] does not want this + +read1: ;call init ;Clear the line and initialize the buffers. +read12: xra a + sta czseen ;Clear the ^X/^Z flag initially. + lxi h,0 + shld numpkt ;Set the number of packets to zero. + shld numrtr ;Set the number of retries to zero. + sta pktnum ;Set the packet number to zero. + sta numtry ;Set the number of tries to zero. + lda quietd ; quiet display? + ana a + jnz read13 ; yes, so dont write... + call scrnrt ;Position cursor + lxi h,0 + call nout ;Write the number of retries. +read13: lda rdl ;[MF]Get or receive? + ora a ;[MF]... + jnz read2 ;[MF]Get, don't reset state + mvi a,'R' + sta state ;Set the state to receive initiate. + ;... +; +;RECEIVE state table switcher. + +read2: lda quietd ; noisy display? + ana a + jnz read21 ; no, a quiet one + lda remtxt ;[MF] In Remote command? + ora a + jnz read21 ;[MF] Yes, don't write to screen + call scrnp ;Position cursor + lhld numpkt + call nout ;Write the current packet number. +read21: lda state ;Get the state. + cpi 'D' ;Are we in the DATA receive state? + jnz read22 + call rdata + jmp read2 + +read22: cpi 'X' ; F packet but not an F packet? + jnz read3 ; nope, so try next one + call rfile ; 'get' the filename (but dont open it) + jmp read2 + +read3: cpi 'F' ;Are we in the FILE receive state? + jnz read4 + call rfile ;Call receive file. + jmp read2 + +read4: cpi 'R' ;Are we in the Receive-Initiate state? + jnz read5 + call rinit + lda state ;[jd] get new state + cpi 'F' ;[jd] went into receive state? + jnz read2 ;[jd] no + lxi d,inms24 ;[jd] yes, get receiving... message + call finmes ;[jd] go print it + jmp read2 + +read5: cpi 'C' ;Are we in the Receive-Complete state? + jnz read6 + lxi d,infms3 ;Put in "Complete" message. + lda czseen ;Or was it interrupted? + ora a ; . . . + jz read5a ;No. + xra a ;Yes, clear flag. + sta czseen ; ... + lxi d,inms13 ;Issue "interrupted" message. +read5a: lda remtxt ;[MF] Doing a Remote command? + ora a + cz finmes ;Print completion message in right place if not +; + lda rdl ;[MF]Receive or Get? + ora a ;[MF]... + jnz kermit ;[MF]Get, Autoreceive means nothing. + lda autorc ; see if we want autoreceives + ana a + jz kermit ;[MF]No autoreceives, so drop out + lxi d,autmes ;[MF]Yes, tell the user what we're doing + call prtstr ;[MF]... + jmp read1 ;[MF]Try another Receive (we get one + ;[MF]retry from the sender as the ^A is lost) + +read6: cpi 'Y' ;[MF]Simple ack (from remote command)? + jz kermit ;[MF]Yes + + cpi 'I' ;[MF]Exchanging parameters via info packet? + jnz read7 ;[MF]No + call sinit ;[MF]Yes, send the packet + lda state ;[MF]Now see what happened + cpi 'X' ;[MF]Did we exchange parameters successfully? + jz read6a ;[MF]Yes, go send the filespec + cpi 'A' ;[MF]No, are we in abort state? + jnz read2 ;[MF]No, try again + jmp kermit ;[MF]Yes, it's a real disaster, we must stop +read6a: lda rdl ;[MF]Get length of filespec + sta argblk+1 ;[MF]as length of packet + mov c,a ;[MF]We must copy the filespec + mvi b,0 ;[MF]... + lxi h,remdat ;[MF]from the temporary buffer + lxi d,data ;[MF]to the packet data area + call mover ;[MF]Do it. +; for GET we must send the name of the file we want [gnn] + + mvi a,'1' ;Start with single character checksum + sta curchk ;Save the type + xra a ;Start a packet zero. + sta argblk + mvi a,'R' ;Receive init packet. + call spack ;Send the packet. + jmp kermt3 ; Die! + xra a + sta czseen ;Clear the ^X/^Z flag initially. + lxi h,0 + shld numpkt ;Set the number of packets to zero. + sta pktnum ;Set the packet number to zero. + sta numtry ;Set the number of tries to zero. + mvi a,'R' ;[MF]Set state to Receive-Initiate + sta state ;[MF]... + jmp read21 ;[MF]and go around again + ;[MF]without retyping packet-number + +read7: cpi 'A' ;Are we in the Receive-"Abort" state? + jnz read8 +read8: lxi d,infms4 ;Anything else is equivalent to "abort". + call finmes + jmp kermit +; +; Receive routines + +; Receive init +; called by: read + +rinit: lda numtry ;Get the number of tries. + cpi imxtry ;Have we reached the maximum number of tries? + jm rinit2 + lxi d,ermes4 + call error3 ;Move cursor and print an error message. + jmp abort ;Change the state to abort. + +rinit2: inr a ;Increment it. + sta numtry ;Save the updated number of tries. + mvi a,'1' ;Reset block check type to single character + sta curchk ;Store as current type for initialization + call rpack ;Get a packet. + jmp nak ; Trashed packet: nak, retry. + cpi 'S' ;Is it a send initiate packet? + jnz rinit3 ;If not see if its an error. +rini2a: lda numtry ;Get the number of tries. + sta oldtry ;Save it. + xra a + sta numtry ;Reset the number of tries. + lda argblk ;Returned packet number. (Synchronize them.) + call countp + lda argblk+1 ;Get the number of arguments received. + lxi h,data ;Get a pointer to the data. + call spar ;Get the data into the proper variables. + lxi h,data ;Get a pointer to our data block. + call rpar ;Set up the receive parameters. + sta argblk+1 ;Store the returned number of arguments. + mvi a,'Y' ;Acknowledge packet. + call spack ;Send the packet. + jmp abort ; Failed, abort. + lda inichk ;Now switch to agreed upon check-type + sta curchk ;For all future packets + mvi a,'F' ;Set the state to file send. + sta state + ret + +rinit3: cpi 'E' ;Is it an error packet. + jnz nak0 ;If not NAK whatever it is. + call error + jmp abort +; +; Receive file +; called by: read + +rfile: lda numtry ;Get the number of tries. + cpi maxtry ;Have we reached the maximum number of tries? + jm rfile1 + lxi d,ermes5 + call error3 ;Move cursor and print an error message. + jmp abort ;Change the state to abort. + +rfile1: inr a ;Increment it. + sta numtry ;Save the updated number of tries. + call rpack ;Get a packet. + jmp nak ; Trashed packet: nak, retry. + cpi 'S' ;Is it a send initiate packet? + jnz rfile2 ; No, try next type. + lda oldtry ;Get the number of tries. + cpi imxtry ;Have we reached the maximum number of tries? + jm rfil12 ;If not proceed. + lxi d,ermes4 + call error3 ;Move cursor and print an error message. + jmp abort ;Change the state to abort. + +rfil12: inr a ;Increment it. + sta oldtry ;Save the updated number of tries. + lda pktnum ;Get the present packet number. + dcr a ;Decrement + ani 3FH ; modulo 64 + mov b,a + lda argblk ;Get the packet's number + cmp b ;Is the packet's number one less than now? + jnz nak0 ;No, NAK and try again. + call updrtr ;Update the retry count. + xra a + sta numtry ;Reset the number of tries. + lxi h,data ;Get a pointer to our data block. + call rpar ;Set up the parameter information. + sta argblk+1 ;Save the number of arguments. + mvi a,'Y' ;Acknowledge packet. + call spack ;Send the packet. + jmp abort ; Failed, abort. + ret + +rfile2: cpi 'Z' ;Is it an EOF packet? + jnz rfile3 ; No, try next type. + lda oldtry ;Get the number of tries. + cpi maxtry ;Have we reached the maximum number of tries? + jm rfil21 ;If not proceed. + lxi d,ermes6 + call error3 ;Move cursor and print an error message. + jmp abort ;Change the state to abort. + +rfil21: call tryagn + ret + +rfile3: cpi 'F' ;Start of file? + jnz rfil3b + mov c,a ;[MF]Save packet type + lda remtxt ;[MF]Doing a remote server command? + ora a ;[MF]... + mov a,c ;[MF]Restore packet type + jnz rfil3d ;[MF]If yes, same as x packet + call compp + jnz nak0 ;No, NAK it and try again. + call countp + mov c,a ;[MF] + lda remtxt ;[MF]Doing a remote command? + ora a ;[MF]... + mov a,c ;[MF] + jnz rfil3a ;[MF]Yes, don't open a file + call gofil ;Get a file to write to, and init output buffer. + jmp abort +rfil3a: lda numtry ;Get the number of tries. + sta oldtry ;Save it. + call ackp + mvi a,'D' ;Set the state to data receive. + sta state + lda czseen ;Check if we punted a file + cpi 'Z' ;and didn't want any more + rz ;If that was the request, keep telling other end + xra a ;Otherwise, clear flag (^X is only for one file) + sta czseen ;And store the flag back + ret + +rfil3b: cpi 'X' ;Start of 'file?' , but not a file? + jnz rfile4 +rfil3d: call compp + jnz nak0 ;No, NAK it and try again. + call countp + + call selcon ;[MF]Select Console + lda argblk+1 ; get length + ora a ;[MF]Anything to write? + jz rfil3e ;[MF]No + push psw ;[MF]Yes, save character count + mvi e,'<' ;[MF]Write "<<" as in VMSKermit + push d ;[MF]... + call outcon ;[MF]... + pop d ;[MF]... + call outcon ;[MF]... + pop psw ;[MF]Restore character count + lxi h,data ; lets write the filename (?) to display +rfil3f: push psw ;[MF]Save loop counter + mov e,m ;[MF]Get character to write + inx h ;[MF]and increment character pointer + push h ;[MF]Save the pointer + call outcon ;[MF]Write character to display + pop h ;[MF]Restore pointer + pop psw ;[MF]and loop counter + dcr a ;[MF]Decrement the counter + jnz rfil3f ;[MF]Display entire filename + mvi e,'>' ;[MF]Put in ">>" as in VMSKermit + push d ;[MF]... + call outcon ;[MF]... + pop d ;[MF]... + call outcon ;[MF]... + call prcrlf ;[MF]New line +rfil3e: lda numtry ;Get the number of tries. + sta oldtry ;Save it. + call ackp + mvi a,'D' ; expecting a D packet + sta state + lda czseen ;Check if we punted a file + cpi 'Z' ;and didn't want any more + rz ;If that was the request, keep telling other end + xra a ;Otherwise, clear flag (^X is only for one file) + sta czseen ;And store the flag back + ret + +rfile4: cpi 'B' ;End of transmission. + jnz rfile5 + call compp + jnz nak0 ;No, NAK it and try again. + xra a ;No data. (Packet number already in argblk). + sta argblk+1 + mvi a,'Y' ;Acknowledge packet. + call spack ;Send the packet. + jmp abort + mvi a,'C' ;Set the state to complete. + sta state + ret + +rfile5: cpi 'E' ;Is it an error packet. + jnz abort + call error + jmp abort +; +; Receive data +; called by: read + +rdata: lda numtry ;Get the number of tries. + cpi maxtry ;Have we reached the maximum number of tries? + jm rdata1 + lxi d,erms10 + call error3 ;Display error message. +rdat16: lda remtxt ;[MF]Is a Remote command in progress? + ora a ;[MF]... + jnz abort ;[MF]Yes, don't worry about file disposition + lda incflg ;[MF]Are we keeping incomplete files? + ora a ;[MF]... + jnz rdat17 ;[MF]Yes + lxi d,fcb ;[MF]No, close the file, ignoring errors + push d ;[MF]while protecting the pointer + mvi c,closf ;[MF]... + call bdos ;[MF]... + pop d ;[MF]Now delete the file, ignoring errors + mvi c,delf ;[MF]... + call bdos ;[MF]... + jmp abort ;Change the state to abort. +rdat17: call clofil ;[MF]Try to close the file, writing + ;[MF]outstanding buffers to disk + jmp rdat37 ;[MF]We can't, the disk is full + jmp abort ;[MF]Change the state to "abort" + +rdata1: inr a ;Increment it. + sta numtry ;Save the updated number of tries. + call rpack ;Get a packet. + jmp nak ; Trashed packet: nak, retry. + cpi 'D' ;Is it a data packet? + jnz rdata2 ; No, try next type. + call compp ;check for correct packet number (zero flag = ok) + jz rdat14 ;its correct + lda oldtry ;Get the number of tries. + cpi maxtry ;Have we reached the maximum number of tries? + jm rdat12 ;If not proceed. + lxi d,erms10 + call error3 ;Display err msg. + jmp rdat16 ;[MF]Change the state to abort. + +rdat12: call tryagn + ret + +rdat14: call countp + lda numtry ;Get the number of tries. + sta oldtry ;Save it. + lda argblk+1 ;Get the length of the data. + call ptchr + jmp rdat3b ;[MF] Unable to write out chars;abort. + xra a + sta numtry ;Reset the number of tries. + sta argblk+1 ;No data. (Packet number still in argblk.) + mov c,a ;Assume no data + lda czseen ;Check if control-X typed + ora a ; . . . + jz rdat15 ;Zero if not typed + mov c,a ;Get the type of character typed + mvi a,1 ;One data character + sta argblk+1 ;Save the count + mov a,c ;Get the possible data character + sta data ;Store in data area +rdat15: mvi a,'Y' ;Acknowledge packet. + call spack ;Send the packet. + jmp rdat16 ;[MF] + ret + +rdata2: cpi 'F' ;Start of file? + jnz rdata3 ; No, try next type. + lda oldtry ;Get the number of tries. + cpi maxtry ;Have we reached the maximum number of tries? + jm rdat21 ;If not proceed. + lxi d,ermes5 + call error3 ;Display err msg. + jmp rdat16 ;[MF]Change the state to abort. + +rdat21: call tryagn + ret + +rdata3: cpi 'Z' ;Is it a EOF packet? + jnz rdata4 ;Try and see if its an error. + call compp + jnz nak0 ;No, NAK it and try again. + call countp + lda argblk+1 ;Get the data length + cpi 1 ;Have one item? + jnz rdat33 ;If not, ignore data + lda data ;Yes, get the character + cpi 'D' ;Is it a 'D' for discard? + jz rdat36 ;If so, punt file +rdat33: lda remtxt ;[MF]Writing text to disk? + ora a ;[MF]... + jnz rdat38 ;[MF]No, don't close file + call clofil ;Finish off the file. + jmp rdat37 ; Give up if the disk is full. +rdat38: xra a ;Since we kept the file, + sta czseen ;don't say it was discarded. + lda numtry ;Get the number of tries. [MF] + sta oldtry ;Save it. [MF] + call ackp ;[MF] + jmp rdat39 ;[MF]and get ready to get more files +rdat36: lda numtry ;Get the number of tries. + sta oldtry ;Save it. + call ackp + lda remtxt ;[MF]Is a Remote command in progress? + ora a ;[MF]... + jnz rdat39 ;[MF]Yes, don't worry about file disposition + lda dscflg ;[MF]Is the file being punted because + ora a ;[MF]of a collision? + jnz rdat39 ;[MF]Yes, don't delete the existing file + lda incflg ;[MF]No, are we keeping incomplete files? + ora a ;[MF]... + jnz rdat3a ;[MF]Yes + lxi d,fcb ;[MF]No, close the file, + mvi c,closf ;[MF]ignoring errors + push d ;[MF]... + call bdos ;[MF]... + pop d ;[MF]Now delete the file, + mvi c,delf ;[MF]ignoring errors + call bdos ;[MF]... + jmp rdat39 ;[MF]and continue +rdat3a: call clofil ;[MF]Try to close the file, writing + ;[MF]outstanding buffers to disk + jmp rdat37 ;[MF]Can't, disk is full +rdat39: mvi a,'F' + sta state + ret + +rdat37: call ptchr9 ; Send "?Disk full" on the error line [MF] + ; and to the remote Kermit [MF] +rdat3b: lda remtxt ;[MF]Doing a Remote command? + ora a ;[MF]... + jnz abort ;[MF]Yes, just abort + lxi d,fcb ;[MF]Close the file, ignoring errors + push d ;[MF]Protect fcb pointer + mvi c,closf ;[MF]... + call bdos ;[MF]... + pop d ;[MF]Restore pointer + lda incflg ;[MF]Are we keeping incomplete files? + ora a ;[MF]... + jnz abort ;[MF]Yes, just abort transfer + mvi c,delf ;[MF]No, delete the file, ignoring errors + call bdos ;[MF]... + jmp abort ;[MF] abort transfer + +rdata4: cpi 'E' ;Is it an error packet. + jnz rdat16 ;[MF] + call error + jmp rdat16 ;[MF] +; +; SEND command +; here from: kermit + +send: mvi a,cmifi ;Parse an input file spec. + lxi d,fcb ;Give the address for the FCB. + call comnd + jmp kermit ; Give up on bad parse. +; section to get remote filename [gnn] + lxi d,remnam ;[gnn] where to put filename + mvi a,cmtxt ;[gnn] + call comnd ;[gnn] get the text to end of the line + jmp kermt3 ;[gnn] failure in reading buffer + sta remlen ;[gnn] save length (may be zero) +; + xra a + sta mfflg1 ; clear flags... + sta mfflg2 + sta mfflg3 ;[gnn] + sta fcbcnt ;[gnn] clear fcbcount + lxi h,fcb0 ;[gnn] and fcb pointer + shld xfcbptr +; + call mfname ;handle (multi) files + jnc send14 ;got a valid file-name + lxi d,erms15 + call prtstr ;Display error msg. ([hh] where it's visible) + jmp kermit + +send14: call init ;Clear the line and initialize the buffers. + xra a + sta pktnum ;Set the packet number to zero. + sta numtry ;Set the number of tries to zero. + sta wrn8 ;[jd] we haven't sent the 8-bit-lost warning + lxi h,0 + shld numpkt ;Set the number of packets to zero. + shld numrtr ;Set the number of retries to zero. + lda quietd ; a quiet display? + ana a + jnz send15 ; yup, dont write + call scrnrt ;Position cursor + lxi h,0 + call nout ;Write the number of retries. +send15: mvi a,'1' ;Reset to use single character checksum + sta curchk ;For startup + mvi a,'S' + sta state ;Set the state to receive initiate. + ;... +; +;SEND state table switcher + +send2: lda quietd ; a quiet display? + ana a + jnz send21 ; yes, so dont write + call scrnp ;Position cursor + lhld numpkt + call nout ;Write the packet number. +send21: lda state ;Get the state. + cpi 'D' ;Are we in the data send state? + jnz send3 + call sdata + jmp send2 + +send3: cpi 'F' ;Are we in the file send state? + jnz send4 + call sfile ;Call send file. + jmp send2 + +send4: cpi 'Z' ;Are we in the EOF state? + jnz send5 + call seof + jmp send2 + +send5: cpi 'S' ;Are we in the send initiate state? + jnz send6 + call sinit + lda state ;[jd] get state back + cpi 'F' ;[jd] into file send state yet? + jnz send2 ;[jd] no + lxi d,inms23 ;[jd] yes, print sending... + call finmes ;[jd] + jmp send2 + +send6: cpi 'B' ;Are we in the eot state? + jnz send7 + call seot + jmp send2 + +send7: cpi 'C' ;Are we in the send complete state? + jnz send8 ;No... + lxi d,infms3 ;Yes, write "Complete" message. + lda czseen ;Or was it interrupted? + ora a ; . . . + jz send7a ;No. + lxi d,inms13 ;Yes, then say "Interrupted" instead. +send7a: call finmes + jmp kermit + +send8: cpi 'A' ;Are we in the send "abort" state? + jnz send9 + lxi d,infms4 ;Print message. + call finmes + jmp kermit + +send9: lxi d,infms4 ;Anything else is equivalent to "abort". + call finmes + jmp kermit +; +; Send routines + +; Send initiate +; called by: send + +sinit: lda numtry ;Get the number of tries. + cpi imxtry ;Have we reached the maximum number of tries? + jm sinit2 + lxi d,erms14 + call error3 ;Display ermsg + jmp abort ;Change the state to abort. + +sinit2: inr a ;Increment it. + sta numtry ;Save the updated number of tries. + mvi a,'1' ;Reset to use single character checksum + sta curchk ;For startup + lda chktyp ;Get our desired block check type + sta inichk ;Store so we tell other end + lxi h,data ;Get a pointer to our data block. + call rpar ;Set up the parameter information. + sta argblk+1 ;Save the number of arguments. + lda numpkt ;Get the packet number. + sta argblk + lda state ; load state (I or S) + + call spack ;Send the packet. + jmp abort ; Failed, abort. + call rpack ;Get a packet. + jmp r ; Trashed packet don't change state, retry. + cpi 'Y' ;ACK? + jnz sinit3 ;If not try next. + call compp ;compare packets. If ok, zero flag set + rnz ;If not try again. + call countp ;increment packet number modulo 64 + lda argblk+1 ;Get the number of pieces of data. + lxi h,data ;Pointer to the data. + call spar ;Read in the data. (decode what they want) + lda numtry ;Get the number of tries. + sta oldtry ;Save it. + xra a + sta numtry ;Reset the number of tries. + lda state ; se if S or I state + cpi 'I' ; I state, so set X as next state + jnz sinita +sinitb: mvi a,'X' + sta state + ret + +sinita: lda inichk ;Get the agreed upon block check type + sta curchk ;Store as type to use for packets now + mvi a,'F' ;Set the state to file send. (Assumed) + sta state + call getfil ;Open the file. + ret ; assume success; mfname thinks the file exists. + +sinit3: cpi 'N' ;NAK? + jnz sinit4 ;If not see if its an error. + call updrtr ;Update the number of retries. + lda pktnum ;Get the present packet number. + inr a ;Increment + ani 3FH ; modulo 64 + mov b,a + lda argblk ;Get the packet's number. + cmp b ;Is the packet's number one more than now? + rnz ;If not assume its for this packet, go again. + xra a + sta numtry ;Reset number of tries. + mvi a,'F' ;Set the state to file send. + sta state + ret + +sinit4: cpi 'E' ;Is it an error packet. + jnz abort + lda state ;[MF]Get state + cpi 'I' ;[MF]If an "I" packet was sent, + jz sinitb ;[MF]Ignore the error, pretend success + call error ;[MF]else display the error info + jmp abort ;[MF]and abort +; +; Send file header +; called by: send +;[5a] Question [majoc]: Why could not the filename +; parsing have been done by comnd, like all the rest? + +sfile: lda numtry ;Get the number of tries. + cpi maxtry ;Have we reached the maximum number of tries? + jm sfile1 + lxi d,erms14 + call error3 + jmp abort ;Change the state to abort. + +sfile1: inr a ;Increment it. + sta numtry ;Save the updated number of tries. + xra a ;Clear A + sta czseen ;No control-Z or X seen + lxi h,data ;Get a pointer to our data block. + shld datptr ;Save it. +; use remote name if given, else use local name [gnn] + lda remlen ;[gnn] anything given? + ora a ;[gnn] + jnz sfile4 ;[gnn] use remote name + + lxi h,fcb+1 ;Pointer to the file name in the FCB. + shld fcbptr ;Save position in FCB. + mvi b,0 ;No chars yet. + mvi c,0 +sfil11: mov a,b + cpi 8H ;Is this the ninth char? + jnz sfil12 ;If not proceed. + mvi a,'.' ;Get a dot. + lhld datptr + mov m,a ;Put the char in the data packet. + inx h + shld datptr ;Save position in data packet. + inr c +sfil12: inr b ;Increment the count. + mov a,b + cpi 0CH ;Twelve? + jp sfil13 + lhld fcbptr + mov a,m + ani 7fH ;Turn off CP/M 2 or 3's high bits. + inx h + shld fcbptr ;Save position in FCB. + cpi '!' ;Is it a good character? + jm sfil11 ;If not get the next. + lhld datptr + mov m,a ;Put the char in the data packet. + inx h + shld datptr ;Save position in data packet. + inr c + jmp sfil11 ;Get another. + +sfil13: mov a,c ;Number of char in file name. + sta argblk+1 + lhld datptr + mvi a,'$' + mov m,a ;Put in a dollar sign for printing. + lda quietd ; a quiet display + ana a + jnz sfi13a ; yes, dont write + call scrfln ;Position cursor +sfi13a: lxi d,data ;Print the file name though, in either case + call prtstr + lda pktnum ;Get the packet number. + sta argblk + mvi a,'F' ;File header packet. + call spack ;Send the packet. + jmp abort ; Failed, abort. + call rpack ;Get a packet. + jmp r ; Trashed packet don't change state, retry. + cpi 'Y' ;ACK? + jnz sfile2 ;If not try next. + call compp + rnz ;If not hold out for the right one. +sfil14: call countp + lda numtry ;Get the number of tries. + sta oldtry ;Save it. + xra a + sta numtry ;Reset the number of tries. + sta bytes ;[10] clear the "bytes transferred" counter + sta bytes+1 ;[10] + sta bytes+2 ;[10] + sta bytes+3 ;[10] + call gtchr ;Fill the first data packet + jmp sfil16 ;Error go see if its EOF. +; ;Got the chars, proceed. + sta size ;Save the size of the data gotten. + mvi a,'D' ;Set the state to data send. + sta state + ret + +sfil16: cpi 0FFH ;Is it EOF? + jnz abort ;If not give up. + mvi a,'Z' ;Set the state to EOF. + sta state + ret + +sfile2: cpi 'N' ;NAK? + jnz sfile3 ;Try if error packet. + call updrtr ;Update the number of retries. + lda pktnum ;Get the present packet number. + inr a ;Increment + ani 3FH ; modulo 64 + mov b,a + lda argblk ;Get the packet's number. + cmp b ;Is the packet's number one more than now? + rnz ;If not go try again. + jmp sfil14 ;Just as good as a ACK;go to the ACK code. + +sfile3: cpi 'E' ;Is it an error packet. + jnz abort + call error + jmp abort + +; copy remote name into packet to send [gnn] +sfile4: xchg ;[gnn] keep pointer to packet + lxi h,remnam ;[gnn] set pointer to name + mov c,a ;[gnn] keep count of length + mov b,a ;[gnn] and set as loop counter +sfil41: mov a,m ;[gnn] get a character + stax d ;[gnn] copy it to packet + inx h ;[gnn] + inx d ;[gnn] move pointers + dcr b ;[gnn] + mov a,b ;[gnn] + ora a ;[gnn] done them all? + jnz sfil41 ;[gnn] repeat until done + xchg ;[gnn] get final position + shld datptr ;[gnn] and save it + jmp sfil13 ;[gnn] now go and send packet + +; +; Send data +; called by: send + +sdata: lda numtry ;Get the number of tries. + cpi maxtry ;Have we reached the maximum number of tries? + jm sdata1 + lxi d,erms14 + call error3 + jmp abort ;Change the state to abort. + +sdata1: inr a ;Increment it. + sta numtry ;Save the updated number of tries. + lxi h, data ;Get a pointer to our data block. + shld datptr ;Save it. + lxi h,filbuf ;Pointer to chars to be sent. + shld cbfptr ;Save position in char buffer. + mvi b,1 ;First char. +sdat11: lhld cbfptr + mov a,m + inx h + shld cbfptr ;Save position in char buffer. + mov c,a ;[jd] preserve character temporarily + lda quot8 ;[jd] doing eighth-bit quoting? + ora a ;[jd] + mov a,c ;[jd] restore char + jnz sdat4 ;[jd] using eighth-bit quoting, no warning + lda parity ;[jd] get parity + cpi parnon ;[jd] none? + mov a,c ;[jd] restore character + jz sdat4 ;[jd] no parity, leave char alone + lda wrn8 ;[jd] look at warning flag + ora a ;[jd] have we already given the warning? + jnz sdat5 ;[jd] yes, skip this + mov a,c ;[jd] restore character... + ani 80h ;[jd] examine parity + jz sdat5 ;[jd] no parity, no warning. + call parwrn ;[jd] ...print warning - parity lost + mvi a,0ffh ;[jd] remember that we sent the message + sta wrn8 ;[jd] +sdat5: mov a,c ;[jd] restore character again + ani 7fh ;[jd] strip parity so not checksummed +sdat4: lhld datptr + mov m,a ;Put the char in the data packet. + inx h + shld datptr ;Save position in data packet. + inr b ;Increment the count. + lda size ;Get the number of chars in char buffer. + cmp b ;Have we transfered that many? + jp sdat11 ;If not get another. + lda size ;Number of char in char buffer. + sta argblk+1 + lda pktnum ;Get the packet number. + sta argblk + mvi a,'D' ;Data packet. + call spack ;Send the packet. + jmp abort ; Failed, abort. + call rpack ;Get a packet. + jmp r ; Trashed packet don't change state, retry. + cpi 'Y' ;ACK? + jnz sdata2 ;If not try next. + call compp + rnz ;If not hold out for the right one. + lda argblk ;Get the packet number back + call countp + lda numtry ;Get the number of tries. + sta oldtry ;Save it. + xra a + sta numtry ;Reset the number of tries. + lda argblk+1 ;Get the data length + cpi 1 ;Check if only 1 character? + jnz sdat15 ;If not, just continue + lda data ;Got one character, get it from data + cpi 'Z' ;Want to abort entire stream? + jnz sdat14 ;If not, check for just this file + sta czseen ;Yes, remember it + jmp sdat16 ;[MF] and set EOF state +sdat14: cpi 'X' ;Desire abort of current file? + jnz sdat15 ;If not, just continue + sta czseen ;Yes, remember that + jmp sdat16 ;[MF] and set EOF +sdat15: lda czseen ;Also get control-Z flag + ora a ;Check if either given + jz sdat12 ;If neither given, continue +sdat16: mvi a,'Z' ;Change state to EOF + sta state ; . . . + ret ;And return + +sdat12: call gtchr + jmp sdat13 ;Error go see if its EOF. + sta size ;Save the size of the data gotten. + ret + +sdat13: cpi 0FFH ;Is it EOF? + jnz abort ;If not give up. + mvi a,'Z' ;Set the state to EOF. + sta state + ret + +sdata2: cpi 'N' ;NAK? + jnz sdata3 ;See if is an error packet. + call updrtr ;Update the number of retries. + lda pktnum ;Get the present packet number. + inr a ;Increment + ani 3FH ; modulo 64 + mov b,a + lda argblk ;Get the packet's number. + cmp b ;Is the packet's number one more than now? + rnz ;If not go try again. + jmp sdat12 ;Just as good as a ACK;go to the ACK code. + +sdata3: cpi 'E' ;Is it an error packet. + jnz abort + call error + jmp abort +; +; Send EOF +; called by: send + +seof: lda numtry ;Get the number of tries. + cpi maxtry ;Have we reached the maximum number of tries? + jm seof1 + lxi d,erms14 + call error3 + jmp abort ;Change the state to abort. + +seof1: inr a ;Increment it. + sta numtry ;Save the updated number of tries. + lda pktnum ;Get the packet number. + sta argblk + xra a + sta argblk+1 ;No data. + lda czseen ;Check if C-Z or C-X typed + ora a ; . . . + jz seof14 ;If not aborted, just keep going + mvi a,'D' ;Tell other end to discard packet + sta data ;Store in data portion + mvi a,1 ;One character + sta argblk+1 ;Store the length +seof14: mvi a,'Z' ;EOF packet. + call spack ;Send the packet. + jmp abort ; Failed, abort. + call rpack ;Get a packet. + jmp r ; Trashed packet don't change state, retry. + cpi 'Y' ;ACK? + jnz seof2 ;If not try next. + call compp + rnz ;If not hold out for the right one. +seof12: call countp + lda numtry ;Get the number of tries. + sta oldtry ;Save it. + xra a + sta numtry ;Reset the number of tries. + mvi c,closf ;Close the file. + lxi d,fcb + call bdos +;* Check if successful + lda czseen ;Desire abort of entire stream? + cpi 'Z' ;Desire abort of entire stream? + jz seof13 ;If so, just give up now + call mfname ;Get the next file. + jc seof13 ; No more. + call getfil ;and open it (assume success) + xra a ;Clear A + sta czseen ;Since we have not aborted this file + mvi a,'F' ;Set the state to file send. + sta state + ret + +seof13: mvi a,'B' ;Set the state to EOT. + sta state + ret + +seof2: cpi 'N' ;NAK? + jnz seof3 ;Try and see if its an error packet. + call updrtr ;Update the number of retries. + lda pktnum ;Get the present packet number. + inr a ;Increment + ani 3FH ; modulo 64 + mov b,a + lda argblk ;Get the packet's number. + cmp b ;Is the packet's number one more than now? + rnz ;If not go try again. + jmp seof12 ;Just as good as a ACK;go to the ACK code. + +seof3: cpi 'E' ;Is it an error packet. + jnz abort + call error + jmp abort +; +; Send EOT +; called by: send + +seot: lda numtry ;Get the number of tries. + cpi maxtry ;Have we reached the maximum number of tries? + jm seot1 + lxi d,erms14 + call error3 + jmp abort ;Change the state to abort. + +seot1: inr a ;Increment it. + sta numtry ;Save the updated number of tries. + lda pktnum ;Get the packet number. + sta argblk + xra a + sta argblk+1 ;No data. + mvi a,'B' ;EOF packet. + call spack ;Send the packet. + jmp abort ; Failed, abort. + call rpack ;Get a packet. + jmp r ; Trashed packet don't change state, retry. + cpi 'Y' ;ACK? + jnz seot2 ;If not try next. + call compp + rnz ;If not hold out for the right one. +seot12: call countp + lda numtry ;Get the number of tries. + sta oldtry ;Save it. + xra a + sta numtry ;Reset the number of tries. + mvi a,'C' ;Set the state to file send. + sta state + ret + +seot2: cpi 'N' ;NAK? + jnz seot3 ;Is it error. + call updrtr ;Update the number of retries. + lda pktnum ;Get the present packet number. + inr a ;Increment + ani 3FH ; modulo 64 + mov b,a + lda argblk ;Get the packet's number. + cmp b ;Is the packet's number one more than now? + rnz ;If not go try again. + jmp seot12 ;Just as good as a ACK;go to the ACK code. + +seot3: cpi 'E' ;Is it an error packet. + jnz abort + call error + jmp abort +; +; This routine sets up the data for init packet (either the +; Send_init or ACK packet). +; called by: rinit, rfile, sinit +; +; Called by rinit, rfile and sinit. See what WE want from the other fella +; +; [11] by OBS - Stripped out all the new capas code etc and reverted +; to Good Ol' Basic Kermit again! +; Those keen should study the followin gode with care, and remove +; or add semicolons as indicated. +; +; See also SPAR which decodes what comes in. It also decodes bits in +; the "capability" fields. (Two CAPAS files allowed from remote +; machines, but we will only send one at max.) Note that not all +; if any of the capability bits will be used. +; +; Definitions - init packet (data section only.. rest of header assumed OK) +; Byte 0 Maximum length I want to send +; 1 The Timeout I want you to use +; 2 Number of PAD characters I want tot use (May be null) +; 3 The PAD character I want to use (May be Null) +; 4 The End-of-Line character I will use (Carriage Return) +; 5 The control character Quote Character I will use (#) +; 6 The parity bit Quote Character I will use (&) +; 7 The Checktype I will use +; 8 The repeat prefix I will use (Null, as we cannot to repeats) +; 9 Capability Byte 0 (See SPAR for defs) +; 10 Capability byte 1 ( --- " --- but we will not send it.) +; 11 The number of packets I will send per window (not used) +; 12 MAXL1 - Long packet size, ms count +; 13 MAXL2 - Long packet size, ls count +; +; +; Enter with HL pointing to the "data" part of the packet. + +; +; older part of rpar follows... +; +; +rpar: lda rpsiz ;Get the receive packet size. + adi space ;Add a space to make it printable. + mov m,a ;Put it in the packet. + inx h ;Point to the next char. + lda rtime ;Get the receive packet time out. + adi space ;Add a space. + mov m,a ;Put it in the packet. + inx h + lda rpad ;Get the number of padding chars. + adi space + mov m,a + inx h + lda rpadch ;Get the padding char. + adi 100O ;Uncontrol it. + ani 7FH + mov m,a + inx h + lda reol ;Get the EOL char. + adi space + mov m,a + inx h + lda rquote ;Get the quote char. + mov m,a + inx h + mvi m,'Y' ;[jd] we know how to do 8-bit quoting + lda parity ;[jd] + cpi parnon ;[jd] parity none? + jz rpar1 ;[jd] yes, keep going + lda qbchr ;[jd] no, better request 8-bit quoting + mov m,a + +rpar1: + inx h ;Advance to next + lda chktyp ;Get desired block check type + mov m,a ;Store it + inx h ;Advance pointer + +; Comment out the next two lines for capas etc. WILL require debugging + mvi a,8 ; this id the older end for this routine. May be useful. + ret + +; [11] Rest not needed for now, commented out +; [10] (to ret) +; New additions to rpar follows... + +; lda rcap1 ; get the first capability byte +; ani 3eh ; mask out bit 0, ie only one CAPAS byte +; adi space ; tochar it +; mov m,a +; inx h +; mvi m,space ; No windows, ie space to packet +; inx h +; push h ; we need the HL regs for maths. +; lhld rdpkt ; get receive packet length +; lxi d,95 ; we want hl div 95 and hl mod 95 +; call divide ; return with divsion in hl, remainder in de +; mov a,l ; two sets of bytes +; pop h +; adi space ; tochar(maxl1) +; mov m,a +; inx h +; mov a,l +; adi space ; tochar(maxl2) +; mov m,a +; +; done all, set databytes = 12 and return +; mvi a,12 ; 12 bits of data +; ret + +;[11] End of commented out code for rpar + + +; +; This routine reads in all the send_init packet information. +; called by: rinit, sinit + +;[11] As for rpar, restore the "old" kermit code for non-capas Kermit. +;[10] (to ret at end) +; +; SPAR - routine to decode parameters received from the remote end +; +; Called by rinit,sinit +; +; Entry: a: Number of databytes in packet +; hl: Pointer to "data" part of packet +; +;spar: sta temp4 ; save for a while +; ; first clear some variables +; lda dspsiz ; get default "send" packet length +; sta spktl +; lda dstime ; get default time-out +; sta stimeo +; xra a ; set no pad characters by default +; sta spad +; lda dspadc ; get the default padding character +; sta spadc +; mvi a,cr ; default end of line character (CR) +; sta seol +; mvi a,dsquot ; default quote character +; sta squote +; mvi a,dsbqut ; default binary quote character +; sta qbchr +; mvi a,dschkt ; set checktype = 1 for inits +; sta inichk +; mvi a,space ; no repeat prefixing ( otherwise ~) +; sta srept +; +; Now follows the "capabilities" bits... 5 bits per capas byte. +; +; Note: Before extracting any data bits, apply unchar() to get the +; six ls bits. If bit 0 = 1 the a subsequent capaa byte follows +; +; Byte0: Bit 0: Set to 1 if there are subsequent CAPAS bytes +; 1: (Cap. 5) Set to 1 for long packets. Second byte +; AFTER the last capas byte has packet length DIV 95 +; and Thire byte has length MOD 95 +; 2: (Cap. 4) Sliding Windows. If used, first byte AFTER +; last capas byte has TOCHAR(no. of packets in window) +; 3: (Cap. 3) Ability to accept "A" (attribute packets) +; 4: (Cap. 2) Reserved +; 5: (Cap. 1) Reserved +; Byte 2 onward: not used in this implementation. Any capas bytes sent +; will be stored, however. +; +; lda temp4 ; get the number of bytes to test +; mov c,a ; to a count register +; mov a,m ; get first byte +; call decc ; unchar it, and decrement c +; sta spsiz ; save a send packet size +; jz sparx ; if no more, exit +; +; mov a,m ; get timout +; call decc +; sta stime ; save timeout +; jz sparx +; +; mov a,m ; get pad characters +; call decc +; sta spadc ; save it +; jz sparx +; +; mov a,m ; get pad character count +; call decc +; sta spad +; jz sparx +; +; mov a,m ; get send EOL +; call decc +; sta seol +; jz sparx +; +; mov a,m ; get control quote character +; call decc +; sta squote +; jz sparx +; +; mov a,m ; get binary (parity) quote char +; mov b,a ; this time we actually WANT accumulator +; cpi space ; are we doing 8th bit quoteing +; jz spar1 ; dont know, assume not +; cpi 'N' ; definately not? +; jz spar1 +; cpi 'Y' ; definately - use & +; jz spar2 +; sta squote ; else save the new character +;spar2: lda parity ; see if we are using the parity bit +; cpi parnon ; no parity => no quoting +; jz spar3 ; yup, so use the default quote character & +; +;spar1: xra a ; save not quoting +; sta squote +;spar3: call decc ; update counters etc +; jz sparx +; +; mov a,m ; get repeat prefixing +; call decc +; push psw ; save flags +; cpi space-32 ; we want it? +; jz spar4 +; sta srept +;spar4: pop psw ; restore flags +; jz sparx +; +; lxi d,scapas ; point to start of capability byte(s) +; push psw ; must do this... +;spar5: pop psw ; cos we restore the spack +; mov a,m +; call decc ; get scap1 (or n) +; sta scap1 +; push psw +; ani 01 ; another byte following? +; jnz spar5 +; pop psw ; see if any other data bytes (Windows etc) +; jz sparx +; +; mov a,m ; get window size +; call decc +; sta swindo +; jz sparx +; +; mov a,m ; get long packets ms bits +; call decc ; +; mov d,a ; unchared ms bits-ish +; mov a,m +; call decc ; ls bits-ish +; push h ; and we are doing maths +; push b ; and an intermediate result in c +; push psw ; we want flags and the ls bits... +; mvi b,0 +; mov c,d ; get ms bits-ish to bc +; push b ; get number to hl +; pop h +; now multipy by 95 +; dad h ;*2 +; dad h ;*4 +; dad h ;*8 +; dad h ;*16 +; push h ; *16 to ... +; pop d ; ... de +; dad h ;*32 +; dad d ; *(32+16) = *48 +; dad h ; *96 +; mov a,l ; *(96-1) +; sub c +; mov l,a +; mov a,0 +; sbb h +; mov h,a +; pop psw ; restore ls bitsish +; mov e,a +; mvi d,0 +; dad d ; *95 + ls bits. Phew. +; shld sdpkt ; save long packet length +; pop b +; pop h ; restore regs +; +;sparx: ret ; if here, (assume) no more data to read in +;[10] routines required follow +;decc: mov a,m ; get data byte +; sui space ; unchar it +; inx h ; increment input pointer +; dcr c ; decrement data counter +; ret ; return +;[10] end or spar replacement + +;[11] Restore older spar.... +; Older spar follows... +spar: sta temp4 ;Save the number of arguments. +; Initialize some variables to their required default values, so we use +; the right values even if the remote Kermit doesn't send the full packet: +; ; we don't do anything with timeout values yet. +; ; no default pad count/pad character? + mvi a,cr ; EOL character = carriage-return + sta seol + mvi a,'#' ; quote character = '#' + sta squote + mvi a,'&' ; eighth-bit quote character = '&' + sta qbchr + mvi a,'1' ; block-check = 1-character-checksum + sta inichk +; + mov a,m ;Get the max packet size. + sbi space ;Subtract a space. + sta spsiz ;Save it. + lda temp4 + cpi 3 ;Fewer than three pieces? + rm ;If so we are done. + inx h + inx h ;Increment past the time out info. + mov a,m ;Get the number of padding chars. + sbi space + sta spad + lda temp4 + cpi 4 ;Fewer than four pieces? + rm ;If so we are done. + inx h + mov a,m ;Get the padding char. + adi 100O ;Re-controlify it. + ani 7FH + sta spadch + lda temp4 + cpi 5 ;Fewer than five pieces? + rm ;If so we are done. + inx h + mov a,m ;Get the EOL char. + sbi space + sta seol + lda temp4 + cpi 6 ;Fewer than six pieces? + rm ;If so we are done. + inx h + mov a,m ;Get the quote char. + sta squote + lda temp4 ;Get the amount of data supplied + cpi 7 ;Have an 8-bit quote? + rm ;If not there, all done + inx h ;Yes, get the character + mvi a,0 ;[jd] + sta quot8 ;[jd] assume not quoting + mov a,m ;Get the supplied character + cpi 'N' ;[jd] No? + jz spar1 ;[jd] then don't try to do it + cpi space ;[jd] maybe they don't know about it... + jz spar1 ;[jd] then don't try to do it. + cpi 'Y' ;[jd] Yes? + jnz spar2 ;[jd] if not 'Y', assume it's a quote char. + lda parity ;[jd] using parity? + cpi parnon ;[jd] no, don't need quoting... + jz spar1 ;[jd] + mvi a,0ffh ;[jd] else turn on... + sta quot8 ;[jd] ...quote flag + jmp spar1 + +;[11] Note: If capas etc required, beware of the next two lables, as these +; are used elswhere. + +spar2: sta qbchr ;[jd] use their quote char (should validate) + mvi a,0ffh + sta quot8 ;[jd] turn quote flag and fall thru... + +spar1: lda temp4 ;Determine if block check type given + cpi 8 ;Is the field there? + rm ;If not, all done + inx h ;Point to the character + mov a,m ;Get the value + mov b,a ;Copy value + lda chktyp ;Get our type + cmp b ;Is it our desired type? + rnz ; If not, use default (1-character-checksum) + sta inichk ; Match, store as type to use after init + ret ; and return +;[10] end of replacement +;[11] end of replacement of replacement (ie back to original code) +; + +; Copy characters from packet to disk (or screen) +; called by: rdata + +ptchr: sta temp1 ;Save the size. + lda remtxt ;[MF]Get remote command flag + ora a ;[MF]Remote command in progress? + jnz ptchr0 ;[MF]Yes, don't check for file collisions + lda flwflg ;[MF]Get File Warning (Set Collision) flag + cpi 3 ;[MF]SET COLLISION DISCARD? + jnz ptchr0 ;[MF]No + lda dscflg ;[MF]Yes, get "discard" flag + ora a ;[MF]Discarding file? + jz ptchr0 ;[MF]No + mvi a,'X' ;[MF]Yes, simulate a user rejection + sta czseen ;[MF]... + jmp rskp ;[MF]and pretend success +ptchr0: ;[MF] + lxi h,data ;Beginning of received packet data. + shld outpnt ;Remember where we are. + lda rquote + mov b,a ;Keep the quote char in b. + mvi c,0 ;[jd] assume no 8-bit quote char + lda quot8 ;[jd] doing 8-bit quoting? + ora a + jz ptchr1 ;[jd] no, keep going + lda qbchr ;[jd] else get 8-bit quote char + mov c,a ;[jd] keep this in c +ptchr1: lxi h,temp1 + dcr m ;Decrement # of chars in packet. + jm rskp ;Return successfully if done. + lda remtxt ; to screen only? + ana a + jnz ptchr2 ; dont do any disk stuff + lxi h,chrcnt ;Number of chars remaining in dma. + dcr m ;Decrement. + jp ptchr2 ;Continue if space left. + call outbuf ;Output it if full. + jmp ptchr9 ; Error return if disk is full. +ptchr2: lhld outpnt ;Get position in output buffer. + mov a,m ;Grab a char. + inx h + shld outpnt ;and bump pointer. + mvi e,0 ;[jd] assume nothing to OR in. + cmp c ;[jd] is it the binary quote char? + jnz ptch2a ;[jd] no, keep going + mvi e,80h ;[jd] include parity bit + lda temp1 + dcr a + sta temp1 ;[jd] decrement character count + mov a,m ;[jd] get next character + inx h + shld outpnt +ptch2a: cmp b ;Is it the quote char? + jnz ptchr3 ;[jd] changed to ptchr3 so includes parity + mov a,m ;Get the quoted character + inx h + shld outpnt ;and bump pointer. + lxi h,temp1 + dcr m ;Decrement # of chars in packet. + mov d,a ;Save the char. + ani 80H ;Turn off all but the parity bit. + ora e ;[jd] let parity come from either (???) + mov e,a ;Save the parity bit. + mov a,d ;Get the char. + ani 7FH ;Turn off the parity bit. + cmp b ;Is it the quote char? + jz ptchr3 ;If so just go write it out. + cmp c ;[jd] maybe it's the 8-bit prefix character? + jz ptchr3 ;[jd] then don't controllify. + mov a,d ;Get the char. + adi 40H ;Make the character a control char again. + ani 7FH ;Modulo 128. +ptchr3: ora e ;Or in the parity bit. + sta temp3 ; save for a while + lda remtxt ; to screen or disk? + ana a + lda temp3 + jz ptch31 ; to disk + push h + push d + push b + mov e,a ; to display + mvi c,dconio + call bdos + pop b + pop d + pop h + jmp ptchr1 ; continue + +ptch31: lhld bufpnt ;Destination buffer. + mov m,a ;Store it. + inx h + shld bufpnt ;Update the pointer + jmp ptchr1 ;and loop to next char. + +ptchr9: lxi d,erms11 ; "?Disk full" + push d ;[MF] Save pointer + call error3 ; put it on the error line + pop d ;[MF] Restore pointer + lxi h,data ;[MF] Where to put the message for "e" packet + lda argblk ;[MF] Get packet-number + call countp ;[MF]Increment it + sta argblk ;[MF] as packet to send + xra a ;[MF] Zero length of packet data + sta temp1 ;[MF] ... +ptch9a: ldax d ;[MF] Get a character to copy + cpi cr ;[MF] No more to copy? + jz ptch9b ;[MF] Yes, we can send the packet + mov m,a ;[MF] No, copy the character + inx d ;[MF] and increment source/dest pointers + inx h ;[MF] ... + lda temp1 ;[MF] Get character count + inr a ;[MF] and increment it + sta temp1 ;[MF] ... + jmp ptch9a ;[MF] Copy entire error message +ptch9b: mvi m,0 ;[MF]Put in a zero + lda temp1 ;[MF] Get number of characters in the message + sta argblk+1 ;[MF] and store as number of packet data chars + mvi a,'E' ;[MF] Make it an error packet + call spack ;[MF] Send the error packet + nop ;[MF] Don't really care if + nop ;[MF] the send fails since we're + nop ;[MF] bombing off anyway + ret ; take error return. +; +; Fill a data packet from file +; called by: sfile, sdata + +gtchr: lda squote ;Get the quote char. + mov c,a ;Keep quote char in c. + lda curchk ;Get current block check type + sui '1' ;Get the extra overhead + mov b,a ;Get a copy + lda spsiz ;Get the maximum packet size. + sui 5 ;Subtract the overhead. + sub b ;Determine max packet length + sta temp1 ;This is the number of chars we are to get. + lxi h,filbuf ;Where to put the data. + shld cbfptr ;Remember where we are. + mvi b,0 ;No chars. +gtchr1: lda temp1 + dcr a ;Decrement the number of chars left. + jp gtchr2 ;Go on if there is more than one left. + mov a,b ;Return the count in A. + jmp rskp + +gtchr2: sta temp1 + lda chrcnt ;Space left in the DMA. + dcr a +;* Can improve order here. + jm gtchr3 + sta chrcnt + jmp gtchr4 + +gtchr3: call inbuf ;Get another buffer full. + jmp gtch30 ; If no more return what we got. + jmp gtchr4 ;If we got some, proceed. + +gtch30: mov a,b ;Return the count in A. + ora a ;Get any chars? + jnz rskp ;If so return them. + jmp gtceof ;If not, say we found the end of the file. + +gtchr4: lhld bufpnt ;Position in DMA. + mov a,m ;Get a char from the file. + inx h + shld bufpnt + mov d,a ;Save the char. + ani 80H ;Turn off all but parity. + mov e,a ;Save the parity bit. + jz gtch4a ;[jd] no parity, skip this check... + lda quot8 ;[jd] doing eighth-bit quoting? + ora a + jz gtch4a ;[jd] no, just proceed normally + lda temp1 ;[jd] get space remaining + cpi 2 ;[jd] 3 chrs left (one cnted already)? + jm gtchr9 ;[jd] no, skip this + dcr a ;[jd] decrement space remaining + sta temp1 ;[jd] put back. + lhld cbfptr ;[jd] Position in character buffer. + lda qbchr ;[jd] get quote character + mov m,a ;]jd] Put the quote char in the buffer. + inx h ;[jd] increment destination buffer pointer + shld cbfptr ;[jd] store the pointer back + inr b ;[jd] Increment the char count. + mvi e,0 ;[jd] no parity bit to OR in. +;[jd] fall thru... + +gtch4a: mov a,d ;Restore the char. + ani 7FH ;Turn off the parity. + mov d,a ;[jd] save here for later... + cpi space ;Compare to a space. + jm gtchr5 ;If less then its a control char, handle it. + cpi del ;Is the char a delete? + jz gtchr5 ;Go quote it. + lda quot8 ; Are we doing 8th-bit quoting? + ora a + jz gtch4c ; if not, skip this test and restore character. + lda qbchr ; get 8th-bit quote character + cmp d ; same as current character? + jz gtch4b ; yes, have to quote it... +gtch4c: mov a,d ; no. get character back again. + cmp c ;Is it the quote char? + jnz gtchr8 ;If not proceed. +gtch4b: lxi h,temp1 ;[jd] point to char count + dcr m ;[jd] decrement (know room for at least one) + lhld cbfptr ;Position in character buffer. + mov m,c ;Put the (quote) char in the buffer. + inx h + shld cbfptr + inr b ;Increment the char count. + mov a,d ;[jd] restore character again + jmp gtchr8 + +gtchr5: + ;[gnn] ignore parity for checking +; ora e ;Turn on the parity bit. + + cpi ('Z'-100O) ;Is it a ^Z? + jnz gtchr7 ;If not just proceed. + lda cpmflg ;Was the file created by CPM... + cpi 1 ;in ASCII-mode ? + jz gtch52 ;Control-Z stops text + cpi 2 ;in BINARY mode? + jz gtchr6 ;Yes, pass the ^Z +;At this point file-mode is DEFAULT. +;If the rest of the record is filled with ^Zs, we're at EOF, otherwise +;its a regular character. + lhld bufpnt ;since CHRCNT is ZERO at EOF-time + lda chrcnt ;(set by INBUF5 B.G.E) + mov d,a ;Get the number of chars left in the DMA. +gtch51: dcr d + mov a,d + jp gtch53 ;Any chars left? +gtch52: xra a ;If not, get a zero. + sta chrcnt ;Say no more chars in buffer. + mov a,b ;Return the count in A. + jmp rskp + +;Scan rest of buffer for non ^Z -- If we find a non ^Z, fall into gtchr6. +;If we get to the end of the buffer before finding a non ^Z, fall into gtch52. +gtch53: mov a,m ;Get the next char. + inx h ;Move the pointer. + cpi ('Z'-100O) ;Is it a ^Z? + jz gtch51 ;If so see if the rest are. + +gtchr6: mvi a,('Z'-100O) ;Restore the ^Z. +gtchr7: sta temp2 ;Save the char. + lxi h,temp1 ;Point to the char total remaining. + dcr m ;Decrement it. + lhld cbfptr ;Position in character buffer. + mov m,c ;Put the quote in the buffer. + inx h + shld cbfptr + inr b ;Increment the char count. + lda temp2 ;Get the control char back. + adi 40H ;Make the non-control. + ani 7fH ;Modulo 200 octal. +gtchr8: lhld cbfptr ;Position in character buffer. + ora e ;Or in the parity bit. + mov m,a ;Put the char in the buffer. + inx h + shld cbfptr + inr b ;Increment the char count. + jmp gtchr1 ;Go around again. + +gtchr9: ;[jd] not enough room left in buffer... + lhld bufpnt + dcx h + shld bufpnt ;[jd] back up over last character + lxi h,chrcnt ;[jd] point to character count + inr m ;[jd] increment it + mov a,b ;[jd] count of chars transferred + jmp rskp ;[jd] return it + +gtceof: mvi a,0FFH ;Get a minus one. + ret +; + +; Little code to allow some expansion of code without changing +; every futher address, only up to the end of this file. +; TO BE REMOVED FRO RELEASE! + +; org ($+100h) AND 0FF00H + +IF lasm + LINK CPSPK2 ;[obs] Link to part two of the packet file +ENDIF ;lasm diff --git a/cpspk2.asm b/cpspk2.asm new file mode 100644 index 0000000..b246967 --- /dev/null +++ b/cpspk2.asm @@ -0,0 +1,1336 @@ +; CPSPK2.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 +; 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 file contains the (system-independent) routines that implement +; the KERMIT protocol, and the commands that use them: +; RECEIVE, SEND, FINISH, and LOGOUT. +; +; revision history: +; +;edit 11, 21-Mar-1991 by MF. After "inchr7", close TAKE-file (if any) so +; ^C will halt all processing (including commands from TAKE-files) +; and put the user back at Kermit command-level. +;edit 10, 3-Jan-1991 by MF. Modify routine "inchr" after label "inchr5" to +; not take retry (nonskip) return if ^X/^Z seen on the Console. This +; will prevent multiple copies of packets being sent if user aborts +; some files in a stream being sent via ^X and is a better fix to this +; problem than flushing comm input before sending the "Z" packet +; requesting the remote Kermit to discard the current file being +; received (as implemented in CPSPK1.ASM edit of 2-jan-1991). +;edit 9, 14-Dec-1990 by MF. Modified "gofil" routine to allow for +; specification of a drive in the local filespec for GET and +; RECEIVE commands. Thus commands such as +; GET HELLO.TXT B:GOODBYE.TXT +; and +; RECEIVE B:GOODBYE.TXT +; now work as expected. +;edit 8, 22-Oct-1990 by MF. Fixed bug in completion-message routine +; "finmes" wherein the completion message was not printed if the +; terminal was set to QUIET because the message pointer was clobbered +; by prcrlf. +;edit 7, 14-Sep-1990 by MF. Add hooks for SET COLLISION command. +; Eliminate commented-out old file warning rename routine. +; Clear communication input buffers (call flsmdm) before +; BYE, FINISH and LOGOUT commands. +;edit 6, 9-Sep-1990 by MF. Implemented fixes in CPKERM.BWR for +; garbage printout during quiet transfers and for file existence/ +; rename algorithm. +; Also implemented hooks for Remote commands. +; edit 5, 18 June 1990 by Russell Lang [rjl@monu1.cc.monash.edu.au] +; When trying to generate a unique file name on receive, zero +; the attribute bits between file opening attempts. This is +; to fix a bug which caused the unique file name to have the +; attributes of the already existing file. If the attribute +; was R/O, a bdos error occured later when an attempt was made +; to write to the file. +; +; edit 4, 27 October, 1987 By OBSchou. Changed the rename routine to +; be more like the MSDOS issue. +; +; edit 3, 28 July, by OBSchou. Added traps to NOT print to screen during +; file transfers if quietd is non zero (ie we SET TERMINAL QUIET) +; This hopefully speeds up transfers in systems spending an age +; updating the screen. +; +; edit 2, 8 April, 1987 by OBSchou. Minor edit to put drive and user number +; in the "filename" field on the transfer screen. This means that the +; offset on the line foe the file name proper has moved along 4 space. +; Also, it writes 15 spaces AFER the xxd: string to clear the field +; of any prevous file. Needed for thos terminals that cannot +; clear to end of line... +; +; edit 1, 28 January, 1987 by OBSchou. +; Hived off about 1/2 of CPSPKT.ASM to form two (smaller => easier +; to handle) files. +; +; + +pk2ver: db 'CPSPK2.ASM (11) 21-Mar-1991$' ; name, edit number, date + + +; +; Get the file name (including host to micro translation) +; called by: rfile + +gofil: xra a + sta fcb ;Set the drive to default to current. + lxi h,data ;Get the address of the file name. +; allow use of local name if one was given [gnn] + lda remlen ;[gnn] + ora a ;[gnn] anything there? + jz gofil0 ;[gnn] no, use the one in the data packet + lxi h,remnam ;[gnn] yes, use this instead + lda remnam+1 ;[MF]Get 2nd char of local filename + cpi ':' ;[MF]Was a drive specified? + jnz gofil0 ;[MF]No, proceed as of old + mov a,m ;[MF]Yes, get drive + ani 5fh ;[MF]Force uppercase + sui 'A'-1 ;[MF]Make valid drive for fcb + sta fcb ;[MF]and store in fcb + inx h ;[MF]Skip drive and delimiter + inx h ;[MF]... +gofil0: ;[gnn] continue to set up the file [gnn] +; + shld datptr ;Store the address. + lxi h,fcb+1 ;Address of the FCB. + shld fcbptr ;Save it. + xra a + sta temp1 ;Initialize the char count. + sta temp2 + mvi b,' ' +gofil1: mov m,b ;Blank the FCB. + inx h + inr a +; cpi 0CH ;Twelve?[5a] + cpi 0BH ; Eleven? [5a] + jm gofil1 + mvi m,0 ; [5a] Specify extent 0 +gofil2: lhld datptr ;Get the NAME field. + mov a,m + cpi 'a' ;Force upper case + jm gofl2a ; + ani 5FH ; +gofl2a: inx h + cpi '.' ;Seperator? + jnz gofil3 + shld datptr ;[jd] update ptr (moved from above) + lxi h,fcb+9H + shld fcbptr + lda temp1 + sta temp2 + mvi a,9H + sta temp1 + jmp gofil6 + +gofil3: ora a ;Trailing null? + jz gofil7 ;Then we're done. + shld datptr ;[jd] no, can update ptr now. + lhld fcbptr + mov m,a + inx h + shld fcbptr + lda temp1 ;Get the char count. + inr a + sta temp1 + cpi 8H ;Are we finished with this field? + jm gofil2 +gofil4: sta temp2 + lhld datptr + mov a,m + inx h + shld datptr + ora a + jz gofil7 + cpi '.' ;Is this the terminator? + jnz gofil4 ;Go until we find it. +gofil6: lhld datptr ;Get the TYPE field. + mov a,m + cpi 'a' ;Force upper case + jm gofl6a ; + ani 5FH ; +gofl6a: ora a ;Trailing null? + jz gofil7 ;Then we're done. +;[jd] move above two lines so we don't increment pointer if char is null + inx h + shld datptr + lhld fcbptr + mov m,a + inx h + shld fcbptr + lda temp1 ;Get the char count. + inr a + sta temp1 + cpi 0CH ;Are we finished with this field? + jm gofil6 +gofil7: lhld datptr + mvi m,'$' ;Put in a dollar sign for printing. + lda quietd ; quiet display? + ana a + jnz gofi70 ; yes, so skip it. + call scrfln ;Position cursor +gofi70: lxi d,data ;Print the file name + lda getrxflg ;[obs 8] are we doing a get or receive? + ana a ;[obs 8] + jz gofi7a ;[obs 8] if zero, receive + lxi d,remnam ;[obs 8] +gofi7a: ;[obs 8] + + call prtstr +gofi7b: xra a ;[MF]Zero "discard" flag + sta dscflg ;[MF]... + lda flwflg ;Is file warning on? + ora a + jz gofil9 ;If not, just proceed. + mvi c,openf ;See if the file exists. + lxi d,fcb + call bdos + cpi 0FFH ;Does it exist? + jz gofil9 ;If not create it. +; + lda flwflg ;[MF]Get flag again + cpi 3 ;[MF]SET COLLISION DISCARD? + jnz gofi7h ;[MF]No + mvi a,0ffh ;[MF]Yes, order rejection of the file + sta dscflg ;[MF]... + jmp rskp ;[MF]and pretend successful open +gofi7h: push psw ;[MF]Save Collision status + lxi d,infms5 + call error3 + pop psw ;[MF]Restore Collision status + cpi 1 ;[MF]SET COLLISION RENAME? + jz gofi7i ;[MF]Yes, same as SET WARNING ON + ;[MF]If we come here, SET COLLISION BACKUP + lxi h,fcb ;[MF]Copy original fcb to a safe place + lxi d,colfcb ;[MF]... + lxi b,33 ;[MF]... + call mover ;[MF]... + ;[MF]and fall into rename code +gofi7i: ;[MF] +; +; Replacement file name renamer routine. Incomming +; files are renamed in this manner: +; original file name: filex.ext +; first rename: filex001.ext +; ... ... +; ninth rename filex009.ext +; 10th rename fail - would we really want 10 +; files of the same name?? +; +; +; 1) +; Assume that we need to "rename" the file, so lets make sure +; that there is a full. 8 character filename. (We make it if +; it does not already exist) +; 1a) If full file name, last character is to be replaced +; by a zero. This gives us up to no#ine renames. +; 2)open file +; 2a)If exists, increment last character by one +; 2b)if = '9' then abort +; 2c)If does not exist, got 2) +; 3)we have a valid 'renamed' file +; +;Part 1) - fill out filename part + + mvi c,8 ; max 8 characters to test for + mvi a,'0' ; spaces to be replaced by a zero. + lxi h,fcb+8 ; start at the end +gofi7c: mov m,a ; put a zero in here + dcr c ; come to the end? + jz gofi7d ; should not have, but just in case... + dcx h ; previous chararcter + mov a,m ; get it + cpi ' ' ; if this character a space as well, zero it + mvi a,'0' ; set it to ascii zero just in case... + jz gofi7c ; +; +; Part 2) open the file (if success, then it exists) + +gofi7d: +;zero the attribute bits. [rjl@monu1.cc.monash.edu.au] + lxi h,fcb+1 ;[rjl] + mvi c,11 ;[rjl] +gofi7z: mov a,m ;[rjl] + ani 07fh ;[rjl] + mov m,a ;[rjl] + inx h ;[rjl] + dcr c ;[rjl] + jnz gofi7z ;[rjl] + lxi d,fcb + mvi c,openf + call BDOS + inr a ; if 0ffh returned, error (ie does not exist) + jz gofi7e + lda fcb+8 ; get last character + inr a + sta fcb+8 + cpi '9'+1 ; more than '9' => too far, lets give up. + jnz gofi7d ; else try again +;Giving up, so lets exit + lxi d,erms16 ; + call prtstr + ret ; return to error routine + +gofi7e: lxi d,fnbuf ; make the file name into a character string + lxi h,fcb+1 ; point to source file name, less drive name + mvi c,8 ; 11 characters (8+3) + dot to copy across +; +gofi7f: mov a,m ; get character + stax d + inx h + inx d + dcr c + jnz gofi7f ; loop until all done + + mvi a,'.' ; then the dot + stax d + inx d + + mvi c,3 ; then the file extention + +gofi7g: mov a,m + stax d + inx h + inx d + dcr c + jnz gofi7g ; loop until extention copied across + + mvi a,'$' ; dollar terminate string + stax d + lxi d,fnbuf ;[MF]Point to string + call prtstr ; write string to console + + lda flwflg ;[MF]Get warning (SET COLLISION) flag + cpi 2 ;[MF]SET COLLISION BACKUP? + jnz gofil9 ;[MF]No + lxi h,fcb ;[MF]Yes, get new filename fcb + lxi d,colfcb+16 ;[MF]Where to copy to for rename + lxi b,16 ;[MF]Copy 16 bytes + call mover ;[MF]... + lxi d,colfcb ;[MF]Point to rename fcb + mvi c,renam ;[MF]Rename function + call bdos ;[MF]Try to rename original file + cpi 0ffh ;[MF]Did we win? + jnz gofl82 ;[MF]Yes + lxi d,erms16 ;[MF]No, complain and bomb + jmp error3 ;[MF]... +gofl82: lxi h,colfcb ;[MF]Now recopy original filename into fcb + lxi d,fcb ;[MF]to create new file with original name + lxi b,16 ;[MF]... + call mover ;[MF]... +; +; +;Now lets make the file (create it) + +gofil9: call makfil ; Create the file. + jmp gofl91 ; Disk was full. + jmp rskp ; Success. + +gofl91: lxi d,erms11 + call error3 + ret +; +; This is the FINISH command. It tells the remote KERSRV to exit. +; here from kermit + +finish: call cfmcmd + call selmdm ;[MF]Select modem + call flsmdm ;[MF]Flush buffers + call selcon ;[MF]Select keyboard again + xra a + sta numtry ;Inititialize count. + mvi a,'1' ;Reset block check type to single character + sta curchk ; . . . + +finsh1: lda numtry ;How many times have we tried? + cpi maxtry ;Too many times? + jm finsh3 ;No, try it. +finsh2: lxi d,erms18 ;Say we couldn't do it. + call prtstr + jmp kermit ;Go home. + +finsh3: inr a ;Increment the number of tries. + sta numtry + xra a + sta argblk ;Make it packet number zero. + mvi a,1 + sta argblk+1 ;One piece of data. + lxi h,data + mvi m,'F' ;Finish running Kermit. + mvi a,'G' ;Generic command packet. + call spack + jmp finsh2 ; Tell the user and die. + call rpack ;Get an acknowledgement. + jmp finsh1 ; Go try again. + cpi 'Y' ;ACK? + jz kermit ;Yes, we are done. + cpi 'E' ;Is it an error packet? + jnz finsh1 ;Try sending the packet again. + call error1 ;Print the error message. + jmp kermit +; +; This is the LOGOUT command. It tells the remote KERSRV to logout. +; here from: kermit + +logout: call cfmcmd + call logo ;Send the logout packet. + jmp kermit ;Go get another command + jmp kermit ; whether we succeed or not. + +; do logout processing. +; called by: bye, logout + +logo: call selmdm ;[MF]Select modem + call flsmdm ;[MF]Flush buffers + call selcon ;[MF]Select keyboard again + xra a + sta numtry ;Inititialize count. + mvi a,'1' ;Reset block check type to single character + sta curchk ; . . . + +logo1: lda numtry ;How many times have we tried? + cpi maxtry ;Too many times? + jm logo3 ;No, try it. +logo2: lxi d,erms19 ;Say we couldn't do it. + call prtstr + ret ;Finished. + +logo3: inr a ;Increment the number of tries. + sta numtry + xra a + sta argblk ;Make it packet number zero. + mvi a,1 + sta argblk+1 ;One piece of data. + lxi h,data + mvi m,'L' ;Logout the remote host. + mvi a,'G' ;Generic command packet. + call spack + jmp logo2 ; Tell the user and die. + call rpack ;Get an acknowledgement + jmp logo1 ; Go try again. + cpi 'Y' ;ACK? + jz rskp ;Yes, we are done. + cpi 'E' ;Is it an error packet? + jnz logo1 ;Try sending the packet again. + call error1 ;Print the error message. + ret ;All done. +; +; Packet routines + +; Send_Packet +; This routine assembles a packet from the arguments given and sends it +; to the host. +; +; Expects the following: +; A - Type of packet (D,Y,N,S,R,E,F,Z,T) +; ARGBLK - Packet sequence number +; ARGBLK+1 - Number of data characters +; Returns: nonskip if failure +; skip if success +; called by: read, rinit, rfile, rdata, sinit, sfile, sdata, seof, seot, +; finish, logout, nak, ackp + +spack: sta argblk+2 + lxi h,packet ;Get address of the send packet. + lda sndsop ;[gnn] send start-of-pkt char. + mov m,a ;Put in the packet. + inx h ;Point to next char. + lda curchk ;Get current checksum type + sui '1' ;Determine extra length of checksum + mov b,a ;Copy length + lda argblk+1 ;Get the number of data chars. + adi ' '+3 ;Real packet character count made printable. + add b ;Determine overall length + mov m,a ;Put in the packet. + inx h ;Point to next char. + lxi b,0 ;Zero the checksum AC. + mov c,a ;Start the checksum. + lda argblk ;Get the packet number. + adi ' ' ;Add a space so the number is printable. + mov m,a ;Put in the packet. + inx h ;Point to next char. + add c + mov c,a ;Add the packet number to the checksum. + mvi a,0 ;Clear A (Cannot be XRA A, since we can't + ; touch carry flag) + adc b ;Get high order portion of checksum + mov b,a ;Copy back to B + lda argblk+2 ;Get the packet type. + mov m,a ;Put in the packet. + inx h ;Point to next char. + add c + mov c,a ;Add the packet number to the checksum. + mvi a,0 ;Clear A + adc b ;Get high order portion of checksum + mov b,a ;Copy back to B +spack2: lda argblk+1 ;Get the packet size. + ora a ;Are there any chars of data? + jz spack3 ; No, finish up. + dcr a ;Decrement the char count. + sta argblk+1 ;Put it back. + mov a,m ;Get the next char. + inx h ;Point to next char. + add c + mov c,a ;Add the packet number to the checksum. + mvi a,0 ;Clear A + adc b ;Get high order portion of checksum + mov b,a ;Copy back to B + jmp spack2 ;Go try again. + +spack3: lda curchk ;Get the current checksum type + cpi '2' ;Two character? + jz spack4 ;Yes, go handle it + jnc spack5 ;No, go handle CRC if '3' + mov a,c ;Get the character total. + ani 0C0H ;Turn off all but the two high order bits. + ;Shift them into the low order position. + rlc ;Two left rotates same as 6 rights + rlc ; . . . + add c ;Add it to the old bits. + ani 3FH ;Turn off the two high order bits. (MOD 64) + adi ' ' ;Add a space so the number is printable. + mov m,a ;Put in the packet. + inx h ;Point to next char. + jmp spack7 ;Go store eol character + +;Here for 3 character CRC-CCITT + +spack5: mvi m,0 ;Store a null for current end + push h ;Save H + lxi h,packet+1 ;Point to first checksumed character + call crcclc ;Calculate the CRC + pop h ;Restore the pointer + mov c,e ;Get low order half for later + mov b,d ;Copy the high order + mov a,d ;Get the high order portion + rlc ;Shift off low 4 bits + rlc ; . . . + rlc ; . . . + rlc ; . . . + ani 0FH ;Keep only low 4 bits + adi ' ' ;Put into printing range + mov m,a ;Store the character + inx h ;Point to next position + +;Here for two character checksum + +spack4: mov a,b ;Get high order portion + ani 0FH ;Only keep last four bits + rlc ;Shift up two bits + rlc ; . . . + mov b,a ;Copy back into safe place + mov a,c ;Get low order half + rlc ;Shift high two bits + rlc ;to low two bits + ani 03H ;Keep only two low bits + ora b ;Get high order portion in + adi ' ' ;Convert to printing character range + mov m,a ;Store the character + inx h ;Point to next character + mov a,c ;get low order portion + ani 3FH ;Keep only six bits + adi ' ' ;Convert to printing range + mov m,a ;Store it + inx h ;Bump the pointer + +spack7: lda dbgflg + ora a ; is debugging enabled? + jz spack8 + push h ; yes. save address of end of packet + mvi m,0 ; null-terminate the packet for display + lda quietd ; a quiet display? + ana a + jnz spac7a ; so dont say a thing + call sppos ; position cursor + lxi h,packet+1 ; print the packet + call dmptxt + lda prnflg ; is the printer on too? + ana a + jz spac7a + lxi h,sstatm ; print state + call printm ; dumptext but to printer + lda state + mov e,a + call outprn + lxi h,princr ; cr lf to printer + call printm + lxi h,spackm + call printm + lxi h,packet+1 + call printm + lxi h,princr + call printm + lxi h,princr + call printm + +spac7a: pop h ; restore address of end of packet +spack8: lda seol ;Get the EOL the other host wants. + mov m,a ;Put in the packet. + inx h ;Point to next char. + xra a ;Get a null. + mov m,a ;Put in the packet. +; Write out the packet. +outpkt: call selmdm ; Set up for output to comm port if iobyt + lda spad ;Get the number of padding chars. + sta temp1 +outpk2: lda temp1 ;Get the count. + dcr a + ora a + jm outpk6 ;If none left proceed. + sta temp1 + lda spadch ;Get the padding char. + call setpar ;Set parity appropriately + mov e,a ;Put the char in right AC. + call outmdm ;Output it. + jmp outpk2 + +outpk6: lxi h,packet ; Point to the packet. +outlup: mov a,m ; Get the next character. + ora a ; Is it a null? + jz outlud ; If so return success. + call setpar ; Set parity for the character + mov e,a ; Put it in right AC + call outmdm ; and output it. +; TAC trap: If this character is the TAC intercept character, and the TAC +; trap is enabled, we have to output it twice. If the TAC trap is enabled, +; tacflg contains the intercept character. (The current character cannot +; be NUL, so we don't have to worry about doubling nulls in the message) + lda tacflg ; get current intercept character, or zero. + cmp m ; compare against current data character. + jnz outpk8 ; if different, do nothing. + call setpar ; match. set appropriate parity, + mov e,a ; put it in the right register, + call outmdm ; and output it a second time. +outpk8: + inx h ; Increment the char pointer. + jmp outlup + +outlud: call selcon ; select console + jmp rskp ; and return success +; +; Receive_Packet +; This routine waits for a packet to arrive from the host. It reads +; characters until it finds a SOH. It then reads the packet into packet. +; +; Returns: nonskip if failure (checksum wrong or packet trashed) +; skip if success, with +; A - message type +; ARGBLK - message number +; ARGBLK+1 - length of data +; called by: rinit, rfile, rdata, +; sinit, sfile, sdata, seof, seot, finish, logout + +rpack: call inpkt ;Read up to the end-of-line character + jmp r ; Return bad. +rpack0: call getchr ;Get a character. + jmp rpack ; Hit eol;null line;just start over. + lxi h,rcvsop ;[gnn] Is it receive start-of-pkt char. + cmp m ;[gnn] + jnz rpack0 ; No, go until it is. +rpack1: call getchr ;Get a character. + jmp r ; Hit end of line, return bad. + lxi h,rcvsop ;[gnn] Is it receive start-of-pkt char. + cmp m ;[gnn] + jz rpack1 ; Yes, then go start over. + sta packet+1 ;Store in packet also + mov c,a ;Start the checksum. + lda curchk ;Get block check type + sui '1' ;Determine extra length of block check + mov b,a ;Get a copy + mov a,c ;Get back length character + sui ' '+3 ;Get the real data count. + sub b ;Get total length + sta argblk+1 + mvi b,0 ;Clear high order half of checksum + call getchr ;Get a character. + jmp r ; Hit end of line, return bad. + lxi h,rcvsop ;[gnn] Is it receive start-of-pkt char. + cmp m ;[gnn] + jz rpack1 ; Yes, then go start over. + sta argblk + sta packet+2 ;Save also in packet + add c + mov c,a ;Add the character to the checksum. + mvi a,0 ;Clear A + adc b ;Get high order portion of checksum + mov b,a ;Copy back to B + lda argblk + sui ' ' ;Get the real packet number. + sta argblk + call getchr ;Get a character. + jmp r ; Hit end of line, return bad. + lxi h,rcvsop ;[gnn] Is it receive start-of-pkt char. + cmp m ;[gnn] + jz rpack1 ; Yes, then go start over. + sta temp1 ;Save the message type. + sta packet+3 ;Save in packet + add c + mov c,a ;Add the character to the checksum. + mvi a,0 ;Clear A + adc b ;Get high order portion of checksum + mov b,a ;Copy back to B + lda argblk+1 ;Get the number of data characters. + sta temp2 + lxi h,data ;Point to the data buffer. + shld datptr +rpack2: lda temp2 + sui 1 ;Any data characters? + jm rpack3 ; If not go get the checksum. + sta temp2 + call getchr ;Get a character. + jmp r ; Hit end of line, return bad. + lxi h,rcvsop ;[gnn] Is it receive start-of-pkt char. + cmp m ;[gnn] + jz rpack1 ; Yes, then go start over. + lhld datptr + mov m,a ;Put the char into the packet. + inx h ;Point to the next character. + shld datptr + add c + mov c,a ;Add the character to the checksum. + mvi a,0 ;Clear A + adc b ;Get high order portion of checksum + mov b,a ;Copy back to B + jmp rpack2 ;Go get another. + +rpack3: call getchr ;Get a character. + jmp r ; Hit end of line, return bad. + lxi h,rcvsop ;[gnn] Is it receive start-of-pkt char. + cmp m ;[gnn] + jz rpack1 ; Yes, then go start over. + sui ' ' ;Turn the char back into a number. + sta temp3 +;Determine type of checksum + + lda curchk ;Get the current checksum type + cpi '2' ;1, 2 or 3 character? + jz rpack4 ;If zero, 2 character + jnc rpack5 ;Go handle 3 character + mov a,c ;Get the character total. + ani 0C0H ;Turn off all but the two high order bits. + ;Shift them into the low order position. + rlc ;Two left rotates same as six rights + rlc ; . . . + add c ;Add it to the old bits. + ani 3FH ;Turn off the two high order bits. (MOD 64) + mov b,a + lda temp3 ;Get the real received checksum. + cmp b ;Are they equal? + jz rpack7 ;If so, proceed. +rpack9: call updrtr ;If not, update the number of retries. + ret ;Return error. + +;Here for three character CRC-CCITT + +rpack5: lhld datptr ;Get the address of the data + mvi m,0 ;Store a zero in the buffer to terminate packet + lxi h,packet+1 ;Point at start of checksummed region + call crcclc ;Calculate the CRC + mov c,e ;Save low order half for later + mov b,d ;Also copy high order + mov a,d ;Get high byte + rlc ;Want high four bits + rlc ; . . . + rlc ;And shift two more + rlc ; . . . + ani 0FH ;Keep only 4 bits + mov d,a ;Back into D + lda temp3 ;Get first value back + cmp d ;Correct? + jnz rpack9 ;No, punt + call getchr ;Get a character. + jmp r ; Hit end of line, return bad. + lxi h,rcvsop ;[gnn] Is it receive start-of-pkt char. + cmp m ;[gnn] + jz rpack1 ; Yes, then go start over. + sui ' ' ;Remove space offset + sta temp3 ;Store for later check + ;... + +;Here for a two character checksum and last two characters of CRC + +rpack4: mov a,b ;Get high order portion + ani 0FH ;Only four bits + rlc ;Shift up two bits + rlc ; . . . + mov b,a ;Save back in B + mov a,c ;Get low order + rlc ;move two high bits to low bits + rlc ; . . . + ani 03H ;Save only low two bits + ora b ;Get other 4 bits + mov b,a ;Save back in B + lda temp3 ;Get this portion of checksum + cmp b ;Check first half + jnz rpack9 ;If bad, go give up + call getchr ;Get a character. + jmp r ; Hit end of line, return bad. + lxi h,rcvsop ;[gnn] Is it receive start-of-pkt char. + cmp m ;[gnn] + jz rpack1 ; Yes, then go start over. + sui ' ' ;Remove space offset + mov b,a ;Save in safe place + mov a,c ;Get low 8 bits of checksum + ani 3FH ;Keep only 6 bits + cmp b ;Correct value + jnz rpack9 ;Bad, give up +rpack7: lhld datptr + mvi m,0 ;Put a null at the end of the data. + lda temp1 ;Get the type. + jmp rskp +; +; inpkt - receive and buffer packet +; returns: nonskip if error (timeout) +; skip if success; packet starts at recpkt (which holds the SOH) +; and is terminated by a null. +; console is selected in either case. +; called by: rpack + +inpkt: lxi h,recpkt ;Point to the beginning of the packet. + shld pktptr +inpkt1: call inchr ;Get first character + jmp r ;Return failure + lxi h,rcvsop ;[gnn] Is it receive start-of-pkt char. + cmp m ;[gnn] + jnz inpkt1 ;if not, ignore leading junk + jmp inpkt3 ;else go put it in packet + +inpkt2: call inchr ;Get a character. + jmp r ; Return failure. + lxi h,rcvsop ;[gnn] Is it receive start-of-pkt char. + cmp m ;[gnn] + jnz inpkt3 ;if not continue + lxi h,recpkt ;else throw away what we've got so far + shld pktptr ; +inpkt3: lhld pktptr ; + mov m,a ;Put the char in the packet. + inx h + shld pktptr + mov b,a + lxi d,-recpkx ;Start over if packet buffer overflow + dad d ; + jc inpkt ;buffer overflow + lda reol ;Get the EOL char. + cmp b + jnz inpkt2 ;If not loop for another. +;[gnn] *** added by Godfrey Nix Nottingham University *** +;[gnn] to allow Kermit server to echo our packets back + lxi h,recpkt+3 ;[gnn] point to packet type + lda packet+3 ;[gnn] get the one we sent + cmp m ;[gnn] are they the same? + jz inpkt ;[gnn] yes, get another packet +;[gnn] *** end of patch ***** + ;... + ;... + +;Begin IBM change/fdc +;This moved from OUTPK7 -- it appears that waiting until we're +;ready to send a packet before looking for turnaround character +;is long enough for it to get lost. Better to look now. + + lda ibmflg ;Is this the IBM? + ora a + jz inpkt6 ;If not then proceed. + lda state ;Check if this is the Send-Init packet. + cpi 'S' + jz inpkt6 ;If so don't wait for the XON. +inpkt5: call inchr ;Wait for the turn around char. + jmp inpkt6 + cpi xon ;Is it the IBM turn around character? + jnz inpkt5 ;If not, go until it is. +inpkt6: lhld pktptr ;Reload packet pointer +;End IBM change/fdc. + dcx h ;Back up to end of line character + mvi m,0 ;Replace it with a null to stop rpack: + call selcon ;We've got the packet. Return to console. + + lda dbgflg ; Is debugging enabled? + ora a + jz inpkt7 + inx h ; Point to next char. + lda quietd ; a quiet display? + ana a + jnz inpkt7 ; so dont say a thing + call rppos ; position cursor + lxi h,recpkt+1 ; print the packet + call dmptxt + + lda prnflg ; is the printer on too? + ana a + jz inpkt7 + lxi h,rstatm ; print state + call printm ; dumptext but to printer + lda state + mov e,a + call outprn + lxi h,princr ; cr lf to printer + call printm + lxi h,rpackm + call printm + lxi h,recpkt+1 + call printm + lxi h,princr + call printm + lxi h,princr + call printm + + +inpkt7: lxi h,recpkt + shld pktptr ;Save the packet pointer. + jmp rskp ;If so we are done. + +; getchr - get next character from buffered packet. +; returns nonskip at end of packet. +; called by: rpack + +getchr: lhld pktptr ;Get the packet pointer. + mov a,m ;Get the char. + inx h + shld pktptr + ora a ;Is it the null we put at the end of the packet? + jnz rskp ;If not return retskp. + ret ;If so return failure. +; +; +; inchr - character input loop for file transfer +; returns: nonskip if timeout or character typed on console +; (console selected) +; skip with character from modem in A (parity stripped +; if necessary; modem selected) +; preserves bc, de, hl in either case. +; called by: inpkt + +inchr: push h ; save hl and bc + push b + lhld timout ;Get initial value for timeout + shld timval ;[jd] +inchr0: call selmdm ;select modem + call inpmdm ;Try to get a character from the modem + ora a + jz inchr2 ;if zero, nothing there. + mov b,a + lda parity ;Is the parity none? + cpi parnon + mov a,b + jz inchr1 ;If so just return. + ani 7FH ;Turn off the parity bit. +inchr1: pop b ;restore registers + pop h + jmp rskp ;take skip return, character in A + +inchr2: call selcon ;select console + call inpcon ; Try to get a character from the console + ora a + jz inchr6 ;If not go do timer thing + cpi cr ;Is it a carriage return? + jz inchr4 ;If so return + cpi ('Z'-100O) ;Control-Z? + jz inchr5 ;Yes, go flag it + cpi ('C'-100O) ;Control-C? + jz inchr7 ;re-enter, he wants to get out + cpi ('X'-100O) ;Control-X? + jnz inchr6 ;No, ignore it. do timer thing. +inchr5: adi 100O ;Convert to printing range + sta czseen ;Flag we saw a control-Z + jmp inchr6 ;[MF] and do timer thing +inchr4: pop b ; restore registers + pop h + ret ;And return + +inchr6: lda timflg ;[jd] pick up timer flag + ora a ;[jd] are we allowed to use timer? + jz inchr0 ;[jd] no, don't time out + lhld timval ; decrement fuzzy time-out + dcx h ; + shld timval ;((timout-1) * loop time) + mov a,h ;(Retry if not time-out) + ora l ; + jnz inchr0 ; + call updrtr ;Count as retry (?) + pop b ;restore registers + pop h + ret ;and return to do retry + +inchr7: call clrtop ;[hh] clear screen and home cursor + lda takflg ;[MF]Take-file in progress? + ani 1 ;[MF]... + cnz closet ;[MF]Yes, close it and reset TAKE-flag + ;[MF]so all processing is halted + jmp kermit ;[hh] then re-enter kermit + +; +; CRCCLC - Routine to calculate a CRC-CCITT for a string. +; +; This routine will calculate a CRC using the CCITT polynomial for +; a string. +; +; call with: HL/ Address of null-terminated string +; 16-bit CRC value is returned in DE. +; Registers BC and HL are preserved. +; +; called by: spack, rpack + +crcclc: push h ;Save HL + push b ;And BC + lxi d,0 ;Initial CRC value is 0 + +crccl0: mov a,m ;Get a character + ora a ;Check if zero + jz crccl1 ;If so, all done + push h ;Save the pointer + xra e ;Add in with previous value + mov e,a ;Get a copy + ani 0FH ;Get last 4 bits of combined value + mov c,a ;Get into C + mvi b,0 ;And make high order zero + lxi h,crctb2 ;Point at low order table + dad b ;Point to correct entry + dad b ; . . . + push h ;Save the address + mov a,e ;Get combined value back again + rrc ;Shift over to make index + rrc ; . . . + rrc ; . . . + ani 1EH ;Keep only 4 bits + mov c,a ;Set up to offset table + lxi h,crctab ;Point at high order table + dad b ;Correct entry + mov a,m ;Get low order portion of entry + xra d ;XOR with previous high order half + inx h ;Point to high order byte + mov d,m ;Get into D + pop h ;Get back pointer to other table entry + xra m ;Include with new high order half + mov e,a ;Copy new low order portion + inx h ;Point to other portion + mov a,m ;Get the other portion of the table entry + xra d ;Include with other high order portion + mov d,a ;Move back into D + + pop h ;And H + inx h ;Point to next character + jmp crccl0 ;Go get next character + +crccl1: pop b ;Restore B + pop h ;And HL + + ret ;And return, DE=CRC-CCITT + +CRCTAB: DW 00000H + DW 01081H + DW 02102H + DW 03183H + DW 04204H + DW 05285H + DW 06306H + DW 07387H + DW 08408H + DW 09489H + DW 0A50AH + DW 0B58BH + DW 0C60CH + DW 0D68DH + DW 0E70EH + DW 0F78FH + +CRCTB2: DW 00000H + DW 01189H + DW 02312H + DW 0329BH + DW 04624H + DW 057ADH + DW 06536H + DW 074BFH + DW 08C48H + DW 09DC1H + DW 0AF5AH + DW 0BED3H + DW 0CA6CH + DW 0DBE5H + DW 0E97EH + DW 0F8F7H +; +; This is where we go if we get an error during a protocol communication. +; error prints the error packet on line 6 or so, and aborts the +; transfer. +; called by: rinit, rfile, rdata, sinit, sfile, sdata, seof, seot +; error1 print CRLF followed by the error packet. +; called by: finish, logout +; error2 just prints the error packet. +; error3 positions cursor and prints error message specified in DE. +; called by: rinit, rfile, rdata, sinit, sfile, sdata, seof, +; seot, parwrn, gofil, outbuf + +error: lda quietd ; a quiet display? + ana a + jnz error0 ; so dont say a thing + lda remtxt ;[MF]Doing a remote command? + ora a ;[MF]... + jnz error0 ;[MF]Yes, don't position cursor + call screrr ;Position the cursor. +error0: mvi a,'A' ;Set the state to abort. + sta state + jmp error2 + +error1: lxi d,crlf ;Print a CRLF. + lda quietd ; a quiet display? + ana a + jnz error2 ; so dont say a thing + call prtstr +error2: lda argblk+1 ;Get the length of the data. + mov c,a + mvi b,0 ;Put it into BC + lxi h,data ;Get the address of the data. + dad b ;Get to the end of the string. + mvi m,'$' ;Put a dollar sign at the end. + lxi d,data ;Print error message + lda remtxt ;[MF]Doing a remote command? + ora a ;[MF]... + jnz errr2a ;[MF]Yes, print message, quiet or not! + lda quietd ; a quiet display? + ana a + rnz ; so dont say a thing +errr2a: call prtstr + ret + +error3: lda quietd ; a quiet display? + ana a + rnz ; so dont say a thing + lda remtxt ;[MF]Doing a remote command? + ora a ;[MF]... + jnz err3a ;[MF]Yes, don't position cursor + push d ;Save the pointer to the message. + call screrr ;Position the cursor. + pop d ;Get the pointer back. +err3a: call prtstr ;Print error message + ret +; +; Set up for file transfer. +; called by read, send. + +init: lxi d,version ; point at Kermit's version string + lda quietd ; a quiet display? + ana a + jnz init1 ; so dont say a thing + call sysscr ; fix up screen +init1: call selmdm ; select modem + call flsmdm ; purge any pending data + call selcon ; select console again. + ret + +; Set state to ABORT +; called by: rinit, rfile, rdata, sinit, sfile, sdata, seof, seot, +; nak, ackp + +abort: mvi a,'A' ;Otherwise abort. + sta state + ret + +; nak - send NAK packet +; here from: rinit, rfile, rdata +; nak0 - update retry count and send NAK packet +; here from: rinit, rfile, rdata, tryagn + +nak0: call updrtr ;Update number of retries. +nak: lda pktnum ;Get the packet number we're waiting for. + sta argblk + xra a ;No data. + sta argblk+1 + mvi a,'N' ;NAK that packet. + call spack + jmp abort ; Give up. + ret ;Go around again. + +; increment and display retry count +; called by: rfile, sinit, sfile, sdata, seof, seot, +; nak, rpack, inchr, tryagn + +updrtr: lhld numrtr + inx h ;Increment the number of retries + shld numrtr + lda remtxt ;[MF]Doing a remote server command? + ora a ;[MF]... + rnz ;[MF]Yes, keep mum + lda quietd ; a quiet display? + ana a + rnz ; so dont say a thing + call scrnrt ;Position cursor + lhld numrtr ;[MF] +call nout ;Write the number of retries. + ret + +; [jd] this routine prints parity warnings. All registers are +; saved except for a. +; called by: sdata + +parwrn: push b + push d + push h + lxi d,inms25 + call error3 + pop h + pop d + pop b + ret +;[jd] end of addition + +; print message in status field. address of message is in DE. +; called by: read, send + +finmes: lda quietd ; a quiet display? + ana a + jz finme0 ; so do usual stuff + push d ;[MF]Save pointer to completion message + call prcrlf ; best do a new line + pop d ;[MF]Restore completion message pointer + call prtstr ; and send message + mvi e,space ; send a space or two + mvi c,dconio + push b + push d + call bdos + pop d + pop b + call bdos + ret ; and exit back +; +;else for screaming screens... + +finme0: push d ;Save message. + call scrst ;Position cursor + pop d ;Print the termination message + call prtstr + ret ; may not want this ************** + + mvi c,4 ;[2] copy across user no and drive + lxi h,kerm1 ;[2] as we have the text already +finme1: mov e,m + push h ;[2] conout probably destroys these + push b + call conout + pop b + pop h + inx h ;[2] next character + dcr c ;[2] ah, but have we done? + jnz finme1 ;[2] nope + lxi d,spac15 ;[2] send 15 spaces (clears previous filename) + call prtstr ;[2] + call scrend ;Position cursor for prompt + ret + +; Compare expected packet number against received packet number. +; return with flags set (Z = packet number valid) +; called by: rfile, rdata, sinit, sfile, sdata, seof, seot + +compp: lda pktnum ;Get the packet Nr. + mov b,a + lda argblk + cmp b + ret + +; Increment the packet number, modulo 64. +; called by: rinit, rfile, rdata, sinit, sfile, sdata, seof, seot + +countp: inr a ;Increment packet Nr. + ani 3FH ;Turn off the two high order bits + sta pktnum ;Save modulo 64 of number + lhld numpkt + inx h ;Increment Nr. of packets + shld numpkt + ret + +; Send an ACK-packet +; called by: rfile, rdata, tryagn + +ackp: xra a + sta numtry ;Reset number of retries + sta argblk+1 ;No data. (The packet number is in argblk) + mvi a,'Y' ;Acknowledge packet + call spack ;Send packet + jmp abort + ret + +; ? +; called with A/ current retry count +; called by: rfile, rdata + +tryagn: inr a ;Increment it. + sta oldtry ;Save the updated number of tries. + lda pktnum ;Get the present packet number. + dcr a ;Decrement + ani 3FH ; modulo 64 + mov b,a + lda argblk ;Get the packet's number + cmp b ;Is the packet's number one less than now? + jnz nak0 ;No, NAK it and try again. + call updrtr ;Update the number of retries. + call ackp + ret + +; Output a null-terminated string to the console. We assume that the +; console has been selected. Called with HL = address of string. +; called by: spack, inpkt + +dmptxt: mov a,m ; get character from string + ora a + rz ; done if null + push h ; save string address + mov e,a ; move character to E for outcon + call outcon ; output character to console + pop h ; restore string address + inx h ; point past printed character + jmp dmptxt ; go output rest of string + + +; Output a null-terminated string to the PRINTER We assume that the +; console has been selected. Called with HL = address of string. +; called by: spack, inpkt + +printm: mov a,m ; get character from string + ora a + rz ; done if null + push h ; save string address + mov e,a ; move character to E for outcon + call outprn ; output character to printer + pop h ; restore string address + inx h ; point past printed character + jmp printm ; go output rest of string + + +; +; test if character in A is the start of header character. We get +; the start of packet character from sohchr, which can be SET +tstsoh: push b ; save these registers for a bit + mov c,a ; we have to test if this is the character + lda sohchr + cmp c ; if zero, then it is + mov a,c ; restore accumulator but not flags + pop b + ret ; return with flags set +; + + +; Little code to allow some expansion of code without changing +; every futher address, only up to the end of this file. +; TO BE REMOVED FRO RELEASE! + +; org ($+100h) AND 0FF00H + + +IF lasm + LINK CPSREM +ENDIF;lasm diff --git a/cpsrem.asm b/cpsrem.asm new file mode 100644 index 0000000..2f480b9 --- /dev/null +++ b/cpsrem.asm @@ -0,0 +1,1149 @@ +; CPSREM.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 +; 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 file contains the (system-independent) routines that implement +; the REMOTE commands of the KERMIT protocol. +; +; revision history: +; +;edit 13, 21-Mar-1991 by MF. Renamed REMOTE SET FILE COLLISION REPLACE to +; REMOTE SET FILE COLLISION OVERWRITE and modified the corresponding +; help text slightly. +;edit 12, 13-Feb-1991 by MF. Simplified code at "remcl0" to get REMOTE +; command arguments by calling "cmgtch" in order to get command-line +; characters directly. This means that command-line characters are +; passed literally (except for prefixingand space-compression) to the +; remote Kermit and that one need not send "?" or <esc> as "\"-prefixed +; octal numbers in order to avoid immediate action by CP/M Kermit. +;edit 11, 30-Jan-1991 by MF. Corrected code to always require entry of at least +; one argument in the REMOTE COPY, REMOTE DELETE (REMOTE ERASE), +; REMOTE MESSAGE, REMOTE RENAME and REMOTE TYPE commands. This is +; done by branching to KERMT3 (the "not confirmed" code) if the +; first argument isn't given. This should correct a bug which occurred +; in numerous places in which the character immediately following +; that specifying the flavor of a Generic command was not defined if +; the first of multiple (at least two) arguments was left blank but +; subsequent arguments were not. This should correct a problem +; encountered by Russell Lang of Monash University In Australia when +; he did a REMOTE MESSAGE command with a blank first argument (the +; user id) and a nonblank second argument (the message text) from +; CP/M Kermit to Ms-Kermit in Server mode. +;edit 10, 14-Dec-1990 by MF. Put "<<>>" around "x" or "F" packet replies +; to REMOTE commands as in VMS Bliss Kermit and eliminate unnecessary +; instruction before label remc2d. +;edit 9, 1-Nov-1990 by MF. Changed REMOTE CWD to REMOTE CD in the quest for +; uniformity of nomenclature (per request of FDC). +;edit 8, 29-Oct-1990 by MF. Corrected Remote command code to properly +; prefix control characters (repeat prefix (~) isn't done in CP/M +; yet). +;edit 7, 17-Oct-1990 by MF. Changed verb "REMOTE SEND-MESSAGE" to +; "REMOTE MESSAGE" to conform with the nomenclature suggested in +; Chapter 10 of the 6th edition of the Kermit Protocol Manual. +;edit 6, 10-Oct-1990 by MF. Corrected Remote command code to +; properly prefix the control-character prefix character and the +; eighth-bit quotation prefix character. Remote Set commands +; now function correctly. +; Also change the REMOTE SET FILE COLLISION ASK value to 5 per +; Kermit Digest V12 #6 (though I still have no idea how the local +; Kermit is supposed to answer). +;edit 5, 5-Oct-1990 by MF. Coded many Remote Set commands. +; The commands I have omitted deal with Attribute packets which +; don't make much sense on a CP/M system. +; Note also that for those Remote Set commands which take a +; numeric argument, no range-checking is done here. +; Also note that, for now, REMOTE SET FILE-COLLISION ASK is +; equivalent to REMOTE SET FILE-COLLISION DISCARD because +; (a) that's what the Kermit Digest indicated and (b) no mechanism +; has been proposed for the Remote Kermit to query the Local Kermit. +;edit 4, 29-Sep-1990 by MF. Corrected code to ignore error packets in +; response to sending an "I" packet, per KPROTO.DOC +;edit 3, 9-Sep-1990 by MF. Extensively revised this file to implement +; Remote commands except for the following: +; REMOTE JOURNAL, REMOTE MAIL, REMOTE PRINT, REMOTE PROGRAM, +; REMOTE SET, REMOTE VARIABLE. +;edit 2 ... MF Dunno where edit 2 went (shown in Version string). +; edit 1: September 8th, 1987. Created this file from bits of the two packet files. +; The commands supported by this system are all the REMOTE commands, +; to allow users to acces remote host systems via Kermit. Added REMOTE +; command table and REMOTE DIR command. +; +; +remver: db 'CPSREM.ASM (13) 21-Mar-1991$' ; name, edit number, date + +; +; REMOTE command - quite similar to the SET command +remote: call selmdm ;Select modem + call flsmdm ;Flush buffers + call selcon ;Back to keyboard + lxi d,remtab ; remote commands table + lxi h,remhlp ; remote help table + call keycmd ; get result + xchg + pchl ; and do it + + + + +; REMOTE command table. Works the same way as every other table etc. +; +remtab: db 19 ; nineteen commands so far + db 2,'CD$' + dw remcd ; remote cd command + db 4,'COPY$' + dw remcpy ; remote copy command + db 6,'DELETE$' + dw remdel ; remote delete command + db 9,'DIRECTORY$' + dw remdir ; remote directory command + db 10,'DISK-USAGE$' + dw remdsk ; remote disk-usage command + db 5,'ERASE$' + dw remdel ; remote erase command (same as delete) + db 6,'FINISH$' + dw finish ; same as finish + db 4,'HELP$' + dw remhep ; remote help command + db 4,'HOST$' + dw remhos ; remote host command + db 6,'KERMIT$' + dw remker ; remote Kermit command + db 5,'LOGIN$' + dw remlgi ; remote login + db 6,'LOGOUT$' + dw logout ; same as logout + db 7,'MESSAGE$' + dw remmsg ; remote message command + db 6,'RENAME$' + dw remren ; remote rename + db 3,'SET$' + dw remset ; remote set command + db 5,'SPACE$' + dw remdsk ; remote space command (same as disk-usage) + db 6,'STATUS$' + dw remsta ; remote status (of server) command + db 4,'TYPE$' + dw remtyp ; remote type command + db 3,'WHO$' + dw remwho ; remote who command + +remhlp: db cr,lf,'CD - change default directory for remote server' + db ' operations' + db cr,lf,'COPY - copy files on a remote system' + db cr,lf,'DELETE - delete files on a remote system' + db cr,lf,'DIRECTORY - list a directory on a remote system' + db cr,lf,'DISK-USAGE - show disk usage on a remote system' + db cr,lf,'FINISH - stop a remote server' + db cr,lf,'HELP - get help from a remote server' + db cr,lf,'HOST - execute a command on a remote system' + db cr,lf,'KERMIT - tell a remote server to execute a Kermit ' + db 'command' + db cr,lf,'LOGIN - send user-identification to a remote server' + db cr,lf,'LOGOUT - stop and logout a remote server' + db cr,lf,'MESSAGE - send a message to a remote system user' + db cr,lf,'RENAME - rename files on a remote system' + db cr,lf,'SET - set remote server parameters' + db cr,lf,'SPACE - show disk-usage on a remote system' + db cr,lf,'STATUS - Get status of a remote server' + db cr,lf,'TYPE - type files on a remote system' + db cr,lf,'WHO - show current users on a remote system' + db '$' + + +;Description of remote commands + +; +; Packets start with an I packet in place of S/R packet. An X +; packet is the same as an F (filename) packet except the 'file' +; is not applicable. Copy X packet data field to display. Set +; options so that no data is written to disk during D packets. +; (REMTXT <> 0) +; +;Packets: +; we we comments +; send receive +; I +; ACK +; Command packet +; Ack or +; Init +; ACK +; X Dummy header. +; ACK +; D listing from remote end +; ACK We got it +; .... +; ACK last packet received ok +; Z +; ACK +; B +; ACK end of transaction. +; +;**Note** If the Remote system gives a simple ack to the command packet, +;that is, a "short reply" is given, the data, if any, in the packet +;is displayed and the transaction ends. The outline shown above is for a +;"long reply". +; +; Remote commands +; +; Remote Copy - Copy file(s) on remote system +; +remcpy: lxi h,newfms ;Second argument prompt + shld rprmpt ;... + mvi a,'K' ;Generic type +remcp0: sta remdat ;into packet + mvi a,2 ;Packet has at least two characters + sta rdl ;... + mvi a,'G' ;Generic command + sta rcom ;... + lxi d,remdat+2 ;Point to data buffer + call remcli ;Get filespec (if any) from command line + ora a ;Anything typed? + jz kermt3 ;No, we must have an argument + mov b,a ;Save length + adi space ;Yes, make encoded field length + sta remdat+1 ;and store in packet data area + lda rdl ;Get packet length so far + add b ;Count answer length + sta rdl ;and remember new packet size + lhld rprmpt ;Point to "new file" prompt + xchg ;... + shld rptr ;Save data pointer + call prompt ;Prompt the user + lhld rptr ;Get data pointer again + inx h ;Skip encoded field-length + xchg ;... + call remcli ;get user's answer + lhld rptr ;Restore pointer + mov c,a ;Save answer length + adi space ;Convert to encoded field length + mov m,a ;Put length in packet + lda rdl ;Get accumulated data length + add c ;plus data length + adi 1 ;plus field length character + sta rdl ;and remember it + jmp remcom ;and branch to common code +; +; Remote Cd - Change Directory +; +remcd: lxi h,pswdms ;Second argument prompt + shld rprmpt ;... + mvi a,'C' ;Generic cd +remcd0: sta remdat ;into packet + mvi a,1 ;Packet is at least one character long + sta rdl ;... + mvi a,'G' ;Generic command + sta rcom ;... + lxi d,remdat+2 ;Point to data buffer + call remcli ;Get filespec (if any) from command line + mov b,a ;Save answer length (may be zero) + adi space ;Make encoded field length + sta remdat+1 ;and store in packet data area + lda rdl ;Get length so far + add b ;Count answer length + adi 1 ;and field length character + sta rdl ;and remember current packet-size + lda remdat ;Get generic packet flavor + cpi 'C' ;Remote CD? + jnz remcd1 ;No + mov a,b ;Get length of possible directory spec + ora a ;Did the user give a directory spec? + jz remcom ;No, we can process the command immediately + mvi a,0ffH ;Yes, password follows, make it not echo + sta cmqflg ;... +remcd1: lhld rprmpt ;Point to "password" prompt + xchg ;... + shld rptr ;Save data pointer + mvi a,0ffH ;Allow blank password + sta cmbflg ;... + call prompt ;Prompt the user + lhld rptr ;Restore data pointer + xchg ;... + inx d ;and increment it + call remcli ;Get user's answer + ora a ;Password given? + jz remcom ;No, proceed with command + mov c,a ;Yes, save answer length + adi space ;Convert to encoded field length + lhld rptr ;Get data pointer + mov m,a ;Put length in packet + lda rdl ;Get accumulated data length + adi 1 ;Count encoded field length + add c ;plus data length + sta rdl ;and remember packet-size + jmp remcom ;Branch to common code +; +; Remote Delete (Erase) command +; +remdel: mvi a,'E' ;Delete (Erase) command +remdl0: sta remdat ;... + mvi a,1 ;At least one character in packet + sta rdl ;... + mvi a,'G' ;Generic command + sta rcom ;... + lxi d,remdat+2 ;Point to data field + call remcli ;Get filespec + mov b,a ;Save length + lda remdat ;Get packet type + cpi 'E' ;If Generic Delete + jz remdl1 ;We must have an argument + cpi 'T' ;Ditto for Generic Type + jz remdl1 ;... + mov a,b ;Else get back character count + ora a ;Answer typed? + jz remcom ;No, process packet as is +remdl1: mov a,b ;Get character count again + ora a ;Anything typed? + jz kermt3 ;No, we must have an argument (Delete/Type) + adi space ;Yes, encode field length + sta remdat+1 ;and put in packet + lda rdl ;Get packet length so far + add b ;Count length of filespec + adi 1 ;Count field length character + sta rdl ;and store packet length + jmp remcom ;and do our stuff +; +; Remote Directory command +; +remdir: mvi a,'D' ;generic directory command + jmp remdl0 ;Do common code +; +; Remote Disk-usage (Space) command +; +remdsk: mvi a,'U' ;Disk-usage generic command + jmp remdl0 ;Do common code +; +; Remote Help command +; +remhep: mvi a,'H' ;generic help command + jmp remdl0 ;Do common code +; +; Remote Host command +; +remhos: mvi a,'C' ;Remote Host command +remho0: sta rcom ;... + xra a ;Zero packet length + sta rdl ;... + lxi d,remdat ;Point to packet data buffer + call remcli ;Get host command + ora a ;Anything typed? + jz kermt3 ;No, don't let the user get away with this + sta rdl ;Yes, store packet length + jmp remcom ;and do the command +; +; Remote Kermit command +; +remker: mvi a,'K' ;Remote Kermit command + jmp remho0 ;Do common code +; +; Remote Login command +; +remlgi: mvi a,'G' ;Generic command + sta rcom ;... + mvi a,'I' ;Generic type + sta remdat ;into packet + mvi a,1 ;At least one character in packet + sta rdl ;... + lxi d,remdat+2 ;Point to data buffer + call remcli ;Get userid (if any) from command line + ora a ;Userid typed? + jz remcom ;No, nothing more to do + mov b,a ;Yes, save length + adi space ;Make encoded field length + sta remdat+1 ;and store in packet data area + lda rdl ;Get packet length + add b ;Count id length + adi 1 ;and field length character + sta rdl ;and remember accumulated length + xchg ;Save data pointer + shld rptr ;... + mvi a,0ffH ;Allow blank answers + sta cmbflg ;... + sta cmqflg ;Passwords don't echo + lxi d,pswdms ;Point to "password" prompt + call prompt ;Prompt the user + lhld rptr ;Get data pointer + xchg ;Put in DE + inx d ;Skip encoded field-length + call remcli ;Get password, if any + ora a ;Anything typed? + jz remcom ;No, do command immediately + mov c,a ;Yes, save answer length + adi space ;Convert to encoded field length + lhld rptr ;Get pointer + mov m,a ;Put length in packet + lda rdl ;Get accumulated data length + adi 1 ;Count encoded field length + add c ;Count "password" field length + sta rdl ;and remember new packet length + xchg ;Save data pointer + shld rptr ;... + xra a ;Allow echoing again for "account" field + sta cmqflg ;... + lxi d,acctms ;Point to "account" prompt + call prompt ;Prompt the user + lhld rptr ;Get data pointer + xchg ;into DE + inx d ;Skip encoded field length + call remcli ;Get "account" field, if any + ora a ;Anything typed? + jz remcom ;No, do the command now + mov c,a ;Yes, save length of answer + adi space ;Convert to encoded field length + lhld rptr ;Get data pointer + mov m,a ;Put length in packet + lda rdl ;Get accumulated data length + adi 1 ;Count encoded field length + add c ;plus "account" length + sta rdl ;and remember it + jmp remcom ;Branch to common code +; +; Remote Rename command +; +remren: lxi h,newfms ;Second argument prompt + shld rprmpt ;... + mvi a,'R' ;generic rename + jmp remcp0 ;Do common code +; +; Remote Message command +; +remmsg: lxi h,msgms ;Second argument prompt + shld rprmpt ;... + mvi a,'M' ;generic message + jmp remcp0 ;Do common code +; +;Remote Set command +; +remset: mvi a,6 ;Packet data area has at least six chars + sta rdl ;... + mvi a,'S' ;Remote Set command + sta remdat ;... + mvi a,'G' ;It's a generic command + sta rcom ;... + mvi a,'#' ;Encoded field-length for SET type + sta remdat+1 ;which is three chars long + lxi d,rmstab ;Point to Set command table + lxi h,rmshlp ;and the help table + call keycmd ;Find out which command is to be executed + xchg ;Put dispatch address in HL + pchl ;Go do the command +; +; Common code for Remote Set commands that take an argument +; +remscm: lxi d,remdat+6 ;We get an argument from the user + mvi a,cmtxt ;... + call comnd ;... + jmp kermt3 ;Couldn't get one. + ora a ;Did the user give one? + jz kermt3 ;a blank answer isn't acceptable + mov c,a ;Save length of answer + adi space ;Convert to encoded field-length + sta remdat+5 ;and put in packet data area + lda rdl ;Get current data length + add c ;Count length of answer + sta rdl ;and store new data length + call cfmcmd ;Get a "confirm" + jmp remcom ;Do common Remote command code +; +; Common code for Remote Set commands requiring another table lookup +; +remsc1: call chkkey ;Get user's selection + sta remdat+6 ;and put into the packet data area + mvi a,'!' ;Encoded field length for 1 char + sta remdat+5 ;Put in packet + lda rdl ;Get accumulated packet data length + adi 1 ;Count length of answer (1 char) + sta rdl ;and store as new packet data length + jmp remcom ;Go do common Remote command processing +; +; Remote Status (of server) command +; +remsta: call cfmcmd ;Get return + mvi a,'Q' ;Command type (Server Status) + sta remdat ;... + mvi a,'G' ;Generic Kermit command + sta rcom ;... + mvi a,1 ;1 character in packet + sta rdl ;... + jmp remcom ;Do common code +; +; Remote Type command +; +remtyp: mvi a,'T' ;generic type command + jmp remdl0 ;Do common code +; +; Remote Who command +; +remwho: lxi h,optms ;Second argument prompt + shld rprmpt ;... + mvi a,'W' ;generic who + jmp remcd0 ;Do common code + +; Common code for Remote commands +; +remcom: + mvi a,0ffH ; Make sure returned info is sent + sta remtxt ;to the user's screen rather than to a file + lda rcom ;Get packet-type + cpi 'G' ;Is it a generic command? + jnz remc0e ;No, go clear the screen + lda remdat ;Yes, get generic command type + cpi 'S' ;Is it a Remote Set command? + jz remc0f ;Yes, don't clear the screen +remc0e: call clrtop ; clear the screen +remc0f: xra a + sta numtry ; reset retries + sta czseen + sta pktnum + lxi h,0 + shld numpkt + shld numrtr ; clear some variables + + mvi a,'1' ; reset block check type + sta curchk +remcm0: mvi a,'I' ; init state + sta state + call sinit ; do sendinit with I packet (??) + lda state ; now see if we are in the 'X' state + cpi 'X' + jz remco0 ;Yup, all is in order + cpi 'A' ;No, in abort state? + jnz remcm0 ;No, try I-packet again + jmp kermit ;Yes, like Danny Boy, we must die. + ;If we get this far, either the "I" packet + ;was understood or the Server couldn't + ;handle it and we ignored the error. + ;In either case, we can proceed. + + + +remco0: xra a + sta numtry ; reset retries + sta czseen + sta pktnum + lxi h,0 + shld numpkt + shld numrtr ; clear some variables + mvi a,'1' ;Make sure we use + sta curchk ;1-character checksum + lda rdl ;Get packet-length (number of bytes to copy) + ora a ;Anything to copy? + jz remcm1 ;No + sta temp1 ;Yes, save loop counter + lda spsiz ;Get max packet size + sui 5 ;less overhead + sta temp2 ;gives max chars we can send + lxi d,remdat ;Copy from private buffer + lxi h,data ;to packet data area + lda qbchr ;Get eightgh-bit quoting prefix char + mov b,a ;Save it + lda squote ;Get control-char quoting char + mov c,a ;and save it +remc0a: lda temp2 ;Get characters to go in packet + dcr a ;and decrement it + sta temp2 ;... + jm remc0x ;We can't copy any more + ldax d ;Get a packet data character + cpi space ;Is it a control char? + jm remc0b ;Yes, quote it + cmp c ;Is it the control-char prefix? + jz remc0b ;Yes, quote it + lda quot8 ;No, is eighth-bit quoting in effect? + ora a ;... + jz remc0c ;No, just copy the character + ldax d ;Get character again + cmp b ;Is it the eighth-bit quote char? + jnz remc0d ;No, just copy it +remc0b: mov m,c ;Yes, quote the character + inx h ;Increment the dest. pointer + lda temp2 ;Get chars to go + dcr a ;Decrement + sta temp2 ;... + jm remc0x ;Can't copy any more + lda rdl ;Count quote prefix + inr a ;... + sta rdl ;... +remc0c: ldax d ;Get character again + cpi space ;If not a control char, + jp remc0d ;just copy the character, else + adi 40H ;Convert to printing character + ani 7fH ;modulo 128 +remc0d: mov m,a ;Copy the character + inx h ;Increment the pointers + inx d ;... +remc0x: lda temp1 ;Get loop counter + dcr a ;and decrement it + sta temp1 ;... + jnz remc0a ;Copy entire packet data area +; +remcm1: xra a + sta argblk ; set packet no zero + lda rdl ;Number of bytes in packet + sta argblk+1 ;into argument block + lda rcom ;Remote command + call spack ;Send the packet + jmp kermt3 ;Nogo, die! + jmp remco2 ;Try to get an answer + +remco1: call nak0 ;Nak packet +; + +remco2: lda numtry ;Get number of retries + inr a ; update retries + cpi maxtry ;To many retries? + jm remc2a ;No + lxi d,erms28 ;Yes, complain + call prtstr ;... + jmp kermit ;and abort + +remc2a: sta numtry + call rpack ;Get a packet + jmp remco1 ;Couldn't get one. + cpi 'E' ;Error packet? + jnz remc2b ;No + lda rcom ;What kind of packet did we send? + cpi 'G' ;If it wasn't generic, + jnz remc2f ;there is no need to start a new message line + lda remdat ;Packet was generic + cpi 'S' ;Was it a Remote Set? + cz prcrlf ;Yes, start a new line since the screen + ;isn't blank and we would clobber the command- + ;line otherwise +remc2f: call error0 ;Yes, inform the user + jmp kermit ;and abort to main command loop +remc2b: cpi 'S' ;Send-init? + jnz remc2c ;No + call rini2a ;Initialize parameters + lda state ;Get state + cpi 'A' ;If abort, + jz kermit ;Go back to main command loop + mvi a,'X' ;Set state to text-display + sta state ;... + jmp read2 ;Get more packets +remc2c: cpi 'N' ;Nacked packet? + jz remco2 ;Yes, try again + sta state ;Save packet type + call selcon ;Select Console + lxi h,data ;Point to data + lda argblk+1 ;Anything in packet data? + ora a ;... + jz remco6 ;No + push h ;Yes, save pointer + push psw ;and character count + mvi e,'<' ;Type "<<" as in VMSKermit + push d ;... + call outcon ;... + pop d ;... + call outcon ;... + pop psw ;Restore character counter + pop h ;and data pointer +remc2d: ora a ;... + jz remc2e ;No more characters + dcr a ;Decrement loop counter +mov e,m ;Get character + inx h ;Increment pointer + push psw ;Save loop counter + push h ;Save data pointer + call outcon ;Type on Console + pop h ;Restore pointer + pop psw ;Restore loop counter + jmp remc2d ;Type all packet data +remc2e: mvi e,'>' ;Type ">>" as in VMSKermit + push d ;... + call outcon ;... + pop d ;... + call outcon ;... + call prcrlf ;End the line +remco6: lda state ;Get packet type again + cpi 'Y' ;If simple ack, + jz kermit ;Done, else + call ackp ;Acknoledge the packet + call countp ;Count the packet + mvi a,'D' ;Set to data-receive + sta state ;... + jmp read2 ; do the same as read a file, but echo + ; to the screen.. Dont close non-open files. +; +; +;REMCLI - Get command-line for Remote commands +; +remcli: xra a ;Zero accumulated length + sta rcl ;... + mov b,a ;[12]... +; +;[MF][12]Eliminate following code which calls "comnd" in favor of code which +;[MF][12]calls "cmgtch" directly so that characters are sent without +;[MF][12]alteration or inadvertent action ("?" or <esc>). The only thing +;[MF][12]lost is the ability to produce any ASCII character via +;[MF][12]octal numbers prefixed with "\" but this isn't used much in remote +;[MF][12]commands anyway. +; +;remcl0: mvi a,cmtxt ;We get arbitrary text +; call comnd ;from the command-line +; jmp kermt3 ;We couldn't get any. +; ora a ;Anything given? +; jz remcl1 ;No, done +; push b ;Save BC +; mov c,a ;Save length +; lda rcl ;Get accumulated length +; add c ;plus current word length +; adi 1 ;plus a space +; sta rcl ;and save accumulated length +; mvi a,space ;Put in a space separator +; stax d ;... +; inx d ;Increment pointer +; pop b ;Restore BC +; jmp remcl0 ;Get text to end-of-line +;remcl1: lda rcl ;Get accumulated length +; ora a ;Anything typed? +; rz ;No +; dcr a ;Yes, don't count final space +; push psw ;Save count +; dcx d ;Point to final space +; xra a ;Zap it +; stax d ;... +; pop psw ;Restore count +; +;[MF][12]Simplified code follows +; +remcl0: call cmgtch ;[12]Get a character from the user + ani 7fh ;[12]Turn off minus bit + cpi cr ;[12]If end-of-line, + jz remclx ;[12]We're done + cpi lf ;[12]... + jz remclx ;[12]... + stax d ;[12]else store the character + inr b ;[12]and count it + inx d ;[12]Increment character buffer pointer + cpi esc ;[12]is character an <esc>? + jz remcl2 ;[12]Yes + cpi ff ;[12]an <ff>? + jz remcl1 ;[12]Yes, diddle command buffer pointer + cpi '?' ;[12]a "?"? + jnz remcl0 ;[12]No, just get more characters +remcl1: push h ;[12]Protect HL + lhld cmdptr ;[12]get "cmgtch"'s character pointer + inx h ;[12]and reverse the action at "cmgtc4" + ;[12]since we don't need a "confirm" and + ;[12]infinite loops are beaucoup bad news + shld cmdptr ;[12]... + pop h ;[12]Restore HL +remcl2: push psw ;[12]Save the character + xra a ;[12]Zero the action flag so we get input + sta cmaflg ;[12]to end-of-line without special action + pop psw ;[12]Restore the character + jmp remcl0 ;[12]Get more characters +remclx: mov a,b ;[12]Get accumulated text length + sta rcl ;[12]and remember it +; + ret ;Return +; +;Remote set values +; +; REMOTE SET FILE TYPE 300 0 = TEXT, 1 = BINARY +; REMOTE SET FILE NAMES 301 0 = CONVERTED, 1 = LITERAL +; REMOTE SET FILE COLLISION 302 0 = RENAME, 1 = OVERWRITE, +; 2 = BACKUP, 3 = APPEND, +; 4 = DISCARD, 5 = ASK +; REMOTE SET FILE REPLACE 303 0 = PRESERVE, 1 = DEFAULT +; REMOTE SET FILE INCOMPLETE 310 0 = DISCARD, 1 = KEEP +; REMOTE SET INCOMPLETE (same as above) +; REMOTE SET BLOCK-CHECK 400 number (1, 2, or 3) +; REMOTE SET RECEIVE PACKET-LENGTH 401 number (10-9024) +; REMOTE SET RECEIVE TIMEOUT 402 number (any, 0 = no timeout) +; REMOTE SET RETRY 403 number (any, 0 = no limit) +; REMOTE SET SERVER TIMEOUT 404 number (any, 0 = no timeout) +;REMOTE SET FILE BLOCKSIZE 311 number +;REMOTE SET FILE RECORD-LENGTH 312 number +;REMOTE SET FILE RECORD-FORMAT 313 F (fixed), V (variable), etc... +;This is just for the record, to assign these numbers to these commands +;for somebody who needed them. Details to be filled in later. +; +;Remote Set command table +; +rmstab: db 7 ;seven entries + db 16,'BLOCK-CHECK-TYPE$' + dw remsbc ;Remote Set Block Check + db 4,'FILE$' + dw remsfl ;Remote Set File + db 10,'INCOMPLETE$' + dw remsfi ;Remote Set (file) Incomplete + db 7,'RECEIVE$' + dw remsrc ;Remote Set Receive + db 7,'REPLACE$' + dw remsfr ;Remote Set (file) Replace + db 5,'RETRY$' + dw remsry ;Remote Set Retry + db 14,'SERVER-TIMEOUT$' + dw remsst ;Remote Set Server Timeout +; +rmshlp: db cr,lf,'BLOCK-CHECK-TYPE for a remote server' + db cr,lf,'FILE parameters for a remote server' + db cr,lf,'INCOMPLETE file disposition for a remote server' + db cr,lf,'RECEIVE parameters for a remote server' + db cr,lf,'REPLACE file attribute handling for a remote server' + db cr,lf,'RETRY maximum for a remote server' + db cr,lf,'SERVER-TIMEOUT interval for a remote server' + db '$' +; +;Remote Set File tables +; +rsftab: db 8 ;eight entries + db 10,'BLOCK-SIZE$' + dw remsbs ;Remote Set File Block-size command + db 9,'COLLISION$' + dw remsfc ;Remote Set File Collision command + db 10,'INCOMPLETE$' + dw remsfi ;Remote Set File Incomplete command + db 5,'NAMES$' + dw remsfn ;Remote Set File Names command + db 13,'RECORD-FORMAT$' + dw remsrf ;Remote Set File Record-format + db 13,'RECORD-LENGTH$' + dw remsrl ;Remote Set File Record-length + db 7,'REPLACE$' + dw remsfr ;Remote Set File Replace command + db 4,'TYPE$' + dw remsft ;Remote Set File Type command +; +rsfhlp: db cr,lf,'BLOCK-SIZE of files for a remote server' + db cr,lf,'COLLISION action on filename conflicts for a remote' + db ' server' + db cr,lf,'INCOMPLETE file disposition for a remote server' + db cr,lf,'NAMES translation of files for a remote server' + db cr,lf,'RECORD-FORMAT of files for a remote server' + db cr,lf,'RECORD-LENGTH for a remote server' + db cr,lf,'REPLACE file attribute handling for a remote server' + db cr,lf,'TYPE of files for a remote server' + db '$' +; +;Remote Set File Record-format tables +; +rcftab: db 2 ;two entries + db 5,'FIXED$' + db 'F','F' ;Remote Set File Record-format Fixed command + db 8,'VARIABLE$' + db 'V','V' ;Remote Set File Record-format Variable cmd +; +rcfhlp: db cr,lf,'FIXED VARIABLE' + db '$' +; +;Remote Set Receive tables +; +rrctab: db 2 ;two entries + db 13,'PACKET-LENGTH$' + dw remrpl ;Remote Set Receive Packet-length command + db 7,'TIMEOUT$' + dw remsrt ;Remote Set Receive Timeout command +; +rrchlp: db cr,lf,'PACKET-length TIMEOUT' + db '$' +; +;Remote Set File-collision table +; +rfctab: db 6 ;six entries + db 6,'APPEND$' + db '3','3' ;Set collision append + db 3,'ASK$' + db '5','5' ;Set collision ask + db 6,'BACKUP$' + db '2','2' ;Set collision backup + db 7,'DISCARD$' + db '4','4' ;Set collision discard + db 9,'OVERWRITE$' + db '1','1' ;Set collision overwrite + db 6,'RENAME$' + db '0','0' ;Set collision rename +; +rfchlp: db cr,lf,'ASK about existing files on a remote system' + db cr,lf,'APPEND to existing files on a remote system' + db cr,lf,'BACKUP (rename) existing files on a remote system' + db cr,lf,'DISCARD new versions of existing files on a' + db ' remote system' + db cr,lf,'OVERWRITE existing files on a remote system' + db cr,lf,'RENAME new versions of existing files on a' + db ' remote system' + db '$' +; +;Remote Set File-Incomplete tables +; +rfitab: db 2 ;2 entries + db 7,'DISCARD$' + db '0','0' ;Remote Set File Incomplete Discard + db 4,'KEEP$' + db '1','1' ;Remote Set File Incomplete Keep +; +rfihlp: db cr,lf,'DISCARD KEEP' + db '$' +; +;Remote Set File-Names tables +; +rfntab: db 2 ;two entries + db 9,'CONVERTED$' + db '0','0' ;Remote Set File Names Converted + db 7,'LITERAL$' + db '1','1' ;Remote Set File Names Literal +; +rfnhlp: db cr,lf,'CONVERTED LITERAL' + db '$' +; +;Remote Set File Replace tables +; +rfrtab: db 2 ;two entries + db 8,'PRESERVE$' + db '0','0' ;Remote Set File Replace Preserve + db 7,'DEFAULT$' + db '1','1' ;Remote Set File Replace Default +; +rfrhlp: db cr,lf,'PRESERVE DEFAULT' + db '$' +; +;Remote Set File Type tables +; +rfttab: db 2 ;two entries + db 6,'BINARY$' + db '1','1' ;Remote Set File Type Binary + db 4,'TEXT$' + db '0','0' ;Remote Set File Type Text +; +rfthlp: db cr,lf,'BINARY TEXT' + db '$' +; +; Remote Set Block-check +; +remsbc: +IF lasm + lxi h,'40' ;1st 2 chars of "400" +ENDIF ;lasm +IF NOT lasm + lxi h,'04' +ENDIF ;NOT lasm + shld remdat+2 ;Store in correct order + mvi a,'0' ;Put last char of type in buffer + sta remdat+4 ;... + lxi d,blktab ;Point to block-check table + lxi h,blkhlp ;and help table + jmp remsc1 ;Do common code +; +;Remote Set File command +; +remsfl: lxi d,rsftab ;Point to Remote Set File tables + lxi h,rsfhlp ;... +remsf0: call keycmd ;Get user's selection + xchg ;Put dispatch address in HL + pchl ;and obey the user's most fervent desires +; +;Remote Set Receive command +; +remsrc: lxi d,rrctab ;Point to the appropriate tables + lxi h,rrchlp ;... + jmp remsf0 ;and do command +; +;Remote Set Block-size command +; +remsbs: +IF lasm + lxi h,'31' ;1st 2 chars of Set code +ENDIF ;lasm +IF NOT lasm + lxi h,'13' +ENDIF ;NOT lasm + shld remdat+2 ;Store chars in correct order + mvi a,'1' ;Put last char in buffer + sta remdat+4 ;... + jmp remscm ;and do common Remote Set code +; +;Remote Set File-collision command +; +remsfc: +IF lasm + lxi h,'30' ;Put set type code in buffer +ENDIF ;lasm +IF NOT lasm + lxi h,'03' +ENDIF ;NOT lasm + shld remdat+2 ;... + mvi a,'2' ;... + sta remdat+4 ;... + lxi d,rfctab ;Point to tables + lxi h,rfchlp ;... + jmp remsc1 ;and do common code +; +;Remote Set File Incomplete command +; +remsfi: +IF lasm + lxi h,'31' ;Establish command keyword code +ENDIF ;lasm +IF NOT lasm + lxi h,'13' +ENDIF ;NOT lasm + shld remdat+2 ;... + mvi a,'0' ;... + sta remdat+4 ;... + lxi d,rfitab ;Point to tables + lxi h,rfihlp ;... + jmp remsc1 ;and do common code +; +;Remote Set File-Names command +; +remsfn: +IF lasm + lxi h,'30' ;Set command code +ENDIF ;lasm +IF NOT lasm + lxi h,'03' +ENDIF ;NOT lasm + shld remdat+2 ;... + mvi a,'1' ;... + sta remdat+4 ;... + lxi d,rfntab ;Point to the appropriate tables + lxi h,rfnhlp ;... + jmp remsc1 ;and do common code +; +;Remote Set File Record Format command +; +remsrf: +IF lasm + lxi h,'31' ;Set command code +ENDIF ;lasm +IF NOT lasm + lxi h,'13' +ENDIF ;NOT lasm + shld remdat+2 ;... + mvi a,'3' ;... + sta remdat+4 ;... + lxi d,rcftab ;Point to proper tables + lxi h,rcfhlp ;... + jmp remsc1 ;and do common code +; +;Remote Set File Record Length command +; +remsrl: +IF lasm + lxi h,'31' ;Set command code +ENDIF ;lasm +IF NOT lasm + lxi h,'13' +ENDIF ;NOT lasm + shld remdat+2 ;... + mvi a,'2' ;... + sta remdat+4 ;... + jmp remscm ;and do common code +; +;Remote Set File Replace command +; +remsfr: +IF lasm + lxi h,'30' ;Set command code +ENDIF ;lasm +IF NOT lasm + lxi h,'03' +ENDIF ;NOT lasm + shld remdat+2 ;... + mvi a,'3' ;... + sta remdat+4 ;... + lxi d,rfrtab ;Point to tables + lxi h,rfrhlp ;... + jmp remsc1 ;and do common code +; +;Remote Set File Type command +; +remsft: +IF lasm + lxi h,'30' ;Set command code +ENDIF ;lasm +IF NOT lasm + lxi h,'03' +ENDIF ;NOT lasm + shld remdat+2 ;... + mvi a,'0' ;... + sta remdat+4 ;... + lxi d,rfttab ;Point to tables + lxi h,rfthlp ;... + jmp remsc1 ;and go to common code +; +;Remote Set Receive Packet-length command +; +remrpl: +IF lasm + lxi h,'40' ;Set command code +ENDIF ;lasm +IF NOT lasm + lxi h,'04' +ENDIF ;NOT lasm + shld remdat+2 ;... + mvi a,'1' ;... + sta remdat+4 ;... + jmp remscm ;and do common code +; +;Remote Set Receive Timeout command +; +remsrt: +IF lasm + lxi h,'40' ;Set code +ENDIF ;lasm +IF NOT lasm + lxi h,'04' +ENDIF ;NOT lasm + shld remdat+2 ;... + mvi a,'2' ;... + sta remdat+4 ;... + jmp remscm ;and do common code +; +;Remote Set Retry command +; +remsry: +IF lasm + lxi h,'40' ;Set code +ENDIF ;lasm +IF NOT lasm + lxi h,'04' +ENDIF ;NOT lasm + shld remdat+2 ;... + mvi a,'3' ;... + sta remdat+4 ;... + jmp remscm ;Go to common code +; +;Remote Set Server Timeout command +; +remsst: +IF lasm + lxi h,'40' ;Set code +ENDIF ;lasm +IF NOT lasm + lxi h,'04' +ENDIF ;NOT lasm + shld remdat+2 ;... + mvi a,'4' ;... + sta remdat+4 ;... + jmp remscm ;Do common code + + + + + +; Little code to allow some expansion of code without changing +; every futher address, only up to the end of this file. +; TO BE REMOVED FOR RELEASE + +; ORG ($+100H) AND 0FF00H + + +IF lasm + LINK CPSSER +ENDIF ;lasm diff --git a/cpsser.asm b/cpsser.asm new file mode 100644 index 0000000..d49ebe0 --- /dev/null +++ b/cpsser.asm @@ -0,0 +1,44 @@ +; CPSSER.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 +; 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 file contains the (system-independent) routines that implement +; the SERVER part of the KERMIT protocol. +; +; revision history: +; +; +; edit 1: September, 1987. Created CPSSER.ASM from bits from the two CPSPK? +; files. +; The code herein is to allow remote systems to communicate to +; this Kermit running in SERVER mode. Note that not every server +; command will be supported, mind... +; +server: db 'CPSSER.ASM (1) 8-SEP-87$' ; name, edit number, date + + + +; Little code to allow some expansion of code without changing +; every futher address, only up to the end of this file. +; TO BE REMOVED FOR RELEASE! + +; org ($+100h) AND 0FF00H + + +IF lasm + LINK CPSTT +ENDIF;lasm diff --git a/cpstt.asm b/cpstt.asm new file mode 100644 index 0000000..41a30af --- /dev/null +++ b/cpstt.asm @@ -0,0 +1,862 @@ +; CPSTT.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 file contains the code for the TRANSMIT and CONNECT commands, +; which communicate with a host which is not running KERMIT. +; +; revision history: +; +;edit 12, 31-Jan-1991 by MF. Delete call to "inbuf" after "xmit1" in +; the TRANSMIT command. "getfil" initializes various counters so that +; when "in1chr" is first called, "inbuf" will be called immediately +; and will read sectors of the file to be transmitted from disk. +; This, along with a fix to "in1chr" in CPSUTL.ASM, fixes a bug +; discovered by Lance Tagliapietra of the University of Wisconsin at +; Platteville wherein the TRANSMIT command was failing to transmit some +; characters in files over one sector in length. See CPSUTL.ASM, +; edit 29. +; edit 11, 10 September, a987, by OBSchou. Modified TRANSMIT command +; to TRANSMIT <file> <string> +; +; edit 10, 27 August, 1987 by OBSchou. Fixed bugs in Transmit, but I may +; be introducing problems for IBM/CMS or half duplex systems. What +; does this combination do?? +; +; edit 9 30 March, 1987 by OBSchou to replace the TRANSMIT routine. +; Syntax is now TRANSMIT file after a previous +; INPUT <wait time> <string to wait for> +; +; edit 8 19 June, 1986 by OBSchou. Modified the interupt testing routine +; to see if the command was a 'D' (Drop the line), in which case also +; do a 'C', ie disconnect. This is really a little too much of a +; system dependent thing. +; For now, Ill leave it here, and possibly move it later. +; +; edit 7 30 May 1986 OBSchou. Moved xon/xoff control (ie XON/OFF sent to host) +; out to CPSUTL so that ther printer routine can use it too. +; +; edit 6 30 April, 1986 by OBSchou. +; Fixed transmit bug, so as soon as the protocol character is +; received from the host is received then another line is sent. +; added in a comchr (ds 1) to save the character read from the comm +; line in prtchr, and is restored in a on return. +; +; edit 5 7 March, 1986 by OBSchou Loughborough University. +; Need to save the E register before calling outmdm (in CPSSYS.ASM) +; if doing Half duplex. Push/pop DE should sort this problem +; +; edit 4: 13-Jan-85 by Vanya J.Cooper Pima Commun. College Tel: 602-884-6809 +; +;pcc002 28-Dec-84 modules:cp4tt,cp4utl +; Add connect mode <esc>P command to toggle printer on +; and off. Conflicts with "official" recommended commands +; in protocol manual, but I don't think CP/M will ever get +; a PUSH command. +; +;pcc003-pcc005 2-Jan-85 vjc modules:cp4mit,cp4tt,cp4utl +; These edits must all be installed together and change the way +; logging is handled. The log file spec is moved to a separate +; fcb, and not opened until an actual CONNECT command is given. +; This takes care of a NASTY bug that if you used any other file +; command between the LOG and CONNECT, the log file would get +; written over the last file used. This also allows logging to +; be "permanently" enabled until an CLOSE (new command) for all +; CONNECT sessions, like most other kermits do. If a log file +; already exists, it will be appended to. Also add two new +; CONNECT mode commands <esc>Q to suspend logging and <esc>R to +; resume. <esc>R means something else during TRANSMIT, but +; logging is never on then, so there shouldn't be any conflict. +; I also changed the write code, so that it can handle one more +; character after the XOFF is send to stop the host. This allows +; a little "slop" for systems that don't stop immediately (such +; as TOPS10), but it didn't help much. +; +;pcc008 2-Jan-85 vjc modules:cp4def,cp4tt,cp4utl +; Keyboard input during CONNECT mode can get locked out if +; there is enough input from the modem port to keep prtchr +; busy. This can happen for example, if the printer is running +; at the same speed as the modem line, leaving you helpless to +; turn it off or abort the host. Add a fairness count, so that +; at least every prfair characters we look at console input. +; +;pcc012 4-Jan-85 vjc modules:cp4mit,cp4tt,cp4utl +; Use the big buffer for the log file. Move the log file back +; into the common fcb and only save the drive, name, and +; extension between connects. Add new routines to cp4utl to +; create or append to an existing file, and to conditionally +; advance buffers only if in memory. Remove edit pcc003 that +; allows one more character after the xoff, since it didn't +; really work very well and does not fit in well with the way +; the buffer advancing routines are set up. If someone still +; thinks this would be useful, it could be put back in with a +; little more work. +; +; While testing this edit, I also noticed another bug that +; 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. Maybe this should be put on the bug list +; somewhere. +; +; edit 3: July 27, 1984 +; Allow assembly with LASM: to CP4TT is linked by CP4PKT, and links +; to CP4CPM; remove exclamation points so as not to confuse LASM. +; Add Toad Hall TACtrap to TRANSMIT command (TAC intercept character +; is only doubled if it's data; when typed by the user, they're not +; automatically doubled) +; +; edit 2: June 7, 1984 +; formatting and documentation; add module version number; make sure +; console is selected when leaving intchr. +; +; edit 1: May, 1984 +; extracted from CPMBASE.M80 version 3.9; modifications are described +; in the accompanying .UPD file. + +ttver: db 'CPSTT.ASM (12) 31-Jan-1991$' + +; This is the TRANSMIT command. It attempts to send a file, even +; though there is no KERMIT on the other side. +; here from: kermit +; +; [OBS] I have replaced the routine, so that TRANSMIT <filename> <wait string> +; will send a line at a time to the host in a manner similar to MSKERMIT +; +; +xmit: mvi a,cmofi ;Parse an input file spec (non-wild). + lxi d,fcb ;Give the address for the FCB. + call comnd + jmp kermit ;Give up on bad parse. +; + lxi d,stbuff ; where to put the string + mvi a,cmtxt ; get text + call comnd + jmp kermit ; not quite correct... + sta strcnt ; string count returned in a + ana a ; if its zero, make it 1 character (CR) + jnz xmit0 + mvi a,1 + sta strcnt + mvi a,cr + sta stbuff +; +xmit0: call cfmcmd + call getfil ;Open file. + cpi 0FFH ;Succeed? + jnz xmit1 + lxi d,erms15 + call prtstr ;Display error msg. + jmp kermit + +; +; New TRANSMIT routine - transmit a file, line by line, to a remote host +; waiting each time for one or more characters to be returned +; as a remote host prompt. It could be as simple as a CR or LF +; character. Repeat until the complete file has been sent, then +; close the transmitted file, and drop into the connect state so the +; user can tidy up at the host end. +;get the file to send, open it up, and read first sector from disk + +xmit1: lxi d,inms19 ; say we are send a file to the host + call prtstr + + xra a + sta repcnt ; clear the host prompt chars. counter + sta starc ; clear star count +;[MF][12]Delete the following call to "inbuf" as the call to "getfil" +;[MF][12]above will have initialized counters and flags so that when +;[MF][12]"in1chr" is called, "inbuf" will be called immediately and will +;[MF][12]immediately read from disk. Counters and flags will then be +;[MF][12]properly set up to read all characters of the file to be +;[MF][12]transmitted. +; call inbuf ; read one sector from disk +; jmp xmtex ; exit if error + + +xmt10: xra a ; clear retransmit flag and count etc + sta rexbfl ; retransmit flag (1=> retransmit) + sta rexcnt ; character counter + +xmt1: call xmt1ch ; send a character + ani 7fh ; strip any parity + cpi cr ; have we reached the end of the line + jnz xmt1 ; nope, loop around again + +; Now wait for a string back from the host. Compare with STRING buffer +; + xra a ; clear the character count + sta rexcnt +; + call selcon ; sent a line, send a star to console + mvi e,'*' + call outcon + lda starc ; update star count + inr a + sta starc + cpi 60 ; sent 60 stars? + jnz xmt1a ; nope... + xra a + sta starc + call prcrlf +xmt1a: + +xmt3: lda eoflag ; have we hit end of file? + ana a + jnz xmtex ; yup, so quit. + xra a + sta repcnt ; clear the host prompt chars.counter +xmt2: call rd1chl ; read a character from the line + ani 7fh ; set flags + jnz xmt4 ; Not zero => we have a character from host + call ckchr ; see if *WE* have a character from console + push psw ; restore to modem + call selmdm + pop psw + ani 7fh ; stip parity (should not be there) + jnz xmt2a ; if a null, try again + lda strcnt ; if the string length is zero, dont wait. + ana a + jz xmt1 ; so loop back again + jmp xmt4 ; else test for xon/off and incomming string + +xmt2a: cpi cntlc ; do we want to abort? + jz xmtex ; in which case drop through to connect mode + cpi cntlz ; if control z exit back to command loop + jnz xmt2b ; else try for other characters + lxi d,fcb ; close file before exiting to command loop + mvi c,closf + call bdos + jmp kermit + +xmt2b: cpi cr ; a cr => resend last line + jnz xmt2 ; nope, then ignore it + mvi a,1 + sta rexbfl ; else we want to resend the line. + jmp xmt1 + +xmt4: jmp xmt6 ; skit xoff test for now...***************** + + cpi xoff ; xoff from host? + jnz xmt6 +xmt5: call rd1chl ; else see if XOFF comming + ani 7fh + jnz xmt6 ; assume an xoff + call ckchr ; anything at console? + push psw + call selmdm + pop psw + ani 7fh + cpi cntlc ; control-c == abort & play terminal + jz xmtex + ana a ; anything else? + jz xmt5 ;loop again + +xmt6: mov e,a ; save it for a while + lda repcnt ; see if this character matches with one in buffer + lxi h,stbuff ; point to string buffer + add l ; make hl = hl + a + mov l,a + mvi a,0 + adc h + mov h,a ; not using xra, as that clears the Carry flag + mov a,e ; get the character back again + cmp m ; is it = to what we expect? + jnz xmt3 ; no, clear counter and try again + lda repcnt ; yes, then update the pointer, and ... + inr a ; ... see if we have received all ... + sta repcnt ; ... we should have received + mov e,a ; save length into E again + lda strcnt ; get the length to compare + sub e ; if (e) > string length, we have it + jz xmt10 ; so send next line (clear counters etc) + jmp xmt2 ; else wait for a little longer + + +; +; Routine below sends a character to the line. It sends up to a CR, and then +; it waits for a reply. This routine is called from xmt1, so if at +; end of file, return. Then XMT1 will drop through +; to connect. +xmt1ch: ; send a character from the xmtbuf to the line + call selmdm ; just in case it uses it + lda eoflag ; have we hit end of file + ana a ; set flags + jnz xmt1c1 ; no, so dont... + mvi a,cr ; load up a carriage return +xmt1c1: call get1xc ; get the character to send + cpi lf ; dont send line feeds +; jz xmt1c1 + cpi cntlz ; if control z, then we are at end of the file + jz xmtex ; so close the file and drop into telcon + cpi 20h ; control character? + jp xmt11 ; no, so ok + cpi cr ; cr, and tabs ok to send + jz xmt11 + cpi tab + jz xmt11 + jmp xmt1c1 ; else try for another character + +xmt11: call setpar ; else set parity etc + push psw ; we want to keep this for a while + mov e,a ; we need character in e + call outmdm + pop psw ; restore the character we sent + mov e,a ; now, if a TAC is set on.. + lda tacflg + ana a + mov a,e ; (return must have sent character in a) + jz xmt1c2 ; test for xon/off + lda tacchr ;... get the tac character + cmp e ; do we send it again? + jnz xmt1c2 ; test for xon/off + push psw ; save character for return. Already set E... + call outmdm + pop psw + +xmt1c2: ret + +get1xc: ; get a character from the sector or re-transmit buffer read +; into a. Read a new sector if we run out. +; +; First, see if we do a retransmit + lda rexbfl + ana a ; if zero, a genuine line + jz get1x1 +; have to retransmit a line + lxi h,rexbuf + lda rexcnt ; add counter to buffer base + mvi d,0 + mov e,a + dad d + inr a ; update pointer + sta rexcnt + mov a,m ; get next character to send + ret ; and exit + +get1x1: call in1chr ; get a character from the file. + mov c,a ; save it to the retransmit buffer + lda rexcnt + mov e,a + mvi d,0 + lxi h,rexbuf + dad d ; point to next position + inr a + sta rexcnt ; update the character pointer + mov a,c ; restore character to a + mov m,c ; get character to c + ret + + + +; read a character from the line. +rd1chl: + call selmdm ; select the modem + call inpmdm ; get input from the modem + ani 7fh ; strip parity + ; may UPPERCASE-ify if case sensitivity off + ret ; return to caller + +; End of transmit routine. Close input file name, and say we are dropping +; throught to telnet. Note that if eof not found, it is assumed that +; this is the ABORT exit. + +xmtex: + lxi d,fcb ; close the transmitted file + mvi c,closf + call bdos + call selcon ; make sure we are talking to the console + + lda eoflag ; end of file or abort exit? + lxi d,inms22 ; assume eof... + ana a + jz xmtex1 + lxi d,inms29 ; we were wrong, its an abort. +xmtex1: jmp telnt1 ; and drop through to connect mode + ; telnet does the printing + + + +; +; telnet - the CONNECT command. +; here from: kermit +; telnt1 - entry to connect mode from TRANSMIT command +; here from: xend + +telnet: call cfmcmd + lxi d,infms7 ;Output start of message +; enter here from TRANSMIT command. +telnt1: call prtstr + call escpr ;Print the escape char. + lxi d,infms8 ;Output some more of the message + call prtstr + call escpr ;Print the escape char again. + lxi d,inms8a ;Print the remainder of the message + call prtstr + call syscon ;do system-dependent stuff + lda logflg ;[pcc005] Want a log? + ora a ;[pcc005] + cnz logopn ;[pcc005] Open if so + +chrlup: call prtchr ;See if char at port (send to console). + call conchr ;See if char at console (send to port). + jmp kermit ;requested to end session - go to command loop. + jmp chrlup ;Go do it again. +; +; +; prtchr - copy characters from comm line to console +; returns: nonskip, console selected. +; called by: xnext, rexmit, telnet +; + +prtchr: call selmdm ; select modem port + call inpmdm ; try to get a character from it + push psw ; restore to console + call selcon ; select console + pop psw ; restore the (possible character) read + ora a ; test character + jnz prtch0 ; if non-zero, process it. + sta prtcnt ;[pcc008] zero out prt fairness count + ret ; return. + +prtch0: ani 7FH ; drop parity bit. + sta comchr ;[6] save it in case we need it again + lda vtflg ;[9] get the vt52 emulation flag + cpi vtdefe ;[9] are we doing external emulation? + lda comchr ;[9] collect character again + jz extern ;[9] jup, go do it. + + ana a ; set flags. it may be a null + jz prtchr ; ignore null (filler) + cpi del ; ignore delete, too + jz prtchr + cpi xon ;Is it an XON? + jz prtxon ;yes + cpi xoff ;Is it an XOFF? + jz prtxof ;yes + mov e,a ;Set the char aside. + lda vtflg ;Get the VT52 emulation flag. + cpi vtdefv ;Is the flag set for VT52 (ie 1) + ;0 = none + ;1 = VT52 + ;2 = external + ;3 = dumb (traps non printing chars) + ;0ffh not possible by local code (Will change) + jnz prtch1 ;If not, don't do this stuff. + lda escflg ;Get the escape flag. + ora a ;Are we working on an escape sequence? + jz prtch2 ;If not, continue. + call vt52 ;If so, work on it some more + jmp prtchr ;try for more characters. + +prtch2: mov a,e ;normal text. + cpi esc ;Is the char an escape? + jnz prtch1 ;If not skip on. + mvi a,1 + sta escflg ;Set the escape flag: escape seen. + jmp prtchr ;Get another char... + +prtch1: cpi vtdefe ; are we doing external emulation? + jnz prtch3 ; assume we continue on + lxi h,extern+1 ; get address of external emulator + mov a,h ; se if address = 0 (not implemented) + ora l + jz prtch3 ; not external, assume we just carry on + pchl ; go do external emulation. RET back to caller + +prtch3: cpi vtdefd ; are we trapping all non printing characters? + jnz prtch4 ; nope, something else + lda comchr ; Dumb terminal. Lets test the character + cpi cr ; cr then ok + jz prtch4 ; its ok + cpi lf ; lf then ok + jz prtch4 + cpi tab + jz prtch4 ; assume tabs are expanded + cpi space ; if less than 20H ignore it + rm ; return if a control character + +prtch4: call sysflt ; ok to print this character (in E)? + ora a + jz prtchr ; no, skip it. + lda logflg ;Get the log flag. + cpi 81H ;[pcc003] Are we logging + cz logit ;[pcc003] Do so if needed + call selcon ; select console + lda prnflg ;Get Print parallel flag + ora a + cnz outlpt ; output to printer if flag set + call outcon ; output to console. + lxi h,prtcnt ;[pcc008] point to prt fairness count + inr m ;[pcc008] bump + mov a,m ;[pcc008] get it in a + cpi prfair+1 ;[pcc008] time to be fair? + jm prtchr ;[pcc008] no, go around again. + mvi m,0 ;[pcc008] reset count + lda comchr ;[6] restore that character read from comm line + ret ;[pcc008] and return + +; I don't think we want to print xon/xoff - this should be +; flow control only across the link between us and the host. +; (besides, IBM host xon's don't make sense to most micros) +; remember xon/xoff state in xofflg (zero = xon, non-zero = xoff) +prtxon: xra a ;Yes, reset XOFF flag +prtxof: sta xofflg + jmp prtchr ; look for another character +;;[pcc005] Log file routines + +;[pcc005] +; logopn - open the log file +; Open the log file and append to it if it already exists +; or create one if not. + +logopn: + mvi a,ctrlz ;[9] ignore control-z in log files + cmp e ;[9] well, was it? + rz ;[9] yes, to ignore it. + lxi h,lognam ;[pcc012] copy name + lxi d,fcb ;[pcc012] to fcb + lxi b,12 ;[pcc012] 12 bytes + call mover ;[pcc012] copy it + call appfil ;[pcc012] open file for appending + jmp logerr ;[pcc012] error + lxi h,logflg ;[pcc005] point to log flag + mvi a,80H ;[pcc005] file open flag + ora m ;[pcc005] or in contents of logflg + mov m,a ;[pcc005] and store back + lxi d,inms28 ;[pcc005] assume logging is on + cpi 81H ;[pcc005] check + jz prtstr ;[pcc005] print msg if true + lxi d,inms27 ;[pcc005] no, must be suspended + jmp prtstr ;[pcc005] print and return + +; +; logit - output character in E to log file. +; we assume the host recognizes xon/xoff. (we probably shouldn't) +; modem port is selected. +; preserves de +; called by: prtchr + +logit: lxi h,chrcnt ;[pcc012] point to buffer count + dcr m ;[pcc012] and decrement + jp logit1 ;[pcc012] continue if ok + push d ;[pcc012] save de + call outadv ;[pcc012] advance buffer if in memory + call logwrt ;[pcc012] sigh, time to write to disk + pop d ;[pcc012] restore de + lda logflg ;[pcc012] get logging flag + ora a ;[pcc012] Did we quit because of an error + rz ;[pcc012] return now if so +logit1: lhld bufpnt ;[pcc012] get buffer pointer + mov m,e ;Store the char. + inx h + shld bufpnt + ret ;[pcc012] and return + +;[pcc012] +; logwrt - write to log file with XON/XOFF since it may take a while. + +logwrt: call sndxoff ;[7] send and xoff to host + call outbuf ;[pcc012] output the buffer and advance + call logerr ;[pcc005] quit if error + call sndxon ;[send an xon to host + ret ;[pcc012] + +;[pcc005] +; logcls - Close the log file and reset the flag + +logcls: lxi d,infms6 ;[pcc005] Tell user we are closing file. + call prtstr ;[pcc005] + call clofil ;[pcc012] and do it + jmp logerr ;[pcc005] jump if error + lxi h,logflg ;[pcc005] point to flag + mov a,m ;[pcc005] get it + ani 7FH ;[pcc005] clear the open bit + mov m,a ;[pcc005] and store back + ret ;[pcc005] + +;[pcc005] +; logerr - here on a variety of logging errors +; just close the file and disable logging +; called from logopn,logptr,logcls + +logerr: lxi d,erms22 ;[pcc005] Error message + call prtstr ;[pcc005] print it + mvi c,closf ;[pcc005] Close the file. + lxi d,fcb ;[pcc012] + call bdos ;[pcc005] + xra a ;[pcc005] clear logflg + sta logflg ;[pcc005] so don't try again + ret ;[pcc005] +; +; +; VT52 emulation. +; called by: prtchr +; A/ contents of escflg (guaranteed non-zero) +; E/ current character +; modem is selected. +; +vt52: cpi 1 ; first character after escape? + jnz vt52y ; no, must be doing cursor positioning. +; +; E contains the character that followed the escape. +; valid characters are: +; A - cursor up +; B - cursor down +; C - cursor right +; D - cursor left +; F - enter graphics mode (hard to do on a non-vt52) +; G - exit graphics mode +; H - home +; I - reverse linefeed +; J - erase to end of screen +; K - erase to end of line +; Y - cursor positioning leadin +; Z - identify terminal as VT52 +; [ - enter hold-screen mode (not supported) +; \ - exit hold-screen mode (not supported) +; > - enter alternate-keypad mode? (not supported) +; = - exit alternate-keypad mode? (not supported) +; +; Invalid sequences are handled as the VT52 does - the escape and +; the following character are swallowed, never to be seen again. +; For <esc>E, the translation table may contain just '$' (no action), +; or may be used as clear-and-home, as in the Heath/Zenith H19. +; + mov a,e ; get the second character of the sequence. + cpi 'Y' ; if cursor lead-in handle it. + jnz vt52a ; if not, go on. + mvi a,2 ; state = 2: row follows. + sta escflg ; update the flag. + ret ; back for another character + +vt52a: cpi 'Z' ; VT52 ID query? + jz vt52id ; yes. claim to be one. + cpi 'A' ;Less than an 'A'? + jm vtig ;Yes - ignore. + cpi 'K'+1 ;Greater than 'K'? + jp vtig ;Yes - ignore. + sui 'A' ;Else make into index. + rlc ;Multiply by four. + rlc ;(Shift left twice.) + lhld pttab ;Load base addr of table. + mov e,a ;Move a into de pair. + mvi d,00H ;Zero out high byte. + dad d ;Double add index+offset. + xchg ;Exchange de with hl. + call selcon ; select console + call prtstr ;and syscall. +vtig: ;Ignore escape sequence. + xra a ;Reset the ol' escape flag. + sta escflg + ret ;Return home. + +; here for <esc>Z. Tell the host we're a VT52. (Sure we are...) +vt52id: mvi a,esc ; response is escape... + call setpar ; (need correct parity) + mov e,a + call outmdm ; (console already selected) + mvi a,'/' ; ... slash ... + call setpar ; (with parity) + mov e,a + call outmdm + mvi a,'K' ; ... K. + call setpar + mov e,a + call outmdm + jmp vtig ; clear escape-sequence flag and return. + +; here when escflg isn't 0 or 1 - processing cursor positioning sequence. +vt52y: cpi 2 ; looking for row? (y-coordinate) + jnz vt52x ; no, must be column. + mov a,e ; yes. get coordinate + sui (' '-1) ; convert from ascii (1 = top line) + sta vtyval ; store for later + mvi a,3 ; advance to next state (x coord) + sta escflg ; store it + ret ; try for another character + +; here when escflag isn't 0, 1, or 2 - it must be 3. (right?) +; E holds the last character of the cursor positioning sequence. +vt52x: xra a ; end of escape sequence, reset state. + sta escflg + mov a,e ; get column (' ' is left margin) + sui (' '-1) ; make left margin be one + mov c,a ; stash column in c + lda vtyval ; get row number + mov b,a ; in b + call selcon ; select console + call csrpos ; call system-dependent cursor positioner + ret ; all through. +; +; +; conchr - copy character from console to comm line, processing +; (kermit's) escape sequences. +; Enter and exit with console selected. +; nonskip return: transparent mode terminated. +; skip return: still in transparent mode. +; called by: rexmit, telnet + +conchr: call inpcon ;Try to get a character from the console + ani 07FH ;Keep only 7 bits + jz rskp ;Null means nothing there. + mov e,a ;Move the char for comparison. + sta lstchr ;Save it + lda escchr ;Get the escape char. + cmp e ;Is it an escape char? + jz intchr ;If so go process it. + call selmdm ; select the modem + mov a,e ;Get the char. + call setpar ;Set parity (if any). + mov e,a ;Restore it. + push d ; need to save e in case we are half dplx [5] + call outmdm ;Output the char to the port. + pop d ; Just in case we are half dplx [5] + call selcon ; reselect console + lda ecoflg ;Get the echo flag. + ora a ;Is it turned on? + jz rskp ;If not we're done here. + mov a,e ;Get the char. + ani 7FH ;Turn off the parity bit. + mov e,a + call outcon ; echo the character. + jmp rskp ; use skip return +; +; transparent escape character has been typed. dispatch on second +; character. (console is still selected) +; here from: conchr + +intchr: call inpcon ; get another character from the console + ora a ; zero means no character available yet. + jz intchr ; If so, loop until we get a char. + mov b,a ;Save the actual char. + cpi ctrlc ;is it Control-C? + jz contc ;yes + ani 137O ;Convert to upper case. + cpi 'C' ;Is it close? + jnz intch0 ;If not proceed. +contc: lxi d,infms9 ;Say we are back. + call prtstr + call syscls ; call system-dependent close routine + lda logflg ;Get the log flag. + ora a ;[pcc005] Check if open + cm logcls ;[pcc005] Close if needed + ret + +;Here if not a 'C' or '^C' + +intch0: cpi 'S' ;Is it status? + jnz inch01 ;If not, proceed. + call stat01 ;Print out the status stuff. + call prcrlf ;[pcc011] add a crlf + jmp rskp ;return from conchr + +inch01: +inch03: mov a,b ;Get the char. + cpi '?' ;Is it a help request? + jnz intch1 ;If not, go to the next check. +inch3a: lda logflg ;[pcc003] Logging flag + ora a ;[pcc003] see if active + jp inch04 ;[pcc005] jump if no file open + lxi d,loghlp ;[pcc003] yes, tell about R AND Q + call prtstr ;[pcc003] +inch04: lxi d,inthlp ;If so, get the address of the help message. + call prtstr + call sysinh ; print system-dependent help message + lxi d,inhlp1 ; Tell about doubling the escape character + call prtstr + call escpr ;Print escape character + lxi d,inhlp2 ;Print the rest + call prtstr + jmp intchr ;Get another char. + +intch1: mov a,b ;Get the character. + cpi '0' ;Is it '0', to send a null? + jnz intch3 ;No. + xra a ;Yes, send an ASCII zero. + call setpar ; with the correct parity + mov e,a + call selmdm ; (to the modem...) + call outmdm + call selcon ; return with console selected + jmp rskp + +intch3: lda escchr ;Get the escape char. + cmp b ;Is it the escape char? + jnz intch4 ;[pcc002] jump if not + mov a,b ;Get the char. + call setpar + mov e,a ;Restore it. + call selmdm + call outmdm ;Output it. + call selcon ;We promised console would be selected... + jmp rskp ;Return, we are done here. +intch4: mov a,b ;[pcc002] get it again + ani 137o ;[pcc002] in upper case + cpi 'P' ;[pcc002] toggle printer? + jnz intch5 ;[pcc003] nope + lda prnflg ;[pcc002] get printer flag + xri 01h ;[pcc002] complement it + sta prnflg ;[pcc002] and put back + jmp rskp ;[pcc002] +intch5: lda logflg ;[pcc003] get log flag + ora a ;[pcc003] See if open + jp intch7 ;[pcc003] no, skip R and Q + mov a,b ;[pcc003] get back chr + ani 137o ;[pcc003] make upper case + cpi 'R' ;[pcc003] Is it R + jnz intch6 ;[pcc003] Jump if not + mvi a,81H ;[pcc003] set flag for logging + sta logflg ;[pcc003] put it back + lxi d,inms28 ;[pcc003] message + call prtstr ;[pcc003] + jmp rskp ;[pcc003] done +intch6: cpi 'Q' ;[pcc003] Quit logging? + jnz intch7 ;[pcc003] no + mvi a,82H ;[pcc003] flag for open, but suspended + sta logflg ;[pcc003] store away + lxi d,inms27 ;[pcc003] keep them informed + call prtstr ;[pcc003] + jmp rskp ;[pcc003] +intch7: ;[pcc003] + +intchz: mov a,b ; not recognized. get saved copy back. + push psw ;[8] save as we will want to test for 'D' + call sysint ; interpret system-dependent sequences + jmp intchy ; done. [10] Now see if D. If so, do a C. + pop psw ;[10] tidy stack + mvi e,'G'-100O ;Otherwise send a beep. + call outcon ; to the console. + jmp rskp + +intchy: pop psw ;[10] adjust stack + ani 5fh ;[10] strip parity, make it upper case + cpi 'D' ;[10] was it a D? + jz contc ;[10] yup, so to the equivalent of an escape-C + jmp rskp +; +; Little code to allow some expansion of code without changing +; every futher address, only up to the end of this file. +; TO BE REMOVED FOR RELEASE! + +; org ($+100h) AND 0FF00H +IF lasm + LINK CPSCPM +ENDIF;lasm diff --git a/cpsutl.asm b/cpsutl.asm new file mode 100644 index 0000000..3081232 --- /dev/null +++ b/cpsutl.asm @@ -0,0 +1,1227 @@ +; CPSUTL.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. +; +; Utility routines, pure and impure data. +; +; revision history: +; +;edit 31, 21-Mar-1991 by MF. Implement edit 30 without checking takflg after +; "r1tch1" as we are **always** TAKEing from a file if we get to that +; point in the code. Makes for simplicity. +;edit 30, 27-Feb-1991 by MF. When TAKEing characters from a TAKE-file, +; view semicolons as normal characters (not command separators). +; This will allow such commands as REMOTE DELETE *.*;* to work +; properly from TAKE-files without having to revert to old code in +; cpsrem.asm at "remcl0" to decode Remote command arguments. TAKE-files +; ought not (in my opinion) to have multiple commands per line anyway. +;edit 29, 30-Jan-1991 by MF. Fix bug in IN1CHR which decremented "chrcnt" +; once too often after a call to INBUF (which predecrements it +; already). This, along with a fix in CPSTT.ASM, fixes a bug in the +; TRANSMIT command wherein certain characters in the file were not +; being transmitted. This bug was reported to me by Lance Tagliapietra +; of the University of Wisconsin at Platteville, WI (Email: +; <TAGLANCE@ucs.UWPLATT.EDU>). +; (he suggested not predecrementing "chrcnt" in INBUF" but this +; breaks code in routine "GTCHR" from CPSPK1.ASM so it's better +; to modify IN1CHR in this module and XMIT in CPSTT.ASM). +;edit 28, 30-Nov-1990 by MF. Modify routine "p20ln" to use "pausit" routine +; rather than explicitly checking for Console input to eliminate +; redundant code. Also fix spelling in "p20ln"'s comments. +;edit 27, 9-Sep-90 by MF. Put RET in routine PAUSIT per CPKERM.BWR. +; edit 26, September, 1987. Added pause-it routine to wait for a user keysroke. +; +; edit 25, August 19, 1987 by OBSchou. Fixed a few bugs here and there. +; +; edit 24, April 8, 1987 by OBSchou. Added routine to return one character +; from a section of several sectors worth of file. This routine needed +; for TRANSMIT. +; +; edit 23, March 11, 1986 by OBSchou for Richard Russell +; Bug in the TAKE code, such that a new sector was read in after 256 +; bytes, and not the CPM value. A jnz is now jp in the test to see if +; the file buffer has bben exhausted. Many thanks for finding this +; bug. I have never used TAKE files more than 128 bytes long. +; +; edit 22, January 28, 1986 by OBSchou. +; split off the data areas from CPSUTL to CPSDAT.ASM (All in line +; with keeping individual files relatively small) +; +; edit 21 August, 1986 by OBSchou. Sorted a few more bugs in printer buffer +; etc. Have yet to try this with a real printer The code, apart from +; actually printing works OK. +; +; edit 26 20 August, 1986 by OBSchou for Godfrey Nix: +; edit 8-Aug-86 by Godfrey N. Nix [gnn] Nottingham University +; Added two extra bytes for storage of the send and receive +; start-of-packet characters. Used by CP4PKT, and altered +; by SET option in CP4MIT. Also added message strings for +; use by show routines. Added remote filename buffer and length byte. +; +; edit 11: June 20, 1986 by OBSchou. Added multi-fcbs for the DIR command +; together with some bug clearing and new routines. Had to move +; the overlay to 5000h as we ran out of space... +; +; edit 10: June 16, 1986 OBSchou. Added a pseudo clock and check for printer +; ready whenever one enters BDOS... This may slow things down a little +; but adds in (hopefully) pseudo background printing... +; +; edit 9 30-May-86 OBSchou. Added XON/XOFF routines here for the world +; at large to use. Also added two new entries in the overlay tables. +; One to give the address of the family of machines using the overlay, +; the other to the routine for giving printer status. +; +; edit 8: 27-May-86 OBSchou. Added code to check BDOS calls for info from +; the console. If so, and the take flag (takflg) is set then we +; substitute our own characters. Simple, a little tatty... +; Also added bits for SET CASE-SENSITIVE and SET FLOW=CONTROL, and +; removed the XMIT rubbish. This is a prelude to better TRANSMIT +; +; edit 7: 22 April, 1986 by OBSchou Lohghborough University +; Prlude to more changee, this time make overlay address to 4000h +; May revert back to ($+0ffh) AND 0ff00h as address for overlay. +; This gives us space to make quite a few modifications to the system +; dependent part without much fear of having to change this overlay +; address. Should also fix the Osborne problem of having to have io +; routines ii memory above 16k. I know I should not be introducing +; such system dependent rot here, but it wont be too difficult to fill +; memory to 4000h. +; +; edit 6: February 6, 1985 +; Added a storage location for the port value (PORT, just below +; SPEED) which is used by the port status routine, and moved the +; printer copy flag (PRNFLG:) into the communications area so +; that the machine dependant overlay can toggle it. [Hal Hostetler] +; Added ffussy flag for filename checking. Generate the version +; string from 'verno', which is set in CP4KER, because CP4KER has the +; list of modules and their edit numbers. [Charles Carvalho] +; +; edit 5: 13-Jan-85 by Vanya J.Cooper Pima Commun. College Tel: 602-884-6809 +; +;pcc002 28-Dec-84 modules:cp4tt,cp4utl +; Add connect mode <esc>P command to toggle printer on +; and off. Conflicts with "official" recommended commands +; in protocol manual, but I don't think CP/M will ever get +; a PUSH command. +; +;pcc003-pcc005 2-Jan-85 vjc modules:cp4mit,cp4tt,cp4utl +; These edits must all be installed together and change the way +; logging is handled. The log file spec is moved to a separate +; fcb, and not opened until an actual CONNECT command is given. +; This takes care of a NASTY bug that if you used any other file +; command between the LOG and CONNECT, the log file would get +; written over the last file used. This also allows logging to +; be "permanently" enabled until an CLOSE (new command) for all +; CONNECT sessions, like most other kermits do. If a log file +; already exists, it will be appended to. Also add two new +; CONNECT mode commands <esc>Q to suspend logging and <esc>R to +; resume. <esc>R means something else during TRANSMIT, but +; logging is never on then, so there shouldn't be any conflict. +; I also changed the write code, so that it can handle one more +; character after the XOFF is send to stop the host. This allows +; a little "slop" for systems that don't stop immediately (such +; as TOPS10), but it didn't help much. +; +;pcc006 2-jan-85 VJC modules:cp4cmd,cp4utl +; Problems with "?" in filespecs. On reparse, may cause action +; flag to be reset at wrong point, requiring multiple <CR>'s +; to terminate the line or other weird stuff. Also need to +; check flag and complain if wild-cards illegal. +; +;pcc008 2-Jan-85 vjc modules:cp4def,cp4tt,cp4utl +; Keyboard input during CONNECT mode can get locked out if +; there is enough input from the modem port to keep prtchr +; busy. This can happen for example, if the printer is running +; at the same speed as the modem line, leaving you helpless to +; turn it off or abort the host. Add a fairness count, so that +; at least every prfair characters we look at console input. +; +;pcc012 4-Jan-85 vjc modules:cp4mit,cp4tt,cp4utl +; Use the big buffer for the log file. Move the log file back +; into the common fcb and only save the drive, name, and +; extension between connects. Add new routines to cp4utl to +; create or append to an existing file, and to conditionally +; advance buffers only if in memory. Remove edit pcc003 that +; allows one more character after the xoff, since it didn't +; really work very well and does not fit in well with the way +; the buffer advancing routines are set up. If someone still +; thinks this would be useful, it could be put back in with a +; little more work. +; +; While testing this edit, I also noticed another bug that +; 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. Maybe this should be put on the bug list +; somewhere. +; +;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 4: September 9, 1984 +; Move command tables and associated help text to CP4MIT. Add +; makfil/clofil routines and modify outbuf to write files in big +; chunks. Update Kermit's version to 4.03. +; +; edit 3: August 21, 1984 +; Make inbuf read files in big chunks to minimize disk start/stop +; delays. Buffer size and address is specified by system-dependent +; overlay. +; +; edit 2: August 3, 1984 +; move "mover" to CP4SYS to allow use of Z80 block move instruction. +; +; edit 1: July 27, 1984 +; extracted from CP4MIT.M80 edit 2, as part of LASM support. This is +; the last file linked for the system-independent code. +; +utlver: db 'CPSUTL.ASM (31) 21-Mar-1991$' + +; Set the parity for a character in A. +; called by: spack, rexmit, logit, vt52, conchr, intchr + +setpar: push h ;Save HL. + push b + lxi h,parity + mov c,m ;Get the parity routine. + mvi b,0 + lxi h,parjmp ;Get the first address. + dad b + pchl + +parjmp: jmp even + jmp mark + jmp none + jmp odd + jmp spacep + +none: jmp parret ;Don't touch the parity bit. + +even: ani 7FH ;Strip parity. + jpe parret ;Already even, leave it. + ori 80H ;Make it even parity. + jmp parret + +mark: ori 80H ;Turn on the parity bit. + jmp parret + +odd: ani 7FH ;Strip parity. + jpo parret ;Already odd, leave it. + ori 80H ;Make it odd parity. + jmp parret + +spacep: ani 7FH ;Turn off the parity bit. + jmp parret + +parret: pop b + pop h ;Restore HL. + ret +; +; Print the escape char. +; called by: stat01, telnet, intchr + +escpr: lda escchr ;Get the escape char. +escpr1: cpi ' ' ;Is it a control char? + jp escpr2 + push psw ; save the character + lxi d,inms10 ;Output "Control-". + call prtstr + pop psw ; restore the character + ori 100O ;De-controlify. +escpr2: mvi c,conout ;Output the char + mov e,a + call bdos + ret + +; fetch keyword; if unsuccessful, return to command level. +; called by: kermit, setcom + +keycmd: mvi a,cmkey + call comnd + jmp keycm2 ;no match + ret + +keycm2: lxi d,ermes1 ;"Unrecognized Command" + call prtstr + jmp kermit ;Do it again. + +; request confirmation; if unsuccessful, return to command level +; called by: bye, exit, help, log, setcom, show, status, send, +; finish, logout, telnet + +cfmcmd: mvi a,cmcfm + call comnd + jmp kermt3 ;"Not confirmed" + ret +; + +; This routine prints the number in HL on the screen in decimal. +; Uses all ACs. +; called by: cp4sys, read, send, updrtr, dir, user + +nout: mvi a,'0' ; fill tempx with zeros + call filltmp + + lxi b,-10 ;Get some useful constants. +nout1: lxi d,-1 + +nout2: dad b ;Subtract as many 10s as possible. + inx d ;Count them. + jc nout2 ;If some left keep going. + push h ;save remainder - 10 + xchg ;Swap the remainder and the quotient. + mov a,h ;Get the number of 10s found. + ora l ;check for quotient non zero + cnz nout1 ;If non zero, recurse. + pop h ;Get the remainder - 10 + mov a,l ;in a + adi '0'+10 ;Make the number printable and add the 10 back + call shiftmp ; cycle temp registers + sta temp1 ; and save digit + mov e,a ;Output the digit. + lda nquiet ; are we to be quiet? + ana a + rnz ; yup, so return here rather than frm bdos + mvi c,conout + jmp bdos + +; prcrlf - print a CR/LF. (Saves no registers.) [Toad Hall] +; prtstr - print string pointed to by DE (now in overlay section.. see prtstx) +; called by: lots of places. +prcrlf: lxi d,crlf ;Point to the CR/LF + jmp prtstr ; Use the one in the overlay + +; prtstx is funtionally the same as prtstr in the overaly but is here as +; we may need a print a string routine in case the overlay is +; either incorrect version or simply not present. +prtstx: ; PRTSTR moved to overlay, but we do need the + ; same function for writing the sign-on + ; message and error message if the overlay + ;is not present. Thence prtstx + mvi c,prstr ; output string + jmp bdos ;a CALL followed by a RET becomes a JMP + + +; Jumping to this location is like retskp. It assumes the instruction +; after the call is a jmp addr. +; here from: many places. +rskp: pop h ;Get the return address. + inx h ;Increment by three. + inx h + inx h + pchl + +; Jumping here is the same as a ret. 'jmp r' is used after routines +; that have skip returns, where the non-skip instruction must be 3 bytes. +; here from: many places. +r: ret + +; Pause-it routine. Informs the user to press any key to continue +; and then waits for a key input. Called by the any routine +; with more than, say, 20 lines of output. + +pausit: lxi d,anymes ; ask user to press any key to continue + call prtstr +pausi1: call ckcon ; see if a key typed + ana a + jz pausi1 ; loop until a key has been pressed. + + ret + +; +; Open a file for reading (with inbuf). The filename is already +; in fcb; upon return, the end of file flag is cleared and chrcnt +; is set to zero, so inbuf will be called to get a buffer when we +; next attempt to get a character. +; called by: sinit, seof + +getfil: xra a + sta chrcnt ;Buffer is empty. + sta seccnt ;No sectors buffered. + sta eoflag ;Not the end of file. + sta endsts ;No EOF/error pending. + sta fcb+0CH ;Zero the extent. + sta fcb+0EH ;Must be zero for MAKEF or OPENF. + sta fcb+20H ;Zero the current record. + mvi c,openf ;Open the file. + lxi d,fcb + call bdos + ret + +; Get next sector. If necessary, read some more from disk. +; preserves bc, de, hl +; returns nonskip if EOF or error; +; returns skip with chrcnt and bufpnt updated if success. +; called by: gtchr, get1xc (from xmt/transmit) + +inbuf: lda eoflag ;Have we reached the end? + ora a + rnz ;Return if so. + push b + push d + push h +inbuf1: lda seccnt ; Do we have any sectors left? + ora a + jz inbuf3 ; If not, go get some more. +inbuf2: lhld nxtbuf ; Yes. Get address of next sector + shld bufpnt ; Update current buffer pointer + lxi b,bufsiz ; Get number of bytes in sector + dad b ; Update HL to point to next sector + shld nxtbuf ; Save for next time + dcr a ; Decrement count of buffered sectors + sta seccnt ; Put it back + mvi a,bufsiz-1 ; Number of bytes in buffer (pre-decremented) + sta chrcnt ; Store for our caller + pop h + pop d + pop b + jmp rskp ; Return success + +; We don't have any sectors buffered. If we've already hit an error or +; EOF, return that status to the user. + +inbuf3: lda endsts ; Check status from previous read + ora a + jz inbuf4 ; It was OK. Get some more sectors. + sta eoflag ; End of file or error. Set the flag. + xra a + sta chrcnt ; Say no characters in buffer. + pop h + pop d + pop b + ret ; Return failure + +; Read sectors until we fill the buffer or get an error or EOF, then return +; the first buffer to the user. (seccnt is zero) + +inbuf4: lhld bufadr ; Get address of big buffer + shld nxtbuf ; Store as next buffer address to give user +inbuf5: shld bufpnt ; Store as next buffer address to read into + xchg ; Move buffer address to DE + mvi c,setdma ; Tell CP/M where to put the data + call bdos ; ... + mvi c,readf ; Read a record. + lxi d,fcb + call bdos + sta endsts ; Save ending status + ora a ; 00H => read O.K + jnz inbuf6 ; EOF/error: stop reading. + lxi h,seccnt ; Success. Get addr of sector count + inr m ; Bump sector count by one + lda bufsec ; Get max number of sectors in buffer + cmp m ; Are we there yet? + jz inbuf7 ; Yes, can't read any more. + lhld bufpnt ; No, try for another. Get buffer address, + lxi d,bufsiz ; and size of sector, + dad d ; giving next buffer address in HL + jmp inbuf5 ; Go read another sector. + +; We hit EOF or got an error. Put the DMA address back where it belongs, +; then go see if we have any sectors (before the one that got the error) +; to return to the caller. Nxtbuf points to the first good sector, if +; any; seccnt contains the count of good sectors. + +inbuf6: call rstdma + jmp inbuf1 ; Go see if we have some data to return + +; We've filled the big buffer. Reset the DMA address, then go return a +; sector to the caller. nxtbuf points to the beginning of the buffer; +; seccnt contains the number of sectors successfully read (except that +; if we've read 256 sectors, seccnt contains zero, so we can't just go +; to inbuf1). + +inbuf7: call rstdma ;[pcc012] + lda seccnt ; Get sector count again. + jmp inbuf2 ; Return a sector. + +; IN1CHR - get a single character from the file. Taken code from old +; TRANSMIT routine. +in1chr: + lda eoflag ;EOF encountered? + ora a + rnz ; Yes, finish. + lxi d,cmdbuf ; Use comnd buffer as line buffer. + lhld bufpnt ; Get current buffer pointer. + lda chrcnt ; Get current byte count + mov b,a ; in B +in1ch1: dcr b ; Assume there's a character there + jp in1ch2 ; If there was, proceed. + call inbuf ; There wasn't. Try for another buffer. + jmp in1che ; End of file. + lhld bufpnt ; Got another buffer. Get new pointer in HL + lda chrcnt ; and new byte count + mov b,a ; in B +;[MF]The modification below was made 30-Jan-1991 per report from +;[MF]Lance Tagliapietra from the University of Wisconsin at Platteville +;[MF]The following instruction should not be executed as the character counter +;[MF]has already been decremented by INBUF. +; dcr b ; we are reading in a character, so less one +in1ch2: mov a,b ; save new count + sta chrcnt + mov a,m ; Get a character from disk buffer. + inx h + shld bufpnt ; save new pointer + ani 7FH ; Mask 7 bits. + jz in1ch1 ; Skip nulls. + ret ; character in a + + +in1che: mvi a,0ffh ; dubious about this one... + sta eoflag + ret ; set end of file flag...????? + +;;[pcc012] +; appfil - Create or append to an existing file. File name is in FCB. +; Non-skip return if could not be done. Skip return with file +; open and bufpnt pointing to end of file. +; called by logopn +appfil: xra a ;[pcc012] zero out stuff for open + sta fcb+0CH ;[pcc012] extent + sta fcb+0EH ;[pcc012] Must be zero for MAKEF or OPENF. + sta fcb+20H ;[pcc012] Zero the current record. + mvi c,openf ;[pcc012] Try to open the file + lxi d,fcb ;[pcc012] + call bdos ;[pcc012] + cpi 0FFH ;[pcc012] Did we find it? + jz makfi1 ;[pcc012] If not, go create it + mvi c,cflsz ;[pcc012] Compute the file size + lxi d,fcb ;[pcc012] + call bdos ;[pcc012] + lhld fcb+21H ;[pcc012] random record pointer + mov a,h ;[pcc012] See if zero length file + ora l ;[pcc012] + jz makfi2 ;[pcc012] set up pointers if null file + dcx h ;[pcc012] backup to last record written + shld fcb+21H ;[pcc012] store rec ptr back + lhld bufadr ;[pcc012] get buffer address + xchg ;[pcc012] to DE + mvi c,setdma ;[pcc012] set dma address + call bdos ;[pcc012] for read + mvi c,rrand ;[pcc012] read the last block + lxi d,fcb ;[pcc012] + call bdos ;[pcc012] + ora a ;[pcc012] check results + jnz rstdma ;[pcc012] reset dma and return if error + lhld bufadr ;[pcc012] get address again + lxi d,bufsiz ;[pcc012] and and size + mvi a,'Z'-40H ;[pcc012] control-Z for comparison +appcz: cmp m ;[pcc012] Is this the EOF? + jz appxit ;[pcc012] Jump if yes + inx h ;[pcc012] no, bump + dcr e ;[pcc012] and grind + jnz appcz ;[pcc012] until find or buffer empty +appxit: shld bufpnt ;[pcc012] store buffer pointer + dad d ;[pcc012] compute next buffer adr + shld nxtbuf ;[pcc012] and store + mov a,e ;[pcc012] updated chr count + sta chrcnt ;[pcc012] + xra a ;[pcc012] reset sector count + sta seccnt ;[pcc012] + call rstdma ;[pcc012] reset normal dma + jmp rskp ;[pcc012] and give good return + +; Create a file, deleting any previous version. The filename is in +; fcb. +; Returns nonskip if file could not be created. +; If successful, takes skip return with bufpnt and chrcnt initialized +; for output; buffers should be output via outbuf. +; called by: gofil +makfil: mvi c,delf ; delete the file if it exists. + lxi d,fcb + call bdos + xra a + sta fcb+0CH ; zero the extent. + sta fcb+0EH ; must be zero for MAKEF or OPENF. + sta fcb+20H ; zero the current record. +;[pcc012] here from appfil above if file does not exist +makfi1: mvi c,makef ;[pcc012] now create it. + lxi d,fcb + call bdos + cpi 0FFH ; is the disk full? + rz ; take error return if so. +; success. set up pointers and counters for multisector buffering. +;[pcc012] also here from appfil if found zero length file +makfi2: lhld bufadr ;[pcc012] find beginning of buffer space. + shld bufpnt ; make it current buffer. + lxi d,bufsiz ; get sector size. + dad d ; find beginning of next buffer. + shld nxtbuf ; store for later. + mov a,e ; store buffer size + sta chrcnt ; for caller. + xra a + sta seccnt ; no sectors stored yet. + jmp rskp ; take success return. + +;[pcc012] +; outadv - conditionally advance output buffer if disk write not needed. +; preserves BC +; skip return with with next output buffer set up +; non-skip return if memory buffer full and must write to disk. +; called by:logit + +outadv: push b ;[pcc012] save BC as advertised + lxi h,seccnt ;[pcc012] point to sectors buffered + inr m ;[pcc012] count this one + lda bufsec ;[pcc012] how many we can hold + cmp m ;[pcc012] check if full + jnz outbf2 ;[pcc012] continue if not + dcr m ;[pcc012] full, un-advance sector count + pop b ;[pcc012] restore bc + ret ;[pcc012] and give non-skip return + +; get a fresh output buffer, flushing big buffer if necessary. +; returns nonskip if disk full. +; if successful, returns skip with bufpnt and chrcnt updated. Note +; that chrcnt holds one less than the buffer size. +; preserves BC. +; called by: ptchr,logwrt + +outbuf: push b + lxi h,seccnt ; count another buffered sector + inr m ; ... + lda bufsec ; get number of sectors we can hold + cmp m ; full? + jnz outbf2 ; if not, set up pointers and return + call outmbf ; flush the big buffer + jmp outbf9 ; disk error. +;[pcc012] also here from outadv to advance buffer +outbf2: lhld nxtbuf ; get pointer to fresh buffer + shld bufpnt ; store for caller + lxi d,bufsiz ; advance our pointer to next buffer + dad d + shld nxtbuf + mvi a,bufsiz-1 ; get buffer size (pre-decremented) + sta chrcnt ; store for caller + pop b + jmp rskp ; return success. + +outbf9: pop b ; clean up stack + ret ; and take error return. + +; flush incore output buffers. +; returns nonskip if disk full. +; if successful, returns skip with nxtbuf reset to start of buffer and +; seccnt zero. +; destroys all ac's. +; called by: outbuf, clofil. + +outmbf: lhld bufadr ; get start of buffer + shld nxtbuf ; store for next fill cycle + shld bufpnt ; store for empty loop +outmb2: lhld bufpnt ; get address of current sector + xchg ; into DE + lxi h,bufsiz ; advance HL to next sector + dad d ; ... + shld bufpnt ; and store for later + mvi c,setdma + call bdos ; point CP/M at current sector + lxi d,fcb + mvi c,writef + call bdos ; output the sector + ora a ; test for error (A non-zero) + jnz rstdma ;[pcc012] reset dma and take nonskip return if so + lxi h,seccnt + dcr m ; count down buffered sectors + jnz outmb2 ; loop if more saved + call rstdma ;[pcc012] restore normal dma + jmp rskp ; return success. + +; output current buffer, flush incore buffers, and close output file. +; returns nonskip if disk full; skip if successful. +; called by: rdata + +clofil: + lda chrcnt ; get the number of chars left in the buffer. + cpi bufsiz ; Virgin buffer? + jz clofl3 ; yes, don't output it. + lhld bufpnt ; get the buffer pointer. +clofl1: dcr a ; lower the count. + jm clofl2 ; if full then stop. + mvi m,'Z'-100O ; put in a ^Z for EOF. + inx h ; point to the next space. + jmp clofl1 + +clofl2: call outbuf ; output the last buffer. + jmp r ; give up if the disk is full. +clofl3: lda seccnt ; any sectors buffered in memory? + ora a + jz clofl4 ; if not, don't try to flush. + call outmbf ; flush buffers + jmp r ; disk full. +clofl4: mvi c,closf ; close up the file. + lxi d,fcb + call bdos + jmp rskp ; return success. + + +; Reset DMA address to the default buffer +; called from inbuf,appfil,outmbf +rstdma: lxi d,buff ;[pcc012] + mvi c,setdma ;[pcc012] + jmp bdos ;[pcc012] + +; [8] Intercept BDOS calls to check for console input +; This leads to simple trapping for input from disk rather than from the +; keyboard, alowing commands to be stored in a TAKE file. +; Printer is tested for readiness, and the second fuzzy clock is updated. +bdos: ;call print ; print a character to the printer if needed + ;call clock ; update the clock + push psw ; we will need this register + lda takflg ; are we taking from a + ana a ; file or from command line + jz notake ; no, so do usual BDOS stuff + mov a,c ; get bdos function + cpi conin ; is it console in? + jz bd1in ; get a single character + cpi dconio ; direct console in or out? + jz bd1io ; test further for inpu or output + cpi rdstr ; read the console buffer? + jz bdcbuf ; then do it + cpi consta ; get the console status? + jz bdcst ; anything left in buffer? +notake: pop psw ; else we have a kosher BDOS call + jmp 0005h ; Absolute address = BDOS entry point +; +bd1in: ; get a single character from take file + pop psw ; restore stack + call r1tchr ; read a single take character + ret ; and return. We dont expand tabs, + ; check for xon/off or backspaces. + ;Make sure the take file is error free? +; +bd1io: ;get or put a single character from/to console + mov a,e ; get e. If 0ffh then input else output + inr a ; if 0 then input + jnz notake ; its for output, so let notake restore stack + pop psw ; otherwise we do it + call r1tchr ; read a single take character + ret ; and return from out BDOS +; +bdcbuf: ; read a line of edited (?) input from the console + pop psw ; restore stack + inx d ; point to nc +bdosc1: call r1tchr ; get a character + cpi cr ; if a cr then return + jz nomore + cpi lf ; ignore line feeds + jz bdosc1 ; so get another character + push psw ; we will want it later + mvi h,0 + ldax d ; get nc, the no of characters in buffer + mov l,a ; now use as index from de+2 + mvi h,0 + inx d ; de is now de + 2 + dad d + pop psw ; Told you we will want this + mov m,a + dcx d ; point again to nc + xchg ; make hl point to memory + inr m ; update pointer nc + xchg ; restore it + jmp bdosc1 +nomore: dcx d ; restore de to point to buffer + ret + +bdcst: ; get the console status. Returns a 00 if at eof + pop psw + push h ; now save de, hl for return + push d ; + lxi d,takdma ; make a point to next byte... + lhld takptr ; pointer from dma address. There will always + dad d ; be at least one byte, as the buffer is + mov a,m ; ... + pop d ; filled only if a read empties it. + pop h ; restore hl, de + cpi cntlz ; end of file? + mvi a,0ffh ; say there is + rnz ; if it is not a cntl z + jmp closet ; otherwise, close take file etc + +r1tchr: ; read a single character from the take file or command line + push h + push d ; save in case of return + lda takflg ; see if character is to come from file or line + ani 1 ; if bit zero set, from take file + jz r1lchr ; get character from the command line + lxi d,takdma + lhld takptr ; get next data byte + dad d + mov a,m + lhld takptr ; cos it's destroyed with dad + inx h + shld takptr ; update pointer + call p1tchr ; print it (so the user sees it) + push psw ; save the read data for a while + mov a,l ; if l = 0 then read another sector + ana a + jp r1tch1 ;[23] was jnz. jp => 128 byte sectors + call rnsect ;read next sector +r1tch1: pop psw ; now, is this a cntl-z.. in whic case + pop d ; also these... + pop h + cpi lf ; skip if a line feed + jz r1tchr ; +;[MF][31][30]Following lines commented out so semicolons are not considered +;[MF][31][30]command separators and thus are considered part of the command +;[MF][31][30]so commands like REMOTE DELETE *.*;* work correctly. +; cpi semico ; see if its a semicolon +; jnz r1tch2 ; no, ignore it +; mvi a,cr ; else say its a cr (in case of command lines) +r1tch2: cpi cntlz ; end of file?? + rnz + + +c1tchr: call closet ; close file etc, then + mvi a,cr ; fake a carriage return chr + ; ( => clears kermit comnd line) +c1tch1: ret ; and hope that editing etc not required. + +r1lchr: ; read a single character from the command line + lxi d,cbuff ; point to buffer + lda cbptr ; get pointer for next character + mov l,a + lda cbuff ; get total number of characters there + cmp l ; ... less current character + jp r1lch1 ; if positive, we have more characters + lda takflg ; no more, so reset command line bit (bit 4) + ani 0efh + sta takflg + mvi a,cntlz ; fudge an end of file + push psw ; save for common exit (r1tch1) + jmp r1tch1 +; +r1lch1: mov a,l ; get count back again + mvi h,0 + dad d ; get offset to character + inr a + sta cbptr + mov a,m ; get next character + cpi semico ; if a semicolon, make it a carriage return + jnz r1lch2 + mvi a,cr +r1lch2: call p1tchr ; send a copy to the console + push psw ; save it for r1tch1 + jmp r1tch1 ; common exit + + +; rnsect - read the next take sector from disk to the take dma address +; if there is no more then close the file too +rnsect: push b + push d + push h ; save in case we need these later + mvi c,setdma + lxi d,takdma ; set a next read from disk + call bdos ; recursive... + mvi c,readf + lxi d,takfcb + call bdos + ana a + cnz closet ; if returned value not zero, assume eof + lxi h,0 + shld takptr ; pointer restored + call rstdma ; reset the dma address for fussy routines (this one) + pop h + pop d + pop b + ret + +; closet - close the take file and set the take flag to 0 (ie no takes) +; +closet: lda takflg ; reset the take file bit (bit 0) + ani 0feh + sta takflg ; close the take file, and restore the flag + mvi c,closf + lxi d,takfcb + call bdos + call rstdma ; in case we did not do it above, reset dma + ret + +; +; clock - is a 32 bit counter incremented every BDOS call. It serves as a +; timer of sorts and allows a background clock to tick away.. +clock: push psw ; we need flags and hl + push h + lhld clkbit ; get the counter + inx h ; + shld clkbit + mov a,h + ora l ; do we need to update the next lot of clock bits? + jnz clockx + lhld clkbit+2 ; if carry up the top 16 bits + inx h + shld clkbit+2 +clockx: pop h + pop psw + ret + +; p1tchr - print a character in accumulator directly to the console +; bypassing the bdos trap above. + +p1tchr: cpi lf ; if a lf ignore it + jz p1tchx + cpi cr ; ditto carriage returns + jz p1tchx + cpi cntlz ; control z + jz p1tchx ; then dont write it out + push psw ; we do not want to loose it, do we? + push b + push d + push h ; 'cos you never know what bdos does... + mov e,a + mvi c,conout ; direct console io + call 5 ; absolute address as we skip the trap + pop h + pop d + pop b ; ... and we need some of these regs. + pop psw ; +p1tchx: ret ; and return + + + +; outprn - This routine sends charactes to the printer if the latter is ready, +; or to a buffer if the printer is not ready. If the buffer is nearly +; full, an XOFF is sent to the host, asking it to be quiet. The buffer +; is emptied by a series of calls in the connect state only. +; If the buffer is made nearly empty, then an XON is sent to the host. +; +outprn: mov a,e ; get the character to send back to a + sta prntmp ; we need all registers. + jmp outprx ; -testing-testing-testing- avoid buffer +; +outp0: call tstfree ; see how many spaces free + cpi 2 ; (free spaces in a on return) + jp outp1 ; enough free spaces, so keep going + call print ; else see if we can print summat + jmp outp0 ; and try again +; +outp1: cpi 4 ; common test - if three or less then send xoff + cm sndxoff +outpr2: mov a,b ; inc ptr and check for wrap around + call wrapt + mov b,a ; input pointer to b + sta prnbuf+1 ; save the new pointer away + lxi h,prnbuf+2 ; point to first real data entry in buffer + call inchl ; add offset in a to hl + lda prntmp ; get th character to save away + mov m,a ; save the data away + ret + +; outprx - send character in a to the printer. (We have checked to see if +; the printer is ready) +; called by outprn, print +outprx: mov e,a ; character has to be in e register + call outlpt ; send it to printer + ret ; assume we print it + +; TSTFREE - see how many free spacse there are in the buffer +; - returns with free space in a, ip pointer in b, op pointer in c +szecyc equ 127 ; 128 bytes in buffer (less for debugging) +; +tstfree: + lda prnbuf ; get output pointer + mov c,a ;.. to c + lda prnbuf+1 ; and input pointer ... + mov b,a ; ... to b +; +; +; Now comes the tricky bit. We must establish whether there is less than +; three characters left in the buffer. There are two conditions to test for +; 1) the input pointer is a higher value than the output pointer +; 2) the input pointer has been wrapped round and is less than the output pointer +; ie +; |-------|-------|---------------------------------------------| +; Buffer |o/p ptr|i/p ptr| Buffer proper filling ---> | +; |-------|-------|------|-------------|-----------|------------| +; i/p2 o/p i/p1 +; +; If ip = ip1 then if +; (size of buffer - ip ptr + op ptr) < 3 send xoff +; If ip = ip2 then if +; (op ptr - input ptr ) < 3 send xoff +; +; First decide whice one applies + + mov a,b ; get ip ptr + sub c ; see if op ptr > ip ptr (case 2) + jm outp2 ; yup, so do case two + mvi a,szecyc ; else do buffer - ip + op + sub b + add c + jmp outpx ; do common test +outp2: mov a,c ; get op pointer + sub b ; less input pointer +outpx: ret ; with free space in a +; +; +; +; print - get a character from the buffer and print it if the printer +; is ready for it. If the buffer clears more than 3 spare characters +; and an xoff has been sent, then send an xon again. +print: push h ; save for rainy days + push d + push b + push psw ; .. as we may need flags etc.... + lda initflg ; First check if the system has initialised + ana a + jz printx ; If system not set up then skip +; nop +; nop +; nop ; debugging only... + call ckprtr ; check to see if printer is ready... + ana a ; not zero => ok + jz printx ; else skipit. +; nop +; nop +; nop ; skip the jump for debugging + lxi h,prnbuf + mov a,m ; get input pointer + inx h ; test against output pointer + cmp m ; if = then buffer empty + jz printx ; so quit + dcx h ;pointer to output pointer + call wrapt ; check for wrap around + sta prnbuf ; save new pointer + inx h + inx h ; + call inchl ; add output pointer to hl + mov c,m ; get byte + lda hosths ; have we told host to be quiet? + cpi xoff ; if = xoff then we have + jnz print1 ; nope, so just print it.. + push b ; save the character to print + call tstfree ; see how many free bytes in buffer + pop b + cpi 4 ; 3 characters left? + jz printx + push b + call sndxon ; send an xon to host and wake it up. + pop b +print1: mov a,c ; we are gonna print a character, so ... + call outprx ; get it to a (as required by outprx) and print it +printx: + pop psw + pop b + pop d + pop h ; restore regs. + ret + +; +; Utilities for the cyclical buffer. Returns a 0ffh if printer ready, +; else 0h. Called by outprn, print + +ckprtr: + call lptstat ; no registers saved +; mvi a,0 ; FOR DEBUGGING PURPOSES +; nop + ret +; + +inchl: push psw ; we do maths through this register + add l + mov l,a + mvi a,0 + adc h + mov h,a + pop psw ; hl = a + hl + ret + +; wrapt - checks the offset in a with the limits of the buffer. +; returns next address or if wrap around then 0 (start of buffer) +wrapt: push b + inr a + mov b,a ; save new a into b for now + mvi a,szecyc ; test for size of buffer + sub b + mov a,b + pop b ; restore bc regs again + rnz + xra a ; if wrap around, then reset pointer + ret ; return with next address pointer to in a + +; sndxoff - send an xoff to the host and save the xoff character in hosths +; saves all regs. is called by logwrt, outprn +sndxoff: + push psw + push b + push d + push h ; some calling routines may be sensitive... + lda floctl ; are we doing flow control? + ana a + jz sndxf ; no, so dont bother. + mvi a,xoff ;^S to stop the host while we write the buffer. + sta hosths ; save it so we know we have sent it + call setpar ; set correct parity... + mov e,a + call outmdm ; output it. + lxi d,ofsnt ; say we have sent an xoff + call prtstr +sndxf: pop h + pop d + pop b + pop psw ; some routines touchy + ret +ofsnt: db cr,lf,'[XOFF sent to host]',cr,lf,'$' + +; sndxon - send an xon to the host and clear the hosths flag. saves everything +; called by logwrt, print +sndxon: push psw + push b + push d + push h + lda floctl ; are we doing flow control? + ana a + jz sndxn + xra a + sta hosths ; no xoff to hos any more + mvi a,xon ;^Q to restart the host + call setpar ; set appropriate parity + mov e,a + call outmdm ; send it. + lxi d,onsnt + call prtstr ; say xon sent to host... +sndxn: pop h + pop d + pop b + pop psw + ret ; shame we dont do a pushall/popall subroutine... +onsnt: db cr,lf,'[XON sent to host]',cr,lf,'$' +; +; Routines to clear (or rather fill) TEMPnnn space with the data in A +; and to shift it all along one (filltmp an shiftmp respectively) +filltmp: + push b + push d + push h ; save all + lxi h,temp1 + mvi b,10 ; ten locations to fill +fillp: mov m,a + inx h + dcr b ; loop til all done + jnz fillp + pop h + pop d + pop b ; restore all + ret + +shiftmp: + push psw ; save all again + push b + push d + push h + lxi d,temp9 + lxi h,temp10 + mvi b,9 ; shift nine times +shiftl: ldax d ; from tempx + mov m,a ; to tempx+1 + dcx d + dcx h ; mover does not work as that increments + dcr b + jnz shiftl + pop h + pop d + pop b + pop psw + ret ; else all done + +; getun - get the user number to temp1 (lsd) and temp2 (msd) +; +getun: mvi a,0ffh ; tell nout to be quiet + sta nquiet + mvi c,usrcod + mvi e,0ffh ; get current user from bdos + call bdos + mov l,a ; put into hl + mvi h,0 + call nout ; decimalise it (decimalise???) + xra a + sta nquiet ; let nout print again + ret + +; ckcon - Do a direct console IO (read) to see if there is any input +; returns with a=0 (no input) or character (input received) +; Assume that all regs may be destroy. +ckcon: mvi e,0ffh ; direct console input + mvi c,dconio + call bdos + ret ; and return with wahtever returned in a + + + +; +; subbc - Subtract the unsigned number in bc from the unsigned number +; in HL with the answer in HL. Flags altered, all +; other registers left intact. +subbc: sta temp1 ; hl = hl - bc.. we need the accumulator + mov a,l + sub c + mov l,a + mov a,h + sbb b + mov h,a + lda temp1 ; restore loop counter but not flags + ret + +; P20LN - Routine to print a string at (DE) and count the number of +; line feeds. Pause after 20 lines printed. +p20ln: xra a ; clear the line counter + sta lincnt +p20ln1: ldax d ; get character to print + inx d + cpi '$' ; if a dollar we have done + rz + push d + push psw ; save pointer and character to print + mov e,a + call outcon ; send character + pop psw + pop d ; restore pointers etc + cpi lf ; was that last character a line feed? + jnz p20ln1 ; no, so carry on + lda lincnt ; yup, so update counter + inr a + sta lincnt + cpi 20 ; 20 lines printed? + jnz p20ln1 ; not yet + push d ; we need DE +; lxi d,anymes ; pause a while [MF]removed +; call prtstr ; write the message [MF] +;p20ln2: call ckcon ; wait for any input [MF] +; ana a ;[MF] +; jz p20ln2 ;[MF] + call pausit ;[MF] pause a while + pop d + jmp p20ln ; and continue + + +; Little code to allow some expansion of code without changing +; every futher address, only up to the end of this file. +; TO BE REMOVED FOR RELEASE! + +; org ($+100h) AND 0FF00H + +; link to the data area (was part of CPSUTL.ASM) + +IF lasm + LINK CPSDAT +ENDIF ;lasm diff --git a/cpswld.asm b/cpswld.asm new file mode 100644 index 0000000..8be6558 --- /dev/null +++ b/cpswld.asm @@ -0,0 +1,222 @@ +; CPSWLD.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 +; 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. +; +; Multi-file access subroutine. Allows processing of multiple files +; (i.e., *.ASM) from disk. This routine builds the proper name in the +; FCB each time it is called. This command would be used in such pro- +; grams such as modem transfer, tape save, etc. in which you want to +; process single or multiple files. +; Note that it will fail if more than 256 entries match the wildcard. +; +; revision history: +; edit 4: June 20, 1986, by OBSchou. Added stuff at top and tail of routine +; to support multiple FCBs. If the routine get to mfn01 (Search for next) +; then the next file found gets its fcb added to the buffer. Once no +; more files have been found, the mfflg3 flag is set non-zero. +; The first thing to test on entry is whether a disk access +; is needed. Either way, the routine should return the next file name +; in the fcb, or return with the carry flag set if there are no more +; files to do. Once there is a carry flag set for the return, all +; temporary flags are reset. Get all that? +; +; edit 3: July 27, 1984 +; support LASM: remove exclamation points, link to CP4CMD. +; +; edit 2: June 7, 1984 (CJC) +; formatting and documentation; add module version string; redo movfcb, +; in preparation for moving DMA buffer (later...). +; +; edit 1: May, 1984 (CJC) +; extracted from CPMBASE.M80 version 3.9; modifications are described +; in the accompanying .UPD file. +; +wldver: db 'CPSWLD.ASM (4) 20-Jun-86$' + +; The FCB will be set up with the next name, ready to do normal +; processing (OPEN, READ, etc.) when routine is called. +; +; Carry is set if no more names can be found +; +; MFFLG1 is count/switch [0 for first time thru, pos for all others] +; MFFLG2 is counted down for each successive GETNEXT file call +; MFFLG3 is set to the last remaining FCBs buffered once Search for next +; file fails with files in the buffer. +; +; Technique used is to repeat SFIRST/SNEXT sequence N+1 times for each +; successive call, till sequence fails. CP/M does NOT allow disk-handling +; between SFIRST and SNEXT. +; called by: send, seof, dir + +mfname: ora a ; clear carry + push b ;Save registers + push d + push h + jmp mfnam0 ; skip over the next bit (which is entered from elsewhere) + +;[4] Get the FCB counter and see if we have any fcbs already. +mfnam1: lxi h,fcb0 + shld xfcbptr ; reset the pointer if we are to return an FCB + +mfnam0: lda fcbcnt + ana a ; if none, then we may have to get some from disk + jz mfn00 ; see later on + lhld xfcbptr ; we have some, so give the next one to the user + lxi d,fcb ; move from (hl) to (de) for length bc + lxi b,12 + call mover + xra a + sta fcbext ; clear fcb extents and such + sta fcbrno ; like record number + lhld xfcbptr ; point to next fcb + lxi d,fcblen + dad d ; yup + shld xfcbptr + lda fcbcnt + dcr a + sta fcbcnt ; decrease the number of fcbs we have + xra a ; clear carry + jmp mffix1 ; and exit as if were all done + +mfn00: lda mfflg3 ; no more FCBs for the user, any more on disk? + ana a + jnz mffix2 ; no, then set the carry flag to say so. + lxi h,fcb0 ; now reset the fcb pointers and counter + shld xfcbptr + xra a + sta fcbcnt +;[4] end of this addition. See below as well. + + + mvi c,setdma ;Init DMA addr, FCB + lxi d,80H + call bdos + xra a ;A = 0 + sta fcbext ;clear extension + lda mfflg1 ;find out if "second" call in row + ora a + jnz mfn01 ;Were here before + sta mfflg2 + lxi h,fcb + lxi d,mfreq + lxi b,12 + call mover ;.from FCB to MFREQ + mvi c,SFIRST ;Search first + lxi d,fcb + call bdos + jmp mfn02 ;and check results + +mfn01: dcr a + sta mfflg2 ;store down-counter + lxi h,mfreq ;SFIRST REQ name + lxi d,fcb + lxi b,12 + call mover ;.from MFREQ to FCB + mvi c,sfirst ;Search first old one,we got it before + lxi d,fcb + call bdos ;no error's expected -we got that before +mfn01a: + mvi c,snext ;Search next + call bdos +mfn02: push psw + lda mfflg2 ;get "repeat file counter" + ora a + jz mfn02a ;if zero, check if SNEXT had ERROR + dcr a ;count down + sta mfflg2 ;store back + pop psw ;no error-check, we got it before + jmp mfn01a ;next SNEXT + +mfn02a: pop psw + ora a + jm mffi2a ;No (more) found + call movfcb ;move data to fcb + lda mfreq ;the original disk-designator + sta fcb ;back into fcb + lda mfflg1 ;get file-flag + inr a ;increment + sta mfflg1 ;and store for next go-around + mvi a,0 ;Setup FCB + sta fcbext ;clean up FCB for OPEN etc + sta fcbrno + lhld xfcbptr ;[4] like here + xchg + lxi h,fcb ;[4] from fcb space + lxi b,12 + call mover + lhld xfcbptr ;[4] now lets update the pointers + lxi d,fcblen + dad d + shld xfcbptr ;[4] new pointer + lda fcbcnt ;[4] now the fcb counter + inr a + sta fcbcnt + cpi maxfcb ;[4] any more spare space? + jp mfnam1 ;[4] nope, so get first fcb and return + lxi d,fcb ; else restore the file to serach for + lxi h,mfreq + lxi b,12 ; copy the original fcb to fcb + call mover + jmp mfn01a ; and look for next match. + +mffix1: pop h ;restore registers + pop d + pop b + ret ;and return + +mffi2a: + sta mfflg3 ;[4] no more FCBs from disks to be had, but + lda fcbcnt ;[4]we have some in the buffer, havet we? + ana a + jnz mfnam1 ;[4] yes, so all's ok. Get an fcb and return, + +mffix2: xra a + sta mfflg3 ;[4] clear the new flag (=no more fcbs at all) + sta mfflg2 ;[4] may as well do the others, as we're not comming again + sta mfflg1 ;[4] + stc ;set carry + jmp mffix1 ;return with CARRY set + +; copy directory entry to FCB +; called with A/ entry number in directory (0-3) +; directory block in DMA buffer (buff) + +movfcb: add a + add a + add a + add a + add a ;* 32 + mov c,a ; copy offset to bc + mvi b,0 ; (high byte is zero) + lxi h,buff ; get start of disk buffer + dad b ; calculate start of directory entry + lxi d,fcb + lxi b,12 + call mover + ret + +; Data storage for MFNAME (multi-file access) +mfreq: DS 12 ;Requested name +mfflg1: DB 0 ;First time thru flag for MFNAME +mfflg2: DB 0 ;Down counter for MFNAME +mfflg3: DB 0 ;[4] Non zero if no more FCBs from disk, + ;[4] but we still have some in buffer +; +IF lasm + LINK CPSCMD +ENDIF;lasm + diff --git a/cpva65.hex b/cpva65.hex new file mode 100644 index 0000000..342443c --- /dev/null +++ b/cpva65.hex @@ -0,0 +1,65 @@ +:10700000AC0006009972B672C32773C33773C347C7 +:1070100073C35173C32873C33173C32973C35B73C1 +:10702000C35973C30000C30000C39273C38873C302 +:107030008273C39873C3F871C3D471C3C871C3BCDE +:1070400071C3C271C3DD71C3E671C3EF71C3AC70AC +:10705000C3DB72C3DC72C3DD72C3DE72C3FB72C3F7 +:107060001F73C32573C32673C32673C32771C36AF3 +:1070700073C34F71C32572C31472C2730000000042 +:10708000000000000010011DFFFFFFFF00000001D5 +:107090000000000650500805000000000D0D2323DD +:0770A00031004080000101F6 +:1070AC00CDE0700E07CD050032DF700E0CCD050063 +:1070BC007D32DE70113372CD1472119E73CD147249 +:1070CC00CD117221EE7322A3703E4032A570CDD04B +:0270DC0072C977 +:1070E0002A01001103001922087111030019220B53 +:1070F0007111030019220E7111030019221171116F +:107100001E0019221371C9C30000C30000C3000090 +:10711000C30000C300000E14064605C21A710DC25A +:1071200018713DC21671C9D511AC73CD1472D1CD91 +:1071300014721E5BCD3173119E73CD1472114A729D +:10714000CD14723A8D70B7C8118272CD1472C93ADB +:10715000DE70FE30FA86713A5C00B7CA62713DC3D8 +:1071600067710E19CD05005F0E2ECD05000603AF29 +:107170000E032183002B7E1F770DC2757105C26F30 +:10718000715E2356EBC90E1BCD0500EB2AA77023B9 +:10719000010000D51A1E0817DA9C7103572B7DB425 +:1071A000CAAD717A1DC29771D113C39371D1696051 +:1071B0003AAA70D603C8293DC2B671C9011404C3E6 +:1071C0006A73011405C36A73010C06CD6A7311EA70 +:1071D00073C31472010107CD6A73C3CE7101010834 +:1071E000CD6A73C3CE71010809CD6A73C3CE710134 +:1071F000080BCD6A73C3CE713A8D70B7CA057201A0 +:10720000010DC30872010109CD6A7311E673C3143D +:1072100072113072E5D5C50E09CD0500C1D1E1C9A5 +:10722000E1232323E97E1223130B78B1C22572C90F +:107230000D0A24636F6E6669677572656420666FF8 +:10724000722024207769746820245D0D0A0D0A4E8F +:10725000756D626572206F66207061636B65747313 +:107260003A0D0A4E756D626572206F662072657404 +:10727000726965733A0D0A46696C65206E616D65C9 +:107280003A240D0A0D0A0D0A527061636B3A0D0A19 +:107290000D0A537061636B3A244350585357542E70 +:1072A00041534D20283130292020372D4A616E2D41 +:1072B0003139393120244350584150502E41534DDB +:1072C00020283229202032322D6A756C2D3837243F +:1072D0003E0332ACE03E1532ACE0C9C9C9C911E584 +:1072E00072CD1472C90D0A4220205472616E736D02 +:1072F0006974206120425245414B24E65FFE42CA38 +:107300000573C320723AACE0E602CA05733E15F677 +:107310006032ACE03E19CD16713E1532ACE0C97B4F +:10732000C97BC97BC9C9C9C9C90E061EFFCD0500E5 +:10733000C90E06CD0500C9E521ACE07EE602CA3BD8 +:107340007321ADE073E1C93AACE0E601C83AADE0C3 +:10735000C9CD4773B7C25173C9AFC9D5CD2373A780 +:10736000CA68730E05CD0500D1C9C511BF73CD1410 +:1073700072E17CC61F5FE5CD3173E17DC61F5FC33F +:10738000317311BC73C314721E20CD31731E08C338 +:10739000317311B873C3147211B473C31472417092 +:1073A000706C652049492043502F4D241E1B590DF8 +:1073B0000A2020241E1B59240D1B54240808241BBA +:1073C0003D240B2400000A240000062400002400B1 +:1073D00000002400000024000000240000001E24FF +:0E73E00000000B2400001B5924001B54240045 +:0000000000 diff --git a/cpvacc.hex b/cpvacc.hex new file mode 100644 index 0000000..579b59e --- /dev/null +++ b/cpvacc.hex @@ -0,0 +1,64 @@ +:10700000AC00060000721D72C30F73C31F73C32A46 +:1070100073C33273C31073C31973C31173C33C7347 +:10702000C33A73C30000C30000C35A73C35073C391 +:107030004B73C36073C3B871C3B871C3B871C3A9CC +:1070400071C3AE71C3B871C3BB71C3C171C3AC703E +:10705000C33A72C33B72C33C72C33D72C35A72C31C +:107060008572C38B72C38C72C30E73C33371C390AA +:1070700073C33C71C3DB71C3CA710000BA72E97299 +:10708000000000000010FF1CFFFFFFFF00000001D8 +:107090000000000650500805000000000D0D2323DD +:0770A00031004080000101F6 +:1070AC00CDEC700E07CD050032EB700E0CCD05004B +:1070BC007D32EA7011E971CDCA71116673CDCA7156 +:1070CC0011F971CDCA71119173CDCA71CDC77121EE +:0E70DC00E47322A3703E4032A570CD3972C914 +:1070EC002A0100110300192214711103001922172F +:1070FC007111030019221A7111030019221D71114B +:10710C001E0019221F71C9C30000C30000C3000078 +:10711C00C30000C300000E28064605C226710DC22E +:10712C0024713DC22271C9D511BC73CDCA71D1C9AC +:10713C003AEA70FE30FA73713A5C00B7CA4F713D8F +:10714C00C354710E19CD05005F0E2ECD050006033C +:10715C00AF0E032183002B7E1F770DC2627105C217 +:10716C005C715E2356EBC90E1BCD0500EB2AA77094 +:10717C0023010000D51A1E0817DA897103572B7DDD +:10718C00B4CA9A717A1DC28471D113C38071D1694A +:10719C00603AAA70D603C8293DC2A371C91E20C388 +:1071AC0019731E20CD19731E25C31973C3C7711112 +:1071BC00D073C3CA7111DA73C3CA7111E671E5D504 +:1071CC00C50E09CD0500C1D1E1C9E1232323E97E18 +:1071DC001223130B78B1C2DB71C90D0A24636F6ED5 +:1071EC006669677572656420666F72202420776902 +:1071FC00746820244350585357542E41534D202823 +:10720C003130292020372D4A616E2D31393931200A +:10721C00244350585359532E41534D202834302970 +:10722C00202032382D4175672D38392024C9C9C921 +:10723C00C9114472CDCA71C90D0A42202054726121 +:10724C006E736D6974206120425245414B24E65F98 +:10725C00FE42CA6472C3D6713E01D342DB42E601E0 +:10726C00CA64723E05D3423EFAD3423E1ECD227111 +:10727C003E05D3423EEAD342C97BC97BC97BC9C90F +:10728C007B329C723E14CD9D723A9C72CD9D72C91C +:10729D00D3903E01D323DBA007DAA372DB80F5AFD9 +:1072AD00D323DBA007DAAF72F13202EEC906043147 +:1072BD00323030242828043234303024141403336F +:1072CD00303024A0A00434383030240A0A0336307C +:1072DD003024505004393630302405050D0A202055 +:1072ED0033303020203630302020313230302020E5 +:1072FD0032343030202034383030202039363030A0 +:10730D0024C9C9C90E061EFFCD0500C90E06CD053F +:10731D0000C9DB42E604CA1F737BD340C9DB42E6DA +:10732D0001C8DB40C9CD2A73B7C23273C9AFC9D505 +:10733D00CD8972A7CA49730E05CD0500D1C91E08A6 +:10734D00C319731E20CD19731E08C3197311CB7386 +:10735D00C3CA7111E671C3CA714163747269782031 +:10736D0043502F4D244350585644552E41534D20D4 +:10737D0020283629202031322D4F63742D31393993 +:10738D00302024C947656E65726963202844756D88 +:10739D00622920435254205465726D696E616C20D0 +:1073AD00747970652073656C656374656420240D54 +:1073BD000A5374617274696E67202E2E2E245E55E9 +:1073CD000D0A240D0A525061636B3A20240D0A53A5 +:0773DD005061636B3A2024AC +:0000000000 diff --git a/cpvadv.hex b/cpvadv.hex new file mode 100644 index 0000000..dfccf48 --- /dev/null +++ b/cpvadv.hex @@ -0,0 +1,71 @@ +:10700000AC0006009972B672C39873C3A773C3B27B +:1070100073C3BA73C39873C3A173C39973C3C4739F +:10702000C3C273C30000C30000C3F673C3EC73C3D1 +:10703000EB73C3FC73C3F871C3D471C3C871C3BC11 +:1070400071C3C271C3DD71C3E671C3EF71C3AC70AC +:10705000C3EA72C3EB72C3EC72C3ED72C30A73C3AB +:107060002973C33373C33473C39773C32771C3D3F3 +:1070700073C34F71C32572C314722474387367735A +:10708000000000000010011CFFFFFFFF00000001D6 +:107090000000000650500805000000000D0D2323DD +:0770A00031004080000101F6 +:1070AC00CDE0700E07CD050032DF700E0CCD050063 +:1070BC007D32DE70113372CD1472110274CD1472E4 +:1070CC00CD117221507422A3703E4032A570CDD3E5 +:0270DC0072C977 +:1070E0002A01001103001922087111030019220B53 +:1070F0007111030019220E7111030019221171116F +:107100001E0019221371C9C30000C30000C3000090 +:10711000C30000C300000E28064605C21A710DC246 +:1071200018713DC21671C9D5111774CD1472D1CD25 +:1071300014721E5BCDA173110274CD1472114A72C8 +:10714000CD14723A8D70B7C8118272CD1472C93ADB +:10715000DE70FE30FA86713A5C00B7CA62713DC3D8 +:1071600067710E19CD05005F0E2ECD05000603AF29 +:107170000E032183002B7E1F770DC2757105C26F30 +:10718000715E2356EBC90E1BCD0500EB2AA77023B9 +:10719000010000D51A1E0817DA9C7103572B7DB425 +:1071A000CAAD717A1DC29771D113C39371D1696051 +:1071B0003AAA70D603C8293DC2B671C9011404C3E6 +:1071C000D373011405C3D373010C06CDD373114CD3 +:1071D00074C31472010107CDD373C3CE71010108CA +:1071E000CDD373C3CE71010809CDD373C3CE710162 +:1071F000080BCDD373C3CE713A8D70B7CA05720137 +:10720000010DC30872010109CDD373114874C31471 +:1072100072113072E5D5C50E09CD0500C1D1E1C9A5 +:10722000E1232323E97E1223130B78B1C22572C90F +:107230000D0A24636F6E6669677572656420666FF8 +:10724000722024207769746820245D0D0A0D0A4E8F +:10725000756D626572206F66207061636B65747313 +:107260003A0D0A4E756D626572206F662072657404 +:10727000726965733A0D0A46696C65206E616D65C9 +:107280003A240D0A0D0A0D0A527061636B3A0D0A19 +:107290000D0A537061636B3A244350585357542E70 +:1072A00041534D20283130292020372D4A616E2D41 +:1072B0003139393120244350584E4F522E41534DCD +:1072C0002020283429202031362D4A616E2D313975 +:1072D0003931243E40D351217070228870EBCD3477 +:1072E000733E4ED3513E37D351C9C9C9C911F47247 +:1072F000CD1472C90D0A4220205472616E736D69FB +:1073000074206120425245414B24E65FFE42CA147C +:1073100073C32072DB51E604CA14733E3FD3513E5F +:1073200019CD16713E37D351C97BFE04C0AFC97B5E +:10733000C97BC9C97BD358C90604313230302470A7 +:1073400070043234303024787803333030244040B5 +:107350000434383030247C7C0336303024606004C0 +:1073600039363030247E7E0D0A2020203330302004 +:107370002020203630302020202031323030202094 +:10738000202032343030202020203438303020206B +:1073900020203936303024C9C90E061EFFCD050025 +:1073A000C90E06CD0500C9DB51E601CAA7737BD320 +:1073B00050C9DB51E602C8DB50C9CDB273B7C2BABF +:1073C00073C9AFC9D5CD3173A7CAD1730E05CD0529 +:1073D00000D1C9C5112174CD1472E17CC61F5FE5CF +:1073E000CDA173E17DC61F5FC3A173C91E20CDA1CE +:1073F000731E08C3A173111E74C31472111C74C3CD +:1074000014724E6F727468205374617220416476F6 +:10741000616E7461676524040D0A092404240D0E4D +:10742000241B3D240B2400000A2400000C2400002F +:10743000082400000424000012240000132400008B +:107440001E2400000B2400000F2400000E24000066 +:0000000000 diff --git a/cpvamp.hex b/cpvamp.hex new file mode 100644 index 0000000..a50feff --- /dev/null +++ b/cpvamp.hex @@ -0,0 +1,72 @@ +:10700000AC00060000723772C38C73C39B73C3A6B7 +:1070100073C3AE73C38C73C39573C38D73C3B873DB +:10702000C3B673C30000C30000C3D373C3C973C323 +:10703000C473C3D973C3B871C3B871C3B871C3A9DA +:1070400071C3AE71C3B871C3BB71C3C171C3AC703E +:10705000C36A72C36B72C37572C37672C3BE72C3E6 +:10706000FE72C30073C30173C38B73C33371C31048 +:1070700074C33C71C3DB71C3CA710000367365739E +:10708000000000000010FF1CFFFFFFFF00000001D8 +:107090000000000650500805000000000D0D2323DD +:0770A00031004080000101F6 +:1070AC00CDEC700E07CD050032EB700E0CCD05004B +:1070BC007D32EA7011E971CDCA7111DF73CDCA71DD +:1070CC0011F971CDCA71111174CDCA71CDC771216D +:0E70DC00647422A3703E4032A570CD5272C97A +:1070EC002A0100110300192214711103001922172F +:1070FC007111030019221A7111030019221D71114B +:10710C001E0019221F71C9C30000C30000C3000078 +:10711C00C30000C300000E14064605C226710DC242 +:10712C0024713DC22271C9D5113C74CDCA71D1C92B +:10713C003AEA70FE30FA73713A5C00B7CA4F713D8F +:10714C00C354710E19CD05005F0E2ECD050006033C +:10715C00AF0E032183002B7E1F770DC2627105C217 +:10716C005C715E2356EBC90E1BCD0500EB2AA77094 +:10717C0023010000D51A1E0817DA897103572B7DDD +:10718C00B4CA9A717A1DC28471D113C38071D1694A +:10719C00603AAA70D603C8293DC2A371C91E20C388 +:1071AC0095731E20CD95731E25C39573C3C771119E +:1071BC005074C3CA71115A74C3CA7111E671E5D502 +:1071CC00C50E09CD0500C1D1E1C9E1232323E97E18 +:1071DC001223130B78B1C2DB71C90D0A24636F6ED5 +:1071EC006669677572656420666F72202420776902 +:1071FC00746820244350585357542E41534D202823 +:10720C003130292020372D4A616E2D31393931200A +:10721C00244350585359532E41534D20283335296C +:10722C002030312D4465632D38362443505842426A +:10723C00492E41534D202834292020372D4A616E88 +:10724C002D31393931241160720E0A1A13D38C0D79 +:10725C00C25772C918180444010003C105EAC911C8 +:10726C007272CDCA71C90D0A24C9117D72CDCA7151 +:10727C00C90D0A4220205472616E736D69742061CD +:10728C0020425245414B0D0A48202048616E6775DB +:10729C0070207573696E67204454520D0A57202074 +:1072AC00576970652073637265656E20636C6561E8 +:1072BC007224E65FFE42CAD972FE48CAD272FE57E9 +:1072CC00CAD973C3D671160A1EFFC3E872169A1E6A +:1072DC001E3E01D38CDB8CE601CADD723E05D38CDD +:1072EC003E6AB2D38C7BCD22713E05D38C3EEAD361 +:1072FC008CC97BC9C91E3FCD2F733E47773A897025 +:10730C0023771E50CD2F733E3FA6773A8870B73E39 +:10731C0080CA22733E40B677212E73E51E36CD2FE0 +:10732C0073E9C92A0100160019C90604313230303C +:10733C0024016804323430302401340333303024D7 +:10734C0000D0043438303024011A03363030240194 +:10735C00D0043936303024010D0D0A202020333072 +:10736C003020203630302020313230302020323462 +:10737C00303020203438303020203936303024C999 +:10738C00C90E061EFFCD0500C90E06CD0500C9DBD2 +:10739C008CE604CA9B737BD388C9DB8CE601C8DB03 +:1073AC0088C9CDA673B7C2AE73C9AFC9D5A7CAC2B7 +:1073BC00730E05CD0500D1C91E08C395731E20CDD3 +:1073CC0095731E08C39573114B74C3CA7111E67182 +:1073DC00C3CA71416D70726F204C6974746C6520F6 +:1073EC00426F617264244350585644552E41534D9C +:1073FC002020283629202031322D4F63742D31392D +:10740C0039302024C947656E65726963202844753C +:10741C006D622920435254205465726D696E616C03 +:10742C0020747970652073656C65637465642024C1 +:10743C000D0A5374617274696E67202E2E2E245EB1 +:10744C00550D0A240D0A525061636B3A20240D0A23 +:08745C00535061636B3A2024D8 +:0000000000 diff --git a/cpvapl.hex b/cpvapl.hex new file mode 100644 index 0000000..39953f4 --- /dev/null +++ b/cpvapl.hex @@ -0,0 +1,75 @@ +:10700000AC0006009972B672C3C873C3D873C3E8E4 +:1070100073C3F273C3C973C3D273C3CA73C3FC739C +:10702000C3FA73C30000C30000C33374C32974C31D +:107030002374C33974C3F871C3D471C3C871C3BC9A +:1070400071C3C271C3DD71C3E671C3EF71C3AC70AC +:10705000C3E972C3EA72C3EB72C3EC72C3EE72C3CC +:10706000F372C3F972C3FA72C3C773C32771C30B38 +:1070700074C34F71C32572C31472637404736B734A +:10708000000000000010011DFFFFFFFF00000001D5 +:107090000000000650500805000000000D0D2323DD +:0770A00031004080000101F6 +:1070AC00CDE0700E07CD050032DF700E0CCD050063 +:1070BC007D32DE70113372CD1472113F74CD1472A7 +:1070CC00CD1172218F7422A3703E4032A570CDD0A9 +:0270DC0072C977 +:1070E0002A01001103001922087111030019220B53 +:1070F0007111030019220E7111030019221171116F +:107100001E0019221371C9C30000C30000C3000090 +:10711000C30000C300000E14064605C21A710DC25A +:1071200018713DC21671C9D5114D74CD1472D1CDEF +:1071300014721E5BCDD273113F74CD1472114A725A +:10714000CD14723A8D70B7C8118272CD1472C93ADB +:10715000DE70FE30FA86713A5C00B7CA62713DC3D8 +:1071600067710E19CD05005F0E2ECD05000603AF29 +:107170000E032183002B7E1F770DC2757105C26F30 +:10718000715E2356EBC90E1BCD0500EB2AA77023B9 +:10719000010000D51A1E0817DA9C7103572B7DB425 +:1071A000CAAD717A1DC29771D113C39371D1696051 +:1071B0003AAA70D603C8293DC2B671C9011404C3E6 +:1071C0000B74011405C30B74010C06CD0B74118BE9 +:1071D00074C31472010107CD0B74C3CE7101010891 +:1071E000CD0B74C3CE71010809CD0B74C3CE7101F0 +:1071F000080BCD0B74C3CE713A8D70B7CA057201FE +:10720000010DC30872010109CD0B74118774C314F9 +:1072100072113072E5D5C50E09CD0500C1D1E1C9A5 +:10722000E1232323E97E1223130B78B1C22572C90F +:107230000D0A24636F6E6669677572656420666FF8 +:10724000722024207769746820245D0D0A0D0A4E8F +:10725000756D626572206F66207061636B65747313 +:107260003A0D0A4E756D626572206F662072657404 +:10727000726965733A0D0A46696C65206E616D65C9 +:107280003A240D0A0D0A0D0A527061636B3A0D0A19 +:107290000D0A537061636B3A244350585357542E70 +:1072A00041534D20283130292020372D4A616E2D41 +:1072B0003139393120244350584150502E41534DDB +:1072C00020283229202032322D6A756C2D3837243F +:1072D0003AABE0E60F3288703289703E0B32A9E09B +:1072E00032AAE03E1832ABE0C9C9C9C9C924E65F79 +:1072F000C320727BC97BC97BC9C93AABE0E6F0B356 +:1073000032ABE0C90D033131302403030431323094 +:1073100030240808053133342E3524040403313574 +:10732000302405050431383030240909053139325B +:107330003030240F0F0432343030240A0A03333043 +:10734000302406060433363030240B0B0434383036 +:1073500030240C0C03363030240707043732303029 +:10736000240D0D0439363030240E0E0D0A20203144 +:107370003130202020203133342E3520203135305B +:107380002020202033303020202020363030202094 +:107390002031323030202020313830300D0A203278 +:1073A0003430302020203336303020202034383024 +:1073B0003020202037323030202020393630302025 +:1073C00020313932303024C9C9C90E061EFFCD051F +:1073D00000C90E06CD0500C9E521A9E07EE610CA68 +:1073E000DC7321A8E073E1C93AA9E0E608C83AA82D +:1073F000E0C9CDE873B7C2F273C9AFC9D5CDF77292 +:10740000A7CA09740E05CD0500D1C9C5116074CD98 +:107410001472E17CC61F5FE5CDD273E17DC61F5FAC +:10742000C3D273115D74C314721E20CDD2731E08B3 +:10743000C3D273115974C31472115574C3147241B9 +:1074400070706C652049492043502F4D241E1B59F4 +:107450000D0A2020241E1B59240D1B542408082427 +:107460001B3D240B2400000A2400000624000024F5 +:107470000000002400000024000000240000001E82 +:0F7480002400000B2400001B5924001B5424007F +:0000000000 diff --git a/cpvapm.hex b/cpvapm.hex new file mode 100644 index 0000000..9b4e18f --- /dev/null +++ b/cpvapm.hex @@ -0,0 +1,79 @@ +:10700000AC0006008872A572C3FD73C30D74C31D66 +:1070100074C32774C3FE73C30774C3FF73C331748F +:10702000C32F74C30000C30000C36874C35E74C37D +:107030005874C36E74C3E771C3C371C3B771C3AB74 +:1070400071C3B171C3CC71C3D571C3DE71C3AC70F0 +:10705000C3C072C3C172C3C773C3C873C3E273C36F +:10706000F173C3F773C3FC73C3FC73C31671C340DE +:1070700074C33E71C31472C303729874000000009D +:10708000000000000010011DFFFFFFFF00000001D5 +:107090000000000650500805000000000D0D2323DD +:0770A00031004080000101F6 +:1070AC00CDE0700E07CD050032DF700E0CCD050063 +:1070BC007D32DE70112272CD0372117474CD0372A5 +:1070CC00CD007221C47422A3703E4032A570CDBF96 +:0270DC0072C977 +:1070E0002A01001103001922087111030019220B53 +:1070F0007111030019220E7111030019221171116F +:107100001E0019221371C9C30000C30000C3000090 +:10711000C30000C30000D5118274CD0372D1CD032A +:10712000721E5BCD0774117474CD0372113972CD68 +:1071300003723A8D70B7C8117172CD0372C93ADE0D +:1071400070FE30FA75713A5C00B7CA51713DC35692 +:10715000710E19CD05005F0E2ECD05000603AF0E92 +:10716000032183002B7E1F770DC2647105C25E71FF +:107170005E2356EBC90E1BCD0500EB2AA770230139 +:107180000000D51A1E0817DA8B7103572B7DB4CA7D +:107190009C717A1DC28671D113C38271D169603A24 +:1071A000AA70D603C8293DC2A571C9011404C34001 +:1071B00074011405C34074010C06CD407411C074F1 +:1071C000C30372010107CD4074C3BD71010108CD35 +:1071D0004074C3BD71010809CD4074C3BD7101087D +:1071E0000BCD4074C3BD713A8D70B7CAF471010103 +:1071F0000DC3F771010109CD407411BC74C3037252 +:10720000111F72E5D5C50E09CD0500C1D1E1C9E157 +:10721000232323E97E1223130B78B1C21472C90D04 +:107220000A24636F6E6669677572656420666F72A3 +:107230002024207769746820245D0D0A0D0A4E759C +:107240006D626572206F66207061636B6574733A5E +:107250000D0A4E756D626572206F662072657472DC +:107260006965733A0D0A46696C65206E616D653A11 +:10727000240D0A0D0A0D0A527061636B3A0D0A0D56 +:107280000A537061636B3A244350585357542E414C +:10729000534D20283130292020372D4A616E2D3161 +:1072A00039393120244350584150502E41534D20FC +:1072B000283229202032322D6A756C2D383724C9A6 +:1072C000C9CDC872C30501C93AA7E03AA6E0E604F1 +:1072D000CA0F72AF32A5E001E803CDB3733E8F321F +:1072E0006B733E8D32A5E03E0332A7E03E1132A71C +:1072F000E001C409CDB373116C73CD03720E01CDDF +:107300000500F5FE30DA3573FE3AD23573E60FC26A +:1073100014733E0A5F3E0D32A5E0013D00CDB3730C +:107320003E8D32A5E0012700CDB3731DC215730158 +:107330005802CDB373F1FE0DC2FD72117D73CD0302 +:10734000720E061EFFCD0500B7C266733AA7E03A7B +:10735000A6E0E604C241733A6B7332A5E011A47350 +:10736000CD0372C30F72AF32A5E0C9004E756D62D6 +:10737000657220746F204469616C3A20240D0A41C3 +:1073800077616974696E6720436172726965722EF4 +:107390002E2E2E28616E79206B65792061626F72C6 +:1073A000747329240D0A436F6E6E65637465642ED1 +:1073B0000D0A24C5D5041E7E1DC2B8730DC2B67356 +:1073C00005C2B673D1C1C9C911CF73CD0372C90D3E +:1073D0000A44202044726F7020746865206C696EC6 +:1073E0006524E65FFE44C2EE73AF32A5E0C9C30F69 +:1073F000727BC97BC97BC9AF32A5E0C9C9C9C90EB7 +:10740000061EFFCD0500C90E06CD0500C9E521A663 +:10741000E07EE602CA117421A7E073E1C93AA6E052 +:10742000E601C83AA7E0C9CD1D74B7C22774C9AF39 +:10743000C9D5CDF573A7CA3E740E05CD0500D1C9D7 +:10744000C5119574CD0372E17CC61F5FE5CD07744D +:10745000E17DC61F5FC30774119274C303721E20BF +:10746000CD07741E08C30774118E74C30372118A8A +:1074700074C303724170706C652049492043502FDA +:107480004D241E1B590D0A2020241E1B59240D1BA0 +:1074900054240808241B3D240B2400000A24000067 +:1074A0000624000024000000240000002400000046 +:1074B000240000001E2400000B2400001B5924009F +:0474C0001B54240035 +:0000000000 diff --git a/cpvbb2.hex b/cpvbb2.hex new file mode 100644 index 0000000..78fff5c --- /dev/null +++ b/cpvbb2.hex @@ -0,0 +1,71 @@ +:10700000AC00060000723772C38073C38F73C39ADB +:1070100073C3A273C38073C38973C38173C3AC7317 +:10702000C3AA73C30000C30000C3C773C3BD73C347 +:10703000B873C3CD73C3B871C3B871C3B871C3A9F2 +:1070400071C3AE71C3B871C3BB71C3C171C3AC703E +:10705000C36A72C36B72C37572C37672C3BE72C3E6 +:10706000FE72C30073C30173C37F73C33371C3FE66 +:1070700073C33C71C3DB71C3CA7100000B734C73E3 +:10708000000000000010FF1CFFFFFFFF00000001D8 +:107090000000000650500805000000000D0D2323DD +:0770A00031004080000101F6 +:1070AC00CDEC700E07CD050032EB700E0CCD05004B +:1070BC007D32EA7011E971CDCA7111D373CDCA71E9 +:1070CC0011F971CDCA7111FF73CDCA71CDC7712180 +:0E70DC00527422A3703E4032A570CD5272C98C +:1070EC002A0100110300192214711103001922172F +:1070FC007111030019221A7111030019221D71114B +:10710C001E0019221F71C9C30000C30000C3000078 +:10711C00C30000C300000E28064605C226710DC22E +:10712C0024713DC22271C9D5112A74CDCA71D1C93D +:10713C003AEA70FE30FA73713A5C00B7CA4F713D8F +:10714C00C354710E19CD05005F0E2ECD050006033C +:10715C00AF0E032183002B7E1F770DC2627105C217 +:10716C005C715E2356EBC90E1BCD0500EB2AA77094 +:10717C0023010000D51A1E0817DA897103572B7DDD +:10718C00B4CA9A717A1DC28471D113C38071D1694A +:10719C00603AAA70D603C8293DC2A371C91E20C388 +:1071AC0089731E20CD89731E25C38973C3C77111C2 +:1071BC003E74C3CA71114874C3CA7111E671E5D526 +:1071CC00C50E09CD0500C1D1E1C9E1232323E97E18 +:1071DC001223130B78B1C2DB71C90D0A24636F6ED5 +:1071EC006669677572656420666F72202420776902 +:1071FC00746820244350585357542E41534D202823 +:10720C003130292020372D4A616E2D31393931200A +:10721C00244350585359532E41534D20283335296C +:10722C002030312D4465632D38362443505842426A +:10723C00492E41534D202834292020372D4A616E88 +:10724C002D31393931241160720E0A1A13D3810D84 +:10725C00C25772C918180444010003C105EAC911C8 +:10726C007272CDCA71C90D0A24C9117D72CDCA7151 +:10727C00C90D0A4220205472616E736D69742061CD +:10728C0020425245414B0D0A48202048616E6775DB +:10729C0070207573696E67204454520D0A57202074 +:1072AC00576970652073637265656E20636C6561E8 +:1072BC007224E65FFE42CAD972FE48CAD272FE57E9 +:1072CC00CACD73C3D671160A1EFFC3E872169A1E76 +:1072DC001E3E01D381DB81E601CADD723E05D381FE +:1072EC003E6AB2D3817BCD22713E05D3813EEAD377 +:1072FC0081C97BC9C9F33E47D3897BD389FBC908B4 +:10730C00043132303024202005313932303024021F +:10731C000204323430302410100333303024808097 +:10732C00053338343030240101043438303024082B +:10733C0008033630302440400439363030240404FD +:10734C000D0A2020203330302020203630302020F1 +:10735C00313230302020323430302020343830304C +:10736C002020393630302031393230302033383427 +:10737C00303024C9C90E061EFFCD0500C90E06CD3E +:10738C000500C9DB81E604CA8F737BD380C9DB811E +:10739C00E601C8DB80C9CD9A73B7C2A273C9AFC965 +:1073AC00D5A7CAB6730E05CD0500D1C91E08C38971 +:1073BC00731E20CD89731E08C38973113974C3CA17 +:1073CC007111E671C3CA7142696720426F617264C0 +:1073DC00204949244350585644552E41534D2020A2 +:1073EC00283629202031322D4F63742D3139393014 +:1073FC002024C947656E65726963202844756D62E7 +:10740C002920435254205465726D696E616C20744E +:10741C007970652073656C656374656420240D0A4E +:10742C005374617274696E67202E2E2E245E550D76 +:10743C000A240D0A525061636B3A20240D0A5350F2 +:06744C0061636B3A20248D +:0000000000 diff --git a/cpvbbc.hex b/cpvbbc.hex new file mode 100644 index 0000000..36cbba3 --- /dev/null +++ b/cpvbbc.hex @@ -0,0 +1,83 @@ +:10700000AC0006009872B572C33F74C35B74C3676B +:1070100074C37074C34674C35674C34D74C37F7411 +:10702000C37874C30000C30000C3B074C3A674C3A4 +:10703000A574C3B674C3F771C3D371C3C771C3BB9F +:1070400071C3C171C3DC71C3E571C3EE71C3AC70B0 +:10705000C30773C30D73C30E73C30F73C32C73C302 +:107060007C73C38273C38373C30674C32671C38DD9 +:1070700074C34E71C32472C31372D5749073CE73EC +:10708000267410740010011CFFFFFFFF00000001B8 +:107090000000000650500805000000000D0D2323DD +:0770A00031004080000101F6 +:1070AC00CDDF700E07CD0500323E740E0CCD050001 +:1070BC007D32DE70113272CD137211BC74CD13722D +:1070CC00CD107221037522A3703E4032A570CDD134 +:0270DC0072C977 +:1070DF002A01001103001922077111030019220A56 +:1070EF007111030019220D71110300192210711172 +:1070FF001E0019221271C9C30000C30000C3000093 +:10710F00C30000C300000E3C064605C219710DC234 +:10711F0017713DC21571C9D511C674CD1372D1CD7A +:10712F0013721E5BCD567411BC74CD13721149725C +:10713F00CD13723A8D70B7C8118172CD1372C93ADF +:10714F00DE70FE30FA85713A5C00B7CA61713DC3DB +:10715F0066710E19CD05005F0E2ECD05000603AF2B +:10716F000E032183002B7E1F770DC2747105C26E33 +:10717F00715E2356EBC90E1BCD0500EB2AA77023BA +:10718F00010000D51A1E0817DA9B7103572B7DB427 +:10719F00CAAC717A1DC29671D113C39271D1696055 +:1071AF003AAA70D603C8293DC2B571C9011404C3E8 +:1071BF008D74011405C38D74010C06CD8D7411FEF1 +:1071CF0074C31372010107CD8D74C3CD7101010812 +:1071DF00CD8D74C3CD71010809CD8D74C3CD7101EF +:1071EF00080BCD8D74C3CD713A8D70B7CA0472017F +:1071FF00010DC30772010109CD8D7411F974C31309 +:10720F0072112F72E5D5C50E09CD0500C1D1E1C9A7 +:10721F00E1232323E97E1223130B78B1C22472C911 +:10722F000D0A24636F6E6669677572656420666FF9 +:10723F00722024207769746820245D0D0A0D0A4E90 +:10724F00756D626572206F66207061636B65747314 +:10725F003A0D0A4E756D626572206F662072657405 +:10726F00726965733A0D0A46696C65206E616D65CA +:10727F003A240D0A0D0A0D0A527061636B3A0D0A1A +:10728F000D0A537061636B3A244350585357542E71 +:10729F0041534D20283130292020372D4A616E2D42 +:1072AF003139393120244350585359532E41534DBE +:1072BF002028343029202032382D4175672D383958 +:1072CF002024110373CD13723E01CDC8FF3EF2216E +:1072DF0000FFCDF4FF7DE6071F1FD2EE72F602A767 +:1072EF00F2F472F604E607EE073C328870328970CA +:1072FF005FCD8373160324C93E00CDC8FFC9C9C92A +:10730F00111673CD1372C90D0A4220205472616E8B +:10731F00736D6974206120425245414B24E65FFE34 +:10732F0042CA3673C31F723E962E08CDF4FF7CE619 +:10733F0002CA3673214EFE3E40CD68733E9C2160DB +:10734F009FCDF4FF3E19CD15713E9C2600CDF4FF65 +:10735F00214EFE3EC0CD6873C9227773327B7321F5 +:08736F0077733E06CDF1FFC962 +:10737C007BC97BC97BC9C96B3E07CDF4FF6B3E084B +:10738C00CDF4FFC908043132303024040403313504 +:10739C0030240202053139323030240808043234EA +:1073AC0030302405050333303024030304343830E3 +:1073BC0030240606023735240101043936303024D6 +:1073CC0007070D0A202020373520202031353020AA +:1073DC002020333030202020313230302020203219 +:1073EC0034303020202034383030202020393630D2 +:1073FC00302020203139323030247E323D74237ECF +:10740C00323C74C90D0A434F4D4D554E49434154BE +:10741C00494F4E5320706F727424010E434F4D4DE3 +:10742C00554E49434154494F4E532439744204003C +:10743C000442813A3D74320300C93A3E743203006F +:10744C00C9CD0671B7C8CD0971C94BCD0C71C9E551 +:10745C00C53A3C744FCD0500C1E1C9CD0671B7C822 +:10746C00CD0971C9CD6774B7C27074C9CD1271CD15 +:10747C001271C9D5CD8073A7CA8B744BCD0F71D146 +:10748C00C9C511D274CD1372E17CC61F5FE5CD5610 +:10749C0074E17DC61F5FC35674C91E20CD56741E81 +:1074AC0008C3567411CE74C3137211CC74C3137207 +:1074BC0042424320285A383029240C1B3D213024C9 +:1074CC000C240D1B40241B3D240B2400000A24001B +:1074DC000009240000082400000C240000240000F3 +:1074EC0000240000001E240000240000001B3F2488 +:0774FC0000001B402400000A +:0000000000 diff --git a/cpvbee.hex b/cpvbee.hex new file mode 100644 index 0000000..323e26d --- /dev/null +++ b/cpvbee.hex @@ -0,0 +1,134 @@ +:10700000AC0006009972D072C33774C34674C3587B +:1070100074C35C74C33774C34074C33874C3687476 +:10702000C36474C30000C30000C39B74C39174C3E2 +:107030008B74C3A174C3F871C3D471C3C871C3BCCA +:1070400071C3C271C3DD71C3E671C3EF71C3AC70AC +:10705000C3FE72C30473C30E73C30F73C36A73C3D7 +:107060009673C39873C39973C33674C32771C3737C +:1070700074C34F71C32572C31472C0749D73F673C9 +:10708000000000000010001DFFFFFFFF00000001D6 +:107090000000000650500805000000000D0D2323DD +:0770A00031004080000101F6 +:1070AC00CDE0700E07CD050032DF700E0CCD050063 +:1070BC007D32DE70113372CD147211A774CD14723F +:1070CC00CD1172214E8022A3703E4032A570CDEAC4 +:0270DC0072C977 +:1070E0002A01001103001922087111030019220B53 +:1070F0007111030019220E7111030019221171116F +:107100001E0019221371C9C30000C30000C3000090 +:10711000C30000C300000E21064605C21A710DC24D +:1071200018713DC21671C9D511B074CD1472D1CD8C +:1071300014721E5BCD407411A774CD1472114A7283 +:10714000CD14723A8D70B7C8118272CD1472C93ADB +:10715000DE70FE30FA86713A5C00B7CA62713DC3D8 +:1071600067710E19CD05005F0E2ECD05000603AF29 +:107170000E032183002B7E1F770DC2757105C26F30 +:10718000715E2356EBC90E1BCD0500EB2AA77023B9 +:10719000010000D51A1E0817DA9C7103572B7DB425 +:1071A000CAAD717A1DC29771D113C39371D1696051 +:1071B0003AAA70D603C8293DC2B671C9011404C3E6 +:1071C0007374011405C37374010C06CD737411E854 +:1071D00074C31472010107CD7374C3CE7101010829 +:1071E000CD7374C3CE71010809CD7374C3CE710120 +:1071F000080BCD7374C3CE713A8D70B7CA05720196 +:10720000010DC30872010109CD737411E474C31434 +:1072100072113072E5D5C50E09CD0500C1D1E1C9A5 +:10722000E1232323E97E1223130B78B1C22572C90F +:107230000D0A24636F6E6669677572656420666FF8 +:10724000722024207769746820245D0D0A0D0A4E8F +:10725000756D626572206F66207061636B65747313 +:107260003A0D0A4E756D626572206F662072657404 +:10727000726965733A0D0A46696C65206E616D65C9 +:107280003A240D0A0D0A0D0A527061636B3A0D0A19 +:107290000D0A537061636B3A244350585357542E70 +:1072A00041534D20283130292020372D4A616E2D41 +:1072B0003139393120244350585359532E41534DBD +:1072C00020283335292030312D4465632D3836246C +:1072D0004350584245452E41534D20283129202006 +:1072E00030312D5365702D3930242120762288705D +:1072F000EBCD5876ED57323E783E75ED47C93A3EB4 +:1073000078ED47C9110B73CD1472C90D0A24C91148 +:107310001673CD1472C90D0A4220205472616E7327 +:107320006D6974206120425245414B2028302E3334 +:1073300073290D0A4C20205472616E736D6974209C +:1073400061204C4F4E4720425245414B2028312E60 +:107350003873290D0A5720205769706520736372AE +:1073600065656E20636C65617224E65FFE42CA83C8 +:1073700073FE4CCA7E73FE57CAA174C320721EB43A +:10738000C385731E1EDB02E6DFD3027BCD1671DBE5 +:1073900002F620D302C97BC9C9CD5876C90B033187 +:1073A00031302410760431323030243076073132D7 +:1073B00030302F37352438760331353024187604B1 +:1073C0003234303024407603333030242076043495 +:1073D000383030244876033630302428760237356A +:1073E0002400760737352F313230302408760439BF +:1073F0003630302450760D0A3735202037352F317E +:1074000032303020203131302020313530202033CF +:1074100030302020363030202031323030202031C2 +:107420003230302F3735203234303020343830305D +:10743000203936303024C9C90E061EFFCD0500C9DB +:107440000E06CD0500C9F5C5D5E57B215374E52AA7 +:107450004C78E9E1D1C1F1C9CDF177C9CD5874B704 +:10746000C25C74C93A4178C9D5A7CA71747BCD2F63 +:1074700078D1C9C511BD74CD1472E17CC61F5FE51A +:10748000CD4074E17DC61F5FC3407411BB74C3144B +:10749000721E20CD40741E08C3407411B774C3140B +:1074A0007211B574C314724D6963726F626565249D +:1074B0001A0D0A09241A240D1B542408241B3D24E8 +:1074C0000B2400000A2400000C2400000824000003 +:1074D0001A24000024000000240000001E240000E4 +:0C74E0000B2400001B5924001B54240046 +:10750000217883772178837721788377217883772F +:10751000217883772178837721788377217883771F +:10752000217883772178837721788377217883770F +:1075300021788377217883772178837721788377FF +:1075400021788377217883772178837721788377EF +:1075500021788377217883772178837721788377DF +:1075600021788377217883772178837721788377CF +:1075700021788377217883772178837721788377BF +:1075800021788377217883772178837721788377AF +:10759000217883772178837721788377217883779F +:1075A000217883772178837721788377217883778F +:1075B000217883772178837721788377217883777F +:1075C000217883772178837721788377217883776F +:1075D000217883772178837721788377217883775F +:1075E000217883772178837721788377217883774F +:1075F000217883772178837721788377217883773F +:107600007C0D3707A8FF8C767C0D3707C2016676A4 +:107610008109370505D98C763B071704029E8C76C5 +:107620001A048602034B8C768B02BF0102228C76F1 +:10763000C3015A01030D8C76C3015A017C0D667695 +:107640005E01280102038C762C010F012C01667665 +:10765000130101011301667621467806081A772383 +:107660001305C25D76C9060AF3DB02E6DF4FB77980 +:10767000D27576F620D3022A4A782DC27A7625C2B0 +:107680007A76377B1F5F05C26F76FBC97B060821C0 +:1076900000000F4F7D176F7C17677905C292760641 +:1076A00004377D176F7C176705C2A1763EFF323F16 +:1076B000781628DB02E6DF471E00DB02F608CABAAE +:1076C00076D309F3CD05773A3F78B7C20377DB026B +:1076D000F610CAE0762A46782DC2D87625C2D8762A +:1076E0002A4478EB2A42781B7AB3C2F07611FF075E +:1076F0007D936F7C9A67B5CA0377EB224478114E6D +:10770000781971FBC9CD21773A4A783DC20B773A97 +:107710004B783D0000000000C212777AB3C20577B3 +:10772000C97AB7CA5277E603C24877297CE620B007 +:10773000D302157BB7CA6B77E603C26177DB02E63B +:1077400010D601791F4F1DC9B7B7B7B7B7F600C339 +:107750003277B7B7B7B7B7B7B7B7B7B7B7B7C333F6 +:1077600077B7B7B7B7B7F600C34677DB02E610CAFC +:107770007B771E24AF323F78F607C9B7B7B7B7B7E4 +:10778000C34777F5C5D5E5DB02E610CAEA77D3092A +:107790002A48782DC2937725C293771E082A467807 +:1077A0002DC2A07725C2A077DB02E610D601791F93 +:1077B0004F1DC29D77DB02E610CAC7772A46782D97 +:1077C000C2BF7725C2BF772A4478EB2A42781B7A5A +:1077D000B3C2D77711FF077D936F7C9A67B5CAEA6A +:1077E00077EB224478114E781971E1D1C1F1FBEDAC +:1077F0004DD5E52A4278EB2A44787D936F7C9A67D1 +:10780000B5C20778E1D1C9F51B7AB3C2117811FF6F +:1078100007F1EB224278114E78195EF6FF7BC30424 +:10782000783240783E003241783A4078FBED4DE5C1 +:10783000214178CB46C2337836FFD300E1C900003E +:0E7840000000FF07FF070000000000008C762C +:0000000000 diff --git a/cpvbns.hex b/cpvbns.hex new file mode 100644 index 0000000..4799ce8 --- /dev/null +++ b/cpvbns.hex @@ -0,0 +1,53 @@ +:10700000AC00060000721D72C34D72C35C72C36790 +:1070100072C36F72C34D72C35672C34E72C379721C +:10702000C37772C30000C30000C39772C38D72C3DD +:107030008872C39D72C3B871C3B871C3B871C3A954 +:1070400071C3AE71C3B871C3BB71C3C171C3AC703E +:10705000C33B72C33C72C33D72C33E72C34072C332 +:107060004572C34B72C34C72C34C72C33371C3DEDF +:1070700072C33C71C3DB71C3CA7100000000000021 +:10708000000000000010FF1CFFFFFFFF00000001D8 +:107090000000000650500805000000000D0D2323DD +:0770A00031004080000101F6 +:1070AC00CDEC700E07CD050032EB700E0CCD05004B +:1070BC007D32EA7011E971CDCA7111A372CDCA711A +:1070CC0011F971CDCA7111DF72CDCA71CDC77121A1 +:0E70DC00327322A3703E4032A570CD3A72C9C5 +:1070EC002A0100110300192214711103001922172F +:1070FC007111030019221A7111030019221D71114B +:10710C001E0019221F71C9C30000C30000C3000078 +:10711C00C30000C300000E28064605C226710DC22E +:10712C0024713DC22271C9D5110A73CDCA71D1C95E +:10713C003AEA70FE30FA73713A5C00B7CA4F713D8F +:10714C00C354710E19CD05005F0E2ECD050006033C +:10715C00AF0E032183002B7E1F770DC2627105C217 +:10716C005C715E2356EBC90E1BCD0500EB2AA77094 +:10717C0023010000D51A1E0817DA897103572B7DDD +:10718C00B4CA9A717A1DC28471D113C38071D1694A +:10719C00603AAA70D603C8293DC2A371C91E20C388 +:1071AC0056721E20CD56721E25C35672C3C771115E +:1071BC001E73C3CA71112873C3CA7111E671E5D568 +:1071CC00C50E09CD0500C1D1E1C9E1232323E97E18 +:1071DC001223130B78B1C2DB71C90D0A24636F6ED5 +:1071EC006669677572656420666F72202420776902 +:1071FC00746820244350585357542E41534D202823 +:10720C003130292020372D4A616E2D31393931200A +:10721C00244350584E4F522E41534D202028342990 +:10722C00202031362D4A616E2D3139393124C9C9AE +:10723C00C9C9C924E65FC3D6717BC97BC97BC9C9DF +:10724C00C9C90E061EFFCD0500C90E06CD0500C925 +:10725C00DB05E601CA5C727BD304C9DB05E602C818 +:10726C00DB04C9CD6772B7C26F72C9AFC9D5CD493E +:10727C0072A7CA86720E05CD0500D1C91E08C35669 +:10728C00721E20CD56721E08C35672111973C3CAD2 +:10729C007111E671C3CA714E6F7274687374617246 +:1072AC00207573696E67207072696E7465722070D8 +:1072BC006F7274244350585644552E41534D202020 +:1072CC00283629202031322D4F63742D3139393035 +:1072DC002024C947656E65726963202844756D6208 +:1072EC002920435254205465726D696E616C207470 +:1072FC007970652073656C656374656420240D0A70 +:10730C005374617274696E67202E2E2E245E550D97 +:10731C000A240D0A525061636B3A20240D0A535013 +:06732C0061636B3A2024AE +:0000000000 diff --git a/cpvbra.hex b/cpvbra.hex new file mode 100644 index 0000000..f85d305 --- /dev/null +++ b/cpvbra.hex @@ -0,0 +1,81 @@ +:10700000AC0006009972B672C31F74C32F74C33AE2 +:1070100074C34274C32074C32974C32174C34E74EF +:10702000C34A74C30000C30000C38474C37A74C32A +:107030007574C38A74C3F871C3D471C3C871C3BCF7 +:1070400071C3C271C3DD71C3E671C3EF71C3AC70AC +:10705000C3E072C3E172C3E272C3E372C30073C3DD +:107060001F73C32573C32673C31E74C32771C35D07 +:1070700074C34F71C32572C31472BE743273AD737F +:10708000000000000010011DFFFFFFFF00000001D5 +:107090000000000650500805000000000D0D2323DD +:0770A00031004080000101F6 +:1070AC00CDE0700E07CD050032DF700E0CCD050063 +:1070BC007D32DE70113372CD1472119474CD147252 +:1070CC00CD117221EC7422A3703E4032A570CDD448 +:0270DC0072C977 +:1070E0002A01001103001922087111030019220B53 +:1070F0007111030019220E7111030019221171116F +:107100001E0019221371C9C30000C30000C3000090 +:10711000C30000C300000E28064605C21A710DC246 +:1071200018713DC21671C9D511A874CD1472D1CD94 +:1071300014721E5BCD2974119474CD1472114A72AD +:10714000CD14723A8D70B7C8118272CD1472C93ADB +:10715000DE70FE30FA86713A5C00B7CA62713DC3D8 +:1071600067710E19CD05005F0E2ECD05000603AF29 +:107170000E032183002B7E1F770DC2757105C26F30 +:10718000715E2356EBC90E1BCD0500EB2AA77023B9 +:10719000010000D51A1E0817DA9C7103572B7DB425 +:1071A000CAAD717A1DC29771D113C39371D1696051 +:1071B0003AAA70D603C8293DC2B671C9011404C3E6 +:1071C0005D74011405C35D74010C06CD5D7411E797 +:1071D00074C31472010107CD5D74C3CE710101083F +:1071E000CD5D74C3CE71010809CD5D74C3CE71014C +:1071F000080BCD5D74C3CE713A8D70B7CA057201AC +:10720000010DC30872010109CD5D7411E274C3144C +:1072100072113072E5D5C50E09CD0500C1D1E1C9A5 +:10722000E1232323E97E1223130B78B1C22572C90F +:107230000D0A24636F6E6669677572656420666FF8 +:10724000722024207769746820245D0D0A0D0A4E8F +:10725000756D626572206F66207061636B65747313 +:107260003A0D0A4E756D626572206F662072657404 +:10727000726965733A0D0A46696C65206E616D65C9 +:107280003A240D0A0D0A0D0A527061636B3A0D0A19 +:107290000D0A537061636B3A244350585357542E70 +:1072A00041534D20283130292020372D4A616E2D41 +:1072B000313939312024435058544F522E41534DC7 +:1072C00020283529202031302D4A616E2D31393961 +:1072D000312020243A00EFE60F328870328970C9DD +:1072E000C9C9C911EA72CD1472C90D0A42202054CD +:1072F00072616E736D6974206120425245414B2466 +:10730000E65FFE42CA0A73C32072DB41E604CA0A82 +:10731000733E3FD3413E19CD16713E37D341C97BF1 +:10732000C97BC97BC9C93A00EFE6F0B33200EFD39D +:1073300060C910033131302402020431323030246C +:107340000707053133342E35240303033135302448 +:107350000404043138303024080805313932303023 +:10736000240F0F0432303030240909043234303015 +:10737000240A0A0333303024050504333630302420 +:107380000B0B0434383030240C0C02353024000050 +:10739000033630302406060437323030240D0D0217 +:1073A00037352401010439363030240E0E0D0A2001 +:1073B000202035302020202020373520202020316B +:1073C0003130202020203133342E3520203135300B +:1073D0002020202033303020202020363030202044 +:1073E00020313230300D0A20313830302020203228 +:1073F00030303020202032343030202020333630DE +:1074000030202020343830302020203732303020D7 +:107410002020393630302020313932303024C9C96B +:10742000C90E061EFFCD0500C90E06CD0500C9DB3D +:1074300041E601CA2F747BD340C9DB41E602C8DBB9 +:1074400040C9CD3A74B7C24274C9CD1371C9D5CD04 +:107450002373A7CA5B740E05CD0500D1C9C511BB46 +:1074600074CD1472E17CC61F5FE5CD2974E17DC641 +:107470001F5FC329741E08C329741E20CD29741EE2 +:1074800008C3297411B674C3147211B174C3147291 +:107490001B212400496E74657274656320537570F6 +:1074A0006572427261696E24011B7E6B0D0A0909C7 +:1074B00024011B7E6B240D1B7E4B241B59240B24A3 +:1074C00000000A240000062400002400000024001C +:1074D00000002400000024000000012400000B2410 +:0C74E00000001B7E6B24001B7E4B240070 +:0000000000 diff --git a/cpvbrm.hex b/cpvbrm.hex new file mode 100644 index 0000000..44cd190 --- /dev/null +++ b/cpvbrm.hex @@ -0,0 +1,82 @@ +:10700000AC0006009972B672C32974C33974C344C4 +:1070100074C34C74C32A74C33374C32B74C35874BD +:10702000C35474C30000C30000C38E74C38474C30C +:107030007F74C39474C3F871C3D471C3C871C3BCE3 +:1070400071C3C271C3DD71C3E671C3EF71C3AC70AC +:10705000C3E472C3E572C3E672C3E772C30473C3C9 +:107060002373C32973C32A73C32874C32771C367E7 +:1070700074C34F71C32572C31472C8743C73B77361 +:10708000000000000010011DFFFFFFFF00000001D5 +:107090000000000650500805000000000D0D2323DD +:0770A00031004080000101F6 +:1070AC00CDE0700E07CD050032DF700E0CCD050063 +:1070BC007D32DE70113372CD1472119E74CD147248 +:1070CC00CD117221F67422A3703E4032A570CDD43E +:0270DC0072C977 +:1070E0002A01001103001922087111030019220B53 +:1070F0007111030019220E7111030019221171116F +:107100001E0019221371C9C30000C30000C3000090 +:10711000C30000C300000E28064605C21A710DC246 +:1071200018713DC21671C9D511B274CD1472D1CD8A +:1071300014721E5BCD3374119E74CD1472114A7299 +:10714000CD14723A8D70B7C8118272CD1472C93ADB +:10715000DE70FE30FA86713A5C00B7CA62713DC3D8 +:1071600067710E19CD05005F0E2ECD05000603AF29 +:107170000E032183002B7E1F770DC2757105C26F30 +:10718000715E2356EBC90E1BCD0500EB2AA77023B9 +:10719000010000D51A1E0817DA9C7103572B7DB425 +:1071A000CAAD717A1DC29771D113C39371D1696051 +:1071B0003AAA70D603C8293DC2B671C9011404C3E6 +:1071C0006774011405C36774010C06CD677411F16F +:1071D00074C31472010107CD6774C3CE7101010835 +:1071E000CD6774C3CE71010809CD6774C3CE710138 +:1071F000080BCD6774C3CE713A8D70B7CA057201A2 +:10720000010DC30872010109CD677411EC74C31438 +:1072100072113072E5D5C50E09CD0500C1D1E1C9A5 +:10722000E1232323E97E1223130B78B1C22572C90F +:107230000D0A24636F6E6669677572656420666FF8 +:10724000722024207769746820245D0D0A0D0A4E8F +:10725000756D626572206F66207061636B65747313 +:107260003A0D0A4E756D626572206F662072657404 +:10727000726965733A0D0A46696C65206E616D65C9 +:107280003A240D0A0D0A0D0A527061636B3A0D0A19 +:107290000D0A537061636B3A244350585357542E70 +:1072A00041534D20283130292020372D4A616E2D41 +:1072B000313939312024435058544F522E41534DC7 +:1072C00020283529202031302D4A616E2D31393961 +:1072D000312020243A00EFE6F00F0F0F0F328870B4 +:1072E000328970C9C9C9C911EE72CD1472C90D0AAB +:1072F0004220205472616E736D6974206120425285 +:1073000045414B24E65FFE42CA0E73C32072DB592F +:10731000E604CA0E733E3FD3593E19CD16713E376F +:10732000D359C97BC97BC97BC9C93A00EFE60F575E +:107330007B07070707B23200EFD360C91003313172 +:10734000302402020431323030240707053133344F +:107350002E3524030303313530240404043138303E +:1073600030240808053139323030240F0F04323010 +:1073700030302409090432343030240A0A0333300F +:10738000302405050433363030240B0B04343830F8 +:1073900030240C0C02353024000003363030240633 +:1073A000060437323030240D0D0237352401010434 +:1073B00039363030240E0E0D0A20202035302020A2 +:1073C000202020373520202020313130202020205F +:1073D0003133342E352020313530202020203330F9 +:1073E0003020202020363030202020313230300D27 +:1073F0000A20313830302020203230303020202018 +:1074000032343030202020333630302020203438C1 +:1074100030302020203732303020202039363030B4 +:107420002020313932303024C9C9C90E061EFFCDA3 +:107430000500C90E06CD0500C9DB59E601CA39743D +:107440007BD358C9DB59E602C8DB58C9CD4474B7B1 +:10745000C24C74C9CD1371C9D5CD2773A7CA657441 +:107460000E05CD0500D1C9C511C574CD1472E17CDE +:10747000C61F5FE5CD3374E17DC61F5FC333741E45 +:1074800008C333741E20CD33741E08C3337411C077 +:1074900074C3147211BB74C314721B212400496E8F +:1074A00074657274656320537570657242726169A8 +:1074B0006E24011B7E6B0D0A090924011B7E6B24BF +:1074C0000D1B7E4B241B59240B2400000A240000B2 +:1074D0000624000024000000240000002400000016 +:1074E00024000000012400000B2400001B7E6B24FC +:0674F000001B7E4B24008E +:0000000000 diff --git a/cpvca2.hex b/cpvca2.hex new file mode 100644 index 0000000..533a7af --- /dev/null +++ b/cpvca2.hex @@ -0,0 +1,86 @@ +:10700000AC0006009872B572C36274C37E74C38A02 +:1070100074C39374C36974C37974C37074C39F7465 +:10702000C39B74C30000C30000C3D474C3CA74C339 +:10703000C574C3DA74C3F771C3D371C3C771C3BB5B +:1070400071C3C171C3DC71C3E571C3EE71C3AC70B0 +:10705000C34173C34273C34373C34473C34C73C309 +:107060005173C35773C35873C35674C32671C3ADEA +:1070700074C34E71C32472C313720B756A73E573C4 +:10708000000000000010011DFFFFFFFF00000001D5 +:107090000000000650500805000000000D0D2323DD +:0770A00031004080000101F6 +:1070AC00CDDF700E07CD050032D0720E0CCD050071 +:1070BC007D32DE70113272CD137211ED74CD1372FC +:1070CC00CD107221377522A3703E4032A570CDD100 +:0270DC0072C977 +:1070DF002A01001103001922077111030019220A56 +:1070EF007111030019220D71110300192210711172 +:1070FF001E0019221271C9C30000C30000C3000093 +:10710F00C30000C300000E28064605C219710DC248 +:10711F0017713DC21571C9D511FA74CD1372D1CD46 +:10712F0013721E5BCD797411ED74CD137211497208 +:10713F00CD13723A8D70B7C8118172CD1372C93ADF +:10714F00DE70FE30FA85713A5C00B7CA61713DC3DB +:10715F0066710E19CD05005F0E2ECD05000603AF2B +:10716F000E032183002B7E1F770DC2747105C26E33 +:10717F00715E2356EBC90E1BCD0500EB2AA77023BA +:10718F00010000D51A1E0817DA9B7103572B7DB427 +:10719F00CAAC717A1DC29671D113C39271D1696055 +:1071AF003AAA70D603C8293DC2B571C9011404C3E8 +:1071BF00AD74011405C3AD74010C06CDAD7411335C +:1071CF0075C31372010107CDAD74C3CD71010108F1 +:1071DF00CDAD74C3CD71010809CDAD74C3CD7101AF +:1071EF00080BCDAD74C3CD713A8D70B7CA0472015F +:1071FF00010DC30772010109CDAD74112F75C313B2 +:10720F0072112F72E5D5C50E09CD0500C1D1E1C9A7 +:10721F00E1232323E97E1223130B78B1C22472C911 +:10722F000D0A24636F6E6669677572656420666FF9 +:10723F00722024207769746820245D0D0A0D0A4E90 +:10724F00756D626572206F66207061636B65747314 +:10725F003A0D0A4E756D626572206F662072657405 +:10726F00726965733A0D0A46696C65206E616D65CA +:10727F003A240D0A0D0A0D0A527061636B3A0D0A1A +:10728F000D0A537061636B3A244350585357542E71 +:10729F0041534D20283130292020372D4A616E2D42 +:1072AF003139393120244350584349462E41534DEB +:1072BF0020283229202031342D4A756C2D38372063 +:1072CF0024003E8132D0722A4700116F00192263C9 +:1072DF0073232323222073110F0019222F732A45A2 +:1072EF0000111200195E2356D5237E326873237E58 +:1072FF00326973110900195E2356237E3266732398 +:10730F007E326773EBE53E00772377233E9977E173 +:10731F00CD1F73E1E53E00772377233E9977E1CDCB +:10732F002E732A68737E3288703289705F57CD58FA +:10733F0073C9C9C9C9114B73CD1372C924E65FC391 +:10734F001F727BC97BC97BC9C92A66737B77EB2AFE +:10735F00687377CD6273C9000000001003313130BC +:10736F002402020431323030240707053133342E22 +:10737F00352403030331353024040404313830300D +:10738F00240808053139323030240F0F04323030E1 +:10739F00302409090432343030240A0A03333030E0 +:1073AF002405050433363030240B0B0434383030C9 +:1073BF00240C0C023530240000033630302406062E +:1073CF000437323030240D0D0237352401010439D2 +:1073DF00363030240E0E0D0A20202035302020208C +:1073EF00202037352020202031313020202020311F +:1073FF0033342E35202031353020202020333030CB +:10740F0020202020363030202020313230300D0A1D +:10741F0020313830302020203230303020202032C0 +:10742F003430302020203336303020202034383094 +:10743F003020202037323030202020393630302095 +:10744F00203139323030247E326174237E326074C1 +:10745F00C904803A6174320300C93AD07232030012 +:10746F00C9CD0671B7C8CD0971C94BCD0C71C9E52E +:10747F00C53A60744FCD0500C1E1C9CD0671B7C8DB +:10748F00CD0971C9CD8A74B7C29374C9CD1271C9B0 +:10749F00D5CD5573A7CAAB744BCD0F71D1C9C511DB +:1074AF000875CD1372E17DC61F5FE5CD7974E17C60 +:1074BF00C61F5FC379741E08CD79741E20CD7974F1 +:1074CF001E08C37974110175C31372110575C313A7 +:1074DF007220436966657220313838362024204384 +:1074EF0069666572203138383620241B4A0D0A0927 +:1074FF0009241B5E4B241B4A241B50241B412400D0 +:10750F001B4024001B4324001B4424001B4A000083 +:10751F0024000000240000001B4824001B4024000E +:08752F001B4224001B4B240049 +:0000000000 diff --git a/cpvca3.hex b/cpvca3.hex new file mode 100644 index 0000000..c032aa8 --- /dev/null +++ b/cpvca3.hex @@ -0,0 +1,84 @@ +:10700000AC0006009972B672C35774C36774C3713B +:1070100074C37E74C35874C36174C35974C38A74CF +:10702000C38674C30000C30000C3BB74C3B174C380 +:10703000AC74C3C174C3F871C3D471C3C871C3BC89 +:1070400071C3C271C3DD71C3E671C3EF71C3AC70AC +:10705000C34173C34273C34373C34473C34C73C309 +:107060005173C35773C35873C35674C32771C39402 +:1070700074C34F71C32572C31472F2746A73E573DB +:10708000000000000010011DFFFFFFFF00000001D5 +:107090000000000650500805000000000D0D2323DD +:0770A00031004080000101F6 +:1070AC00CDE0700E07CD050032DF700E0CCD050063 +:1070BC007D32DE70113372CD147211D474CD147212 +:1070CC00CD1172211E7522A3703E4032A570CDD118 +:0270DC0072C977 +:1070E0002A01001103001922087111030019220B53 +:1070F0007111030019220E7111030019221171116F +:107100001E0019221371C9C30000C30000C3000090 +:10711000C30000C300000E28064605C21A710DC246 +:1071200018713DC21671C9D511E174CD1472D1CD5B +:1071300014721E5BCD617411D474CD1472114A7235 +:10714000CD14723A8D70B7C8118272CD1472C93ADB +:10715000DE70FE30FA86713A5C00B7CA62713DC3D8 +:1071600067710E19CD05005F0E2ECD05000603AF29 +:107170000E032183002B7E1F770DC2757105C26F30 +:10718000715E2356EBC90E1BCD0500EB2AA77023B9 +:10719000010000D51A1E0817DA9C7103572B7DB425 +:1071A000CAAD717A1DC29771D113C39371D1696051 +:1071B0003AAA70D603C8293DC2B671C9011404C3E6 +:1071C0009474011405C39474010C06CD9474111ABF +:1071D00075C31472010107CD9474C3CE7101010807 +:1071E000CD9474C3CE71010809CD9474C3CE7101DE +:1071F000080BCD9474C3CE713A8D70B7CA05720175 +:10720000010DC30872010109CD9474111675C314E0 +:1072100072113072E5D5C50E09CD0500C1D1E1C9A5 +:10722000E1232323E97E1223130B78B1C22572C90F +:107230000D0A24636F6E6669677572656420666FF8 +:10724000722024207769746820245D0D0A0D0A4E8F +:10725000756D626572206F66207061636B65747313 +:107260003A0D0A4E756D626572206F662072657404 +:10727000726965733A0D0A46696C65206E616D65C9 +:107280003A240D0A0D0A0D0A527061636B3A0D0A19 +:107290000D0A537061636B3A244350585357542E70 +:1072A00041534D20283130292020372D4A616E2D41 +:1072B0003139393120244350584349462E41534DEA +:1072C00020283229202031342D4A756C2D38372062 +:1072D000243E8132DF702A4700116F001922637348 +:1072E000232323222073110F0019222F732A450014 +:1072F000111200195E2356D5237E326873237E3225 +:107300006973110900195E2356237E326673237E4A +:10731000326773EBE53E00772377233E9977E1CD23 +:107320001F73E1E53E00772377233E9977E1CD2E69 +:10733000732A68737E3288703289705F57CD5873B4 +:10734000C9C9C9C9114B73CD1472C924E65FC320E2 +:10735000727BC97BC97BC9C92A66737B77EB2A68B4 +:107360007377CD6273C900000000100331313024FF +:1073700002020431323030240707053133342E3510 +:10738000240303033135302404040431383030241D +:107390000808053139323030240F0F0432303030D4 +:1073A0002409090432343030240A0A0333303024EB +:1073B00005050433363030240B0B043438303024C8 +:1073C0000C0C02353024000003363030240606044D +:1073D00037323030240D0D0237352401010439369F +:1073E0003030240E0E0D0A202020353020202020A1 +:1073F000203735202020203131302020202031330B +:10740000342E3520203135302020202033303020DC +:10741000202020363030202020313230300D0A201C +:1074200031383030202020323030302020203234AB +:107430003030202020333630302020203438303097 +:1074400020202037323030202020393630302020A4 +:10745000313932303024C9C9C90E061EFFCD0500AE +:10746000C90E06CD0500C9E5C50E04CD0500C1E174 +:10747000C90E07CD0500B7C80E03CD0500C9CD71F3 +:1074800074B7C27E74C9CD1371C9D5CD5573A7CA5F +:107490009274D1C9C511EF74CD1472E17DC61F5F1E +:1074A000E5CD6174E17CC61F5FC361741E08CD61C8 +:1074B000741E20CD61741E08C3617411E874C31476 +:1074C0007211EC74C31472204369666572203138FE +:1074D00038362024204369666572203138383620DA +:1074E000241B4A0D0A0909241B5E4B241B4A241B3A +:1074F00050241B4124001B4024001B4324001B4438 +:1075000024001B4A000024000000240000001B4847 +:0E75100024001B4024001B4224001B4B2400BF +:0000000000 diff --git a/cpvci3.hex b/cpvci3.hex new file mode 100644 index 0000000..81c5a62 --- /dev/null +++ b/cpvci3.hex @@ -0,0 +1,86 @@ +:10700000AC0006009972B672C33874C34874C35298 +:1070100074C35F74C33974C34274C33A74C36B746A +:10702000C36774C30000C30000C39C74C39274C3DD +:107030008D74C3A274C3F871C3D471C3C871C3BCC7 +:1070400071C3C271C3DD71C3E671C3EF71C3AC70AC +:10705000C3DD72C3E472C3E572C3E672C30373C3D4 +:107060001473C31A73C31B73C33774C32771C375F7 +:1070700074C34F71C32572C31472EC744B73C6731F +:10708000000000000010011DFFFFFFFF00000001D5 +:107090000000000650500805000000000D0D2323DD +:0770A00031004080000101F6 +:1070AC00CDE0700E07CD050032DF700E0CCD050063 +:1070BC007D32DE70113372CD147211CE74CD147218 +:1070CC00CD1172213F7522A3703E4032A570CDD1F7 +:0270DC0072C977 +:1070E0002A01001103001922087111030019220B53 +:1070F0007111030019220E7111030019221171116F +:107100001E0019221371C9C30000C30000C3000090 +:10711000C30000C300000E28064605C21A710DC246 +:1071200018713DC21671C9D511DB74CD1472D1CD61 +:1071300014721E5BCD427411CE74CD1472114A725A +:10714000CD14723A8D70B7C8118272CD1472C93ADB +:10715000DE70FE30FA86713A5C00B7CA62713DC3D8 +:1071600067710E19CD05005F0E2ECD05000603AF29 +:107170000E032183002B7E1F770DC2757105C26F30 +:10718000715E2356EBC90E1BCD0500EB2AA77023B9 +:10719000010000D51A1E0817DA9C7103572B7DB425 +:1071A000CAAD717A1DC29771D113C39371D1696051 +:1071B0003AAA70D603C8293DC2B671C9011404C3E6 +:1071C0007574011405C37574010C06CD7574111422 +:1071D00075C31472010107CD7574C3CE7101010826 +:1071E000CD7574C3CE71010809CD7574C3CE71011C +:1071F000080BCD7574C3CE713A8D70B7CA05720194 +:10720000010DC30872010109CD7574111075C31405 +:1072100072113072E5D5C50E09CD0500C1D1E1C9A5 +:10722000E1232323E97E1223130B78B1C22572C90F +:107230000D0A24636F6E6669677572656420666FF8 +:10724000722024207769746820245D0D0A0D0A4E8F +:10725000756D626572206F66207061636B65747313 +:107260003A0D0A4E756D626572206F662072657404 +:10727000726965733A0D0A46696C65206E616D65C9 +:107280003A240D0A0D0A0D0A527061636B3A0D0A19 +:107290000D0A537061636B3A244350585357542E70 +:1072A00041534D20283130292020372D4A616E2D41 +:1072B0003139393120244350584349462E41534DEA +:1072C00020283229202031342D4A756C2D38372062 +:1072D000243E8132DF70111875CD1472C9113075DA +:1072E000CD1472C9C9C911ED72CD1472C90D0A420B +:1072F00020205472616E736D697420612042524582 +:10730000414B24E65FFE42CA0D73C32072113B75E8 +:10731000CD1472C97BC97BC97BC9C9D5114873CD4E +:107320001472F13CF5CD3073F1CD3073CD1172C9CB +:107330003DCA4073F51E4E0E06CD0500F1C33073F5 +:107340001E590E06CD0500C91B3F241003313130F4 +:107350002402020431323030240707053133342E41 +:10736000352403030331353024040404313830302C +:10737000240808053139323030240F0F0432303000 +:10738000302409090432343030240A0A03333030FF +:107390002405050433363030240B0B0434383030E8 +:1073A000240C0C023530240000033630302406064D +:1073B0000437323030240D0D0237352401010439F1 +:1073C000363030240E0E0D0A2020203530202020AB +:1073D000202037352020202031313020202020313E +:1073E00033342E35202031353020202020333030EA +:1073F00020202020363030202020313230300D0A3D +:1074000020313830302020203230303020202032DF +:1074100034303020202033363030202020343830B3 +:1074200030202020373230302020203936303020B4 +:1074300020313932303024C9C9C90E061EFFCD05AE +:1074400000C90E06CD0500C9E5C50E04CD0500C175 +:10745000E1C90E07CD0500B7C80E03CD0500C9CDA3 +:107460005274B7C25F74C9CD1371C9D5CD1873A753 +:10747000CA7374D1C9C511E974CD1472E17DC61FF8 +:107480005FE5CD4274E17CC61F5FC342741E08CD28 +:1074900042741E20CD42741E08C3427411E274C3AC +:1074A000147211E674C31472436966657220313830 +:1074B000383620285061726974792073657420749D +:1074C0006F207370616365206F6E6C79292420438F +:1074D00069666572203138383620241B4A0D0A0946 +:1074E00009241B5E4B241B4A241B50241B412400EF +:1074F0001B4024001B4324001B4424001B4A0000A3 +:1075000024000000240000001B4824001B4024002D +:107510001B4224001B4B24001B2F1B2A5B1B251B1B +:107520002A7E781B2A281B3F20204E4E4E590D24C0 +:0F7530001B261B2A291B2A5D1B5C241B2A2224D5 +:0000000000 diff --git a/cpvcif.hex b/cpvcif.hex new file mode 100644 index 0000000..58e314b --- /dev/null +++ b/cpvcif.hex @@ -0,0 +1,88 @@ +:10700000AC0006009872B572C34374C35F74C36B5F +:1070100074C37474C34A74C35A74C35174C3807400 +:10702000C37C74C30000C30000C3B574C3AB74C396 +:10703000A674C3BB74C3F771C3D371C3C771C3BB99 +:1070400071C3C171C3DC71C3E571C3EE71C3AC70B0 +:10705000C3DD72C3E472C3E572C3E672C30373C3D4 +:107060001473C31A73C31B73C33774C32671C38EDF +:1070700074C34E71C32472C3137205754B73C67308 +:10708000000000000010011DFFFFFFFF00000001D5 +:107090000000000650500805000000000D0D2323DD +:0770A00031004080000101F6 +:1070AC00CDDF700E07CD050032D0720E0CCD050071 +:1070BC007D32DE70113272CD137211E774CD137202 +:1070CC00CD107221587522A3703E4032A570CDD1DF +:0270DC0072C977 +:1070DF002A01001103001922077111030019220A56 +:1070EF007111030019220D71110300192210711172 +:1070FF001E0019221271C9C30000C30000C3000093 +:10710F00C30000C300000E28064605C219710DC248 +:10711F0017713DC21571C9D511F474CD1372D1CD4C +:10712F0013721E5BCD5A7411E774CD13721149722D +:10713F00CD13723A8D70B7C8118172CD1372C93ADF +:10714F00DE70FE30FA85713A5C00B7CA61713DC3DB +:10715F0066710E19CD05005F0E2ECD05000603AF2B +:10716F000E032183002B7E1F770DC2747105C26E33 +:10717F00715E2356EBC90E1BCD0500EB2AA77023BA +:10718F00010000D51A1E0817DA9B7103572B7DB427 +:10719F00CAAC717A1DC29671D113C39271D1696055 +:1071AF003AAA70D603C8293DC2B571C9011404C3E8 +:1071BF008E74011405C38E74010C06CD8E74112DBF +:1071CF0075C31372010107CD8E74C3CD7101010810 +:1071DF00CD8E74C3CD71010809CD8E74C3CD7101ED +:1071EF00080BCD8E74C3CD713A8D70B7CA0472017E +:1071FF00010DC30772010109CD8E74112975C313D7 +:10720F0072112F72E5D5C50E09CD0500C1D1E1C9A7 +:10721F00E1232323E97E1223130B78B1C22472C911 +:10722F000D0A24636F6E6669677572656420666FF9 +:10723F00722024207769746820245D0D0A0D0A4E90 +:10724F00756D626572206F66207061636B65747314 +:10725F003A0D0A4E756D626572206F662072657405 +:10726F00726965733A0D0A46696C65206E616D65CA +:10727F003A240D0A0D0A0D0A527061636B3A0D0A1A +:10728F000D0A537061636B3A244350585357542E71 +:10729F0041534D20283130292020372D4A616E2D42 +:1072AF003139393120244350584349462E41534DEB +:1072BF0020283229202031342D4A756C2D38372063 +:1072CF0024003E8132D072113175CD1372C911492C +:1072DF0075CD1372C9C9C911ED72CD1372C90D0ADB +:1072EF004220205472616E736D6974206120425286 +:1072FF0045414B24E65FFE42CA0D73C31F72115402 +:10730F0075CD1372C97BC97BC97BC9C9D5114873A8 +:10731F00CD1372F13CF5CD3073F1CD3073CD1072CA +:10732F00C93DCA4073F51E4E0E06CD0500F1C330A0 +:10733F00731E590E06CD0500C91B3F2410033131B2 +:10734F003024020204313230302407070531333440 +:10735F002E3524030303313530240404043138302F +:10736F0030240808053139323030240F0F04323001 +:10737F0030302409090432343030240A0A03333000 +:10738F00302405050433363030240B0B04343830E9 +:10739F0030240C0C02353024000003363030240624 +:1073AF00060437323030240D0D0237352401010425 +:1073BF0039363030240E0E0D0A2020203530202093 +:1073CF002020203735202020203131302020202050 +:1073DF003133342E352020313530202020203330EA +:1073EF003020202020363030202020313230300D18 +:1073FF000A20313830302020203230303020202009 +:10740F0032343030202020333630302020203438B2 +:10741F0030302020203732303020202039363030A5 +:10742F0020203139323030247E324274237E324173 +:10743F0074C904803A4274320300C93AD0723203DD +:10744F0000C9CD0671B7C8CD0971C94BCD0C71C933 +:10745F00E5C53A41744FCD0500C1E1C9CD0671B7FD +:10746F00C8CD0971C9CD6B74B7C27474C9CD12710F +:10747F00C9D5CD1873A7CA8C744BCD0F71D1C9C59F +:10748F00110275CD1372E17DC61F5FE5CD5A74E110 +:10749F007CC61F5FC35A741E08CD5A741E20CD5A66 +:1074AF00741E08C35A7411FB74C3137211FF74C393 +:1074BF00137243696665722031383836202850615F +:1074CF00726974792073657420746F2073706163AF +:1074DF0065206F6E6C7929242043696665722031AF +:1074EF0038383620241B4A0D0A0909241B5E4B2409 +:1074FF001B4A241B50241B4124001B4024001B4308 +:10750F0024001B4424001B4A000024000000240018 +:10751F0000001B4824001B4024001B4224001B4B6F +:10752F0024001B2F1B2A5B1B251B2A7E781B2A2856 +:10753F001B3F20204E4E4E590D241B261B2A291B64 +:09754F002A5D1B5C241B2A222486 +:0000000000 diff --git a/cpvcom.hex b/cpvcom.hex new file mode 100644 index 0000000..97fdd86 --- /dev/null +++ b/cpvcom.hex @@ -0,0 +1,57 @@ +:10700000AC00060000721D72C39672C3A572C3B0B5 +:1070100072C3B872C39672C39F72C39772C3C272AF +:10702000C3C072C30000C30000C3E072C3D672C302 +:10703000D172C3E672C3B871C3B871C3B871C3A9C2 +:1070400071C3AE71C3B871C3BB71C3C171C3AC703E +:10705000C34F72C35072C35172C35272C36F72C3B3 +:107060008E72C39472C39572C39572C33371C31E7B +:1070700073C33C71C3DB71C3CA7100000000000020 +:10708000000000000010FF1CFFFFFFFF00000001D8 +:107090000000000650500805000000000D0D2323DD +:0770A00031004080000101F6 +:1070AC00CDEC700E07CD050032EB700E0CCD05004B +:1070BC007D32EA7011E971CDCA7111EC72CDCA71D1 +:1070CC0011F971CDCA71111F73CDCA71CDC7712160 +:0E70DC00727322A3703E4032A570CD3A72C985 +:1070EC002A0100110300192214711103001922172F +:1070FC007111030019221A7111030019221D71114B +:10710C001E0019221F71C9C30000C30000C3000078 +:10711C00C30000C300000E28064605C226710DC22E +:10712C0024713DC22271C9D5114A73CDCA71D1C91E +:10713C003AEA70FE30FA73713A5C00B7CA4F713D8F +:10714C00C354710E19CD05005F0E2ECD050006033C +:10715C00AF0E032183002B7E1F770DC2627105C217 +:10716C005C715E2356EBC90E1BCD0500EB2AA77094 +:10717C0023010000D51A1E0817DA897103572B7DDD +:10718C00B4CA9A717A1DC28471D113C38071D1694A +:10719C00603AAA70D603C8293DC2A371C91E20C388 +:1071AC009F721E20CD9F721E25C39F72C3C7711183 +:1071BC005E73C3CA71116873C3CA7111E671E5D5E8 +:1071CC00C50E09CD0500C1D1E1C9E1232323E97E18 +:1071DC001223130B78B1C2DB71C90D0A24636F6ED5 +:1071EC006669677572656420666F72202420776902 +:1071FC00746820244350585357542E41534D202823 +:10720C003130292020372D4A616E2D31393931200A +:10721C00244350584E4F522E41534D202028342990 +:10722C00202031362D4A616E2D31393931243E8082 +:10723C00D3033E80D3033E40D3033E4ED3033E37AD +:10724C00D303C9C9C9C9115972CDCA71C90D0A4232 +:10725C0020205472616E736D697420612042524516 +:10726C00414B24E65FFE42CA7972C3D671DB03E65A +:10727C0004CA79723E3FD3033E19CD22713E37D3F7 +:10728C0003C97BC97BC97BC9C9C9C90E061EFFCD01 +:10729C000500C90E06CD0500C9DB03E601CAA572BF +:1072AC007BD302C9DB03E602C8DB02C9CDB072B7DF +:1072BC00C2B872C9AFC9D5CD9272A7CACF720E052A +:1072CC00CD0500D1C91E08C39F721E20CD9F721E12 +:1072DC0008C39F72115973C3CA7111E671C3CA7185 +:1072EC00436F6D61727420436F6D6D756E69636170 +:1072FC00746F72244350585644552E41534D2020E0 +:10730C00283629202031322D4F63742D31393930F4 +:10731C002024C947656E65726963202844756D62C7 +:10732C002920435254205465726D696E616C20742F +:10733C007970652073656C656374656420240D0A2F +:10734C005374617274696E67202E2E2E245E550D57 +:10735C000A240D0A525061636B3A20240D0A5350D3 +:06736C0061636B3A20246E +:0000000000 diff --git a/cpvcp3.hex b/cpvcp3.hex new file mode 100644 index 0000000..c604570 --- /dev/null +++ b/cpvcp3.hex @@ -0,0 +1,52 @@ +:10700000AC00060000721D72C34C72C35C72C36692 +:1070100072C37372C34D72C35672C34E72C37D7214 +:10702000C37B72C30000C30000C39B72C39172C3D1 +:107030008C72C3A172C3B871C3B871C3B871C3A94C +:1070400071C3AE71C3B871C3BB71C3C171C3AC703E +:10705000C33A72C33B72C33C72C33D72C33F72C337 +:107060004472C34A72C34B72C34B72C33371C3C5FC +:1070700072C33C71C3DB71C3CA7100000000000021 +:10708000000000000010FF1CFFFFFFFF00000001D8 +:107090000000000650500805000000000D0D2323DD +:0770A00031004080000101F6 +:1070AC00CDEC700E07CD050032EB700E0CCD05004B +:1070BC007D32EA7011E971CDCA7111F172CDCA71CC +:1070CC0011F971CDCA7111C672CDCA71CDC77121BA +:0E70DC00297322A3703E4032A570CD3972C9CF +:1070EC002A0100110300192214711103001922172F +:1070FC007111030019221A7111030019221D71114B +:10710C001E0019221F71C9C30000C30000C3000078 +:10711C00C30000C300000E14064605C226710DC242 +:10712C0024713DC22271C9D5110173CDCA71D1C967 +:10713C003AEA70FE30FA73713A5C00B7CA4F713D8F +:10714C00C354710E19CD05005F0E2ECD050006033C +:10715C00AF0E032183002B7E1F770DC2627105C217 +:10716C005C715E2356EBC90E1BCD0500EB2AA77094 +:10717C0023010000D51A1E0817DA897103572B7DDD +:10718C00B4CA9A717A1DC28471D113C38071D1694A +:10719C00603AAA70D603C8293DC2A371C91E20C388 +:1071AC0056721E20CD56721E25C35672C3C771115E +:1071BC001573C3CA71111F73C3CA7111E671E5D57A +:1071CC00C50E09CD0500C1D1E1C9E1232323E97E18 +:1071DC001223130B78B1C2DB71C90D0A24636F6ED5 +:1071EC006669677572656420666F72202420776902 +:1071FC00746820244350585357542E41534D202823 +:10720C003130292020372D4A616E2D31393931200A +:10721C00244350585359532E41534D202834302970 +:10722C00202032382D4175672D38392024C9C9C921 +:10723C00C9C924E65FC3D6717BC97BC97BC9C9C9DF +:10724C00C9C90E061EFFCD0500C90E06CD0500C925 +:10725C00E5C50E04CD0500C1E1C90E07CD0500B78B +:10726C00C80E03CD0500C9CD6672B7C27372C9AF23 +:10727C00C9D5CD4872A7CA8A720E05CD0500D1C9F1 +:10728C001E08C356721E20CD56721E08C3567211AC +:10729C001073C3CA7111E671C3CA71435058564476 +:1072AC00552E41534D2020283629202031322D4F88 +:1072BC0063742D313939302024C947656E65726984 +:1072CC0063202844756D6229204352542054657202 +:1072DC006D696E616C20747970652073656C656383 +:1072EC00746564202447656E657269632043502F72 +:1072FC004D2D3830240D0A5374617274696E6720F9 +:10730C002E2E2E245E550D0A240D0A525061636BED +:0D731C003A20240D0A535061636B3A20247F +:0000000000 diff --git a/cpvcpc.hex b/cpvcpc.hex new file mode 100644 index 0000000..c08bc1e --- /dev/null +++ b/cpvcpc.hex @@ -0,0 +1,134 @@ +:10700000AC0006009972B672C3EB76C31A77C33030 +:1070100077C35277C3EB76C3F476C3EC76C3947729 +:10702000C36874C30000C30000C3C277C3B877C38A +:10703000B377C3C877C3F871C3D471C3C871C3BC75 +:1070400071C3C271C3DD71C3E671C3EF71C3AC70AC +:10705000C37074C37E74C38874C38974C3D174C38A +:107060001B75C31D75C31E75C3EA76C32771C39B09 +:1070700077C34F71C32572C314720C785B75ED75BD +:10708000000000000010001CFFFFFFFF00000001D7 +:107090000000000650500805000000000D0D2323DD +:0770A00031004080000101F6 +:1070AC00CDE0700E07CD050032DF700E0CCD050063 +:1070BC007D32DE70113372CD147211CE77CD147215 +:1070CC00CD117221387822A3703E4032A570CDD2FA +:0270DC0072C977 +:1070E0002A01001103001922087111030019220B53 +:1070F0007111030019220E7111030019221171116F +:107100001E0019221371C9C30000C30000C3000090 +:10711000C30000C300000E21064605C21A710DC24D +:1071200018713DC21671C9D511E977CD1472D1CD50 +:1071300014721E5BCDF47611CE77CD1472114A72A3 +:10714000CD14723A8D70B7C8118272CD1472C93ADB +:10715000DE70FE30FA86713A5C00B7CA62713DC3D8 +:1071600067710E19CD05005F0E2ECD05000603AF29 +:107170000E032183002B7E1F770DC2757105C26F30 +:10718000715E2356EBC90E1BCD0500EB2AA77023B9 +:10719000010000D51A1E0817DA9C7103572B7DB425 +:1071A000CAAD717A1DC29771D113C39371D1696051 +:1071B0003AAA70D603C8293DC2B671C9011404C3E6 +:1071C0009B77011405C39B77010C06CD9B77113487 +:1071D00078C31472010107CD9B77C3CE71010108FA +:1071E000CD9B77C3CE71010809CD9B77C3CE7101CA +:1071F000080BCD9B77C3CE713A8D70B7CA0572016B +:10720000010DC30872010109CD9B77113078C314B9 +:1072100072113072E5D5C50E09CD0500C1D1E1C9A5 +:10722000E1232323E97E1223130B78B1C22572C90F +:107230000D0A24636F6E6669677572656420666FF8 +:10724000722024207769746820245D0D0A0D0A4E8F +:10725000756D626572206F66207061636B65747313 +:107260003A0D0A4E756D626572206F662072657404 +:10727000726965733A0D0A46696C65206E616D65C9 +:107280003A240D0A0D0A0D0A527061636B3A0D0A19 +:107290000D0A537061636B3A244350585357542E70 +:1072A00041534D20283130292020372D4A616E2D41 +:1072B0003139393120244350585043572E41534DD2 +:1072C00020283929202032322D4A616E2D3139395A +:1072D00031240E0CCD05007DFE31CAE87211F47325 +:1072E000CD14720E00CD05002A010011570019229D +:1072F0006C742A01001103001922577419225A7460 +:1073000019225D741922607419192263742A01000C +:10731000112A00192269742A01001133001922660A +:1073200074CD6B74E300FE01C2367311AE73CD14DD +:10733000720E00CD0500CD6B74E600AFB1C24B7389 +:10734000112574CD14720E00CD0500CD6B74BC00F8 +:10735000E578B9CA6473FE08C2697379FE02C2692E +:1073600073010000C5E1228870E17DD6050F0F0F83 +:10737000326F74CD6B74BC00326E74CD6B74E300ED +:1073800078B7CAA273FE01C2907379FE04FAA273A1 +:10739000CD6B74BC00EEFF3CF602EEFF3CCD6B748F +:1073A000B60021388822A3703E4032A570C94572CC +:1073B000726F72202D20202054686973204B6572F3 +:1073C0006D69742077696C6C206F6E6C79207275B2 +:1073D0006E206F6E2074686520416D7374726164F5 +:1073E00020435043203436342F3636342F36313252 +:1073F000380D0A244572726F72202D20496E636F1A +:1074000072726563742043502F4D207665727369E4 +:107410006F6E2C206E656564732043502F4D2033B2 +:107420002E780D0A244572726F72202D2020204E76 +:107430006F2053494F206F7074696F6E20666974B6 +:1074400074656420746F2074686973206D6163686B +:10745000696E650D0A24C30000C30000C30000C3A9 +:0E7460000000C30000C30000C30000C3000012 +:10747000CD6B74BC003A6E74CD6B74B600C91185C7 +:1074800074CD1472C90D0A24C9119074CD1472C937 +:107490000D0A4220205472616E736D697420612060 +:1074A000425245414B0D0A48202048616E67757075 +:1074B000207573696E67204454520D0A5720205777 +:1074C0006970652073637265656E20636C656172B7 +:1074D00024E65FFE42CAEC74FE48CAE574FE57CA51 +:1074E000C877C32072160A1EFFC3FE74169A1E1EAA +:1074F0003E0101DDFAED79ED78E601CAF0743E0552 +:10750000ED793A6F74B2ED797BCD16713E0501DDF0 +:10751000FAED793A6F74F68AED79C97BC9C9D5E17C +:107520007CB7C22B75210208C35575FE11C2367592 +:10753000210802C35575FE10C255753E3601DFFBAA +:10754000ED7901DCFB7CED7978ED7901DCFB7CEDFC +:107550007978ED79C9CD6B74B900C9120331313036 +:10756000240303043132303024080807313230302C +:107570002F3735240000053133342E35240404031D +:1075800031353024050504313830302409090531FE +:1075900039323030240F0F0432343030240A0A03D9 +:1075A00033303024060605333132353024101004D0 +:1075B00033363030240B0B0434383030240C0C02BA +:1075C00035302401010336303024070704373230C8 +:1075D00030240D0D0237352402020737352F3132A2 +:1075E00030302411110439363030240E0E0D0A0AC1 +:1075F0004E6F726D616C2072617465733A20353024 +:10760000202020203735202020203131302020201C +:107610003133342E352031353020202033303020A6 +:1076200020203630300D0A2020202020202020204D +:1076300020202020203132303020203138303020BE +:10764000203234303020203336303020203438306F +:107650003020203732303020203936303020203171 +:10766000393230300D0A0A486967682073706565E1 +:107670006420203A20333132353020286F6E6C7907 +:10768000206265747765656E20416D737472616404 +:1076900073290D0A0A53706C6974207261746573E2 +:1076A000203A20313230302F3735202852783D3182 +:1076B0003230302C2054783D20203735290D0A20D7 +:1076C0002020202020202020202020202037352F7F +:1076D00031323030202852783D202037352C20544C +:1076E000783D31323030290D0A24C9C9CD5674B7DE +:1076F000C8C359747BFE09CAFE764BC35C74CD6B5C +:1077000074BF007DE607EEFFC609B7C83DF50E2041 +:10771000CD5C74CD6A77F1C30A77C5CD607701DDA2 +:10772000FAED78E604CA1B777B01DCFAED79C1C972 +:10773000CD6A772A5E777CB5C82B225E772A5A7786 +:107740004E11C987197CE60F6711387819225A77CC +:1077500079C9CD3077B7C25277C938783878000008 +:10776000D5C5E5CD6A77E1C1D1C901DDFAED78E68D +:1077700001C801DCFAED782A5C777711C987197C9A +:10778000E60F6711387819225C772A5E7723225E2C +:1077900077C36A77D54BCD5F74D1C9C5110978CD50 +:1077A0001472E17CC61F5FE5CDF476E17DC61F5FF4 +:1077B000C3F4761E08C3F4761E20CDF4761E08C3EB +:1077C000F476110578C31472110078C31472416DF8 +:1077D0007374726164204350432077697468204356 +:1077E000502F4D20506C7573241B481B4A0D0A20E6 +:1077F0002020202020202020202020202020202485 +:107800001B481B4A240D1B4B241B59241B412400DD +:107810001B4224001B4324001B4424001B4524005E +:1078200024000000240000001B4824001B49240001 +:087830001B4A24001B4B24003D +:0000000000 diff --git a/cpvcps.hex b/cpvcps.hex new file mode 100644 index 0000000..2ac8789 --- /dev/null +++ b/cpvcps.hex @@ -0,0 +1,82 @@ +:10700000AC0006009972B672C33874C34874C35892 +:1070100074C36274C33974C34274C33A74C36C7466 +:10702000C36A74C30000C30000C3A374C39974C3CC +:107030009374C3A974C3F871C3D471C3C871C3BCBA +:1070400071C3C271C3DD71C3E671C3EF71C3AC70AC +:10705000C3DB72C3DC72C3DD72C3DE72C3FB72C3F7 +:107060002773C32D73C32E73C33774C32771C37BB8 +:1070700074C34F71C32572C31472D3744F73CA7330 +:10708000000000000010011DFFFFFFFF00000001D5 +:107090000000000650500805000000000D0D2323DD +:0770A00031004080000101F6 +:1070AC00CDE0700E07CD050032DF700E0CCD050063 +:1070BC007D32DE70113372CD147211AF74CD147237 +:1070CC00CD117221FF7422A3703E4032A570CDD039 +:0270DC0072C977 +:1070E0002A01001103001922087111030019220B53 +:1070F0007111030019220E7111030019221171116F +:107100001E0019221371C9C30000C30000C3000090 +:10711000C30000C300000E14064605C21A710DC25A +:1071200018713DC21671C9D511BD74CD1472D1CD7F +:1071300014721E5BCD427411AF74CD1472114A7279 +:10714000CD14723A8D70B7C8118272CD1472C93ADB +:10715000DE70FE30FA86713A5C00B7CA62713DC3D8 +:1071600067710E19CD05005F0E2ECD05000603AF29 +:107170000E032183002B7E1F770DC2757105C26F30 +:10718000715E2356EBC90E1BCD0500EB2AA77023B9 +:10719000010000D51A1E0817DA9C7103572B7DB425 +:1071A000CAAD717A1DC29771D113C39371D1696051 +:1071B0003AAA70D603C8293DC2B671C9011404C3E6 +:1071C0007B74011405C37B74010C06CD7B7411FB29 +:1071D00074C31472010107CD7B74C3CE7101010821 +:1071E000CD7B74C3CE71010809CD7B74C3CE710110 +:1071F000080BCD7B74C3CE713A8D70B7CA0572018E +:10720000010DC30872010109CD7B7411F774C31419 +:1072100072113072E5D5C50E09CD0500C1D1E1C9A5 +:10722000E1232323E97E1223130B78B1C22572C90F +:107230000D0A24636F6E6669677572656420666FF8 +:10724000722024207769746820245D0D0A0D0A4E8F +:10725000756D626572206F66207061636B65747313 +:107260003A0D0A4E756D626572206F662072657404 +:10727000726965733A0D0A46696C65206E616D65C9 +:107280003A240D0A0D0A0D0A527061636B3A0D0A19 +:107290000D0A537061636B3A244350585357542E70 +:1072A00041534D20283130292020372D4A616E2D41 +:1072B0003139393120244350584150502E41534DDB +:1072C00020283229202032322D6A756C2D3837243F +:1072D000213737228870EBCD2E73C9C9C9C911E592 +:1072E00072CD1472C90D0A4220205472616E736D02 +:1072F0006974206120425245414B24E65FFE42CA38 +:107300000573C320723AFBE2E604CA05733E80327D +:10731000FEE23E3F32FBE23E19CD16713E3732FBB4 +:10732000E23E0032FEE2C97BC97BC97BC9C93E800F +:1073300032FEE23AFBE23E4E32FAE23E043DC23D0C +:10734000737B32FAE23E3732FBE2AF32FEE2C91023 +:1073500003313130243232043132303024373705B2 +:107360003133342E3524333303313530243434046F +:1073700031383030243838053139323030243F3F0D +:1073800004323030302439390432343030243A3A3F +:10739000033330302435350433363030243B3B045E +:1073A00034383030243C3C02353024303003363021 +:1073B000302436360437323030243D3D0237352410 +:1073C00031310439363030243E3E0D0A202020353C +:1073D000302020202037352020203131302020203F +:1073E000203133342E3520203135302020202033F9 +:1073F00030302020202036303020202031323030F4 +:107400000D0A203138303020203230303020203208 +:1074100034303020202033363030202020343830B3 +:1074200030202020373230302020203936303020B4 +:1074300020313932303024C9C9C90E061EFFCD05AE +:1074400000C90E06CD0500C9E521FBE27EE601CAB2 +:107450004C7421FAE273E1C93AFBE2E602C83AFA57 +:10746000E2C9CD5874B7C26274C9AFC9D5CD2B7308 +:10747000A7CA79740E05CD0500D1C9C511D074CD48 +:107480001472E17CC61F5FE5CD4274E17DC61F5FCB +:10749000C3427411CD74C314721E20CD42741E08F1 +:1074A000C3427411C974C3147211C574C3147241F8 +:1074B00070706C652049492043502F4D241E1B5984 +:1074C0000D0A2020241E1B59240D1B5424080824B7 +:1074D0001B3D240B2400000A240000062400002485 +:1074E0000000002400000024000000240000001E12 +:0F74F0002400000B2400001B5924001B5424000F +:0000000000 diff --git a/cpvcpt.hex b/cpvcpt.hex new file mode 100644 index 0000000..3c35e9b --- /dev/null +++ b/cpvcpt.hex @@ -0,0 +1,87 @@ +:10700000AC000600A572C272C36274C37274C37D01 +:1070100074C38574C36374C36C74C36474C38F74A2 +:10702000C38D74C30000C30000C3AD74C3A374C395 +:107030009E74C3B374C30472C3E071C3D471C3C874 +:1070400071C3CE71C3E971C3F271C3FB71C3AC707C +:10705000C3F572C3FE72C33E73C33F73C35C73C395 +:107060007B73C38173C38273C36174C33371C3F40D +:1070700074C35B71C33172C3207224758673F77356 +:10708000000000000010011CFFFFFFFF00000001D6 +:107090000000000650500805000000000D0D2323DD +:0770A00031004080000101F6 +:1070AC00CDEC700E07CD050032EB700E0CCD05004B +:1070BC007D32EA70113F72CD207211B974CD2072FD +:1070CC00114F72CD2072110C75CD2072CD1D722115 +:0E70DC00507522A3703E4032A570CDDE72C901 +:1070EC002A0100110300192214711103001922172F +:1070FC007111030019221A7111030019221D71114B +:10710C001E0019221F71C9C30000C30000C3000078 +:10711C00C30000C300000E14064605C226710DC242 +:10712C0024713DC22271C9D5111275CD2072D1CDF9 +:10713C0020721E5BCD6C7411B974CD207211567215 +:10714C00CD20723A8D70B7C8118E72CD2072C93AAB +:10715C00EA70FE30FA92713A5C00B7CA6E713DC3A8 +:10716C0073710E19CD05005F0E2ECD05000603AF11 +:10717C000E032183002B7E1F770DC2817105C27B0C +:10718C00715E2356EBC90E1BCD0500EB2AA77023AD +:10719C00010000D51A1E0817DAA87103572B7DB40D +:1071AC00CAB9717A1DC2A371D113C39F71D1696021 +:1071BC003AAA70D603C8293DC2C271C9011404C3CE +:1071CC00F474011405C3F474010C06CDF474114C61 +:1071DC0075C32072010107CDF474C3DA7101010883 +:1071EC00CDF474C3DA71010809CDF474C3DA7101FA +:1071FC00080BCDF474C3DA713A8D70B7CA117201F1 +:10720C00010DC31472010109CDF474114875C3202A +:10721C0072113C72E5D5C50E09CD0500C1D1E1C98D +:10722C00E1232323E97E1223130B78B1C23172C9F7 +:10723C000D0A24636F6E6669677572656420666FEC +:10724C00722024207769746820245D0D0A0D0A4E83 +:10725C00756D626572206F66207061636B65747307 +:10726C003A0D0A4E756D626572206F6620726574F8 +:10727C00726965733A0D0A46696C65206E616D65BD +:10728C003A240D0A0D0A0D0A527061636B3A0D0A0D +:10729C000D0A537061636B3A244350585357542E64 +:1072AC0041534D20283130292020372D4A616E2D35 +:1072BC003139393120244350585359532E41534DB1 +:1072CC002028343029202032382D4175672D38394B +:1072DC0020243E80D34C210F0F228870EBCD82737B +:1072EC003E4ED34A3E37D34AC93E80D34C3E00D3A0 +:1072FC004CC9110573CD2072C920285573650943FB +:10730C004F4445202B205348494654202B20312FE5 +:10731C003220206B657920746F2067656E65726111 +:10732C007465206120436F6E74726F6C2D5C290D37 +:10733C000A24C9114673CD2072C90D0A422020546B +:10734C0072616E736D6974206120425245414B2409 +:10735C00E65FFE42CA6673C32C72DB4AE604CA6659 +:10736C00733E3FD34A3E19CD22713E37D34AC97B77 +:10737C00C97BC97BC9C97BD34CC90F0331313024BC +:10738C0003030431323030240909053133342E35EE +:10739C0024040403313530240505043138303024FD +:1073AC000A0A0432343030240B0B033330302406F9 +:1073BC00060433363030240C0C0434383030240DB1 +:1073CC000D02353024010103363030240707043711 +:1073DC00323030240E0E023735240202033930309D +:1073EC002408080439363030240F0F0D0A202020D1 +:1073FC0035302020202020373520202020313130FE +:10740C00202020203133342E3520203135302020DF +:10741C0020203330302020202036303020202020F7 +:10742C003930300D0A2031323030202020313830C4 +:10743C0030202020323430302020203336303020A1 +:10744C00202034383030202020373230302020209B +:10745C003936303024C9C9C90E061EFFCD0500C906 +:10746C000E06CD0500C9DB4AE601CA72747BD34B0C +:10747C00C9DB4AE602C8DB4BC9CD7D74B7C2857443 +:10748C00C9AFC9D5CD7F73A7CA9C740E05CD0500B5 +:10749C00D1C91E08C36C741E20CD6C741E08C36C3D +:1074AC0074111C75C32072111875C320724350548B +:1074BC002D3835787820756E64657220436F6D7049 +:1074CC007550616B2043502F4D24435058564455F2 +:1074DC002E41534D2020283629202031322D4F6348 +:1074EC00742D313939302024C5112075CD2072E12D +:1074FC007CC61F5FE5CD6C74E17DC61F5FC36C74E9 +:10750C0041444D3341241A00000D0A241A00002472 +:10751C001B5924000D1B3D240B2400000A240000E1 +:10752C000C240000082400001A0000242400000091 +:10753C00240000001E2400000B2400002400000086 +:04754C002400000017 +:0000000000 diff --git a/cpvcro.hex b/cpvcro.hex new file mode 100644 index 0000000..056a1e0 --- /dev/null +++ b/cpvcro.hex @@ -0,0 +1,59 @@ +:10700000AC00060000721D72C3C172C3D172C3DC32 +:1070100072C3E472C3C272C3CB72C3C372C3EE72D3 +:10702000C3EC72C30000C30000C30C73C30273C37C +:10703000FD72C31273C3B871C3B871C3B871C3A969 +:1070400071C3AE71C3B871C3BB71C3C171C3AC703E +:10705000C34872C34972C34A72C34B72C34D72C3F1 +:107060005272C35872C35972C3C072C33371C348DA +:1070700073C33C71C3DB71C3CA7100005D7293724C +:10708000000000000010FF1CFFFFFFFF00000001D8 +:107090000000000650500805000000000D0D2323DD +:0770A00031004080000101F6 +:1070AC00CDEC700E07CD050032EB700E0CCD05004B +:1070BC007D32EA7011E971CDCA71111873CDCA71A4 +:1070CC0011F971CDCA71114973CDCA71CDC7712136 +:0E70DC009C7322A3703E4032A570CD3972C95C +:1070EC002A0100110300192214711103001922172F +:1070FC007111030019221A7111030019221D71114B +:10710C001E0019221F71C9C30000C30000C3000078 +:10711C00C30000C300000E14064605C226710DC242 +:10712C0024713DC22271C9D5117473CDCA71D1C9F4 +:10713C003AEA70FE30FA73713A5C00B7CA4F713D8F +:10714C00C354710E19CD05005F0E2ECD050006033C +:10715C00AF0E032183002B7E1F770DC2627105C217 +:10716C005C715E2356EBC90E1BCD0500EB2AA77094 +:10717C0023010000D51A1E0817DA897103572B7DDD +:10718C00B4CA9A717A1DC28471D113C38071D1694A +:10719C00603AAA70D603C8293DC2A371C91E20C388 +:1071AC00CB721E20CDCB721E25C3CB72C3C77111FF +:1071BC008873C3CA71119273C3CA7111E671E5D594 +:1071CC00C50E09CD0500C1D1E1C9E1232323E97E18 +:1071DC001223130B78B1C2DB71C90D0A24636F6ED5 +:1071EC006669677572656420666F72202420776902 +:1071FC00746820244350585357542E41534D202823 +:10720C003130292020372D4A616E2D31393931200A +:10721C00244350585359532E41534D202834302970 +:10722C00202032382D4175672D383920243E01D36A +:10723C00223E90D320328870328970C9C9C9C9C91D +:10724C0024E65FC3D6717BC97BC97BC9C97BD320BC +:10725C00C907033131302401010431323030248824 +:10726C0088033135302482820432343030249090BB +:10727C0003333030248484043438303024A0A00408 +:10728C003936303024C0C00D0A2020203131302056 +:10729C002020313530202020333030202031323046 +:1072AC003020203234303020203438303020203917 +:1072BC0036303024C9C9C90E061EFFCD0500C90ED3 +:1072CC0006CD0500C9DB20E680CAD1727BD321C96B +:1072DC00DB20E640C8DB21C9CDDC72B7C2E472C941 +:1072EC00AFC9D5CD5672A7CAFB720E05CD0500D11C +:1072FC00C91E08C3CB721E20CDCB721E08C3CB7225 +:10730C00118373C3CA7111E671C3CA7143726F6D75 +:10731C00656D636F202854552D41525429244350D8 +:10732C00585644552E41534D2020283629202031C3 +:10733C00322D4F63742D313939302024C947656E95 +:10734C0065726963202844756D622920435254206C +:10735C005465726D696E616C20747970652073650B +:10736C006C656374656420240D0A537461727469CE +:10737C006E67202E2E2E245E550D0A240D0A5250B7 +:10738C0061636B3A20240D0A535061636B3A2024DD +:0000000000 diff --git a/cpvdel.hex b/cpvdel.hex new file mode 100644 index 0000000..6f9ea5f --- /dev/null +++ b/cpvdel.hex @@ -0,0 +1,68 @@ +:10700000AC00060000721D72C34673C35673C361A1 +:1070100073C36973C34773C35073C34873C3737334 +:10702000C37173C30000C30000C39173C38773C3EC +:107030008273C39773C3B871C3B871C3B871C3A95E +:1070400071C3AE71C3B871C3BB71C3C171C3AC703E +:10705000C34472C34572C34672C34772C34972C305 +:107060004E72C35472C35572C34573C33371C3CFD9 +:1070700073C33C71C3DB71C3CA7100005972D4720F +:10708000000000000010FF1CFFFFFFFF00000001D8 +:107090000000000650500805000000000D0D2323DD +:0770A00031004080000101F6 +:1070AC00CDEC700E07CD050032EB700E0CCD05004B +:1070BC007D32EA7011E971CDCA71119D73CDCA711F +:1070CC0011F971CDCA7111D073CDCA71CDC77121AF +:0E70DC00237422A3703E4032A570CD3972C9D4 +:1070EC002A0100110300192214711103001922172F +:1070FC007111030019221A7111030019221D71114B +:10710C001E0019221F71C9C30000C30000C3000078 +:10711C00C30000C300000E14064605C226710DC242 +:10712C0024713DC22271C9D511FB73CDCA71D1C96D +:10713C003AEA70FE30FA73713A5C00B7CA4F713D8F +:10714C00C354710E19CD05005F0E2ECD050006033C +:10715C00AF0E032183002B7E1F770DC2627105C217 +:10716C005C715E2356EBC90E1BCD0500EB2AA77094 +:10717C0023010000D51A1E0817DA897103572B7DDD +:10718C00B4CA9A717A1DC28471D113C38071D1694A +:10719C00603AAA70D603C8293DC2A371C91E20C388 +:1071AC0050731E20CD50731E25C35073C3C771116D +:1071BC000F74C3CA71111974C3CA7111E671E5D584 +:1071CC00C50E09CD0500C1D1E1C9E1232323E97E18 +:1071DC001223130B78B1C2DB71C90D0A24636F6ED5 +:1071EC006669677572656420666F72202420776902 +:1071FC00746820244350585357542E41534D202823 +:10720C003130292020372D4A616E2D31393931200A +:10721C00244350585359532E41534D202834302970 +:10722C00202032382D4175672D383920243E07D364 +:10723C0029328870328970C9C9C9C9C924E65FC3AB +:10724C00D6717BC97BC97BC9C97BD329C9100331D2 +:10725C003130240202043132303024070705313337 +:10726C00342E35240303033135302404040431381F +:10727C003030240808053139323030240F0F0432F5 +:10728C003030302409090432343030240A0A0333F4 +:10729C0030302405050433363030240B0B043438DD +:1072AC003030240C0C0235302400000336303024EE +:1072BC0006060437323030240D0D02373524010117 +:1072CC000439363030240E0E0D0A202020353020A3 +:1072DC002020202037352020202031313020202044 +:1072EC00203133342E3520203135302020202033EE +:1072FC0030302020202036303020202031323030E9 +:10730C000D0A20313830302020203230303020200F +:10731C0020323430302020203336303020202034BE +:10732C003830302020203732303020202039363091 +:10733C00302020313932303024C9C9C90E061EFF25 +:10734C00CD0500C90E06CD0500C9DB23E601CA56E2 +:10735C00737BD322C9DB23E602C8DB22C9CD617360 +:10736C00B7C26973C9AFC9D5CD5272A7CA80730EA3 +:10737C0005CD0500D1C91E08C350731E20CD507316 +:10738C001E08C35073110A74C3CA7111E671C3CAC3 +:10739C007144696769636F6D702044656C706869CE +:1073AC0020313030244350585644552E41534D20F3 +:1073BC0020283629202031322D4F63742D31393954 +:1073CC00302024C947656E65726963202844756D49 +:1073DC00622920435254205465726D696E616C2091 +:1073EC00747970652073656C656374656420240D15 +:1073FC000A5374617274696E67202E2E2E245E55AA +:10740C000D0A240D0A525061636B3A20240D0A5365 +:07741C005061636B3A20246C +:0000000000 diff --git a/cpvdis.hex b/cpvdis.hex new file mode 100644 index 0000000..62885a0 --- /dev/null +++ b/cpvdis.hex @@ -0,0 +1,73 @@ +:10700000AC00060000721D72C38F73C39F73C3AAC6 +:1070100073C3B273C39073C39973C39173C3BC73C7 +:10702000C3BA73C30000C30000C3DA73C3D073C311 +:10703000CB73C3E073C3B871C3B871C3B871C3A9CC +:1070400071C3AE71C3B871C3BB71C3C171C3AC703E +:10705000C37272C37372C37472C37572C3B472C3E2 +:10706000F272C3F872C3F972C38E73C33371C3254E +:1070700074C33C71C3DB71C3CA71000018735B73C6 +:10708000000000000010FF1CFFFFFFFF00000001D8 +:107090000000000650500805000000000D0D2323DD +:0770A00031004080000101F6 +:1070AC00CDEC700E07CD050032EB700E0CCD05004B +:1070BC007D32EA7011E971CDCA7111E673CDCA71D6 +:1070CC0011F971CDCA71112674CDCA71CDC7712158 +:0E70DC00797422A3703E4032A570CD3972C97E +:1070EC002A0100110300192214711103001922172F +:1070FC007111030019221A7111030019221D71114B +:10710C001E0019221F71C9C30000C30000C3000078 +:10711C00C30000C300000E28064605C226710DC22E +:10712C0024713DC22271C9D5115174CDCA71D1C916 +:10713C003AEA70FE30FA73713A5C00B7CA4F713D8F +:10714C00C354710E19CD05005F0E2ECD050006033C +:10715C00AF0E032183002B7E1F770DC2627105C217 +:10716C005C715E2356EBC90E1BCD0500EB2AA77094 +:10717C0023010000D51A1E0817DA897103572B7DDD +:10718C00B4CA9A717A1DC28471D113C38071D1694A +:10719C00603AAA70D603C8293DC2A371C91E20C388 +:1071AC0099731E20CD99731E25C39973C3C7711192 +:1071BC006574C3CA71116F74C3CA7111E671E5D5D8 +:1071CC00C50E09CD0500C1D1E1C9E1232323E97E18 +:1071DC001223130B78B1C2DB71C90D0A24636F6ED5 +:1071EC006669677572656420666F72202420776902 +:1071FC00746820244350585357542E41534D202823 +:10720C003130292020372D4A616E2D31393931200A +:10721C00244350585359532E41534D202834302970 +:10722C00202032382D4175672D383920243E0CD35F +:10723C00043E0BD3043E0DD3043E00D3043E0ED3C8 +:10724C00043E03D3043E0BD3043E52D3043E04D37A +:10725C00043E44D3043E03D3043E71D3043E05D311 +:10726C00043EEAD304C9C9C9C9117C72CDCA71C91B +:10727C000D0A42205472616E736D69742061203363 +:10728C0030306D7320425245414B0D0A4C205472E4 +:10729C00616E736D697420612035207365636F6E48 +:1072AC006420425245414B24E65FFE42CAC972FE3D +:1072BC004CCAC372C3D671D51611C3CC72D5160184 +:1072CC003E01D304DB04E601CACC723E05D3043E76 +:1072DC00FAD3043E1ECD227115C2DF72D13E05D306 +:1072EC00043EEAD304C97BC97BC97BC9C93E0CD314 +:1072FC00047BD3043E0DD3047AD3043E0ED3043E58 +:10730C0003D3043E0BD3043E52D304C909033131D9 +:10731C0030246E0404313230302402010331353014 +:10732C00243F030432343030243200033330302411 +:10733C009F0104343830302418000336303024CE0A +:10734C00000237352481060439363030240B000D09 +:10735C000A202037352020313130202031353020A3 +:10736C002033303020203630302020313230302065 +:10737C002032343030202034383030202039363030 +:10738C003024C9C9C90E061EFFCD0500C90E06CD95 +:10739C000500C9DB04E604CA9F737BD305C9DB0473 +:1073AC00E601C8DB05C9CDAA73B7C2B273C9AFC9B0 +:1073BC00D5CDF672A7CAC9730E05CD0500D1C91E6D +:1073CC0008C399731E20CD99731E08C3997311605D +:1073DC0074C3CA7111E671C3CA71446973636F7661 +:1073EC00657279207573696E672038335520626F2A +:1073FC0061726420706F727420422443505856445A +:10740C00552E41534D2020283629202031322D4F26 +:10741C0063742D313939302024C947656E65726922 +:10742C0063202844756D62292043525420546572A0 +:10743C006D696E616C20747970652073656C656321 +:10744C0074656420240D0A5374617274696E67202C +:10745C002E2E2E245E550D0A240D0A525061636B9C +:0D746C003A20240D0A535061636B3A20242E +:0000000000 diff --git a/cpvdm2.hex b/cpvdm2.hex new file mode 100644 index 0000000..fb20248 --- /dev/null +++ b/cpvdm2.hex @@ -0,0 +1,70 @@ +:10700000AC0006009872B572C35B73C37773C38319 +:1070100073C38C73C36273C37273C36973C39B738B +:10702000C39473C30000C30000C3D773C3CD73C33D +:10703000C873C3DD73C3F771C3D371C3C771C3BB57 +:1070400071C3C171C3DC71C3E571C3EE71C3AC70B0 +:10705000C3D972C3E172C3E272C3E372C30073C3E4 +:107060001B73C32173C32273C32273C32671C3A9C5 +:1070700073C34E71C32472C31372127400000000F4 +:1070800042732C730010001CFFFFFFFF0000000183 +:107090000000000650500805000000000D0D2323DD +:0770A00031004080000101F6 +:1070AC00CDDF700E07CD0500325A730E0CCD0500E6 +:1070BC007D32DE70113272CD137211E373CD137207 +:1070CC00CD1072213E7422A3703E4032A570CDD1FA +:0270DC0072C977 +:1070DF002A01001103001922077111030019220A56 +:1070EF007111030019220D71110300192210711172 +:1070FF001E0019221271C9C30000C30000C3000093 +:10710F00C30000C300000E14064605C219710DC25C +:10711F0017713DC21571C9D511F673CD1372D1CD4B +:10712F0013721E5BCD727311E373CD13721149721B +:10713F00CD13723A8D70B7C8118172CD1372C93ADF +:10714F00DE70FE30FA85713A5C00B7CA61713DC3DB +:10715F0066710E19CD05005F0E2ECD05000603AF2B +:10716F000E032183002B7E1F770DC2747105C26E33 +:10717F00715E2356EBC90E1BCD0500EB2AA77023BA +:10718F00010000D51A1E0817DA9B7103572B7DB427 +:10719F00CAAC717A1DC29671D113C39271D1696055 +:1071AF003AAA70D603C8293DC2B571C9011404C3E8 +:1071BF00A973011405C3A973010C06CDA973113A64 +:1071CF0074C31372010107CDA973C3CD71010108F7 +:1071DF00CDA973C3CD71010809CDA973C3CD7101B9 +:1071EF00080BCDA973C3CD713A8D70B7CA04720164 +:1071FF00010DC30772010109CDA973113674C313B1 +:10720F0072112F72E5D5C50E09CD0500C1D1E1C9A7 +:10721F00E1232323E97E1223130B78B1C22472C911 +:10722F000D0A24636F6E6669677572656420666FF9 +:10723F00722024207769746820245D0D0A0D0A4E90 +:10724F00756D626572206F66207061636B65747314 +:10725F003A0D0A4E756D626572206F662072657405 +:10726F00726965733A0D0A46696C65206E616D65CA +:10727F003A240D0A0D0A0D0A527061636B3A0D0A1A +:10728F000D0A537061636B3A244350585357542E71 +:10729F0041534D20283130292020372D4A616E2D42 +:1072AF003139393120244350585359532E41534DBE +:1072BF002028343029202032382D4175672D383958 +:1072CF002024010201CD1373C9C9010200CD13732C +:1072DF00C9C9C9C911EA72CD1372C90D0A4220205A +:1072EF005472616E736D6974206120425245414B37 +:1072FF0024E65FFE42CA0A73C31F72010206CD1352 +:10730F007301001E2A0100113F0019E97BC97BC9D7 +:10731F007BC9C97E325973237E325873C90D0A4314 +:10732F004F4D4D554E49434154494F4E5320706F69 +:10733F00727424010E434F4D4D554E4943415449EC +:10734F004F4E532455734204000442813A5973320D +:10735F000300C93A5A73320300C9CD0671B7C8CDBD +:10736F000971C94BCD0C71C9E5C53A58734FCD059D +:10737F0000C1E1C9CD0671B7C8CD0971C9CD8373FD +:10738F00B7C28C73C9CD1271CD1271C9D5CD1F7310 +:10739F00A7CAA7734BCD0F71D1C9C5110F74CD13E8 +:1073AF0072E1E56C2600CD08011E3BCD7273E1261C +:1073BF0000CD08011E48C372731E08C372731E20CE +:1073CF00CD72731E08C37273110A74C31372110343 +:1073DF0074C313724445436D61746520494920435A +:1073EF00502F4D2D3830241B3C1B5B481B5B4A0D27 +:1073FF000A0909241B5B481B5B4A240D1B5B4B24AA +:10740F001B5B241B5B41241B5B42241B5B43241B24 +:10741F005B44242400000024000000240000001B13 +:0F742F005B48241B4D24001B5B4A241B5B4B2432 +:0000000000 diff --git a/cpvdmv.hex b/cpvdmv.hex new file mode 100644 index 0000000..e9169ad --- /dev/null +++ b/cpvdmv.hex @@ -0,0 +1,72 @@ +:10700000AC00060000721D72C38173C39173C39CF0 +:1070100073C3A473C38273C38B73C38373C3B0730B +:10702000C3AC73C30000C30000C3CE73C3C473C337 +:10703000BF73C3D473C3B871C3B871C3B871C3A9E4 +:1070400071C3AE71C3B871C3BB71C3C171C3AC703E +:10705000C33C72C33D72C33E72C33F72C35C72C312 +:107060007B72C38172C38272C38073C33371C30FD7 +:1070700074C33C71C3DB71C3CA71000094720F7397 +:10708000000000000010FF1CFFFFFFFF00000001D8 +:107090000000000650500805000000000D0D2323DD +:0770A00031004080000101F6 +:1070AC00CDEC700E07CD050032EB700E0CCD05004B +:1070BC007D32EA7011E971CDCA7111DA73CDCA71E2 +:1070CC0011F971CDCA71111074CDCA71CDC771216E +:0E70DC00637422A3703E4032A570CD3B72C992 +:1070EC002A0100110300192214711103001922172F +:1070FC007111030019221A7111030019221D71114B +:10710C001E0019221F71C9C30000C30000C3000078 +:10711C00C30000C300000E14064605C226710DC242 +:10712C0024713DC22271C9D5113B74CDCA71D1C92C +:10713C003AEA70FE30FA73713A5C00B7CA4F713D8F +:10714C00C354710E19CD05005F0E2ECD050006033C +:10715C00AF0E032183002B7E1F770DC2627105C217 +:10716C005C715E2356EBC90E1BCD0500EB2AA77094 +:10717C0023010000D51A1E0817DA897103572B7DDD +:10718C00B4CA9A717A1DC28471D113C38071D1694A +:10719C00603AAA70D603C8293DC2A371C91E20C388 +:1071AC008B731E20CD8B731E25C38B73C3C77111BC +:1071BC004F74C3CA71115974C3CA7111E671E5D504 +:1071CC00C50E09CD0500C1D1E1C9E1232323E97E18 +:1071DC001223130B78B1C2DB71C90D0A24636F6ED5 +:1071EC006669677572656420666F72202420776902 +:1071FC00746820244350585357542E41534D202823 +:10720C003130292020372D4A616E2D31393931200A +:10721C0024435058544F522E41534D202835292089 +:10722C002031302D4A616E2D31393931202024C95D +:10723C00C9C9C9114672CDCA71C90D0A4220205460 +:10724C0072616E736D6974206120425245414B240A +:10725C00E65FFE42CA6672C3D671DB71E604CA668B +:10726C00723E2FD3773E64CD22713E27D377C97BF4 +:10727C00C97BC97BC9C93E00D3773E4ED3763E70DD +:10728C0083D3763E27D377C91003313130240202E1 +:10729C000431323030240707053133342E352403C2 +:1072AC000303313530240404043138303024080809 +:1072BC00053139323030240F0F043230303024098C +:1072CC00090432343030240A0A03333030240505E3 +:1072DC000433363030240B0B0434383030240C0C8F +:1072EC0002353024000003363030240606043732D1 +:1072FC003030240D0D02373524010104393630307D +:10730C00240E0E0D0A20202035302020202020377E +:10731C003520202020313130202020203133342ED4 +:10732C0035202031353020202020333030202020D3 +:10733C0020363030202020313230300D0A203138C8 +:10734C003030202020323030302020203234303089 +:10735C00202020333630302020203438303020208C +:10736C00203732303020202039363030202031394F +:10737C0032303024C9C9C90E061EFFCD0500C90E16 +:10738C0006CD0500C9DB71E601CA91737BD374C9C4 +:10739C00DB71E602C8DB70C9CD9C73B7C2A473C99C +:1073AC00CD1F71C9D5CD7F72A7CABD730E05CD0592 +:1073BC0000D1C91E08C38B731E20CD8B731E08C34E +:1073CC008B73114A74C3CA7111E671C3CA714E43EF +:1073DC0052204465636973696F6E4D617465205604 +:1073EC00241B2124004350585644552E41534D2004 +:1073FC0020283629202031322D4F63742D31393914 +:10740C00302024C947656E65726963202844756D08 +:10741C00622920435254205465726D696E616C2050 +:10742C00747970652073656C656374656420240DD4 +:10743C000A5374617274696E67202E2E2E245E5569 +:10744C000D0A240D0A525061636B3A20240D0A5325 +:07745C005061636B3A20242C +:0000000000 diff --git a/cpvgen.hex b/cpvgen.hex new file mode 100644 index 0000000..201057f --- /dev/null +++ b/cpvgen.hex @@ -0,0 +1,62 @@ +:10700000AC000600FF711C72C3DD72C3F972C305C8 +:1070100073C30E73C3E472C3F472C3EB72C31D7304 +:10702000C31673C30000C30000C33A73C33073C3F5 +:107030002B73C34073C3B771C3B771C3B771C3A810 +:1070400071C3AD71C3B771C3BA71C3C071C3AC7042 +:10705000C33972C33A72C33B72C33C72C33E72C33C +:107060004372C34972C34A72C34A72C33271C36462 +:1070700073C33B71C3DA71C3C97100000000000023 +:107080009D7254720010FF1CFFFFFFFF0000000103 +:107090000000000650500805000000000D0D2323DD +:0770A00031004080000101F6 +:1070AC00CDEB700E07CD050032DC720E0CCD050059 +:1070BC007D32EA7011E871CDC971119073CDC9712F +:1070CC0011F871CDC971116573CDC971CDC671211E +:0E70DC00C87322A3703E4032A570CD3872C931 +:1070EB002A01001103001922137111030019221632 +:1070FB00711103001922197111030019221C71114E +:10710B001E0019221E71C9C30000C30000C300007A +:10711B00C30000C300000E14064605C225710DC244 +:10712B0023713DC22171C9D511A073CDC971D1C9CC +:10713B003AEA70FE30FA72713A5C00B7CA4E713D92 +:10714B00C353710E19CD05005F0E2ECD050006033E +:10715B00AF0E032183002B7E1F770DC2617105C219 +:10716B005B715E2356EBC90E1BCD0500EB2AA77096 +:10717B0023010000D51A1E0817DA887103572B7DDF +:10718B00B4CA99717A1DC28371D113C37F71D1694E +:10719B00603AAA70D603C8293DC2A271C91E20C38A +:1071AB00F4721E20CDF4721E25C3F472C3C6711186 +:1071BB00B473C3C97111BE73C3C97111E571E5D540 +:1071CB00C50E09CD0500C1D1E1C9E1232323E97E19 +:1071DB001223130B78B1C2DA71C90D0A24636F6ED7 +:1071EB006669677572656420666F72202420776903 +:1071FB00746820244350585357542E41534D202824 +:10720B003130292020372D4A616E2D31393931200B +:10721B00244350585359532E41534D202834302971 +:10722B00202032382D4175672D38392024C9C9C922 +:10723B00C9C924E65FC3D5717BC97BC97BC9C97E2C +:10724B0032DB72237E32DA72C90D0A435254206448 +:10725B0065766963650D0A505452206465766963DF +:10726B00650D0A545459206465766963650D0A559A +:10727B004331206465766963650D0A55523120648C +:10728B0065766963650D0A555232206465766963CC +:10729B006524060343525424C8720350545224CB22 +:1072AB00720354545924CE720355433124D17203C3 +:1072BB0055523124D4720355523224D772550200E1 +:1072CB005604000002005702006A04007E0400040A +:1072DB0056953ADB72320300C93ADC72320300C9AD +:1072EB00CD1271B7C8CD1571C94BCD1871C9E5C594 +:1072FB003ADA724FCD0500C1E1C9CD1271B7C8CDD5 +:10730B001571C9CD0573B7C20E73C9CD1E71CD1ED4 +:10731B0071C9D5CD4772A7CA29734BCD1B71D1C982 +:10732B001E08C3F4721E20CDF4721E08C3F4721132 +:10733B00AF73C3C97111E571C3C97143505856443A +:10734B00552E41534D2020283629202031322D4FE8 +:10735B0063742D313939302024C947656E657269E4 +:10736B0063202844756D6229204352542054657262 +:10737B006D696E616C20747970652073656C6563E3 +:10738B00746564202447656E657269632043502FD2 +:10739B004D2D3830240D0A5374617274696E672059 +:1073AB002E2E2E245E550D0A240D0A525061636B4E +:0D73BB003A20240D0A535061636B3A2024E0 +:0000000000 diff --git a/cpvgni.hex b/cpvgni.hex new file mode 100644 index 0000000..04e5bfb --- /dev/null +++ b/cpvgni.hex @@ -0,0 +1,82 @@ +:10700000AC0006009972B672C33974C34974C35494 +:1070100074C35C74C33A74C34374C33B74C366746F +:10702000C36474C30000C30000C39C74C39274C3E0 +:107030008D74C3A274C3F871C3D471C3C871C3BCC7 +:1070400071C3C271C3DD71C3E671C3EF71C3AC70AC +:10705000C3E372C3E472C3E572C3E672C30373C3CE +:107060002373C32973C32A73C33874C32771C375C9 +:1070700074C34F71C32572C31472CF743B73BF7353 +:10708000000000000010011DFFFFFFFF00000001D5 +:107090000000000650500805000000000D0D2323DD +:0770A00031004080000101F6 +:1070AC00CDE0700E07CD050032DF700E0CCD050063 +:1070BC007D32DE70113372CD147211A874CD14723E +:1070CC00CD117221FB7422A3703E4032A570CDD13C +:0270DC0072C977 +:1070E0002A01001103001922087111030019220B53 +:1070F0007111030019220E7111030019221171116F +:107100001E0019221371C9C30000C30000C3000090 +:10711000C30000C300000E28064605C21A710DC246 +:1071200018713DC21671C9D511B774CD1472D1CD85 +:1071300014721E5BCD437411A874CD1472114A727F +:10714000CD14723A8D70B7C8118272CD1472C93ADB +:10715000DE70FE30FA86713A5C00B7CA62713DC3D8 +:1071600067710E19CD05005F0E2ECD05000603AF29 +:107170000E032183002B7E1F770DC2757105C26F30 +:10718000715E2356EBC90E1BCD0500EB2AA77023B9 +:10719000010000D51A1E0817DA9C7103572B7DB425 +:1071A000CAAD717A1DC29771D113C39371D1696051 +:1071B0003AAA70D603C8293DC2B671C9011404C3E6 +:1071C0007574011405C37574010C06CD757411F73F +:1071D00074C31472010107CD7574C3CE7101010827 +:1071E000CD7574C3CE71010809CD7574C3CE71011C +:1071F000080BCD7574C3CE713A8D70B7CA05720194 +:10720000010DC30872010109CD757411F374C31423 +:1072100072113072E5D5C50E09CD0500C1D1E1C9A5 +:10722000E1232323E97E1223130B78B1C22572C90F +:107230000D0A24636F6E6669677572656420666FF8 +:10724000722024207769746820245D0D0A0D0A4E8F +:10725000756D626572206F66207061636B65747313 +:107260003A0D0A4E756D626572206F662072657404 +:10727000726965733A0D0A46696C65206E616D65C9 +:107280003A240D0A0D0A0D0A527061636B3A0D0A19 +:107290000D0A537061636B3A244350585357542E70 +:1072A00041534D20283130292020372D4A616E2D41 +:1072B000313939312024435058474E492E41534DDE +:1072C0002020283329202032372D4F63742D383762 +:1072D000243E83D3EB3E14D3E83E00D3E93A3A731D +:1072E000D3EBC9C9C9C911ED72CD1472C90D0A42D7 +:1072F00020205472616E736D697420612042524582 +:10730000414B24E65FFE42CA0D73C32072DBEDE6FB +:1073100020CA0D733E40D3EB3E19CD16713A3A7335 +:10732000D3EDC97BC97BC97BC9C93E83D3EB7AD373 +:10733000E87BD3E93A3A73D3EBC903110331313017 +:107340002406D104313230302400A0053133342EEC +:1073500035240594033135302405000431383030AC +:1073600024006B05313932303024000A04323030C9 +:107370003024006004323430302400500333303085 +:10738000240280043336303024003505333834305D +:1073900030240005043438303024002802353024ED +:1073A0000F000336303024014004373230302400DF +:1073B0001B023735240A0004393630302400140DFE +:1073C0000A20202035302020202020203735202082 +:1073D0002020313130202020203133342E35202020 +:1073E000313530202020203330302020202036300E +:1073F00030202020313230300D0A2031383030201A +:1074000020203230303020202032343030202020F4 +:1074100033363030202020343830302020203732AE +:107420003030202020393630302020313932303091 +:107430002020333834303024C9C9C90E061EFFCD90 +:107440000500C90E06CD0500C9DBEDE620CA49746A +:107450007BD3E8C9DBEDE601C8DBE8C9CD5474B7DE +:10746000C25C74C9AFC9D5CD2773A7CA73740E05A2 +:10747000CD0500D1C9C511CC74CD1472E17CC61FF5 +:107480005FE5CD4374E17DC61F5FC343741E08C32F +:1074900043741E20CD43741E08C3437411C974C3C2 +:1074A000147211C774C31472456163612047656E1D +:1074B000696520494949241A0D0A202020202020EE +:1074C000202020202020241A240D18241B3D240BCA +:1074D0002400000A2400000C240000082400001AE4 +:1074E0002400001B5224001B5324001E2400000B08 +:0B74F0002400001924000018240000F4 +:0000000000 diff --git a/cpvh89.hex b/cpvh89.hex new file mode 100644 index 0000000..661c733 --- /dev/null +++ b/cpvh89.hex @@ -0,0 +1,90 @@ +:10700000AC0006009972B672C3AC74C3BC74C3C73B +:1070100074C3CF74C3AD74C3B674C3AE74C3DB742E +:10702000C3D774C30000C30000C31175C30775C381 +:107030000275C31775C3F871C3D471C3C871C3BCDB +:1070400071C3C271C3DD71C3E671C3EF71C3AC70AC +:10705000C31973C31A73C31B73C31C73C34B73C3AA +:107060007E73C38473C38873C3AB74C32771C3EACD +:1070700074C34F71C32572C314724275A173347403 +:10708000000000000010001CFFFFFFFF00000001D7 +:107090000000000650500805000000000D0D2323DD +:0770A00031004080000101F6 +:1070AC00CDE0700E07CD050032DF700E0CCD050063 +:1070BC007D32DE70113372CD1472111D75CD1472C8 +:1070CC00CD1172216E7522A3703E4032A570CDD2C7 +:0270DC0072C977 +:1070E0002A01001103001922087111030019220B53 +:1070F0007111030019220E7111030019221171116F +:107100001E0019221371C9C30000C30000C3000090 +:10711000C30000C300000E14064605C21A710DC25A +:1071200018713DC21671C9D5112D75CD1472D1CD0E +:1071300014721E5BCDB674111D75CD1472114A7296 +:10714000CD14723A8D70B7C8118272CD1472C93ADB +:10715000DE70FE30FA86713A5C00B7CA62713DC3D8 +:1071600067710E19CD05005F0E2ECD05000603AF29 +:107170000E032183002B7E1F770DC2757105C26F30 +:10718000715E2356EBC90E1BCD0500EB2AA77023B9 +:10719000010000D51A1E0817DA9C7103572B7DB425 +:1071A000CAAD717A1DC29771D113C39371D1696051 +:1071B0003AAA70D603C8293DC2B671C9011404C3E6 +:1071C000EA74011405C3EA74010C06CDEA74116A6D +:1071D00075C31472010107CDEA74C3CE71010108B1 +:1071E000CDEA74C3CE71010809CDEA74C3CE710132 +:1071F000080BCDEA74C3CE713A8D70B7CA0572011F +:10720000010DC30872010109CDEA74116675C3143A +:1072100072113072E5D5C50E09CD0500C1D1E1C9A5 +:10722000E1232323E97E1223130B78B1C22572C90F +:107230000D0A24636F6E6669677572656420666FF8 +:10724000722024207769746820245D0D0A0D0A4E8F +:10725000756D626572206F66207061636B65747313 +:107260003A0D0A4E756D626572206F662072657404 +:10727000726965733A0D0A46696C65206E616D65C9 +:107280003A240D0A0D0A0D0A527061636B3A0D0A19 +:107290000D0A537061636B3A244350585357542E70 +:1072A00041534D20283130292020372D4A616E2D41 +:1072B0003139393120244350584845412E41534DEE +:1072C00020283429202033312D4175672D3139385C +:1072D0003924CDF372DBDBF680D3DBDBD832887068 +:1072E000DBD93289703E03D3DBDBDCF601D3DCCDA6 +:1072F0000273C9DBD9321773AFD3D9DBDCF610D3F5 +:10730000DCC9DBD83E07CD1671DBD8DBDCE6EFD37A +:07731000DC3A1773D3D9C961 +:10731800C9C9C9C9112373CD1472C90D0A422020E5 +:107328005472616E736D6974206120425245414BFD +:107338000D0A44202044726F7020746865206C69BF +:107348006E6524E65FFE44C26473DBDCE6FED3DCD4 +:107358003E32CD1671DBDCF601D3DCC9FE42CA6CC5 +:1073680073C32072DBDBF640D3DB3E1ECD1671DB28 +:10737800DBE6BFD3DBC97BC97BC97BC9CD5273C9E7 +:10738800CDF372DBDBF680D3DB7BD3D87AD3D9DBC2 +:10739800DBE67FD3DBCD0273C91303313130241709 +:1073A800040431323030246000053133342E352462 +:1073B8005903043138303024400005313932303037 +:1073C80024060003323030244002043234303024A2 +:1073D8003000033330302480010433363030242029 +:1073E80000053338343030240300033435302400AA +:1073F80001043438303024180002353024000905DF +:1074080035363030302402000336303024C00004D2 +:107418003732303024100002373524000603393063 +:10742800302480000439363030240C000D0A202026 +:1074380020203530202020203735202020313130C1 +:10744800203133342E352020203230302020203394 +:107458003030202020343530202020363030202095 +:10746800203930302020313230300D0A2020313898 +:107478003030202032343030202033363030202055 +:107488003438303020203732303020203936303010 +:1074980020313932303020333834303020353630EE +:1074A800303024C9C9C90E061EFFCD0500C90E0615 +:1074B800CD0500C9DBDDE620CABC747BD3D8C9DBA7 +:1074C800DDE601C8DBD8C9CDC774B7C2CF74C9CD52 +:1074D8001371C9D5CD8273A7CAE8740E05CD05000E +:1074E800D1C9C5113F75CD1472E17CC61F5FE5CDCA +:1074F800B674E17DC61F5FC3B6741E08C3B6741E9A +:1075080020CDB6741E08C3B674113B75C31472112E +:107518003675C3147248656174682F5A656E69744C +:1075280068203839241B481B4A0D0A0909241B48BE +:107538001B4A240D1B4B241B59241B4124001B42AE +:1075480024001B4324001B4424001B4524001B4625 +:1075580024001B4724001B4824001B4924001B4A05 +:0675680024001B4B24006F +:0000000000 diff --git a/cpvh8q.hex b/cpvh8q.hex new file mode 100644 index 0000000..7171b7a --- /dev/null +++ b/cpvh8q.hex @@ -0,0 +1,69 @@ +:10700000AC0006009972B672C35873C36873C37339 +:1070100073C37B73C35973C36273C35A73C38773D8 +:10702000C38373C30000C30000C3BD73C3B373C382 +:10703000AE73C3C373C3F871C3D471C3C871C3BC87 +:1070400071C3C271C3DD71C3E671C3EF71C3AC70AC +:10705000C3EE72C3EF72C3F072C3F172C3F372C3B3 +:10706000F872C3FE72C3FF72C35773C32771C3960E +:1070700073C34F71C32572C31472FA7303733273EF +:10708000000000000010001CFFFFFFFF00000001D7 +:107090000000000650500805000000000D0D2323DD +:0770A00031004080000101F6 +:1070AC00CDE0700E07CD050032DF700E0CCD050063 +:1070BC007D32DE70113372CD147211C973CD14721E +:1070CC00CD117221267422A3703E4032A570CDD210 +:0270DC0072C977 +:1070E0002A01001103001922087111030019220B53 +:1070F0007111030019220E7111030019221171116F +:107100001E0019221371C9C30000C30000C3000090 +:10711000C30000C300000E14064605C21A710DC25A +:1071200018713DC21671C9D511E573CD1472D1CD58 +:1071300014721E5BCD627311C973CD1472114A7241 +:10714000CD14723A8D70B7C8118272CD1472C93ADB +:10715000DE70FE30FA86713A5C00B7CA62713DC3D8 +:1071600067710E19CD05005F0E2ECD05000603AF29 +:107170000E032183002B7E1F770DC2757105C26F30 +:10718000715E2356EBC90E1BCD0500EB2AA77023B9 +:10719000010000D51A1E0817DA9C7103572B7DB425 +:1071A000CAAD717A1DC29771D113C39371D1696051 +:1071B0003AAA70D603C8293DC2B671C9011404C3E6 +:1071C0009673011405C39673010C06CD96731122B4 +:1071D00074C31472010107CD9673C3CE7101010807 +:1071E000CD9673C3CE71010809CD9673C3CE7101DC +:1071F000080BCD9673C3CE713A8D70B7CA05720174 +:10720000010DC30872010109CD9673111E74C314D8 +:1072100072113072E5D5C50E09CD0500C1D1E1C9A5 +:10722000E1232323E97E1223130B78B1C22572C90F +:107230000D0A24636F6E6669677572656420666FF8 +:10724000722024207769746820245D0D0A0D0A4E8F +:10725000756D626572206F66207061636B65747313 +:107260003A0D0A4E756D626572206F662072657404 +:10727000726965733A0D0A46696C65206E616D65C9 +:107280003A240D0A0D0A0D0A527061636B3A0D0A19 +:107290000D0A537061636B3A244350585357542E70 +:1072A00041534D20283130292020372D4A616E2D41 +:1072B0003139393120244350584845412E41534DEE +:1072C00020283429202033312D4175672D3139385C +:1072D00039241180013E10D3DC3E80D3DB7AD3D930 +:1072E0007BD3D83E03D3DBDBD83E09D3DCC9C9C985 +:1072F000C9C924E65FC320727BC97BC97BC9C9CDDC +:10730000D572C9060333303024018003363030246F +:1073100000C0043132303024006004323430302474 +:10732000003004343830302400180439363030242A +:10733000000C0D0A20333030202020363030202041 +:107340003132303020203234303020203438303068 +:1073500020203936303024C9C9C90E061EFFCD059C +:1073600000C90E06CD0500C9DBDDE620CA68737BC7 +:10737000D3D8C9DBDDE601C8DBD8C9CD7373B7C28A +:107380007B73C9CD1371C9D5CDFC72A7CA94730E96 +:1073900005CD0500D1C9C511F773CD1472E17CC6C6 +:1073A0001F5FE5CD6273E17DC61F5FC362731E0878 +:1073B000C362731E20CD62731E08C3627311F37320 +:1073C000C3147211EE73C314724865617468204867 +:1073D000382077697468207175616420492F4F20C7 +:1073E00063617264241B481B4A0D0A0909241B4867 +:1073F0001B4A240D1B4B241B59241B4124001B42F8 +:1074000024001B4324001B4424001B4524001B466E +:1074100024001B4724001B4824001B4924001B4A4E +:0674200024001B4B2400B8 +:0000000000 diff --git a/cpvhor.hex b/cpvhor.hex new file mode 100644 index 0000000..202991a --- /dev/null +++ b/cpvhor.hex @@ -0,0 +1,57 @@ +:10700000AC00060000721D72C39672C3A572C3B0B5 +:1070100072C3B872C39672C39F72C39772C3C272AF +:10702000C3C072C30000C30000C3E072C3D672C302 +:10703000D172C3E672C3B871C3B871C3B871C3A9C2 +:1070400071C3AE71C3B871C3BB71C3C171C3AC703E +:10705000C34F72C35072C35172C35272C36F72C3B3 +:107060008E72C39472C39572C39572C33371C31C7D +:1070700073C33C71C3DB71C3CA7100000000000020 +:10708000000000000010FF1CFFFFFFFF00000001D8 +:107090000000000650500805000000000D0D2323DD +:0770A00031004080000101F6 +:1070AC00CDEC700E07CD050032EB700E0CCD05004B +:1070BC007D32EA7011E971CDCA7111EC72CDCA71D1 +:1070CC0011F971CDCA71111D73CDCA71CDC7712162 +:0E70DC00707322A3703E4032A570CD3A72C987 +:1070EC002A0100110300192214711103001922172F +:1070FC007111030019221A7111030019221D71114B +:10710C001E0019221F71C9C30000C30000C3000078 +:10711C00C30000C300000E28064605C226710DC22E +:10712C0024713DC22271C9D5114873CDCA71D1C920 +:10713C003AEA70FE30FA73713A5C00B7CA4F713D8F +:10714C00C354710E19CD05005F0E2ECD050006033C +:10715C00AF0E032183002B7E1F770DC2627105C217 +:10716C005C715E2356EBC90E1BCD0500EB2AA77094 +:10717C0023010000D51A1E0817DA897103572B7DDD +:10718C00B4CA9A717A1DC28471D113C38071D1694A +:10719C00603AAA70D603C8293DC2A371C91E20C388 +:1071AC009F721E20CD9F721E25C39F72C3C7711183 +:1071BC005C73C3CA71116673C3CA7111E671E5D5EC +:1071CC00C50E09CD0500C1D1E1C9E1232323E97E18 +:1071DC001223130B78B1C2DB71C90D0A24636F6ED5 +:1071EC006669677572656420666F72202420776902 +:1071FC00746820244350585357542E41534D202823 +:10720C003130292020372D4A616E2D31393931200A +:10721C00244350584E4F522E41534D202028342990 +:10722C00202031362D4A616E2D31393931243E8082 +:10723C00D3053E80D3053E40D3053E4ED3053E37A5 +:10724C00D305C9C9C9C9115972CDCA71C90D0A4230 +:10725C0020205472616E736D697420612042524516 +:10726C00414B24E65FFE42CA7972C3D671DB05E658 +:10727C0004CA79723E3FD3053E19CD22713E37D3F5 +:10728C0005C97BC97BC97BC9C9C9C90E061EFFCDFF +:10729C000500C90E06CD0500C9DB05E601CAA572BD +:1072AC007BD304C9DB05E602C8DB04C9CDB072B7D9 +:1072BC00C2B872C9AFC9D5CD9272A7CACF720E052A +:1072CC00CD0500D1C91E08C39F721E20CD9F721E12 +:1072DC0008C39F72115773C3CA7111E671C3CA7187 +:1072EC004E6F7274687374617220486F72697A6F32 +:1072FC006E244350585644552E41534D2020283669 +:10730C0029202031322D4F63742D3139393020240E +:10731C00C947656E65726963202844756D622920C2 +:10732C00435254205465726D696E616C207479708F +:10733C00652073656C656374656420240D0A537451 +:10734C00617274696E67202E2E2E245E550D0A24F0 +:10735C000D0A525061636B3A20240D0A535061633D +:04736C006B3A202434 +:0000000000 diff --git a/cpvhp1.hex b/cpvhp1.hex new file mode 100644 index 0000000..e8e0a0e --- /dev/null +++ b/cpvhp1.hex @@ -0,0 +1,80 @@ +:10700000AC0006009972B672C38173C39173C39BBF +:1070100073C3A973C38273C38B73C38373C3B37303 +:10702000C3B173C30000C30000C3F273C3E873C3EA +:10703000E373C3F873C3F871C3D471C3C871C3BC1D +:1070400071C3C271C3DD71C3E671C3EF71C3AC70AC +:10705000C30673C32273C32373C32473C32673C3CA +:107060002B73C33173C33273C33273C32771C3C26B +:1070700073C34F71C32572C31472267400000000DD +:1070800063733F730010001CFFFFFFFF000000014F +:107090000000000650500805000000000D0D2323DD +:0770A00031004080000101F6 +:1070AC00CDE0700E07CD050032DF700E0CCD050063 +:1070BC007D32DE70113372CD147211FE73CD1472E9 +:1070CC00CD117221DD7422A3703E4032A570CDD259 +:0270DC0072C977 +:1070E0002A01001103001922087111030019220B53 +:1070F0007111030019220E7111030019221171116F +:107100001E0019221371C9C30000C30000C3000090 +:10711000C30000C300000E28064605C21A710DC246 +:1071200018713DC21671C9D5111074CD1472D1CD2C +:1071300014721E5BCD8B7311FE73CD1472114A72E3 +:10714000CD14723A8D70B7C8118272CD1472C93ADB +:10715000DE70FE30FA86713A5C00B7CA62713DC3D8 +:1071600067710E19CD05005F0E2ECD05000603AF29 +:107170000E032183002B7E1F770DC2757105C26F30 +:10718000715E2356EBC90E1BCD0500EB2AA77023B9 +:10719000010000D51A1E0817DA9C7103572B7DB425 +:1071A000CAAD717A1DC29771D113C39371D1696051 +:1071B0003AAA70D603C8293DC2B671C9011404C3E6 +:1071C000C273011405C3C273010C06CDC273114E04 +:1071D00074C31472010107CDC273C3CE71010108DB +:1071E000CDC273C3CE71010809CDC273C3CE710184 +:1071F000080BCDC273C3CE713A8D70B7CA05720148 +:10720000010DC30872010109CDC273114A74C31480 +:1072100072113072E5D5C50E09CD0500C1D1E1C9A5 +:10722000E1232323E97E1223130B78B1C22572C90F +:107230000D0A24636F6E6669677572656420666FF8 +:10724000722024207769746820245D0D0A0D0A4E8F +:10725000756D626572206F66207061636B65747313 +:107260003A0D0A4E756D626572206F662072657404 +:10727000726965733A0D0A46696C65206E616D65C9 +:107280003A240D0A0D0A0D0A527061636B3A0D0A19 +:107290000D0A537061636B3A244350585357542E70 +:1072A00041534D20283130292020372D4A616E2D41 +:1072B0003139393120244350585359532E41534DBD +:1072C0002028343029202032382D4175672D383957 +:1072D000202401FF73CD050011D87401FF7ECD0578 +:1072E000002ADB7422D4743E0132D97421D3742273 +:1072F000DB7411D87401FF7ECD0500215274228AFF +:1073000070EBCD1472C901FF74CD05002AD474222C +:10731000DB7411D87401FF7ECD050011A874CD1463 +:1073200072C9C9C9C924E65FC320727BC97BC97B06 +:10733000C9C9F5C5D5E5EBCD1472E1D1C1F1C90DCF +:107340000A436F6D6D756E69636174696F6E73204A +:10735000706F72740D0A5072696E74657220706F6E +:10736000727424020E434F4D4D554E4943415449CA +:107370004F4E53245274075052494E544552247D67 +:1073800074C9C90E061EFFCD0500C90E06CD050045 +:10739000C9E5C50E04CD0500C1E1C901FF70CD05E9 +:1073A00000B7C80E03CD0500C9CD9B73B7C2A97342 +:1073B000C9AFC9D5CD2F73A7CAC0730E05CD0500BF +:1073C000D1C9050DC5112274CD1472E1E56C2600FA +:1073D000CD08011E72CD8B73E12600CD08011E433E +:1073E000C38B731E08C38B731E20CD8B731E08C303 +:1073F0008B73111E74C31472111974C31472485024 +:107400002D31323520536572696573203130302457 +:107410001B481B4A0D0A0909241B481B4A240D1B43 +:107420004B241B2661241B4124001B4224001B43C8 +:1074300024001B4424001B4A2400240000002400D4 +:1074400000001B4824001B4D24001B4A24001B4B3A +:1074500024001B2669313073313864394D1B26698D +:107460003273323564394D1B2669313073313664DD +:10747000324D1B26693073323564324D241B266928 +:10748000313073313664394D1B26693073323564BF +:10749000394D1B2669313073313864324D1B2669F2 +:1074A0003273323564324D241B26693073323564B1 +:1074B000394D1B2669313073313664394D1B2669CD +:1074C0003273323564394D1B26693130733138647B +:0D74D000394D24CD000078C90700C300002D +:0000000000 diff --git a/cpvhp1.txt b/cpvhp1.txt new file mode 100644 index 0000000..cf164cd --- /dev/null +++ b/cpvhp1.txt @@ -0,0 +1,99 @@ +. From BPA +. Postmark:30-Aug-89:08:08:48 +. To MAILER +. Expires:29-Sep-89:08:07:29 +. Subject: bitnet%"fdccu@cuvma" +Re: Version of CP/M Kermit for the HP-125 + +Below, delimited by lines of asterisks, you will find an Intel .HEX-formated +version of the system-dependent part of CP/M Kermit, Version 4.09, for the +HP-125 Business Assistant computer running HP's modified CP/M Version 2.2. +I suggest that it be called CPVHP1.TXT. I can also send the sources in +separate messages if you wish. Sorry it took so long but other projects +were pressing. +You may reach me by sending mail on Bitnet to mailer@uwalocke with the +subject "dec10%bpa". Cheers! +-- Mike Freeman, Bonneville Power Administration; P.O. Box 491; Vancouver, +WA 98666 Routine MORF (Telephone (206)690-2307) -- +************************************************************************ +:10600000AB0006009862B362C37D63C38D63C39720 +:1060100063C3A563C37E63C38763C37F63C3AF6387 +:10602000C3AD63C30000C30000C3EE63C3E463C336 +:10603000DF63C3F463C3F761C3D361C3C761C3BB89 +:1060400061C3C161C3DC61C3E561C3EE61C3AB6021 +:10605000C30263C31E63C31F63C32063C32263C33E +:106060002763C32D63C32E63C32E63C32661C3BEE0 +:1060700063C34E61C32462C3136222640000000044 +:106080005F633B630010001CFFFFFFFF0000000187 +:1060900000000640400805000000000D0D232331DC +:0660A00000408000010138 +:1060AB00CDDF600E07CD050032DE600E0CCD050096 +:1060BB007D32DD60113262CD136211FA63CD136252 +:1060CB00CD106221D96422A2603E4032A460CDCEB5 +:0260DB0062C998 +:1060DF002A01001103001922076111030019220A76 +:1060EF006111030019220D611103001922106111B2 +:1060FF001E0019221261C9C30000C30000C30000B3 +:10610F00C30000C300000E28064605C219610DC268 +:10611F0017613DC21561C9D5110C64CD1362D1CD84 +:10612F0013621E5BCD876311FA63CD13621149624F +:10613F00CD13623A8D60B7C8118162CD1362C93A2F +:10614F00DD60FE30FA85613A5C00B7CA61613DC31C +:10615F0066610E19CD05005F0E2ECD05000603AF4B +:10616F000E032183002B7E1F770DC2746105C26E53 +:10617F00615E2356EBC90E1BCD0500EB2AA66023EB +:10618F00010000D51A1E0817DA9B6103572B7DB447 +:10619F00CAAC617A1DC29661D113C39261D1696095 +:1061AF003AA960D603C8293DC2B561C9011404C319 +:1061BF00BE63011405C3BE63010C06CDBE63114A55 +:1061CF0064C31362010107CDBE63C3CD6101010832 +:1061DF00CDBE63C3CD61010809CDBE63C3CD6101DF +:1061EF00080BCDBE63C3CD613A8D60B7CA0462019F +:1061FF00010DC30762010109CDBE63114664C313CC +:10620F0062112F62E5D5C50E09CD0500C1D1E1C9D7 +:10621F00E1232323E97E1223130B78B1C22462C931 +:10622F000D0A24636F6E6669677572656420666F09 +:10623F00722024207769746820245D0D0A0D0A4EA0 +:10624F00756D626572206F66207061636B65747324 +:10625F003A0D0A4E756D626572206F662072657415 +:10626F00726965733A0D0A46696C65206E616D65DA +:10627F003A240D0A0D0A0D0A527061636B3A0D0A2A +:10628F000D0A537061636B3A244350585357542E81 +:10629F0041534D20283629202031362D4A756C2D3B +:1062AF00383720244350585359532E41534D2028EB +:1062BF003339292020342D4175672D38372024019B +:1062CF00FF73CD050011D46401FF7ECD05002AD7E1 +:1062DF006422D0643E0132D56421CF6422D7641189 +:1062EF00D46401FF7ECD0500214E64228A60EBCD80 +:1062FF001362C901FF74CD05002AD06422D764113F +:10630F00D46401FF7ECD050011A464CD1362C9C909 +:10631F00C9C924E65FC31F627BC97BC97BC9C9F5A5 +:10632F00C5D5E5EBCD1362E1D1C1F1C90D0A436FBC +:10633F006D6D756E69636174696F6E7320706F72C6 +:10634F00740D0A5072696E74657220706F727424C6 +:10635F00020E434F4D4D554E49434154494F4E53F5 +:10636F00244E64075052494E544552247964C9C98A +:10637F000E061EFFCD0500C90E06CD0500C9E5C5E9 +:10638F000E04CD0500C1E1C901FF70CD0500B7C8EE +:10639F000E03CD0500C9CD9763B7C2A563C9AFC9B9 +:1063AF00D5CD2B63A7CABC630E05CD0500D1C9059A +:1063BF000DC5111E64CD1362E1E56C2600CD0801F9 +:1063CF001E72CD8763E12600CD08011E43C387638C +:1063DF001E08C387631E20CD87631E08C387631102 +:1063EF001A64C31362111564C3136248502D3132FE +:1063FF00352053657269657320313030241B481B7B +:10640F004A0D0A0909241B481B4A240D1B4B241B48 +:10641F002661241B4124001B4224001B4324001B24 +:10642F004424001B4A240024000000240000001B09 +:10643F004824001B4D24001B4A24001B4B24001B27 +:10644F002669313073313864394D1B266932733206 +:10645F003564394D1B2669313073313664324D1B2B +:10646F0026693073323564324D241B2669313073FF +:10647F00313664394D1B26693073323564394D1B03 +:10648F002669313073313864324D1B2669327332CD +:10649F003564324D241B26693073323564394D1BF8 +:1064AF002669313073313664394D1B2669327332A8 +:1064BF003564394D1B2669313073313864394D24B9 +:0A64CF00CD000078C90700C30000EB +:0000000000 +************************************************************************ diff --git a/cpvkpr.hex b/cpvkpr.hex new file mode 100644 index 0000000..9e6b859 --- /dev/null +++ b/cpvkpr.hex @@ -0,0 +1,86 @@ +:10700000AC0006009972D072C38B74C39A74C3A586 +:1070100074C3AD74C38B74C39474C38C74C3B774DA +:10702000C3B574C30000C30000C3EB74C3E174C3F1 +:10703000DB74C3F174C3F871C3D471C3C871C3BC2A +:1070400071C3C271C3DD71C3E671C3EF71C3AC70AC +:10705000C30373C30473C30E73C30F73C35773C3E4 +:107060009773C39973C39A73C38A74C32771C3C3D5 +:1070700074C34F71C32572C3147214759E7319744F +:10708000000000000010011CFFFFFFFF00000001D6 +:107090000000000650500805000000000D0D2323DD +:0770A00031004080000101F6 +:1070AC00CDE0700E07CD050032DF700E0CCD050063 +:1070BC007D32DE70113372CD147211F774CD1472EF +:1070CC00CD117221407522A3703E4032A570CDEBDC +:0270DC0072C977 +:1070E0002A01001103001922087111030019220B53 +:1070F0007111030019220E7111030019221171116F +:107100001E0019221371C9C30000C30000C3000090 +:10711000C30000C300000E19064605C21A710DC255 +:1071200018713DC21671C9D5110175CD1472D1CD3A +:1071300014721E5BCD947411F774CD1472114A72DF +:10714000CD14723A8D70B7C8118272CD1472C93ADB +:10715000DE70FE30FA86713A5C00B7CA62713DC3D8 +:1071600067710E19CD05005F0E2ECD05000603AF29 +:107170000E032183002B7E1F770DC2757105C26F30 +:10718000715E2356EBC90E1BCD0500EB2AA77023B9 +:10719000010000D51A1E0817DA9C7103572B7DB425 +:1071A000CAAD717A1DC29771D113C39371D1696051 +:1071B0003AAA70D603C8293DC2B671C9011404C3E6 +:1071C000C374011405C3C374010C06CDC374113C10 +:1071D00075C31472010107CDC374C3CE71010108D8 +:1071E000CDC374C3CE71010809CDC374C3CE710180 +:1071F000080BCDC374C3CE713A8D70B7CA05720146 +:10720000010DC30872010109CDC374113875C3148F +:1072100072113072E5D5C50E09CD0500C1D1E1C9A5 +:10722000E1232323E97E1223130B78B1C22572C90F +:107230000D0A24636F6E6669677572656420666FF8 +:10724000722024207769746820245D0D0A0D0A4E8F +:10725000756D626572206F66207061636B65747313 +:107260003A0D0A4E756D626572206F662072657404 +:10727000726965733A0D0A46696C65206E616D65C9 +:107280003A240D0A0D0A0D0A527061636B3A0D0A19 +:107290000D0A537061636B3A244350585357542E70 +:1072A00041534D20283130292020372D4A616E2D41 +:1072B0003139393120244350585359532E41534DBD +:1072C00020283335292030312D4465632D3836246C +:1072D0004350584242492E41534D20283429202002 +:1072E000372D4A616E2D313939312411F9720E0A68 +:1072F0001A13D3060DC2F072C91818044401000312 +:10730000C105EAC9110B73CD1472C90D0A24C91144 +:107310001673CD1472C90D0A4220205472616E7327 +:107320006D6974206120425245414B0D0A4820206E +:1073300048616E677570207573696E67204454529A +:107340000D0A572020576970652073637265656E5A +:1073500020636C65617224E65FFE42CA7273FE4868 +:10736000CA6B73FE57CAF174C32072160A1EFFC39C +:107370008173169A1E1E3E01D306DB06E601CA760D +:10738000733E05D3063E6AB2D3067BCD16713E0529 +:10739000D3063EEAD306C97BC9C97BD300C9100313 +:1073A00031313024020204313230302407070531F4 +:1073B00033342E35240303033135302404040431DF +:1073C000383030240808053139323030240F0F04AA +:1073D000323030302409090432343030240A0A03B0 +:1073E0003330302405050433363030240B0B04349D +:1073F000383030240C0C0235302400000336303095 +:107400002406060437323030240D0D0237352401AE +:10741000010439363030240E0E0D0A20202035307C +:1074200020202020203735202020203131302020FE +:1074300020203133342E35202031353020202020BB +:1074400033303020202020363030202020313230A0 +:10745000300D0A20313830302020203230303020BA +:10746000202032343030202020333630302020208D +:107470003438303020202037323030202020393648 +:1074800030302020313932303024C9C90E061EFF79 +:10749000CD0500C90E06CD0500C9DB06E604CA9A73 +:1074A000747BD304C9DB06E601C8DB04C9CDA5742F +:1074B000B7C2AD74C9AFC9D5A7CAC1740E05CD0591 +:1074C00000D1C9C5110C75CD1472E17CC61F5FE5F2 +:1074D000CD9474E17DC61F5FC39474110F75C314FE +:1074E000721E20CD94741E08C39474110975C314C0 +:1074F00072110775C314724B617970726F2049491C +:10750000241A0D0A0909241A240D18241B3D2408E5 +:10751000200808240B2400000A2400000C2400008A +:10752000082400001A2400001B4724001B412400EB +:107530001E2400001B45240017240000182400000E +:0000000000 diff --git a/cpvlbo.hex b/cpvlbo.hex new file mode 100644 index 0000000..1848f55 --- /dev/null +++ b/cpvlbo.hex @@ -0,0 +1,90 @@ +:10700000AC0006009972B672C3AC74C3BC74C3CC36 +:1070100074C3D674C3AD74C3B674C3AE74C3E07422 +:10702000C3DE74C30000C30000C31C75C31275C364 +:107030000775C32275C3F871C3D471C3C871C3BCCB +:1070400071C3C271C3DD71C3E671C3EF71C3AC70AC +:10705000C30373C30473C30573C30673C33573C318 +:107060006C73C37273C37673C36774C32771C3EF42 +:1070700074C34F71C32572C314724A757B73F67360 +:10708000A1748C740010011CFFFFFFFF00000001C1 +:107090000000000650500805000000000D0D2323DD +:0770A00031004080000101F6 +:1070AC00CDE0700E07CD050032DF700E0CCD050063 +:1070BC007D32DE70113372CD1472112875CD1472BD +:1070CC00CD117221767522A3703E4032A570CDD2BF +:0270DC0072C977 +:1070E0002A01001103001922087111030019220B53 +:1070F0007111030019220E7111030019221171116F +:107100001E0019221371C9C30000C30000C3000090 +:10711000C30000C300000E14064605C21A710DC25A +:1071200018713DC21671C9D5113475CD1472D1CD07 +:1071300014721E5BCDB674112875CD1472114A728B +:10714000CD14723A8D70B7C8118272CD1472C93ADB +:10715000DE70FE30FA86713A5C00B7CA62713DC3D8 +:1071600067710E19CD05005F0E2ECD05000603AF29 +:107170000E032183002B7E1F770DC2757105C26F30 +:10718000715E2356EBC90E1BCD0500EB2AA77023B9 +:10719000010000D51A1E0817DA9C7103572B7DB425 +:1071A000CAAD717A1DC29771D113C39371D1696051 +:1071B0003AAA70D603C8293DC2B671C9011404C3E6 +:1071C000EF74011405C3EF74010C06CDEF74117256 +:1071D00075C31472010107CDEF74C3CE71010108AC +:1071E000CDEF74C3CE71010809CDEF74C3CE710128 +:1071F000080BCDEF74C3CE713A8D70B7CA0572011A +:10720000010DC30872010109CDEF74116E75C3142D +:1072100072113072E5D5C50E09CD0500C1D1E1C9A5 +:10722000E1232323E97E1223130B78B1C22572C90F +:107230000D0A24636F6E6669677572656420666FF8 +:10724000722024207769746820245D0D0A0D0A4E8F +:10725000756D626572206F66207061636B65747313 +:107260003A0D0A4E756D626572206F662072657404 +:10727000726965733A0D0A46696C65206E616D65C9 +:107280003A240D0A0D0A0D0A527061636B3A0D0A19 +:107290000D0A537061636B3A244350585357542E70 +:1072A00041534D20283130292020372D4A616E2D41 +:1072B0003139393120244350585359532E41534DBD +:1072C0002028343029202032382D4175672D383957 +:1072D000202411F8720E0A1A1332E5F732E7F70D7F +:1072E000C2D7723E0532D0F732D4F73288703EE40E +:1072F000328A703ED0328B7018180444010003C1EA +:1073000005EAC9C9C9C9110D73CD1472C90D0A4264 +:1073100020205472616E736D697420612042524561 +:10732000414B0D0A44202044726F70207468652020 +:107330006C696E6524E65FFE42CA4473FE44CA4E21 +:1073400073C320723E05CD68733EFAC355733E0584 +:10735000CD68733E6ACD68733E1ECD16713E05CD75 +:1073600068733EEACD6873C932E5F7C97BC97BC94A +:107370007BC9CD4E73C97B32D0F7C9100331313090 +:107380002402020431323030240707053133342E11 +:1073900035240303033135302404040431383030FC +:1073A000240808053139323030240F0F04323030D0 +:1073B000302409090432343030240A0A03333030CF +:1073C0002405050433363030240B0B0434383030B8 +:1073D000240C0C023530240000033630302406061D +:1073E0000437323030240D0D0237352401010439C1 +:1073F000363030240E0E0D0A20202035302020207B +:10740000202037352020202031313020202020310D +:1074100033342E35202031353020202020333030B9 +:1074200020202020363030202020313230300D0A0C +:1074300020313830302020203230303020202032AF +:107440003430302020203336303020202034383083 +:107450003020202037323030202020393630302084 +:10746000203139323030247D32C77432D374328ABD +:10747000703C32BE7432CD743269737C32867432A1 +:107480007873328B703AD0F7328870C90D0A525334 +:107490002D32333220706F72742041206F7220427F +:1074A0002402014124E4D0014224E6D4C9C90E06D5 +:1074B0001EFFCD0500C90E06CD0500C9E521E5F783 +:1074C0007EE604CAC07421E4F773E1C93AE5F7E641 +:1074D00001C83AE4F7C9CDCC74B7C2D674C9AFC9F4 +:1074E000D5CD7073A7CAED740E05CD0500D1C9C501 +:1074F000114275CD1472E17CC61F5FE5CDB674E113 +:107500007DC61F5FC3B674114575C314721E08C3D0 +:10751000B6741E20CDB6741E08C3B674113E75C372 +:107520001472113B75C314724C6F626F204D415839 +:107530002D3830241B2A0D0A0909241B2A240D1B6F +:1075400052241B3D2408200808240B2400000A2490 +:1075500000000C240000082400001B2A2400240042 +:107560000000240000001E2400001B4524001B59BD +:0675700024001B5424005E +:0000000000 diff --git a/cpvmdi.hex b/cpvmdi.hex new file mode 100644 index 0000000..c28f906 --- /dev/null +++ b/cpvmdi.hex @@ -0,0 +1,68 @@ +:10700000AC00060000721D72C33973C35773C362AC +:1070100073C36A73C34173C35173C34973C3747336 +:10702000C37273C30000C30000C39273C38873C3E9 +:107030008373C39873C3B871C3B871C3B871C3A95C +:1070400071C3AE71C3B871C3BB71C3C171C3AC703E +:10705000C34372C34472C34572C34672C34872C30A +:107060004D72C35372C35472C33873C33371C3CEEA +:1070700073C33C71C3DB71C3CA7100007772DC72E9 +:10708000000000000010FF1CFFFFFFFF00000001D8 +:107090000000000650500805000000000D0D2323DD +:0770A00031004080000101F6 +:1070AC00CDEC700E07CD050032EB700E0CCD05004B +:1070BC007D32EA7011E971CDCA71119E73CDCA711E +:1070CC0011F971CDCA7111CF73CDCA71CDC77121B0 +:0E70DC00227422A3703E4032A570CD3972C9D5 +:1070EC002A0100110300192214711103001922172F +:1070FC007111030019221A7111030019221D71114B +:10710C001E0019221F71C9C30000C30000C3000078 +:10711C00C30000C300000E14064605C226710DC242 +:10712C0024713DC22271C9D511FA73CDCA71D1C96E +:10713C003AEA70FE30FA73713A5C00B7CA4F713D8F +:10714C00C354710E19CD05005F0E2ECD050006033C +:10715C00AF0E032183002B7E1F770DC2627105C217 +:10716C005C715E2356EBC90E1BCD0500EB2AA77094 +:10717C0023010000D51A1E0817DA897103572B7DDD +:10718C00B4CA9A717A1DC28471D113C38071D1694A +:10719C00603AAA70D603C8293DC2A371C91E20C388 +:1071AC0051731E20CD51731E25C35173C3C771116A +:1071BC000E74C3CA71111874C3CA7111E671E5D586 +:1071CC00C50E09CD0500C1D1E1C9E1232323E97E18 +:1071DC001223130B78B1C2DB71C90D0A24636F6ED5 +:1071EC006669677572656420666F72202420776902 +:1071FC00746820244350585357542E41534D202823 +:10720C003130292020372D4A616E2D31393931200A +:10721C00244350585359532E41534D202834302970 +:10722C00202032382D4175672D38392024216000FB +:10723C00228870CD5472C9C9C9C9C924E65FC3D6A6 +:10724C00717BC97BC97BC9C9CD39733E87D34B2AA6 +:10725C008870EB7AD3497BD3483E07D34BAFD349E5 +:10726C00D34DDB4EDB4DDB48DB48C90D03313130F0 +:10727C0024170404313230302460000331353024BB +:10728C0000030531393230302406000432343030FA +:10729C00243000033330302480010533383430304F +:1072AC0024030003343530242001043438303024D6 +:1072BC0018000535363030302402000336303024C7 +:1072CC00C0000237352400060439363030240C0057 +:1072DC000D0A20202037352020202031313020206D +:1072EC002020313530202020203330302020202029 +:1072FC0034353020202020363030202020313230E0 +:10730C00300D0A20323430302020203438303020F8 +:10731C0020203936303020203139323030202033A3 +:10732C00383430302020353630303024C93A010022 +:10733C00F603D34FC93A0100F601D34FC90E061E0E +:10734C00FFCD0500C90E06CD0500C9DB4DE620CAF0 +:10735C0057737BD348C9DB4DE601C8DB48C9CD6206 +:10736C0073B7C26A73C9AFC9D5CD5172A7CA81733D +:10737C000E05CD0500D1C91E08C351731E20CD5179 +:10738C00731E08C35173110974C3CA7111E671C31A +:10739C00CA714D6F72726F77204465636973696F40 +:1073AC006E2049244350585644552E41534D2020AD +:1073BC00283629202031322D4F63742D3139393044 +:1073CC002024C947656E65726963202844756D6217 +:1073DC002920435254205465726D696E616C20747F +:1073EC007970652073656C656374656420240D0A7F +:1073FC005374617274696E67202E2E2E245E550DA7 +:10740C000A240D0A525061636B3A20240D0A535022 +:06741C0061636B3A2024BD +:0000000000 diff --git a/cpvmik.hex b/cpvmik.hex new file mode 100644 index 0000000..0408658 --- /dev/null +++ b/cpvmik.hex @@ -0,0 +1,78 @@ +:10700000AC0006009872B572C3EF73C30B74C3175C +:1070100074C32074C3F673C30674C3FD73C32F74A3 +:10702000C32874C30000C30000C36474C35A74C38C +:107030005574C36A74C3F771C3D371C3C771C3BB3B +:1070400071C3C171C3DC71C3E571C3EE71C3AC70B0 +:10705000C3FA72C30B73C30C73C30D73C30F73C333 +:107060001473C31E73C31F73C3B673C32671C33DAA +:1070700074C34E71C32472C31372887440738373D4 +:10708000D673C0730010011CFFFFFFFF000000015A +:107090000000000650500805000000000D0D2323DD +:0770A00031004080000101F6 +:1070AC00CDDF700E07CD050032EE730E0CCD050052 +:1070BC007D32DE70113272CD1372117074CD137279 +:1070CC00CD107221B47422A3703E4032A570CDD184 +:0270DC0072C977 +:1070DF002A01001103001922077111030019220A56 +:1070EF007111030019220D71110300192210711172 +:1070FF001E0019221271C9C30000C30000C3000093 +:10710F00C30000C300000E14064605C219710DC25C +:10711F0017713DC21571C9D5117B74CD1372D1CDC5 +:10712F0013721E5BCD0674117074CD1372114972F8 +:10713F00CD13723A8D70B7C8118172CD1372C93ADF +:10714F00DE70FE30FA85713A5C00B7CA61713DC3DB +:10715F0066710E19CD05005F0E2ECD05000603AF2B +:10716F000E032183002B7E1F770DC2747105C26E33 +:10717F00715E2356EBC90E1BCD0500EB2AA77023BA +:10718F00010000D51A1E0817DA9B7103572B7DB427 +:10719F00CAAC717A1DC29671D113C39271D1696055 +:1071AF003AAA70D603C8293DC2B571C9011404C3E8 +:1071BF003D74011405C33D74010C06CD3D7411B02F +:1071CF0074C31372010107CD3D74C3CD7101010862 +:1071DF00CD3D74C3CD71010809CD3D74C3CD71018F +:1071EF00080BCD3D74C3CD713A8D70B7CA047201CF +:1071FF00010DC30772010109CD3D7411AC74C313A6 +:10720F0072112F72E5D5C50E09CD0500C1D1E1C9A7 +:10721F00E1232323E97E1223130B78B1C22472C911 +:10722F000D0A24636F6E6669677572656420666FF9 +:10723F00722024207769746820245D0D0A0D0A4E90 +:10724F00756D626572206F66207061636B65747314 +:10725F003A0D0A4E756D626572206F662072657405 +:10726F00726965733A0D0A46696C65206E616D65CA +:10727F003A240D0A0D0A0D0A527061636B3A0D0A1A +:10728F000D0A537061636B3A244350585357542E71 +:10729F0041534D20283130292020372D4A616E2D42 +:1072AF003139393120244350585359532E41534DBE +:1072BF002028343029202032382D4175672D383958 +:1072CF00202411F2720E072112FFCDE1723EFF3220 +:1072DF00F2F1F31A77130DC2E272FBC9034105AA4B +:1072EF00044F0003CF05EA044400C911EB720E07E7 +:1072FF002112FFCDE1723E7F32F2F1C9C9C9C92413 +:10730F00E65FC31F727BFE0FC0AFC97BC97BC9C9C4 +:10731F00F32130FF72732131FF727306003E02BBFF +:10732F00F2347306083E042112FF773E44B077FB18 +:10733F00C90903313130246903043132303024500C +:10734F0000033135302480020432343030242800D9 +:10735F000333303024400104343830302414000318 +:10736F0036303024A000023735240005043936307A +:10737F0030240A000D0A20203735202031313020EB +:10738F00203135302020333030202036303020204F +:10739F003132303020203234303020203438303009 +:1073AF00202039363030247E32ED73237E32EC7359 +:1073BF00C90D0A434F4D4D554E49434154494F4E08 +:1073CF005320706F727424010E434F4D4D554E492B +:1073DF00434154494F4E5324E973B2040004B28120 +:1073EF003AED73320300C93AEE73320300C9CD068A +:1073FF0071B7C8CD0971C94BCD0C71C9E5C53AEC50 +:10740F00734FCD0500C1E1C9CD0671B7C8CD097164 +:10741F00C9CD1774B7C22074C9CD1271CD1271C9FD +:10742F00D5CD1C73A7CA3B744BCD0F71D1C9C511F4 +:10743F008574CD1372E17CC61F5FE5CD0674E17DC7 +:10744F00C61F5FC306741E08C306741E20CD0674C4 +:10745F001E08C30674118274C31372118074C31390 +:10746F00724D696B726F4D696B6B6F241A0D0A0940 +:10747F00241A240D1C241B3D240B2400000A240075 +:10748F00000C240000082400001A2400002400002F +:10749F0000240000001E240000240000001C240013 +:0574AF00001C24000098 +:0000000000 diff --git a/cpvmm.hex b/cpvmm.hex new file mode 100644 index 0000000..e5e4ac9 --- /dev/null +++ b/cpvmm.hex @@ -0,0 +1,72 @@ +:10700000AC00060000721D72C37A73C38A73C39505 +:1070100073C39D73C37B73C38473C37C73C3A77330 +:10702000C3A573C30000C30000C3C573C3BB73C350 +:10703000B673C3CB73C3B871C3B871C3B871C3A9F6 +:1070400071C3AE71C3B871C3BB71C3C171C3AC703E +:10705000C33A72C33B72C33C72C33D72C35A72C31C +:107060008572C38B72C38C72C37973C33371C30CC3 +:1070700074C33C71C3DB71C3CA71000090720B739F +:10708000000000000010FF1CFFFFFFFF00000001D8 +:107090000000000650500805000000000D0D2323DD +:0770A00031004080000101F6 +:1070AC00CDEC700E07CD050032EB700E0CCD05004B +:1070BC007D32EA7011E971CDCA7111D173CDCA71EB +:1070CC0011F971CDCA71110D74CDCA71CDC7712171 +:0E70DC00607422A3703E4032A570CD3972C997 +:1070EC002A0100110300192214711103001922172F +:1070FC007111030019221A7111030019221D71114B +:10710C001E0019221F71C9C30000C30000C3000078 +:10711C00C30000C300000E28064605C226710DC22E +:10712C0024713DC22271C9D5113874CDCA71D1C92F +:10713C003AEA70FE30FA73713A5C00B7CA4F713D8F +:10714C00C354710E19CD05005F0E2ECD050006033C +:10715C00AF0E032183002B7E1F770DC2627105C217 +:10716C005C715E2356EBC90E1BCD0500EB2AA77094 +:10717C0023010000D51A1E0817DA897103572B7DDD +:10718C00B4CA9A717A1DC28471D113C38071D1694A +:10719C00603AAA70D603C8293DC2A371C91E20C388 +:1071AC0084731E20CD84731E25C38473C3C77111D1 +:1071BC004C74C3CA71115674C3CA7111E671E5D50A +:1071CC00C50E09CD0500C1D1E1C9E1232323E97E18 +:1071DC001223130B78B1C2DB71C90D0A24636F6ED5 +:1071EC006669677572656420666F72202420776902 +:1071FC00746820244350585357542E41534D202823 +:10720C003130292020372D4A616E2D31393931200A +:10721C00244350585359532E41534D202834302970 +:10722C00202032382D4175672D38392024C9C9C921 +:10723C00C9114472CDCA71C90D0A42202054726121 +:10724C006E736D6974206120425245414B24E65F98 +:10725C00FE42CA6472C3D6713E01D38BDB8BE6014E +:10726C00CA64723E05D38B3EFAD38B3E1ECD22717F +:10727C003E05D38B3EEAD38BC97BC97BC97BC9C97D +:10728C007BD393C9100331313024E2E20431323024 +:10729C003024E7E7053133342E3524E3E30331356D +:1072AC003024E4E4043138303024E8E80531393254 +:1072BC00303024EFEF043230303024E9E90432343A +:1072CC00303024EAEA0333303024E5E50433363039 +:1072DC003024EBEB043438303024ECEC0235302421 +:1072EC00E0E00336303024E6E6043732303024ED6B +:1072FC00ED02373524E1E1043936303024EEEE0D61 +:10730C000A20202035302020373520202020313114 +:10731C0030202020203133342E35202031353020C0 +:10732C0020202033303020202020363030202020E8 +:10733C00313230300D0A20313830302020203230BC +:10734C003030202020323430302020203336303082 +:10735C00202020343830302020203732303020208C +:10736C0020393630302020313932303024C9C9C967 +:10737C000E061EFFCD0500C90E06CD0500C9DB8B20 +:10738C00E604CA8A737BD389C9DB8BE601C8DB8927 +:10739C00C9CD9573B7C29D73C9AFC9D5CD8972A735 +:1073AC00CAB4730E05CD0500D1C91E08C384731E63 +:1073BC0020CD84731E08C38473114774C3CA711122 +:1073CC00E671C3CA71504D43204D6963726F6D6194 +:1073DC007465207573696E6720706F727420492F05 +:1073EC004F244350585644552E41534D2020283697 +:1073FC0029202031322D4F63742D3139393020241E +:10740C00C947656E65726963202844756D622920D1 +:10741C00435254205465726D696E616C207479709E +:10742C00652073656C656374656420240D0A537460 +:10743C00617274696E67202E2E2E245E550D0A24FF +:10744C000D0A525061636B3A20240D0A535061634C +:04745C006B3A202443 +:0000000000 diff --git a/cpvmrl.hex b/cpvmrl.hex new file mode 100644 index 0000000..13cdef5 --- /dev/null +++ b/cpvmrl.hex @@ -0,0 +1,58 @@ +:10700000AC00060000721D72C36672C37672C3863E +:1070100072C3A572C36772C37172C36872C3B1725F +:10702000C3AD72C30000C30000C3CA72C3C072C341 +:10703000BB72C3D072C3B871C3B871C3B871C3A9EE +:1070400071C3AE71C3B871C3BB71C3C171C3AC703E +:10705000C33D72C33E72C34072C34172C35872C310 +:107060005E72C36472C36572C36672C33371C33424 +:1070700073C33C71C3DB71C3CA7100000000000020 +:10708000000000000010FF1CFFFFFFFF00000001D8 +:107090000000000650500805000000000D0D2323DD +:0770A00031004080000101F6 +:1070AC00CDEC700E07CD050032EB700E0CCD05004B +:1070BC007D32EA7011E971CDCA7111D672CDCA71E7 +:1070CC0011F971CDCA71113573CDCA71CDC771214A +:0E70DC00887322A3703E4032A570CD3972C970 +:1070EC002A0100110300192214711103001922172F +:1070FC007111030019221A7111030019221D71114B +:10710C001E0019221F71C9C30000C30000C3000078 +:10711C00C30000C300000E32064605C226710DC224 +:10712C0024713DC22271C9D5116073CDCA71D1C908 +:10713C003AEA70FE30FA73713A5C00B7CA4F713D8F +:10714C00C354710E19CD05005F0E2ECD050006033C +:10715C00AF0E032183002B7E1F770DC2627105C217 +:10716C005C715E2356EBC90E1BCD0500EB2AA77094 +:10717C0023010000D51A1E0817DA897103572B7DDD +:10718C00B4CA9A717A1DC28471D113C38071D1694A +:10719C00603AAA70D603C8293DC2A371C91E20C388 +:1071AC0071721E20CD71721E25C37172C3C771110D +:1071BC007473C3CA71117E73C3CA7111E671E5D5BC +:1071CC00C50E09CD0500C1D1E1C9E1232323E97E18 +:1071DC001223130B78B1C2DB71C90D0A24636F6ED5 +:1071EC006669677572656420666F72202420776902 +:1071FC00746820244350585357542E41534D202823 +:10720C003130292020372D4A616E2D31393931200A +:10721C00244350584D524C2E41534D202832292096 +:0E722C002032322D4A756E2D3837202024C9AD +:10723D00C9C924C9C90D0A4220205472616E736DEB +:10724D006974206120425245414B24E65FC3D671DB +:10725D00C97BC97BC97BC9C9C9C9C9CD5DF5B7C8CA +:10726D00CD6EF5C94BCD7FF5C9F5E5D5C54B3E01C5 +:10727D0057CDA2F6C1D1E1F1C93A32FAB7C83E01F4 +:10728D0057CD51F6F5F33E003232FA32D3F23AD4FD +:10729D00F232D5F2FB00F1C9CD8672B7C2A572C923 +:1072AD00CD1F71C9D5CD6272A7CAB972D1C91E08D9 +:1072BD00C371721E20CD71721E08C37172116F736E +:1072CD00C3CA7111E671C3CA714254204D65726C07 +:1072DD00696E204D323231352C20706F727420540E +:1072ED005459313A2C2073657474696E6773207527 +:1072FD006E6368616E6765642E2454657374206DCA +:10730D006573736167650D0A244350585644552EB5 +:10731D0041534D2020283629202031322D4F6374C2 +:10732D002D313939302024C947656E657269632066 +:10733D002844756D622920435254205465726D693D +:10734D006E616C20747970652073656C656374650E +:10735D006420240D0A5374617274696E67202E2E99 +:10736D002E245E550D0A240D0A525061636B3A208E +:0B737D00240D0A535061636B3A20247A +:0000000000 diff --git a/cpvns.hex b/cpvns.hex new file mode 100644 index 0000000..446d9f1 --- /dev/null +++ b/cpvns.hex @@ -0,0 +1,60 @@ +:10700000AC00060000721D72C3CE72C3DD72C3E80D +:1070100072C3F072C3CE72C3D772C3CF72C3FA7297 +:10702000C3F872C30000C30000C31873C30E73C358 +:107030000973C31E73C3B871C3B871C3B871C3A950 +:1070400071C3AE71C3B871C3BB71C3C171C3AC703E +:10705000C34572C34672C34772C34872C34A72C300 +:107060004F72C35572C35672C3CD72C33371C354CA +:1070700073C33C71C3DB71C3CA7100005A72997249 +:10708000000000000010FF1CFFFFFFFF00000001D8 +:107090000000000650500805000000000D0D2323DD +:0770A00031004080000101F6 +:1070AC00CDEC700E07CD050032EB700E0CCD05004B +:1070BC007D32EA7011E971CDCA71112473CDCA7198 +:1070CC0011F971CDCA71115573CDCA71CDC771212A +:0E70DC00A87322A3703E4032A570CD3A72C94F +:1070EC002A0100110300192214711103001922172F +:1070FC007111030019221A7111030019221D71114B +:10710C001E0019221F71C9C30000C30000C3000078 +:10711C00C30000C300000E28064605C226710DC22E +:10712C0024713DC22271C9D5118073CDCA71D1C9E8 +:10713C003AEA70FE30FA73713A5C00B7CA4F713D8F +:10714C00C354710E19CD05005F0E2ECD050006033C +:10715C00AF0E032183002B7E1F770DC2627105C217 +:10716C005C715E2356EBC90E1BCD0500EB2AA77094 +:10717C0023010000D51A1E0817DA897103572B7DDD +:10718C00B4CA9A717A1DC28471D113C38071D1694A +:10719C00603AAA70D603C8293DC2A371C91E20C388 +:1071AC00D7721E20CDD7721E25C3D772C3C77111DB +:1071BC009473C3CA71119E73C3CA7111E671E5D57C +:1071CC00C50E09CD0500C1D1E1C9E1232323E97E18 +:1071DC001223130B78B1C2DB71C90D0A24636F6ED5 +:1071EC006669677572656420666F72202420776902 +:1071FC00746820244350585357542E41534D202823 +:10720C003130292020372D4A616E2D31393931200A +:10721C00244350584E4F522E41534D202028342990 +:10722C00202031362D4A616E2D31393931243E04FE +:10723C00D31C328870328970C9C9C9C9C924E65FA8 +:10724C00C3D6717BC97BC97BC9C97BD31CC9080355 +:10725C003131302407070431323030240404053135 +:10726C00393230302400000432343030240303032C +:10727C00333030240606043438303024020203360E +:10728C00303024050504393630302401010D0A2034 +:10729C002020313130202020333030202020363057 +:1072AC003020203132303030202032343030202029 +:1072BC0034383030202039363030203139323030CB +:1072CC0024C9C90E061EFFCD0500C90E06CD05004A +:1072DC00C9DB1FE601CADD727BD31EC9DB1FE602C8 +:1072EC00C8DB1EC9CDE872B7C2F072C9AFC9D5CD23 +:1072FC005372A7CA07730E05CD0500D1C91E08C36A +:10730C00D7721E20CDD7721E08C3D772118F73C3CC +:10731C00CA7111E671C3CA714E6F7274687374616D +:10732C007220486F72697A6F6E24435058564455D8 +:10733C002E41534D2020283629202031322D4F63E9 +:10734C00742D313939302024C947656E65726963F3 +:10735C00202844756D622920435254205465726D67 +:10736C00696E616C20747970652073656C656374EB +:10737C00656420240D0A5374617274696E67202E43 +:10738C002E2E245E550D0A240D0A525061636B3A61 +:0C739C0020240D0A535061636B3A20243A +:0000000000 diff --git a/cpvosb.hex b/cpvosb.hex new file mode 100644 index 0000000..d350bd4 --- /dev/null +++ b/cpvosb.hex @@ -0,0 +1,69 @@ +:10700000AC0006009972B672C37273C38273C38EEA +:1070100073C39873C37373C37C73C37473C3A27352 +:10702000C3A073C30000C30000C3D973C3CF73C32D +:10703000C973C3DF73C3F871C3D471C3C871C3BC50 +:1070400071C3C271C3DD71C3E671C3EF71C3AC70AC +:10705000C31673C31773C32773C33773C33973C39B +:107060003E73C34473C34573C37173C32771C3B104 +:1070700073C34F71C32572C3147200745273627369 +:10708000000000000010011CFFFFFFFF00000001D6 +:107090000000000650500805000000000D0D2323DD +:0770A00031004080000101F6 +:1070AC00CDE0700E07CD050032DF700E0CCD050063 +:1070BC007D32DE70113372CD147211E573CD147202 +:1070CC00CD1172212C7422A3703E4032A570CDD20A +:0270DC0072C977 +:1070E0002A01001103001922087111030019220B53 +:1070F0007111030019220E7111030019221171116F +:107100001E0019221371C9C30000C30000C3000090 +:10711000C30000C300000E19064605C21A710DC255 +:1071200018713DC21671C9D511EF73CD1472D1CD4E +:1071300014721E5BCD7C7311E573CD1472114A720B +:10714000CD14723A8D70B7C8118272CD1472C93ADB +:10715000DE70FE30FA86713A5C00B7CA62713DC3D8 +:1071600067710E19CD05005F0E2ECD05000603AF29 +:107170000E032183002B7E1F770DC2757105C26F30 +:10718000715E2356EBC90E1BCD0500EB2AA77023B9 +:10719000010000D51A1E0817DA9C7103572B7DB425 +:1071A000CAAD717A1DC29771D113C39371D1696051 +:1071B0003AAA70D603C8293DC2B671C9011404C3E6 +:1071C000B173011405C3B173010C06CDB17311285D +:1071D00074C31472010107CDB173C3CE71010108EC +:1071E000CDB173C3CE71010809CDB173C3CE7101A6 +:1071F000080BCDB173C3CE713A8D70B7CA05720159 +:10720000010DC30872010109CDB173112474C314B7 +:1072100072113072E5D5C50E09CD0500C1D1E1C9A5 +:10722000E1232323E97E1223130B78B1C22572C90F +:107230000D0A24636F6E6669677572656420666FF8 +:10724000722024207769746820245D0D0A0D0A4E8F +:10725000756D626572206F66207061636B65747313 +:107260003A0D0A4E756D626572206F662072657404 +:10727000726965733A0D0A46696C65206E616D65C9 +:107280003A240D0A0D0A0D0A527061636B3A0D0A19 +:107290000D0A537061636B3A244350585357542E70 +:1072A00041534D20283130292020372D4A616E2D41 +:1072B0003139393120244350585359532E41534DBD +:1072C0002028343029202032382D4175672D383957 +:1072D00020243AC1EFE6013E56CADE723E5532889E +:1072E00070328970575FCD4573F3D3003A002AD3CB +:1072F00001FBC9F3D30032002AC30C73F3D3003A65 +:10730000012AD301FBC9F3D30032012AD3013E0184 +:107310003208EFFBC9C9C92A01002E0011850019E6 +:107320005E2356EB367FC92A01002E001185001915 +:107330005E2356EB3608C9C924E65FC320727BC9B9 +:107340007BC97BC9C93E57CDF3720CC24A737BC35C +:10735000F372020431323030245555033330302477 +:1073600056560D0A20203330300D0A20313230308D +:1073700024C9C9C90E061EFFCD0500C90E06CD05DC +:1073800000C9CDE972E602CA82737BC30673CDE9F8 +:1073900072E601C8CDFC72C9CD8E73B7C29873C9AD +:1073A000AFC9D5CD4273A7CAAF730E05CD0500D1C5 +:1073B000C9C511FD73CD1472E17CC61F5FE5CD7C9C +:1073C00073E17DC61F5FC37C7311FA73C314721E11 +:1073D00020CD7C731E08C37C7311F673C314721125 +:1073E000F473C314724F73626F726E652031241A86 +:1073F0000D0A09241A240D1B54240808241B3D24BB +:107400000B2400000A2400000C24000008240000C3 +:107410001A24000024000000240000001E240000A4 +:0C7420000B2400001B5424001B5424000B +:0000000000 diff --git a/cpvosi.hex b/cpvosi.hex new file mode 100644 index 0000000..419948d --- /dev/null +++ b/cpvosi.hex @@ -0,0 +1,48 @@ +:10700000AC000600F4711172C34072C35072C360C9 +:1070100072C36A72C34172C34A72C34272C374724A +:10702000C37272C30000C30000C39372C38972C3EA +:107030008472C39972C3AC71C3AC71C3AC71C39D8C +:1070400071C3A271C3AC71C3AF71C3B571C3AC706E +:10705000C32E72C32F72C33072C33172C33372C373 +:107060003872C33E72C33F72C33F72C32771C3837A +:1070700072C33071C3CF71C3BE7100000000000045 +:10708000000000000010011DFFFFFFFF00000001D5 +:107090000000000650500805000000000D0D2323DD +:0770A00031004080000101F6 +:1070AC00CDE0700E07CD050032DF700E0CCD050063 +:1070BC007D32DE7011DD71CDBE71119F72CDBE714E +:1070CC00CDBB7121D77222A3703E4032A570CD2D5D +:0270DC0072C977 +:1070E0002A01001103001922087111030019220B53 +:1070F0007111030019220E7111030019221171116F +:107100001E0019221371C9C30000C30000C3000090 +:10711000C30000C300000E14064605C21A710DC25A +:1071200018713DC21671C9D511AF72CDBE71D1C9EA +:107130003ADE70FE30FA67713A5C00B7CA43713DBF +:10714000C348710E19CD05005F0E2ECD0500060354 +:10715000AF0E032183002B7E1F770DC2567105C22F +:1071600050715E2356EBC90E1BCD0500EB2AA770AC +:1071700023010000D51A1E0817DA7D7103572B7DF5 +:10718000B4CA8E717A1DC27871D113C37471D1697A +:10719000603AAA70D603C8293DC29771C91E20C3A0 +:1071A0004A721E20CD4A721E25C34A72C3BB71119A +:1071B000C372C3BE7111CD72C3BE7111DA71E5D550 +:1071C000C50E09CD0500C1D1E1C9E1232323E97E24 +:1071D0001223130B78B1C2CF71C90D0A24636F6EED +:1071E0006669677572656420666F7220242077690E +:1071F000746820244350585357542E41534D20282F +:107200003130292020372D4A616E2D313939312016 +:10721000244350585359532E41534D20283430297C +:10722000202032382D4175672D38392024C9C9C92D +:10723000C9C924E65FC3CA717BC97BC97BC9C9C9F7 +:10724000C9C90E061EFFCD0500C90E06CD0500C931 +:10725000E52100CF7EE602CA54722101CF73E1C955 +:107260003A00CFE601C83A01CFC9CD6072B7C26A11 +:1072700072C9AFC9D5CD3C72A7CA81720E05CD05C2 +:1072800000D1C9C91E08C34A721E20CD4A721E0809 +:10729000C34A7211BE72C3BE7111DA71C3BE714F9F +:1072A00068696F20536369656E7469666963240D4C +:1072B0000A5374617274696E67202E2E2E245E55F7 +:1072C0000D0A240D0A525061636B3A20240D0A53B3 +:0772D0005061636B3A2024BA +:0000000000 diff --git a/cpvpci.hex b/cpvpci.hex new file mode 100644 index 0000000..fde2ab1 --- /dev/null +++ b/cpvpci.hex @@ -0,0 +1,73 @@ +:10700000AC00060000721D72C38D73C39D73C3A8CC +:1070100073C3B073C38E73C39773C38F73C3BC73CF +:10702000C3B873C30000C30000C3DA73C3D073C313 +:10703000CB73C3E073C3B871C3B871C3B871C3A9CC +:1070400071C3AE71C3B871C3BB71C3C171C3AC703E +:10705000C34A72C34B72C34C72C34D72C36A72C3CC +:107060008972C38F72C39072C38C73C33371C3218F +:1070700074C33C71C3DB71C3CA710000A0721B737F +:10708000000000000010FF1CFFFFFFFF00000001D8 +:107090000000000650500805000000000D0D2323DD +:0770A00031004080000101F6 +:1070AC00CDEC700E07CD050032EB700E0CCD05004B +:1070BC007D32EA7011E971CDCA7111E673CDCA71D6 +:1070CC0011F971CDCA71112274CDCA71CDC771215C +:0E70DC00757422A3703E4032A570CD3B72C980 +:1070EC002A0100110300192214711103001922172F +:1070FC007111030019221A7111030019221D71114B +:10710C001E0019221F71C9C30000C30000C3000078 +:10711C00C30000C300000E14064605C226710DC242 +:10712C0024713DC22271C9D5114D74CDCA71D1C91A +:10713C003AEA70FE30FA73713A5C00B7CA4F713D8F +:10714C00C354710E19CD05005F0E2ECD050006033C +:10715C00AF0E032183002B7E1F770DC2627105C217 +:10716C005C715E2356EBC90E1BCD0500EB2AA77094 +:10717C0023010000D51A1E0817DA897103572B7DDD +:10718C00B4CA9A717A1DC28471D113C38071D1694A +:10719C00603AAA70D603C8293DC2A371C91E20C388 +:1071AC0097731E20CD97731E25C39773C3C7711198 +:1071BC006174C3CA71116B74C3CA7111E671E5D5E0 +:1071CC00C50E09CD0500C1D1E1C9E1232323E97E18 +:1071DC001223130B78B1C2DB71C90D0A24636F6ED5 +:1071EC006669677572656420666F72202420776902 +:1071FC00746820244350585357542E41534D202823 +:10720C003130292020372D4A616E2D31393931200A +:10721C0024435058544F522E41534D202835292089 +:10722C002031302D4A616E2D31393931202024DB4B +:10723C00073E4ED3063E37D3063E27D307C9C9C9EE +:10724C00C9115472CDCA71C90D0A42202054726101 +:10725C006E736D6974206120425245414B24E65F88 +:10726C00FE42CA7472C3D671DB05E604CA74723E60 +:10727C002FD3073E64CD22713E27D307C97BC97B30 +:10728C00C97BC9C9DB073E4ED3063E3083D3063ECD +:10729C0027D307C9100331313024020204313230B4 +:1072AC0030240707053133342E35240303033135DD +:1072BC0030240404043138303024080805313932C4 +:1072CC003030240F0F0432303030240909043234AA +:1072DC003030240A0A0333303024050504333630A9 +:1072EC0030240B0B0434383030240C0C0235302491 +:1072FC000000033630302406060437323030240DBB +:10730C000D0237352401010439363030240E0E0DB0 +:10731C000A20202035302020202020373520202026 +:10732C0020313130202020203133342E35202031B3 +:10733C0035302020202033303020202020363030B3 +:10734C00202020313230300D0A20313830302020CE +:10735C002032303030202020323430302020203386 +:10736C003630302020203438303020202037323056 +:10737C003020202039363030202031393230302442 +:10738C00C9C9C90E061EFFCD0500C90E06CD0500E4 +:10739C00C9DB05E601CA9D737BD304C9DB05E60294 +:1073AC00C8DB04C9CDA873B7C2B073C9CD1F71C9EE +:1073BC00D5CD8D72A7CAC9730E05CD0500D1C91ED6 +:1073CC0008C397731E20CD97731E08C39773115C67 +:1073DC0074C3CA7111E671C3CA714974686163617F +:1073EC0020496E74657273797374656D73205331B3 +:1073FC003030241B2124004350585644552E415301 +:10740C004D2020283629202031322D4F63742D3108 +:10741C003939302024C947656E6572696320284468 +:10742C00756D622920435254205465726D696E61EA +:10743C006C20747970652073656C65637465642069 +:10744C00240D0A5374617274696E67202E2E2E24DB +:10745C005E550D0A240D0A525061636B3A20240DBF +:09746C000A535061636B3A2024BD +:0000000000 diff --git a/cpvpcw.hex b/cpvpcw.hex new file mode 100644 index 0000000..cb7cf24 --- /dev/null +++ b/cpvpcw.hex @@ -0,0 +1,137 @@ +:10700000AC0006009972B672C32177C35077C35E95 +:1070100077C38077C32177C32A77C32277C3BD772D +:10702000C36574C30000C30000C3F577C3EB77C327 +:10703000DC77C3FB77C3F871C3D471C3C871C3BC19 +:1070400071C3C271C3DD71C3E671C3EF71C3AC70AC +:10705000C36D74C37B74C3C474C3C574C30D75C3DB +:107060005175C35375C35475C32077C32771C3C407 +:1070700077C34F71C32572C314724078917523761C +:10708000000000000010001CFFFFFFFF00000001D7 +:107090000000000650500805000000000D0D2323DD +:0770A00031004080000101F6 +:1070AC00CDE0700E07CD050032DF700E0CCD050063 +:1070BC007D32DE70113372CD1472110178CD1472E1 +:1070CC00CD1172216C7822A3703E4032A570CDD2C6 +:0270DC0072C977 +:1070E0002A01001103001922087111030019220B53 +:1070F0007111030019220E7111030019221171116F +:107100001E0019221371C9C30000C30000C3000090 +:10711000C30000C300000E21064605C21A710DC24D +:1071200018713DC21671C9D5111D78CD1472D1CD1B +:1071300014721E5BCD2A77110178CD1472114A7238 +:10714000CD14723A8D70B7C8118272CD1472C93ADB +:10715000DE70FE30FA86713A5C00B7CA62713DC3D8 +:1071600067710E19CD05005F0E2ECD05000603AF29 +:107170000E032183002B7E1F770DC2757105C26F30 +:10718000715E2356EBC90E1BCD0500EB2AA77023B9 +:10719000010000D51A1E0817DA9C7103572B7DB425 +:1071A000CAAD717A1DC29771D113C39371D1696051 +:1071B0003AAA70D603C8293DC2B671C9011404C3E6 +:1071C000C477011405C3C477010C06CDC4771168D8 +:1071D00078C31472010107CDC477C3CE71010108D1 +:1071E000CDC477C3CE71010809CDC477C3CE710178 +:1071F000080BCDC477C3CE713A8D70B7CA05720142 +:10720000010DC30872010109CDC477116478C3145C +:1072100072113072E5D5C50E09CD0500C1D1E1C9A5 +:10722000E1232323E97E1223130B78B1C22572C90F +:107230000D0A24636F6E6669677572656420666FF8 +:10724000722024207769746820245D0D0A0D0A4E8F +:10725000756D626572206F66207061636B65747313 +:107260003A0D0A4E756D626572206F662072657404 +:10727000726965733A0D0A46696C65206E616D65C9 +:107280003A240D0A0D0A0D0A527061636B3A0D0A19 +:107290000D0A537061636B3A244350585357542E70 +:1072A00041534D20283130292020372D4A616E2D41 +:1072B0003139393120244350585043572E41534DD2 +:1072C00020283929202032322D4A616E2D3139395A +:1072D00031240E0CCD05007DFE31CAE87211F17328 +:1072E000CD14720E00CD05002A010011570019229D +:1072F00069742A0100110300192254741922577469 +:1073000019225A7419225D7419192260742A010015 +:10731000112A00192266742A010011330019226310 +:1073200074CD6874E300FE00C2367311AE73CD14E1 +:10733000720E00CD0500CD6874E600AFB1C24B738C +:10734000112274CD14720E00CD0500CD6874BC00FE +:10735000E578B9CA6473FE08C2697379FE02C2692E +:1073600073010000C5E1228870E17DD6050F0F0F83 +:10737000326C74CD6874BC00326B74CD6874E300F9 +:1073800078B7CAA273FE01C2907379FE04FAA273A1 +:10739000CD6874BC00EEFF3CF602EEFF3CCD687495 +:1073A000B600216C8822A3703E4032A570C9457298 +:1073B000726F72202D20202054686973204B6572F3 +:1073C0006D69742077696C6C206F6E6C79207275B2 +:1073D0006E206F6E2074686520416D7374726164F5 +:1073E0002050435720383235362F383531320D0A88 +:1073F000244572726F72202D20496E636F72726520 +:1074000063742043502F4D2076657273696F6E2C24 +:10741000206E656564732043502F4D20332E780D08 +:107420000A244572726F72202D2020204E6F205347 +:10743000494F206F7074696F6E206669747465645B +:1074400020746F2074686973206D616368696E656C +:107450000D0A24C30000C30000C30000C30000C322 +:0B7460000000C30000C30000C30000D8 +:10746D00CD6874BC003A6B74CD6874B600C91182D6 +:10747D0074CD1472C92855736520626F78656420C8 +:10748D006D696E7573206B6579206E6578742074E7 +:10749D006F2073706163652062617220746F206765 +:1074AD00656E6572617465206120436F6E74726FD5 +:1074BD006C2D5C290D0A24C911CC74CD1472C90D23 +:1074CD000A4220205472616E736D697420612042EE +:1074DD005245414B0D0A48202048616E677570205A +:1074ED007573696E67204454520D0A5720205769F1 +:1074FD0070652073637265656E20636C65617224BF +:10750D00E65FFE42CA2875FE48CA2175FE57CAFBC2 +:10751D0077C32072160A1EFFC33775169A1E1E3EBC +:10752D0001D3E1DBE1E601CA2C753E05D3E13A6CEE +:10753D0074B2D3E17BCD16713E05D3E13A6C74F68E +:10754D008AD3E1C97BC9C9D5E17CB7C26175210276 +:10755D0008C38B75FE11C26C75210802C38B75FEB5 +:10756D0010C28B753E3601E700ED7901E4007CED2C +:10757D007978ED7901E4007CED7978ED79C9CD6804 +:10758D0074B900C912033131302403030431323090 +:10759D003024080807313230302F373524000005EC +:1075AD003133342E352404040331353024050504DC +:1075BD0031383030240909053139323030240F0F7C +:1075CD000432343030240A0A0333303024060605E1 +:1075DD0033313235302410100433363030240B0B58 +:1075ED000434383030240C0C0235302401010336BC +:1075FD0030302407070437323030240D0D02373573 +:10760D002402020737352F3132303024111104395D +:10761D00363030240E0E0D0A0A4E6F726D616C20DD +:10762D0072617465733A2035302020202037352063 +:10763D002020203131302020203133342E3520319F +:10764D0035302020203330302020203630300D0AC8 +:10765D0020202020202020202020202020203132FA +:10766D00303020203138303020203234303020205E +:10767D00333630302020343830302020373230301F +:10768D00202039363030202031393230300D0A0A81 +:10769D004869676820737065656420203A2033312E +:1076AD0032353020286F6E6C792062657477656590 +:1076BD006E20416D737472616473290D0A0A5370E3 +:1076CD006C6974207261746573203A2031323030E8 +:1076DD002F3735202852783D313230302C205478D8 +:1076ED003D20203735290D0A202020202020202064 +:1076FD0020202020202037352F31323030202852C5 +:10770D00783D202037352C2054783D3132303029CA +:10771D000D0A24C9C9CD5374B7C8C356747BFE096D +:10772D00CA34774BC35974CD6874BF007DE607EE3C +:10773D00FFC609B7C83DF50E20CD5974CD9877F128 +:10774D00C34077CD8E77DBE1E604CA50777BD3E07B +:10775D00C9CD98772A8C777CB5C82B228C772A884F +:10776D00774E119587197CE60F67116C7819228871 +:10777D007779C9CD5E77B7C28077C96C786C7800A0 +:10778D0000D5C5E5CD9877E1C1D1C9CD6274B7C833 +:10779D00CD5F742A8A7777119587197CE60F67116B +:1077AD006C7819228A772A8C7723228C77C3987765 +:1077BD00D54BCD5C74D1C9C5113D78CD1472E17C2A +:1077CD00C61F5FE5CD2A77E17DC61F5FC32A7711FE +:1077DD00E277CD1472082008241E08C32A771E20D4 +:1077ED00CD2A771E08C32A77113978C31472113444 +:1077FD0078C31472416D73747261642050435720C5 +:10780D00776974682053494F206F7074696F6E24C7 +:10781D001B481B4A0D0A202020202020202020203C +:10782D00202020202020241B481B4A240D1B4B24E4 +:10783D001B59241B4124001B4224001B4324001B05 +:10784D004424001B45240024000000240000001BDC +:0F785D004824001B4924001B4A24001B4B240015 +:0000000000 diff --git a/cpvpro.hex b/cpvpro.hex new file mode 100644 index 0000000..45920c3 --- /dev/null +++ b/cpvpro.hex @@ -0,0 +1,80 @@ +:10700000AC00060000721D72C3D373C3E373C3FCEC +:1070100073C31074C3D473C3DD73C3D573C31A743D +:10702000C31874C30000C30000C34E74C34474C3C8 +:107030003F74C35474C3B871C3B871C3B871C3A9E2 +:1070400071C3AE71C3B871C3BB71C3C171C3AC703E +:10705000C33B72C33C72C33D72C33E72C36D72C305 +:10706000DF72C3E572C3E972C3D273C33371C389DC +:1070700074C33C71C3DB71C3CA710000FA727573CB +:10708000000000000010FF1CFFFFFFFF00000001D8 +:107090000000000650500805000000000D0D2323DD +:0770A00031004080000101F6 +:1070AC00CDEC700E07CD050032EB700E0CCD05004B +:1070BC007D32EA7011E971CDCA71115A74CDCA7161 +:1070CC0011F971CDCA71118A74CDCA71CDC77121F4 +:0E70DC00DD7422A3703E4032A570CD3A72C919 +:1070EC002A0100110300192214711103001922172F +:1070FC007111030019221A7111030019221D71114B +:10710C001E0019221F71C9C30000C30000C3000078 +:10711C00C30000C300000E14064605C226710DC242 +:10712C0024713DC22271C9D511B574CDCA71D1C9B2 +:10713C003AEA70FE30FA73713A5C00B7CA4F713D8F +:10714C00C354710E19CD05005F0E2ECD050006033C +:10715C00AF0E032183002B7E1F770DC2627105C217 +:10716C005C715E2356EBC90E1BCD0500EB2AA77094 +:10717C0023010000D51A1E0817DA897103572B7DDD +:10718C00B4CA9A717A1DC28471D113C38071D1694A +:10719C00603AAA70D603C8293DC2A371C91E20C388 +:1071AC00DD731E20CDDD731E25C3DD73C3C77111C6 +:1071BC00C974C3CA7111D374C3CA7111E671E5D510 +:1071CC00C50E09CD0500C1D1E1C9E1232323E97E18 +:1071DC001223130B78B1C2DB71C90D0A24636F6ED5 +:1071EC006669677572656420666F72202420776902 +:1071FC00746820244350585357542E41534D202823 +:10720C003130292020372D4A616E2D31393931200A +:10721C002443505850524F2E41534D202832292090 +:10722C002031362D4F63742D313939302024C9C9A2 +:10723C00C9C9114572CDCA71C90D0A44202D2064EB +:10724C00726F7020746865206C696E650D0A42203F +:10725C002D2073656E64206120627265616B0D0A6E +:10726C0024E65FFE44C27B72AFD31332CF73C9FEE8 +:10727C0042CA8172C93E07F3D317DB13F608D31346 +:10728C00FB3E1ECD22713E07F3D317DB13E6F7F658 +:10729C0010D313FBC3D6713ACF73B7CAB9723E077A +:1072AC00F3D317DB13FBE607FE07CAD671F33E07D1 +:1072BC00D3173E10D313D313D313DB133AD173D399 +:1072CC00123AD073D3123E37D313FB3EFF32CF7337 +:1072DC00C3D6717BC97BC97BC9CD7472C93A88701E +:1072EC004721D0737EE6F0B077AF32CF73C9080375 +:1072FC003131302402020431323030240707053199 +:10730C0033342E3524030303313530240404043183 +:10731C00383030240808053139323030240F0F044E +:10732C00323030302409090432343030240A0A0354 +:10733C003330302405050433363030240B0B043441 +:10734C00383030240C0C0235302400000336303039 +:10735C002406060437323030240D0D023735240153 +:10736C00010439363030240E0E0D0A35302020370A +:10737C00352020313130202031333420202031355C +:10738C003020203330302020363030202031323045 +:10739C00300D0A313830302020323030302020325D +:1073AC003430302020333630302020343830302008 +:1073BC0020373230302020393630302020313932ED +:1073CC0030302400374EC9C9C90E061EFFCD05004A +:1073DC00C90E06CD0500C9F33E07D317DB11E60134 +:1073EC00DB11FBCAE373F33E07D3177BD310FBC946 +:1073FC00F33E07D317DB11FBE602C83E07F3D317A6 +:10740C00DB10FBC9CDFC73B7C21074C9AFC9D5CDA5 +:10741C00E372A7CA27740E05CD0500D1F33E07D33E +:10742C0017DB11FBE601CA2874F33E07D3177BD395 +:10743C0010FBC91E08CDDD731E20CDDD731E08C3E5 +:10744C00DD7311C474C3CA7111E671C3CA715B4395 +:10745C006F6D707570726F204946342D375D244303 +:10746C0050585644552E41534D2020283629202063 +:10747C0031322D4F63742D313939302024C9476591 +:10748C006E65726963202844756D622920435254DD +:10749C00205465726D696E616C207479706520730F +:1074AC00656C656374656420240D0A537461727491 +:1074BC00696E67202E2E2E245E550D0A240D0A525D +:1074CC005061636B3A20240D0A535061636B3A2070 +:0174DC00248B +:0000000000 diff --git a/cpvpx8.hex b/cpvpx8.hex new file mode 100644 index 0000000..c8ea212 --- /dev/null +++ b/cpvpx8.hex @@ -0,0 +1,82 @@ +:10700000AC000600BF72DC72C33374C34374C35751 +:1070100074C36B74C33474C33D74C33574C3757463 +:10702000C37374C30000C30000C3AB74C3A174C3B3 +:107030009C74C3B174C3F871C3D471C3C871C3BCA9 +:1070400071C3C271C3DD71C3E671C3EF71C3AC70AC +:10705000C35E73C36273C36373C36473C38173C357 +:107060009973C39F73C3A073C33274C32771C3845E +:1070700074C34F71C33172C31472CF74AD73F373A1 +:10708000000000000010011CFFFFFFFF00000001D6 +:107090000000000650500805000000000D0D2323DD +:0770A00031004080000101F6 +:1070AC00CDE0700E07CD050032DF700E0CCD050063 +:1070BC007D32DE70113F72CD147211B774CD147223 +:1070CC00CD117221FB7422A3703E4032A570CDF815 +:0270DC0072C977 +:1070E0002A01001103001922087111030019220B53 +:1070F0007111030019220E7111030019221171116F +:107100001E0019221371C9C30000C30000C3000090 +:10711000C30000C300000E14064605C21A710DC25A +:1071200018713DC21671C9D511C274CD1472D1CD7A +:1071300014721E5BCD3D7411B774CD14721156726A +:10714000CD14723A8D70B7C811A872CD1472C93AB5 +:10715000DE70FE30FA86713A5C00B7CA62713DC3D8 +:1071600067710E19CD05005F0E2ECD05000603AF29 +:107170000E032183002B7E1F770DC2757105C26F30 +:10718000715E2356EBC90E1BCD0500EB2AA77023B9 +:10719000010000D51A1E0817DA9C7103572B7DB425 +:1071A000CAAD717A1DC29771D113C39371D1696051 +:1071B0003AAA70D603C8293DC2B671C9011402C3E8 +:1071C0008474013B01C38474013302CD847411F7CC +:1071D00074C31472010103CD8474C3CE7101010420 +:1071E000CD8474C3CE71010805CD8474C3CE710102 +:1071F0000807CD8474C3CE713A8D70B7CA05720189 +:107200000109C30872010105CD847411F374C3141C +:1072100072113C72E5D5C51A13FE24CA2872D55FD7 +:107220004FCD3D74D1C31772C1D1E1C9E1232323EE +:10723000E97E1223130B78B1C23172C90D0A24639F +:107240006F6E6669677572656420666F72202420B0 +:107250007769746820245D202020202020202020B1 +:1072600020204E756D626572206F662072657472A3 +:107270006965733A0D0A4E756D626572206F6620FE +:107280007061636B6574733A2020202020202020D9 +:107290002020202020202020202020202046696C33 +:1072A00065206E616D653A240D0A0D0A0D0A527053 +:1072B00061636B3A0D0A0D0A537061636B3A2443A4 +:1072C00050585357542E41534D20283130292020F7 +:1072D000372D4A616E2D31393931202443505853AE +:1072E00059532E41534D2028343029202032382D37 +:1072F0004175672D383920243AA9F6325873676FE3 +:107300002288702A060011FB9CB7ED52225673CDDD +:107310002B730650C33E730630C33E730660C33EF4 +:10732000730640C33E730690C33E73215473114BE2 +:1073300073010900CD31720610C33E730620214B44 +:1073400073115100E52A010019E3C9000000000093 +:1073500000000000FB94000000030001CFC9CD3CF9 +:1073600073C9C9C9116B73CD1472C90D0A422020AB +:107370005472616E736D6974206120425245414BB5 +:1073800024E65FFE42CA8B73C32C723E3FD30D3E90 +:1073900019CD16713E37D30DC97BC97BC97BC9C9CD +:1073A000D5CD3C73D17B325873CD2B73C9090331D2 +:1073B00031302402020431323030240A0A033135DC +:1073C00030240404053139323030240F0F043234B4 +:1073D0003030240C0C0333303024060604343830AB +:1073E00030240D0D0336303024080804393630308F +:1073F000240E0E0D0A20202031303020202031357F +:107400003020202033303020202036303020202003 +:1074100031323030202020323430302020203438B7 +:1074200030302020203936303020202031393230A1 +:107430003024C9C9C90E061EFFCD0500C90E06CDF0 +:107440000500C9E5C5D5CD2173B7CA4674D14BD562 +:10745000CD1C73D1C1E1C9CD2673E664C26874CD79 +:107460001773B7C8CD1273C93E00C9CD5774B7C2E0 +:107470006B74C9AFC9D5CD9D73A7CA82740E05CDF3 +:107480000500D1C9C511CC74CD1472E17CC61F5F53 +:10749000E5CD3D74E17DC61F5FC33D741E08C33D4D +:1074A000741E20CD3D741E08C33D7411C874C314EE +:1074B0007211C574C314724570736F6E2050582DCD +:1074C00038241B2A241B2A240D1B54241B3D241E54 +:1074D0002400001F2400001C2400001D2400001BA9 +:1074E0002A240024000000240000000B2400001EB9 +:0B74F0002400001B5924001B54240042 +:0000000000 diff --git a/cpvpx8.hlp b/cpvpx8.hlp new file mode 100644 index 0000000..b700e58 --- /dev/null +++ b/cpvpx8.hlp @@ -0,0 +1,23 @@ +Date: Thu, 29 Sep 88 12:40:49 EDT +From: Peter Jones <MAINT@UQAM.BITNET> +Subject: EPSON PX8 Support +Keywords: EPSON PX8 + + I would like to draw your attention to a letter published in the "Chaos +Manor Mail" section of "Byte" magazine, July 1988, Volume 13, Number 7,page +36, column 1, entitled "Calling All PX-8 Orphans". This letter gives a couple +of places where one can still get PX-8 support: + +1) Synderscope International + 1594 Hilltop Dr., El Cajon, CA 92020 + (619)-442-3789 (bulletin board) + +2) DAK Industries + 8200 Remmet Ave., Canoga Park, CA 91304 + +3) Bulletin board: (313)-538-6968 + + I believe people ordering the PX-8 version of KERMIT would appreciate +receiving this information with their documentation. I personally have not +tried contacting any of these people yet, so I don't know how useful these +addresses are. diff --git a/cpvrmf.hex b/cpvrmf.hex new file mode 100644 index 0000000..d4770b7 --- /dev/null +++ b/cpvrmf.hex @@ -0,0 +1,71 @@ +:10700000AC0006009972B672C38B73C3A373C3AE90 +:1070100073C3B673C38C73C39573C38D73C3C073CB +:10702000C3BE73C30000C30000C3F273C3E873C3DD +:10703000E773C3F873C3F871C3D471C3C871C3BC19 +:1070400071C3C271C3DD71C3E671C3EF71C3AC70AC +:10705000C3D872C3D972C3DA72C3DB72C3F872C306 +:107060001773C31D73C31E73C38A73C32771C3CF42 +:1070700073C34F71C32572C3147220742373597381 +:10708000000000000010011CFFFFFFFF00000001D6 +:107090000000000650500805000000000D0D2323DD +:0770A00031004080000101F6 +:1070AC00CDE0700E07CD050032DF700E0CCD050063 +:1070BC007D32DE70113372CD147211FE73CD1472E9 +:1070CC00CD1172214C7422A3703E4032A570CDD2EA +:0270DC0072C977 +:1070E0002A01001103001922087111030019220B53 +:1070F0007111030019220E7111030019221171116F +:107100001E0019221371C9C30000C30000C3000090 +:10711000C30000C300000E28064605C21A710DC246 +:1071200018713DC21671C9D5111574CD1472D1CD27 +:1071300014721E5BCD957311FE73CD1472114A72D9 +:10714000CD14723A8D70B7C8118272CD1472C93ADB +:10715000DE70FE30FA86713A5C00B7CA62713DC3D8 +:1071600067710E19CD05005F0E2ECD05000603AF29 +:107170000E032183002B7E1F770DC2757105C26F30 +:10718000715E2356EBC90E1BCD0500EB2AA77023B9 +:10719000010000D51A1E0817DA9C7103572B7DB425 +:1071A000CAAD717A1DC29771D113C39371D1696051 +:1071B0003AAA70D603C8293DC2B671C9011404C3E6 +:1071C000CF73011405C3CF73010C06CDCF731148E3 +:1071D00074C31472010107CDCF73C3CE71010108CE +:1071E000CDCF73C3CE71010809CDCF73C3CE71016A +:1071F000080BCDCF73C3CE713A8D70B7CA0572013B +:10720000010DC30872010109CDCF73114474C31479 +:1072100072113072E5D5C50E09CD0500C1D1E1C9A5 +:10722000E1232323E97E1223130B78B1C22572C90F +:107230000D0A24636F6E6669677572656420666FF8 +:10724000722024207769746820245D0D0A0D0A4E8F +:10725000756D626572206F66207061636B65747313 +:107260003A0D0A4E756D626572206F662072657404 +:10727000726965733A0D0A46696C65206E616D65C9 +:107280003A240D0A0D0A0D0A527061636B3A0D0A19 +:107290000D0A537061636B3A244350585357542E70 +:1072A00041534D20283130292020372D4A616E2D41 +:1072B0003139393120244350585359532E41534DBD +:1072C0002028343029202032382D4175672D383957 +:1072D00020241E11CD9573C9C9C9C911E272CD14FC +:1072E00072C90D0A4220205472616E736D69742058 +:1072F0006120425245414B24E65FFE42CA0273C3FD +:107300002072DBE9E604CA02733E3FD3E93E19CDA1 +:1073100016713E37D3E9C97BC97BC97BC9C93E0415 +:10732000F729C907033131302400000431323030ED +:107330002403030432343030240404033330302473 +:10734000010104343830302405050336303024027E +:107350000204393630302406060D0A20202031314F +:1073600030202020333030202020363030202020A4 +:107370003132303020202032343030202020343858 +:1073800030302020203936303024C9C9C90E061EBD +:10739000FFCD0500C97BFE0DC29D731E0E0E06CDEE +:1073A0000500C9DBE9E601CAA3737BD3E8C9DBE9C1 +:1073B000E602C8DBE8C9CDAE73B7C2B673C9AFC9C0 +:1073C000D5CD1B73A7CACD730E05CD0500D1C9C598 +:1073D000111E74CD1472E17CC61F5FE5CD9573E17B +:1073E0007DC61F5FC39573C91E20CD95731E08C34C +:1073F0009573111B74C31472111974C314725265FE +:10740000736561726368204D616368696E6573209E +:107410003338305A241F0D09241F240E1924162432 +:107420000B2400000A240000182400000824000097 +:107430001F24000024000000240000001D24000080 +:0C744000240000001E240000192400009D +:0000000000 diff --git a/cpvrmm.hex b/cpvrmm.hex new file mode 100644 index 0000000..6629bda --- /dev/null +++ b/cpvrmm.hex @@ -0,0 +1,71 @@ +:10700000AC0006009972B672C38B73C3A373C3AE90 +:1070100073C3B673C38C73C39573C38D73C3C073CB +:10702000C3BE73C30000C30000C3F273C3E873C3DD +:10703000E773C3F873C3F871C3D471C3C871C3BC19 +:1070400071C3C271C3DD71C3E671C3EF71C3AC70AC +:10705000C3D872C3D972C3DA72C3DB72C3F872C306 +:107060001773C31D73C31E73C38A73C32771C3CF42 +:1070700073C34F71C32572C3147220742373597381 +:10708000000000000010011CFFFFFFFF00000001D6 +:107090000000000650500805000000000D0D2323DD +:0770A00031004080000101F6 +:1070AC00CDE0700E07CD050032DF700E0CCD050063 +:1070BC007D32DE70113372CD147211FE73CD1472E9 +:1070CC00CD1172214C7422A3703E4032A570CDD2EA +:0270DC0072C977 +:1070E0002A01001103001922087111030019220B53 +:1070F0007111030019220E7111030019221171116F +:107100001E0019221371C9C30000C30000C3000090 +:10711000C30000C300000E28064605C21A710DC246 +:1071200018713DC21671C9D5111574CD1472D1CD27 +:1071300014721E5BCD957311FE73CD1472114A72D9 +:10714000CD14723A8D70B7C8118272CD1472C93ADB +:10715000DE70FE30FA86713A5C00B7CA62713DC3D8 +:1071600067710E19CD05005F0E2ECD05000603AF29 +:107170000E032183002B7E1F770DC2757105C26F30 +:10718000715E2356EBC90E1BCD0500EB2AA77023B9 +:10719000010000D51A1E0817DA9C7103572B7DB425 +:1071A000CAAD717A1DC29771D113C39371D1696051 +:1071B0003AAA70D603C8293DC2B671C9011404C3E6 +:1071C000CF73011405C3CF73010C06CDCF731148E3 +:1071D00074C31472010107CDCF73C3CE71010108CE +:1071E000CDCF73C3CE71010809CDCF73C3CE71016A +:1071F000080BCDCF73C3CE713A8D70B7CA0572013B +:10720000010DC30872010109CDCF73114474C31479 +:1072100072113072E5D5C50E09CD0500C1D1E1C9A5 +:10722000E1232323E97E1223130B78B1C22572C90F +:107230000D0A24636F6E6669677572656420666FF8 +:10724000722024207769746820245D0D0A0D0A4E8F +:10725000756D626572206F66207061636B65747313 +:107260003A0D0A4E756D626572206F662072657404 +:10727000726965733A0D0A46696C65206E616D65C9 +:107280003A240D0A0D0A0D0A527061636B3A0D0A19 +:107290000D0A537061636B3A244350585357542E70 +:1072A00041534D20283130292020372D4A616E2D41 +:1072B0003139393120244350585359532E41534DBD +:1072C0002028343029202032382D4175672D383957 +:1072D00020241E11CD9573C9C9C9C911E272CD14FC +:1072E00072C90D0A4220205472616E736D69742058 +:1072F0006120425245414B24E65FFE42CA0273C3FD +:107300002072DBC9E604CA02733E3FD3C93E19CDE1 +:1073100016713E37D3C9C97BC97BC97BC9C93E0435 +:10732000F729C907033131302400000431323030ED +:107330002403030432343030240404033330302473 +:10734000010104343830302405050336303024027E +:107350000204393630302406060D0A20202031314F +:1073600030202020333030202020363030202020A4 +:107370003132303020202032343030202020343858 +:1073800030302020203936303024C9C9C90E061EBD +:10739000FFCD0500C97BFE0DC29D731E0E0E06CDEE +:1073A0000500C9DBC9E601CAA3737BD3C8C9DBC921 +:1073B000E602C8DBC8C9CDAE73B7C2B673C9AFC9E0 +:1073C000D5CD1B73A7CACD730E05CD0500D1C9C598 +:1073D000111E74CD1472E17CC61F5FE5CD9573E17B +:1073E0007DC61F5FC39573C91E20CD95731E08C34C +:1073F0009573111B74C31472111974C314725265FE +:10740000736561726368204D616368696E6573209E +:107410003338305A241F0D09241F240E1924162432 +:107420000B2400000A240000182400000824000097 +:107430001F24000024000000240000001D24000080 +:0C744000240000001E240000192400009D +:0000000000 diff --git a/cpvrob.hex b/cpvrob.hex new file mode 100644 index 0000000..2d6f45c --- /dev/null +++ b/cpvrob.hex @@ -0,0 +1,77 @@ +:10700000AC0006009872B572C3C873C3E473C3F0D2 +:1070100073C3F973C3CF73C3DF73C3D673C3087469 +:10702000C30174C30000C30000C34474C33A74C3F3 +:107030003574C34A74C3F771C3D371C3C771C3BB7B +:1070400071C3C171C3DC71C3E571C3EE71C3AC70B0 +:10705000C3D272C3D372C3FE72C3FF72C31C73C3A5 +:107060004273C34873C34973C34973C32671C316BC +:1070700074C34E71C32472C313727874000000008D +:10708000927358730010001CFFFFFFFF0000000107 +:107090000000000650500805000000000D0D2323DD +:0770A00031004080000101F6 +:1070AC00CDDF700E07CD050032C7730E0CCD050079 +:1070BC007D32DE70113272CD1372115074CD137299 +:1070CC00CD107221A47422A3703E4032A570CDD194 +:0270DC0072C977 +:1070DF002A01001103001922077111030019220A56 +:1070EF007111030019220D71110300192210711172 +:1070FF001E0019221271C9C30000C30000C3000093 +:10710F00C30000C300000E14064605C219710DC25C +:10711F0017713DC21571C9D5115C74CD1372D1CDE4 +:10712F0013721E5BCDDF73115074CD137211497240 +:10713F00CD13723A8D70B7C8118172CD1372C93ADF +:10714F00DE70FE30FA85713A5C00B7CA61713DC3DB +:10715F0066710E19CD05005F0E2ECD05000603AF2B +:10716F000E032183002B7E1F770DC2747105C26E33 +:10717F00715E2356EBC90E1BCD0500EB2AA77023BA +:10718F00010000D51A1E0817DA9B7103572B7DB427 +:10719F00CAAC717A1DC29671D113C39271D1696055 +:1071AF003AAA70D603C8293DC2B571C9011404C3E8 +:1071BF001674011405C31674010C06CD167411A0B4 +:1071CF0074C31372010107CD1674C3CD7101010889 +:1071DF00CD1674C3CD71010809CD1674C3CD7101DD +:1071EF00080BCD1674C3CD713A8D70B7CA047201F6 +:1071FF00010DC30772010109CD1674119C74C313DD +:10720F0072112F72E5D5C50E09CD0500C1D1E1C9A7 +:10721F00E1232323E97E1223130B78B1C22472C911 +:10722F000D0A24636F6E6669677572656420666FF9 +:10723F00722024207769746820245D0D0A0D0A4E90 +:10724F00756D626572206F66207061636B65747314 +:10725F003A0D0A4E756D626572206F662072657405 +:10726F00726965733A0D0A46696C65206E616D65CA +:10727F003A240D0A0D0A0D0A527061636B3A0D0A1A +:10728F000D0A537061636B3A244350585357542E71 +:10729F0041534D20283130292020372D4A616E2D42 +:1072AF003139393120244350585359532E41534DBE +:1072BF002028343029202032382D4175672D383958 +:1072CF002024C9C911DA72CD1372C92028547970DC +:1072DF0065204C656674204172726F7720746F2041 +:1072EF0073656E64204354524C2D53290D0A24C9E3 +:1072FF00110673CD1372C90D0A4220205472616EAC +:10730F00736D6974206120425245414B24E65FFE44 +:10731F0042CA2673C31F722164963AC4734F3E0A42 +:10732F00ED792B7DB4C231733AC4734F3E37ED798B +:10733F00D341C97BC97BC97BC9C97E32C673237E42 +:10734F0032C573237E32C473C90D0A434F4D4D5559 +:10735F004E49434154494F4E5320706F72740D0A7A +:10736F0047454E4552414C20707572706F736520C2 +:10737F00706F72740D0A5052494E54455220706FFF +:10738F00727424030E434F4D4D554E49434154499A +:10739F004F4E5324BB730747454E4552414C24BEB5 +:1073AF0073075052494E54455224C17356045957CE +:1073BF000251540249590456953AC673320300C913 +:1073CF003AC773320300C9CD0671B7C8CD0971C969 +:1073DF004BCD0C71C9E5C53AC5734FCD0500C1E161 +:1073EF00C9CD0671B7C8CD0971C9CDF073B7C2F950 +:1073FF0073C9CD1271CD1271C9D5CD4673A7CA14F9 +:10740F00744BCD0F71D1C9C5117574CD1372E1E5F0 +:10741F006C2600CD08011E3BCDDF73E12600CD08A1 +:10742F00011E48C3DF731E08C3DF731E20CDDF7339 +:10743F001E08C3DF73117074C31372116974C31301 +:10744F0072565431383020526F62696E241B3C1BC8 +:10745F005B481B5B4A0D0A0909241B5B481B5B4AEF +:10746F00240D1B5B4B241B5B241B5B41241B5B42CA +:10747F00241B5B43241B5B442424000000240000D6 +:10748F0000240000001B5B48241B4D24001B5B4A9B +:05749F00241B5B4B24DF +:0000000000 diff --git a/cpvsan.hex b/cpvsan.hex new file mode 100644 index 0000000..928b582 --- /dev/null +++ b/cpvsan.hex @@ -0,0 +1,62 @@ +:10700000AC0006009972B672C3E972C3F972C30488 +:1070100073C30C73C3EA72C3F372C3EB72C3167308 +:10702000C31473C30000C30000C34D73C34373C3D1 +:107030003E73C35373C3F871C3D471C3C871C3BC67 +:1070400071C3C271C3DD71C3E671C3EF71C3AC70AC +:10705000C3D272C3D372C3D472C3D572C3DD72C339 +:10706000E072C3E672C3E772C3E872C32771C32537 +:1070700073C34F71C32572C3147291730000000073 +:10708000000000000010011CFFFFFFFF00000001D6 +:107090000000000650500805000000000D0D2323DD +:0770A00031004080000101F6 +:1070AC00CDE0700E07CD050032DF700E0CCD050063 +:1070BC007D32DE70113372CD1472116073CD147287 +:1070CC00CD117221BF7322A3703E4032A570CDD179 +:0270DC0072C977 +:1070E0002A01001103001922087111030019220B53 +:1070F0007111030019220E7111030019221171116F +:107100001E0019221371C9C30000C30000C3000090 +:10711000C30000C300000E14064605C21A710DC25A +:1071200018713DC21671C9D5115973CD1472D1CDE4 +:1071300014721E5BCDF372116073CD1472114A721A +:10714000CD14723A8D70B7C8118272CD1472C93ADB +:10715000DE70FE30FA86713A5C00B7CA62713DC3D8 +:1071600067710E19CD05005F0E2ECD05000603AF29 +:107170000E032183002B7E1F770DC2757105C26F30 +:10718000715E2356EBC90E1BCD0500EB2AA77023B9 +:10719000010000D51A1E0817DA9C7103572B7DB425 +:1071A000CAAD717A1DC29771D113C39371D1696051 +:1071B0003AAA70D603C8293DC2B671C9011404C3E6 +:1071C0002573011405C32573010C06CD257311BB6E +:1071D00073C31472010107CD2573C3CE7101010879 +:1071E000CD2573C3CE71010809CD2573C3CE7101BE +:1071F000080BCD2573C3CE713A8D70B7CA057201E5 +:10720000010DC30872010109CD257311B773C314B1 +:1072100072113072E5D5C50E09CD0500C1D1E1C9A5 +:10722000E1232323E97E1223130B78B1C22572C90F +:107230000D0A24636F6E6669677572656420666FF8 +:10724000722024207769746820245D0D0A0D0A4E8F +:10725000756D626572206F66207061636B65747313 +:107260003A0D0A4E756D626572206F662072657404 +:10727000726965733A0D0A46696C65206E616D65C9 +:107280003A240D0A0D0A0D0A527061636B3A0D0A19 +:107290000D0A537061636B3A244350585357542E70 +:1072A00041534D20283130292020372D4A616E2D41 +:1072B00031393931202443505853594F2E41534DC1 +:1072C00020283129202032372D4F63742D38372064 +:1072D00024C9C9C9C911DC72CD1472C924E65FC9B9 +:1072E0007BC97BC97BC9C9C9C9C9C90E061EFFCDE7 +:1072F0000500C90E06CD0500C9DBDDE601CAF9723D +:107300007BD3DCC9DBDDE602C8DBDCC9CD0473B7A7 +:10731000C20C73C9AFC9D5CDE472A7CA23730E05D9 +:10732000CD0500D1C9C5118D73CD1472E17CC61F86 +:107330005FE5CDF372E17DC61F5FC3F372C91E081E +:10734000CDF3721E20CDF3721E08C3F37211857344 +:10735000C31472118873C314721B451B480D0A09AC +:107360004B45524D49542D38302056332E39205B31 +:1073700053414E594F204D42432D313130305D0D38 +:107380000A241B4B241B50241B451B48241B3D2453 +:10739000001B4100001B4200001B4400001B430077 +:1073A000001B45000000000000000000001B48001A +:0F73B000001B411B4300001B4A00001B4B000049 +:0000000000 diff --git a/cpvsb6.hex b/cpvsb6.hex new file mode 100644 index 0000000..438cdb4 --- /dev/null +++ b/cpvsb6.hex @@ -0,0 +1,96 @@ +:10700000AC00060000721D72C3F374C30375C31095 +:1070100075C32775C3F474C3FD74C3F574C33375A6 +:10702000C32F75C30000C30000C34C75C34275C3B2 +:107030003D75C35275C3B871C3B871C3B871C3A9E4 +:1070400071C3AE71C3B871C3BB71C3C171C3AC703E +:10705000C35A72C37272C37472C37572C39772C318 +:10706000D872C3DE72C3DF72C3F274C33371C390CC +:1070700075C33C71C3DB71C3CA7100007174B9740C +:10708000000000000010FF1CFFFFFFFF00000001D8 +:107090000000000650500805000000000D0D2323DD +:0770A00031004080000101F6 +:1070AC00CDEC700E07CD050032EB700E0CCD05004B +:1070BC007D32EA7011E971CDCA71115875CDCA7162 +:1070CC0011F971CDCA71119175CDCA71CDC77121EC +:0E70DC00E47522A3703E4032A570CD3672C915 +:1070EC002A0100110300192214711103001922172F +:1070FC007111030019221A7111030019221D71114B +:10710C001E0019221F71C9C30000C30000C3000078 +:10711C00C30000C300000E3C064605C226710DC21A +:10712C0024713DC22271C9D511BC75CDCA71D1C9AA +:10713C003AEA70FE30FA73713A5C00B7CA4F713D8F +:10714C00C354710E19CD05005F0E2ECD050006033C +:10715C00AF0E032183002B7E1F770DC2627105C217 +:10716C005C715E2356EBC90E1BCD0500EB2AA77094 +:10717C0023010000D51A1E0817DA897103572B7DDD +:10718C00B4CA9A717A1DC28471D113C38071D1694A +:10719C00603AAA70D603C8293DC2A371C91E20C388 +:1071AC00FD741E20CDFD741E25C3FD74C3C7711163 +:1071BC00D075C3CA7111DA75C3CA7111E671E5D500 +:1071CC00C50E09CD0500C1D1E1C9E1232323E97E18 +:1071DC001223130B78B1C2DB71C90D0A24636F6ED5 +:1071EC006669677572656420666F72202420776902 +:1071FC00746820244350585357542E41534D202823 +:10720C003130292020372D4A616E2D31393931200A +:10721C002443505853422E41534D202832292020CC +:10722C0032322D4A756C2D383724215772ED3800C7 +:10723C007723ED38027723ED38047726082E0822C1 +:0B724C008870219E733608CDE573C9E1 +:10725A002157727EED3900237EED3902237EED3906 +:10726A0004ED3804ED3804C9C924C9117C72CDCAA9 +:10727A0071C90D0A5620204379636C6520706F72BC +:10728A007420706172616D657465727324FE56CAEA +:10729A00A472FE76CAA472C3D671219E737EC601F9 +:1072AA00FE0DC2B1723E0177B73D07074F060021B6 +:1072BA009F732309E511D372CDCA71D1CDCA711159 +:1072CA00D572CDCA71CDE573C93C243E24C97BC9A8 +:1072DA007BC97BC9C9112473CDCA7111DC730E0A2B +:1072EA00CD050021DD737EB7CAE573FE03C20D73B7 +:1072FA0023237EE65F7711DD73219F73CD1274B766 +:10730A00C21673118973CDCA71C3DF72C6030F0F18 +:10731A00E60F219E7377CDE573C90D0A456E746534 +:10732A0072206269742F636861722C2070617269BD +:10733A0074792C20616E642073746F702062697492 +:10734A00732072657175697265642E0D0A28426927 +:10735A007420372F38202020506172697479204EAA +:10736A002F4F2F4520202053746F7020312F322049 +:10737A00202D2043522073616D6529203A20240D67 +:10738A000A496E76616C696420706172616D657418 +:10739A00657273240830374E3124374E3224374F02 +:1073AA003124374F32243745312437453224384E79 +:1073BA003124384E3224384F3124384F322438455C +:1073CA00312438453224000112130203040516172A +:1073DA0006070603384E3224242424219E737E3D58 +:1073EA0021D07306004F097E47E610218870864F28 +:1073FA0078E607C660ED390079ED39023E00ED39CD +:10740A0004ED3804ED3804C97EB7CA6774326D7466 +:10741A004723226974EB7EB7CA6774326E744F23AE +:10742A00226B747891DA67743C4FAF326F74216FB4 +:10743A0074343A6E74472A6B74EB2A69741ABEC2A2 +:10744A00557405CA63742313C347740DCA67742A33 +:0F745A00697423226974C338743A6F74C997C96F +:10747000C9090431323030240B0B03313530240E6E +:107480000E053139323030240101043234303024D9 +:107490000A0A03333030240D0D05333834303024DC +:1074A0000000043438303024090903363030240C0D +:1074B0000C04393630302408080D0A2020203135DC +:1074C0003020203330302020363030202031323010 +:1074D00030202032343030202034383030202039F1 +:1074E00036303020203139323030202033383430BB +:1074F0003024C9C9C90E061EFFCD0500C90E06CD30 +:107500000500C9ED3804E602CA03757BED3906C9EA +:10751000219600ED3804E680CA1F75ED3808C92BA6 +:1075200067B5C21375C9C9CD1075B7C22775C9CD66 +:107530001F71C9D5CDDC72A7CA3B75D1C91E08C35E +:10754000FD741E20CDFD741E08C3FD7411CB75C3E0 +:10755000CA7111E671C3CA714D6963726F4D696E6C +:10756000742053422031383020202836204D487A6C +:1075700029244350585644552E41534D2020283637 +:1075800029202031322D4F63742D31393930202498 +:10759000C947656E65726963202844756D6229204C +:1075A000435254205465726D696E616C2074797019 +:1075B000652073656C656374656420240D0A5374DB +:1075C000617274696E67202E2E2E245E550D0A247A +:1075D0000D0A525061636B3A20240D0A53506163C7 +:0475E0006B3A2024BE +:0000000000 diff --git a/cpvsb9.hex b/cpvsb9.hex new file mode 100644 index 0000000..b16b7c7 --- /dev/null +++ b/cpvsb9.hex @@ -0,0 +1,94 @@ +:10700000AC00060000721D72C3D774C3E774C3F4EA +:1070100074C30B75C3D874C3E174C3D974C3177533 +:10702000C31375C30000C30000C33075C32675C306 +:107030002175C33675C3B871C3B871C3B871C3A91C +:1070400071C3AE71C3B871C3BB71C3C171C3AC703E +:10705000C35A72C37272C37472C37572C39772C318 +:10706000D872C3DE72C3DF72C3D674C33371C37404 +:1070700075C33C71C3DB71C3CA7100007174A9741C +:10708000000000000010FF1CFFFFFFFF00000001D8 +:107090000000000650500805000000000D0D2323DD +:0770A00031004080000101F6 +:1070AC00CDEC700E07CD050032EB700E0CCD05004B +:1070BC007D32EA7011E971CDCA71113C75CDCA717E +:1070CC0011F971CDCA71117575CDCA71CDC7712108 +:0E70DC00C87522A3703E4032A570CD3672C931 +:1070EC002A0100110300192214711103001922172F +:1070FC007111030019221A7111030019221D71114B +:10710C001E0019221F71C9C30000C30000C3000078 +:10711C00C30000C300000E5A064605C226710DC2FC +:10712C0024713DC22271C9D511A075CDCA71D1C9C6 +:10713C003AEA70FE30FA73713A5C00B7CA4F713D8F +:10714C00C354710E19CD05005F0E2ECD050006033C +:10715C00AF0E032183002B7E1F770DC2627105C217 +:10716C005C715E2356EBC90E1BCD0500EB2AA77094 +:10717C0023010000D51A1E0817DA897103572B7DDD +:10718C00B4CA9A717A1DC28471D113C38071D1694A +:10719C00603AAA70D603C8293DC2A371C91E20C388 +:1071AC00E1741E20CDE1741E25C3E174C3C77111B7 +:1071BC00B475C3CA7111BE75C3CA7111E671E5D538 +:1071CC00C50E09CD0500C1D1E1C9E1232323E97E18 +:1071DC001223130B78B1C2DB71C90D0A24636F6ED5 +:1071EC006669677572656420666F72202420776902 +:1071FC00746820244350585357542E41534D202823 +:10720C003130292020372D4A616E2D31393931200A +:10721C002443505853422E41534D202832292020CC +:10722C0032322D4A756C2D383724215772ED3800C7 +:10723C007723ED38027723ED38047726212E21228F +:0B724C008870219E733608CDE573C9E1 +:10725A002157727EED3900237EED3902237EED3906 +:10726A0004ED3804ED3804C9C924C9117C72CDCAA9 +:10727A0071C90D0A5620204379636C6520706F72BC +:10728A007420706172616D657465727324FE56CAEA +:10729A00A472FE76CAA472C3D671219E737EC601F9 +:1072AA00FE0DC2B1723E0177B73D07074F060021B6 +:1072BA009F732309E511D372CDCA71D1CDCA711159 +:1072CA00D572CDCA71CDE573C93C243E24C97BC9A8 +:1072DA007BC97BC9C9112473CDCA7111DC730E0A2B +:1072EA00CD050021DD737EB7CAE573FE03C20D73B7 +:1072FA0023237EE65F7711DD73219F73CD1274B766 +:10730A00C21673118973CDCA71C3DF72C6030F0F18 +:10731A00E60F219E7377CDE573C90D0A456E746534 +:10732A0072206269742F636861722C2070617269BD +:10733A0074792C20616E642073746F702062697492 +:10734A00732072657175697265642E0D0A28426927 +:10735A007420372F38202020506172697479204EAA +:10736A002F4F2F4520202053746F7020312F322049 +:10737A00202D2043522073616D6529203A20240D67 +:10738A000A496E76616C696420706172616D657418 +:10739A00657273240830374E3124374E3224374F02 +:1073AA003124374F32243745312437453224384E79 +:1073BA003124384E3224384F3124384F322438455C +:1073CA00312438453224000112130203040516172A +:1073DA0006070603384E3224242424219E737E3D58 +:1073EA0021D07306004F097E47E610218870864F28 +:1073FA0078E607C660ED390079ED39023E00ED39CD +:10740A0004ED3804ED3804C97EB7CA6774326D7466 +:10741A004723226974EB7EB7CA6774326E744F23AE +:10742A00226B747891DA67743C4FAF326F74216FB4 +:10743A0074343A6E74472A6B74EB2A69741ABEC2A2 +:10744A00557405CA63742313C347740DCA67742A33 +:0F745A00697423226974C338743A6F74C997C96F +:10747000C907043132303024242405313932303008 +:1074800024202004323430302423230333303024AA +:107490002626043438303024222203363030242586 +:1074A0002504393630302421210D0A2020203330A4 +:1074B000302020363030202031323030202032341D +:1074C0003030202034383030202039363030202001 +:1074D000313932303024C9C9C90E061EFFCD05002E +:1074E000C90E06CD0500C9ED3804E602CAE7747B73 +:1074F000ED3906C9219600ED3804E680CA0375ED22 +:107500003808C92B67B5C2F774C9C9CDF474B7C2BE +:107510000B75C9CD1F71C9D5CDDC72A7CA1F75D136 +:10752000C91E08C3E1741E20CDE1741E08C3E174B6 +:1075300011AF75C3CA7111E671C3CA714D69637227 +:107540006F4D696E74205342203138302020283925 +:10755000204D487A29244350585644552E41534DC6 +:107560002020283629202031322D4F63742D3139C7 +:1075700039302024C947656E6572696320284475D7 +:107580006D622920435254205465726D696E616C9E +:1075900020747970652073656C656374656420245C +:1075A0000D0A5374617274696E67202E2E2E245E4C +:1075B000550D0A240D0A525061636B3A20240D0ABE +:0875C000535061636B3A202473 +:0000000000 diff --git a/cpvscn.hex b/cpvscn.hex new file mode 100644 index 0000000..c38c55b --- /dev/null +++ b/cpvscn.hex @@ -0,0 +1,86 @@ +:10700000AC0006009972B672C36B74C37B74C37B09 +:1070100074C38374C36C74C37574C36D74C38F7489 +:10702000C38B74C30000C30000C3C574C3BB74C367 +:10703000B674C3CB74C3F871C3D471C3C871C3BC75 +:1070400071C3C271C3DD71C3E671C3EF71C3AC70AC +:10705000C31973C31A73C31B73C31C73C34B73C3AA +:107060007E73C38473C38873C36A74C32771C39E5A +:1070700074C34F71C32572C314720575A1730D7467 +:10708000000000000010011CFFFFFFFF00000001D6 +:107090000000000650500805000000000D0D2323DD +:0770A00031004080000101F6 +:1070AC00CDE0700E07CD050032DF700E0CCD050063 +:1070BC007D32DE70113372CD147211D174CD147215 +:1070CC00CD117221317522A3703E4032A570CDD204 +:0270DC0072C977 +:1070E0002A01001103001922087111030019220B53 +:1070F0007111030019220E7111030019221171116F +:107100001E0019221371C9C30000C30000C3000090 +:10711000C30000C300000E19064605C21A710DC255 +:1071200018713DC21671C9D511F874CD1472D1CD44 +:1071300014721E5BCD757411D174CD1472114A7224 +:10714000CD14723A8D70B7C8118272CD1472C93ADB +:10715000DE70FE30FA86713A5C00B7CA62713DC3D8 +:1071600067710E19CD05005F0E2ECD05000603AF29 +:107170000E032183002B7E1F770DC2757105C26F30 +:10718000715E2356EBC90E1BCD0500EB2AA77023B9 +:10719000010000D51A1E0817DA9C7103572B7DB425 +:1071A000CAAD717A1DC29771D113C39371D1696051 +:1071B0003AAA70D603C8293DC2B671C9011404C3E6 +:1071C0009E74011405C39E74010C06CD9E74112D8E +:1071D00075C31472010107CD9E74C3CE71010108FD +:1071E000CD9E74C3CE71010809CD9E74C3CE7101CA +:1071F000080BCD9E74C3CE713A8D70B7CA0572016B +:10720000010DC30872010109CD9E74112975C314C3 +:1072100072113072E5D5C50E09CD0500C1D1E1C9A5 +:10722000E1232323E97E1223130B78B1C22572C90F +:107230000D0A24636F6E6669677572656420666FF8 +:10724000722024207769746820245D0D0A0D0A4E8F +:10725000756D626572206F66207061636B65747313 +:107260003A0D0A4E756D626572206F662072657404 +:10727000726965733A0D0A46696C65206E616D65C9 +:107280003A240D0A0D0A0D0A527061636B3A0D0A19 +:107290000D0A537061636B3A244350585357542E70 +:1072A00041534D20283130292020372D4A616E2D41 +:1072B0003139393120244350584845412E41534DEE +:1072C00020283429202033312D4175672D3139385C +:1072D0003924CDF372DB0BF680D30BDB08328870D8 +:1072E000DB093289703E03D30BDB0CF601D30CCDE6 +:1072F0000273C9DB09321773AFD309DB0CF610D365 +:107300000CC9DB083E07CD1671DB08DB0CE6EFD3BA +:077310000C3A1773D309C901 +:10731800C9C9C9C9112373CD1472C90D0A422020E5 +:107328005472616E736D6974206120425245414BFD +:107338000D0A44202044726F7020746865206C69BF +:107348006E6524E65FFE44C26473DB0CE6FED30C74 +:107358003E32CD1671DB0CF601D30CC9FE42CA6C65 +:1073680073C32072DB0BF640D30B3E1ECD1671DBC8 +:107378000BE6BFD30BC97BC97BC97BC9CD5273C987 +:10738800CDF372DB0BF680D30B7BD3087AD309DB02 +:107398000BE67FD30BCD0273C90E03313130247055 +:1073A800040431323030246800053133342E35245A +:1073B800A1030431383030244500053139323030EA +:1073C80024070004323430302434000333303024AE +:1073D800A1010433363030242300043438303024FB +:1073E8001A000235302464090336303024D00004F2 +:1073F80037323030241100023735248306043936F9 +:107408003030240D000D0A20202020353020202087 +:10741800203735202020313130203133342E3520AB +:1074280020203330302020203630302020203132C8 +:1074380030300D0A202031383030202032343030BE +:107448002020333630302020343830302020373276 +:107458003030202039363030202831393230303F32 +:107468002924C9C9C90E061EFFCD0500C90E06CDBF +:107478000500C9DB0DE601C8DB08C9CD7B74B7C2BE +:107488008374C9CD1371C9D5CD8273A7CA9C740EF4 +:1074980005CD0500D1C9C5110275CD1472E17CC6B0 +:1074A8001F5FE5CD7574E17DC61F5FC375741E0847 +:1074B800C375741E20CD75741E08C3757411FE74CF +:1074C800C3147211FC74C314724F454D2053637278 +:1074D80065656E54797065723A20344D487A205A41 +:1074E80038302072756E6E696E67204F532F4D24A9 +:1074F8001A0D0A241A240D1B2A241B3D241E2400BD +:10750800001F2400001C2400001D2400001A240071 +:10751800000000000000000000152400001E2400E8 +:09752800001B2524001B2A24008D +:0000000000 diff --git a/cpvtel.hex b/cpvtel.hex new file mode 100644 index 0000000..7a964a7 --- /dev/null +++ b/cpvtel.hex @@ -0,0 +1,82 @@ +:10700000AC0006009972B672C33974C34974C35494 +:1070100074C35C74C33A74C34374C33B74C368746D +:10702000C36474C30000C30000C39E74C39474C3DC +:107030008F74C3A474C3F871C3D471C3C871C3BCC3 +:1070400071C3C271C3DD71C3E671C3EF71C3AC70AC +:10705000C3D372C3D472C3D572C3D672C3F372C31F +:107060000B73C31173C31273C33874C32771C3770F +:1070700074C34F71C32572C31472CC741D73B7737C +:10708000000000000010001DFFFFFFFF00000001D6 +:107090000000000650500805000000000D0D2323DD +:0770A00031004080000101F6 +:1070AC00CDE0700E07CD050032DF700E0CCD050063 +:1070BC007D32DE70113372CD147211AA74CD14723C +:1070CC00CD117221F87422A3703E4032A570CDD23E +:0270DC0072C977 +:1070E0002A01001103001922087111030019220B53 +:1070F0007111030019220E7111030019221171116F +:107100001E0019221371C9C30000C30000C3000090 +:10711000C30000C300000E28064605C21A710DC246 +:1071200018713DC21671C9D511B774CD1472D1CD85 +:1071300014721E5BCD437411AA74CD1472114A727D +:10714000CD14723A8D70B7C8118272CD1472C93ADB +:10715000DE70FE30FA86713A5C00B7CA62713DC3D8 +:1071600067710E19CD05005F0E2ECD05000603AF29 +:107170000E032183002B7E1F770DC2757105C26F30 +:10718000715E2356EBC90E1BCD0500EB2AA77023B9 +:10719000010000D51A1E0817DA9C7103572B7DB425 +:1071A000CAAD717A1DC29771D113C39371D1696051 +:1071B0003AAA70D603C8293DC2B671C9011404C3E6 +:1071C0007774011405C37774010C06CD777411F43C +:1071D00074C31472010107CD7774C3CE7101010825 +:1071E000CD7774C3CE71010809CD7774C3CE710118 +:1071F000080BCD7774C3CE713A8D70B7CA05720192 +:10720000010DC30872010109CD777411F074C31424 +:1072100072113072E5D5C50E09CD0500C1D1E1C9A5 +:10722000E1232323E97E1223130B78B1C22572C90F +:107230000D0A24636F6E6669677572656420666FF8 +:10724000722024207769746820245D0D0A0D0A4E8F +:10725000756D626572206F66207061636B65747313 +:107260003A0D0A4E756D626572206F662072657404 +:10727000726965733A0D0A46696C65206E616D65C9 +:107280003A240D0A0D0A0D0A527061636B3A0D0A19 +:107290000D0A537061636B3A244350585357542E70 +:1072A00041534D20283130292020372D4A616E2D41 +:1072B0003139393120244350584845412E41534DEE +:1072C00020283429202033312D4175672D3139385C +:1072D0003924C9C9C9C911DD72CD1472C90D0A4258 +:1072E00020205472616E736D697420612042524592 +:1072F000414B24E65FFE42CAFD72C320723E3FD37B +:10730000213E1ECD16713E37D321C97BC97BC97B77 +:10731000C9C93E36D3037BD3007AD300C9140331E5 +:10732000313024C111043132303024A10105313310 +:10733000342E3524850E0331353024050D043137C4 +:107340003630241C0104313830302416010531391F +:10735000323030241A000332303024C40904323071 +:10736000303024FA00043234303024D0000333307B +:10737000302483060433353230248E000433363013 +:1073800030248B0004343830302468000235302437 +:107390001027033630302441030436322E35244082 +:1073A0001F0437323030244500023735240B1A04CD +:1073B000393630302434000D0A202020203530208A +:1073C00020202036322E3520202037352031313014 +:1073D0002020203133342E3520202031353020201C +:1073E0002032303020202033303020202036303002 +:1073F000202020313230300D0A2020313736302025 +:1074000020313830302020323030302020323430BB +:1074100030202033353230202033363030202034B5 +:1074200038303020373230300D0A202039363030B5 +:107430002020313932303024C9C9C90E061EFFCD93 +:107440000500C90E06CD0500C9DB21E601CA497455 +:107450007BD320C9DB21E602C8DB20C9CD5474B739 +:10746000C25C74C9CD1371C9D5CD0F73A7CA757429 +:107470000E05CD0500D1C9C511C974CD1472E17CCA +:10748000C61F5FE5CD4374E17DC61F5FC343741E15 +:1074900008C343741E20CD43741E08C3437411C532 +:1074A00074C3147211C074C3147254656C636F6E2C +:1074B000205A6F726261241B481B4A0D0A09092475 +:1074C0001B481B4A240D1B4B241B59241B41240021 +:1074D0001B4224001B4324001B4424001B452400A2 +:1074E0001B4624001B4724001B4824001B49240082 +:0874F0001B4A24001B4B240081 +:0000000000 diff --git a/cpvtet.hex b/cpvtet.hex new file mode 100644 index 0000000..e0ca33b --- /dev/null +++ b/cpvtet.hex @@ -0,0 +1,61 @@ +:10700000AC00060000721D72C3C872C3D872C3E31D +:1070100072C3EB72C3C972C3D272C3CA72C3F572B0 +:10702000C3F372C30000C30000C31373C30973C367 +:107030000473C31973C3B871C3B871C3B871C3A95A +:1070400071C3AE71C3B871C3BB71C3C171C3AC703E +:10705000C33A72C34572C34672C34772C34972C30F +:107060004E72C35472C35572C3C772C33371C359CE +:1070700073C33C71C3DB71C3CA7100005E72967248 +:10708000000000000010FF1CFFFFFFFF00000001D8 +:107090000000000650500805000000000D0D2323DD +:0770A00031004080000101F6 +:1070AC00CDEC700E07CD050032EB700E0CCD05004B +:1070BC007D32EA7011E971CDCA71111F73CDCA719D +:1070CC0011F971CDCA71115A73CDCA71CDC7712125 +:0E70DC00AD7322A3703E4032A570CD3972C94B +:1070EC002A0100110300192214711103001922172F +:1070FC007111030019221A7111030019221D71114B +:10710C001E0019221F71C9C30000C30000C3000078 +:10711C00C30000C300000E14064605C226710DC242 +:10712C0024713DC22271C9D5118573CDCA71D1C9E3 +:10713C003AEA70FE30FA73713A5C00B7CA4F713D8F +:10714C00C354710E19CD05005F0E2ECD050006033C +:10715C00AF0E032183002B7E1F770DC2627105C217 +:10716C005C715E2356EBC90E1BCD0500EB2AA77094 +:10717C0023010000D51A1E0817DA897103572B7DDD +:10718C00B4CA9A717A1DC28471D113C38071D1694A +:10719C00603AAA70D603C8293DC2A371C91E20C388 +:1071AC00D2721E20CDD2721E25C3D272C3C77111EA +:1071BC009973C3CA7111A373C3CA7111E671E5D572 +:1071CC00C50E09CD0500C1D1E1C9E1232323E97E18 +:1071DC001223130B78B1C2DB71C90D0A24636F6ED5 +:1071EC006669677572656420666F72202420776902 +:1071FC00746820244350585357542E41534D202823 +:10720C003130292020372D4A616E2D31393931200A +:10721C00244350585359532E41534D202834302970 +:10722C00202032382D4175672D38392024C9F33E82 +:10723C0047D3083E08D308FBC9C9C9C924E65FC3B4 +:10724C00D6717BC97BC97BC9C9F37BD3087AD308B8 +:10725C00FBC9070431323030244740053139323014 +:10726C003024470404323430302447200333303088 +:10727C00244700043438303024471003363030248F +:10728C00478004393630302447080D0A202020333B +:10729C003030202020363030202031323030202049 +:1072AC002032343030202020343830302020203927 +:1072BC003630302020313932303024C9C9C90E065D +:1072CC001EFFCD0500C90E06CD0500C9DB01E60485 +:1072DC00CAD8727BD300C9DB01E601C8DB00C9CD7B +:1072EC00E372B7C2EB72C9AFC9D5CD5272A7CA024D +:1072FC00730E05CD0500D1C91E08C3D2721E20CD58 +:10730C00D2721E08C3D272119473C3CA7111E67182 +:10731C00C3CA7154656C6574656B205359535445DD +:10732C004D41535445522043502F4D2D383024435A +:10733C0050585644552E41534D2020283629202094 +:10734C0031322D4F63742D313939302024C94765C2 +:10735C006E65726963202844756D6229204352540E +:10736C00205465726D696E616C2074797065207340 +:10737C00656C656374656420240D0A5374617274C2 +:10738C00696E67202E2E2E245E550D0A240D0A528E +:10739C005061636B3A20240D0A535061636B3A20A1 +:0173AC0024BC +:0000000000 diff --git a/cpvtlb.hex b/cpvtlb.hex new file mode 100644 index 0000000..93daefd --- /dev/null +++ b/cpvtlb.hex @@ -0,0 +1,65 @@ +:10700000AC0006009972B672C32773C33773C342CC +:1070100073C34A73C32873C33173C32973C35473CF +:10702000C35273C30000C30000C38A73C38073C319 +:107030007B73C39073C3F871C3D471C3C871C3BCED +:1070400071C3C271C3DD71C3E671C3EF71C3AC70AC +:10705000C3D372C3D472C31773C31873C31A73C371 +:107060001F73C32573C32673C32673C32771C363FA +:1070700073C34F71C32572C31472BF730000000045 +:10708000000000000010011FFFFFFFFF00000001D3 +:107090000000000650500805000000000D0D2323DD +:0770A00031004080000101F6 +:1070AC00CDE0700E07CD050032DF700E0CCD050063 +:1070BC007D32DE70113372CD1472119673CD147251 +:1070CC00CD117221EB7322A3703E4032A570CDD24C +:0270DC0072C977 +:1070E0002A01001103001922087111030019220B53 +:1070F0007111030019220E7111030019221171116F +:107100001E0019221371C9C30000C30000C3000090 +:10711000C30000C300000E14064605C21A710DC25A +:1071200018713DC21671C9D511AE73CD1472D1CD8F +:1071300014721E5BCD3173119673CD1472114A72A5 +:10714000CD14723A8D70B7C8118272CD1472C93ADB +:10715000DE70FE30FA86713A5C00B7CA62713DC3D8 +:1071600067710E19CD05005F0E2ECD05000603AF29 +:107170000E032183002B7E1F770DC2757105C26F30 +:10718000715E2356EBC90E1BCD0500EB2AA77023B9 +:10719000010000D51A1E0817DA9C7103572B7DB425 +:1071A000CAAD717A1DC29771D113C39371D1696051 +:1071B0003AAA70D603C8293DC2B671C9011404C3E6 +:1071C0006373011405C36373010C06CD637311E788 +:1071D00073C31472010107CD6373C3CE710101083B +:1071E000CD6373C3CE71010809CD6373C3CE710142 +:1071F000080BCD6373C3CE713A8D70B7CA057201A7 +:10720000010DC30872010109CD637311E373C31447 +:1072100072113072E5D5C50E09CD0500C1D1E1C9A5 +:10722000E1232323E97E1223130B78B1C22572C90F +:107230000D0A24636F6E6669677572656420666FF8 +:10724000722024207769746820245D0D0A0D0A4E8F +:10725000756D626572206F66207061636B65747313 +:107260003A0D0A4E756D626572206F662072657404 +:10727000726965733A0D0A46696C65206E616D65C9 +:107280003A240D0A0D0A0D0A527061636B3A0D0A19 +:107290000D0A537061636B3A244350585357542E70 +:1072A00041534D20283130292020372D4A616E2D41 +:1072B0003139393120244350585359532E41534DBD +:1072C0002028343029202032382D4175672D383957 +:1072D0002024C9C911DB72CD1472C92028436F6EF6 +:1072E00074726F6C2D5F2069732074686520446F21 +:1072F000776E2D4172726F77206B6579206F6E20EB +:10730000746865205452532D3830206B6579626F54 +:10731000617264290D0A24C9C924E65FC320727B07 +:10732000C97BC97BC9C9C9C9C90E061EFFCD0500E5 +:10733000C90E06CD0500C9DBF6E604CA37737BD358 +:10734000F4C9DBF6E601C8DBF4C9CD4273B7C24A23 +:1073500073C9AFC9D5CD2373A7CA61730E05CD0517 +:1073600000D1C9C511BC73CD1472E17CC61F5FE5A5 +:10737000CD3173E17DC61F5FC331731E08C3317306 +:107380001E20CD31731E08C3317311B873C314723C +:1073900011B573C314725452532D3830204949200B +:1073A0004C696665626F61742043502F4D241B3A0F +:1073B0000D0A0909241B3A240D1B54241B3D240BE0 +:1073C0002400000A2400000C240000082400001BF4 +:1073D0003A240024000000240000001E2400000BBA +:0B73E0002400001B5924001B54240053 +:0000000000 diff --git a/cpvtm4.hex b/cpvtm4.hex new file mode 100644 index 0000000..d8385d7 --- /dev/null +++ b/cpvtm4.hex @@ -0,0 +1,81 @@ +:10700000AC0006009972B672C32274C33274C33DD9 +:1070100074C34574C32374C32C74C32474C34F74E2 +:10702000C34D74C30000C30000C38574C37B74C325 +:107030007674C38B74C3F871C3D471C3C871C3BCF5 +:1070400071C3C271C3DD71C3E671C3EF71C3AC70AC +:10705000C3DB72C3DC72C3DD72C3DE72C3FB72C3F7 +:107060001F73C32573C32673C32174C32771C35E03 +:1070700074C34F71C32572C31472B8743273AD7385 +:107080000000000000100118FFFFFFFF00000001DA +:107090000000000650500805000000000D0D2323DD +:0770A00031004080000101F6 +:1070AC00CDE0700E07CD050032DF700E0CCD050063 +:1070BC007D32DE70113372CD1472119174CD147255 +:1070CC00CD117221E47422A3703E4032A570CDCF55 +:0270DC0072C977 +:1070E0002A01001103001922087111030019220B53 +:1070F0007111030019220E7111030019221171116F +:107100001E0019221371C9C30000C30000C3000090 +:10711000C30000C300000E28064605C21A710DC246 +:1071200018713DC21671C9D511A074CD1472D1CD9C +:1071300014721E5BCD2C74119174CD1472114A72AD +:10714000CD14723A8D70B7C8118272CD1472C93ADB +:10715000DE70FE30FA86713A5C00B7CA62713DC3D8 +:1071600067710E19CD05005F0E2ECD05000603AF29 +:107170000E032183002B7E1F770DC2757105C26F30 +:10718000715E2356EBC90E1BCD0500EB2AA77023B9 +:10719000010000D51A1E0817DA9C7103572B7DB425 +:1071A000CAAD717A1DC29771D113C39371D1696051 +:1071B0003AAA70D603C8293DC2B671C9011404C3E6 +:1071C0005E74011405C35E74010C06CD5E7411E09B +:1071D00074C31472010107CD5E74C3CE710101083E +:1071E000CD5E74C3CE71010809CD5E74C3CE71014A +:1071F000080BCD5E74C3CE713A8D70B7CA057201AB +:10720000010DC30872010109CD5E7411DC74C31451 +:1072100072113072E5D5C50E09CD0500C1D1E1C9A5 +:10722000E1232323E97E1223130B78B1C22572C90F +:107230000D0A24636F6E6669677572656420666FF8 +:10724000722024207769746820245D0D0A0D0A4E8F +:10725000756D626572206F66207061636B65747313 +:107260003A0D0A4E756D626572206F662072657404 +:10727000726965733A0D0A46696C65206E616D65C9 +:107280003A240D0A0D0A0D0A527061636B3A0D0A19 +:107290000D0A537061636B3A244350585357542E70 +:1072A00041534D20283130292020372D4A616E2D41 +:1072B000313939312024435058544D342E41534DE7 +:1072C000202028352920382D4665622D3931243E6D +:1072D000EED3E9D3E83A3173D3EAC9C9C9C911E594 +:1072E00072CD1472C90D0A4220205472616E736D02 +:1072F0006974206120425245414B24E65FFE42CA38 +:107300000573C32072DBEAE640CA05733E00D3E88A +:10731000D3EA3E19CD16713A3173D3E8D3EAC97B6B +:10732000C97BC97BC9C97BD3E93A3173D3E8D3EAB6 +:10733000C96C100331313024222204313230302420 +:107340007777053133342E35243333033135302408 +:1073500044440431383030248888053139323030A3 +:1073600024FFFF0432303030249999043234303015 +:1073700024AAAA0333303024555504333630302440 +:10738000BBBB043438303024CCCC02353024000070 +:1073900003363030246666043732303024DDDD02B7 +:1073A0003735241111043936303024EEEE0D0A2021 +:1073B000202035302020202020203735202020207C +:1073C000313130202020203133342E35202031350A +:1073D0003020202020333030202020203630302034 +:1073E0002020313230300D0A20313830302020203A +:1073F00032303030202020323430302020203336DC +:1074000030302020203438303020202037323030C7 +:1074100020202039363030202031393230302020C1 +:1074200024C9C9C90E061EFFCD0500C90E06CD052B +:1074300000C9DBEAE640CA32747BD3EBC9DBEAE67B +:1074400080C8DBEBC9CD3D74B7C24574C9AFC9D59F +:10745000CD2373A7CA5C740E05CD0500D1C9C51133 +:10746000B574CD1472E17CC61F5FE5CD2C74E17D4F +:10747000C61F5FC32C741E08C32C741E20CD2C7431 +:107480001E08C32C7411B274C3147211B074C314E7 +:107490007254616E6479204D6F64656C2049562486 +:1074A0001A0D0A2020202020202020202020202407 +:1074B0001A240D15241B3D240B2400000A2400006F +:1074C0000C240000082400001A2400000F240000EF +:1074D0000E2400001E2400000B24000019240000CC +:0474E000152400006F +:0000000000 diff --git a/cpvtpt.hex b/cpvtpt.hex new file mode 100644 index 0000000..3a7cc74 --- /dev/null +++ b/cpvtpt.hex @@ -0,0 +1,65 @@ +:10700000AC0006009972B672C32773C33773C342CC +:1070100073C34A73C32873C33173C32973C35473CF +:10702000C35273C30000C30000C38A73C38073C319 +:107030007B73C39073C3F871C3D471C3C871C3BCED +:1070400071C3C271C3DD71C3E671C3EF71C3AC70AC +:10705000C3D372C3D472C31773C31873C31A73C371 +:107060001F73C32573C32673C32673C32771C363FA +:1070700073C34F71C32572C31472B773000000004D +:10708000000000000010011FFFFFFFFF00000001D3 +:107090000000000650500805000000000D0D2323DD +:0770A00031004080000101F6 +:1070AC00CDE0700E07CD050032DF700E0CCD050063 +:1070BC007D32DE70113372CD1472119673CD147251 +:1070CC00CD117221E37322A3703E4032A570CDD254 +:0270DC0072C977 +:1070E0002A01001103001922087111030019220B53 +:1070F0007111030019220E7111030019221171116F +:107100001E0019221371C9C30000C30000C3000090 +:10711000C30000C300000E14064605C21A710DC25A +:1071200018713DC21671C9D511A973CD1472D1CD94 +:1071300014721E5BCD3173119673CD1472114A72A5 +:10714000CD14723A8D70B7C8118272CD1472C93ADB +:10715000DE70FE30FA86713A5C00B7CA62713DC3D8 +:1071600067710E19CD05005F0E2ECD05000603AF29 +:107170000E032183002B7E1F770DC2757105C26F30 +:10718000715E2356EBC90E1BCD0500EB2AA77023B9 +:10719000010000D51A1E0817DA9C7103572B7DB425 +:1071A000CAAD717A1DC29771D113C39371D1696051 +:1071B0003AAA70D603C8293DC2B671C9011404C3E6 +:1071C0006373011405C36373010C06CD637311DF90 +:1071D00073C31472010107CD6373C3CE710101083B +:1071E000CD6373C3CE71010809CD6373C3CE710142 +:1071F000080BCD6373C3CE713A8D70B7CA057201A7 +:10720000010DC30872010109CD637311DB73C3144F +:1072100072113072E5D5C50E09CD0500C1D1E1C9A5 +:10722000E1232323E97E1223130B78B1C22572C90F +:107230000D0A24636F6E6669677572656420666FF8 +:10724000722024207769746820245D0D0A0D0A4E8F +:10725000756D626572206F66207061636B65747313 +:107260003A0D0A4E756D626572206F662072657404 +:10727000726965733A0D0A46696C65206E616D65C9 +:107280003A240D0A0D0A0D0A527061636B3A0D0A19 +:107290000D0A537061636B3A244350585357542E70 +:1072A00041534D20283130292020372D4A616E2D41 +:1072B0003139393120244350585359532E41534DBD +:1072C0002028343029202032382D4175672D383957 +:1072D0002024C9C911DB72CD1472C92028436F6EF6 +:1072E00074726F6C2D5F2069732074686520446F21 +:1072F000776E2D4172726F77206B6579206F6E20EB +:10730000746865205452532D3830206B6579626F54 +:10731000617264290D0A24C9C924E65FC320727B07 +:10732000C97BC97BC9C9C9C9C90E061EFFCD0500E5 +:10733000C90E06CD0500C9DBF6E604CA37737BD358 +:10734000F4C9DBF6E601C8DBF4C9CD4273B7C24A23 +:1073500073C9AFC9D5CD2373A7CA61730E05CD0517 +:1073600000D1C9C511B473CD1472E17CC61F5FE5AD +:10737000CD3173E17DC61F5FC331731E08C3317306 +:107380001E20CD31731E08C3317311B173C3147243 +:1073900011AF73C314725452532D38302049492011 +:1073A000502B542043502F4D240C0D0A0909240C56 +:1073B000240D01241B59241E2400001F2400001D3D +:1073C0002400001C2400000C2400001124000014E0 +:1073D000240000062400001E2400000224000001F6 +:0373E00024000086 +:0000000000 diff --git a/cpvtrc.hex b/cpvtrc.hex new file mode 100644 index 0000000..7b8d884 --- /dev/null +++ b/cpvtrc.hex @@ -0,0 +1,103 @@ +:10700000AC000600A572C272C37974C38974C3A8A8 +:1070100074C3C474C37A74C38374C37B74C3F274BB +:10702000C3CC74C30000C30000C33875C32E75C33E +:107030002E75C33E75C3F871C3D471C3C871C3BC88 +:1070400071C3C271C3DD71C3E671C3EF71C3AC70AC +:10705000C32373C32473C32573C32673C37173C35C +:10706000D773C3F773C3F873C37874C32771C31698 +:1070700075C34F71C33172C31472A575057443741F +:10708000000000000010011DFFFFFFFF00000001D5 +:107090000000000650500805000000000D0D2323DD +:0770A00031004080000101F6 +:1070AC00CDE0700E07CD050032DF700E0CCD050063 +:1070BC007D32DE70113F72CD1472116A75CD14726F +:1070CC00CD117221447622A3703E4032A570CDE0E2 +:0270DC0072C977 +:1070E0002A01001103001922087111030019220B53 +:1070F0007111030019220E7111030019221171116F +:107100001E0019221371C9C30000C30000C3000090 +:10711000C30000C300000E28064605C21A710DC246 +:1071200018713DC21671C9D5119575CD1472D1CDA6 +:1071300014721E5BCD8374116A75CD147211567270 +:10714000CD14723A8D70B7C8118E72CD1472C93ACF +:10715000DE70FE30FA86713A5C00B7CA62713DC3D8 +:1071600067710E19CD05005F0E2ECD05000603AF29 +:107170000E032183002B7E1F770DC2757105C26F30 +:10718000715E2356EBC90E1BCD0500EB2AA77023B9 +:10719000010000D51A1E0817DA9C7103572B7DB425 +:1071A000CAAD717A1DC29771D113C39371D1696051 +:1071B0003AAA70D603C8293DC2B671C9011404C3E6 +:1071C0001675011405C31675010C06CD167511CD83 +:1071D00075C31472010107CD1675C3CE7101010884 +:1071E000CD1675C3CE71010809CD1675C3CE7101D8 +:1071F000080BCD1675C3CE713A8D70B7CA057201F2 +:10720000010DC30872010109CD167511C975C314AA +:1072100072113C72E5D5C51A13FE24CA2872D55FD7 +:107220004FCD8374D1C31772C1D1E1C9E1232323A8 +:10723000E97E1223130B78B1C23172C90D0A24639F +:107240006F6E6669677572656420666F72202420B0 +:107250007769746820245D0D0A0D0A4E756D6265AC +:1072600072206F66207061636B6574733A0D0A4E0D +:10727000756D626572206F662072657472696573E0 +:107280003A0D0A46696C65206E616D653A240D0AF7 +:107290000D0A0D0A527061636B3A0D0A0D0A5370A4 +:1072A00061636B3A244350585357542E41534D2039 +:1072B000283130292020372D4A616E2D313939315E +:1072C0002024435058544F522E41534D20283529E5 +:1072D000202031302D4A616E2D3139393120202462 +:1072E000E53EF22100FFCD44757DE607EE073C3216 +:1072F00088703289705FCDF8733E0F2E003E0321F7 +:107300000001CD44753E022E02CD44753E052E028D +:10731000CD44753E062E00CD44753ECA2EFFCD44A9 +:1073200075E1C9C9C9C9112D73CD1472C90D0A42BD +:1073300020205472616E736D697420612042524541 +:10734000414B0D0A442020446973636F6E6E656380 +:107350007420746865206D6F64656D2028546573B2 +:107360007420707572706F736573206F6E6C7929FD +:1073700024E65FFE42CAA473FE44CA8073C32C7223 +:10738000118873CD1472AFC9070D0A5465737469FF +:107390006E67206C696E652064726F707065642022 +:1073A0000D0A0724E53EE8210000CD4475E53E9C2A +:1073B000217700CD4475E53E1ECD16713E962E0810 +:1073C0002600CD4475E126003E9CCD4475E12600A3 +:1073D0003EE8CD4475E1C97BC97BE67FFE7FC01ED8 +:1073E00008CD89741E20CD89741E08CD8974AFC95B +:1073F0007BE67FFE0AC0C9C93E076BCD44753E08D7 +:107400006BCD4475C9080431323030240404033193 +:107410003530240202053139323030240808043274 +:10742000343030240505033330302403030434386A +:107430003030240606023735240101043936303055 +:107440002407070D0A202020203735202020203156 +:107450003530202020203330302020313230302091 +:10746000203234303020203438303020203936304B +:107470003020313932303024C9C9C90E061EFFCD43 +:107480000500C90E06CD0500C93A6975A7C29D74ED +:10749000C5E5CDC3FF014BCDC9FFE1C1C9E53E8ABA +:1074A0002E0263CD4475E1C9E53E8021FEFFCD4447 +:1074B000757CB5CABF743E91210100CD44757CE155 +:1074C000E67FC9C9CDA874B7C2C474C93E802EFC7A +:1074D00026FFCD44757CFE0A3E00F03EFFC93E0506 +:1074E0002E01CD4475CD1371F53E052E02CD4475A8 +:1074F000F1C9D5CDF073A7CA14753E052E01CD4450 +:10750000750E05CD05003E052E02CD44753E062EB6 +:1075100000CD4475D1C9C511A275CD1472E17DC6E7 +:10752000FF5FE5CD8374E17CC6FF5FC383741E20DB +:10753000CD83741E08C38374119B75C31472119F8D +:1075400075C31472C547CDC0FF0F48CDC9FF4DCDDF +:10755000C9FF4CCDC9FFCDC6FF6F326775CDC6FFE1 +:107560006732687578C1C9000000546F7263682083 +:10757000556E69636F726E20352024204D43502074 +:1075800076657273696F6E20312E30302020202492 +:107590001B212400240C0D0A090924240000000CDE +:1075A00024001F24000B2400000A240000092400EA +:1075B00000082400000C2400002400000024000027 +:1075C000001E2400000B2400002400000024000002 +:1075D00000202020202020202020202020202020CB +:1075E00008080808080808080808080808080824FF +:1075F0000D2020202020202020202020202020209E +:10760000202020202020202020202020202020207A +:10761000202020202020202020202020202020206A +:10762000202020202020202020202020202020205A +:10763000202020202020202020202020202020204A +:0476400020080D24ED +:0000000000 diff --git a/cpvud.hex b/cpvud.hex new file mode 100644 index 0000000..99882af --- /dev/null +++ b/cpvud.hex @@ -0,0 +1,52 @@ +:10700000AC00060000721D72C34C72C35C72C36791 +:1070100072C36F72C34D72C35672C34E72C379721C +:10702000C37772C30000C30000C39772C38D72C3DD +:107030008872C39D72C3B871C3B871C3B871C3A954 +:1070400071C3AE71C3B871C3BB71C3C171C3AC703E +:10705000C33A72C33B72C33C72C33D72C33F72C337 +:107060004472C34A72C34B72C34B72C33371C3D1F0 +:1070700072C33C71C3DB71C3CA7100000000000021 +:10708000000000000010FF1CFFFFFFFF00000001D8 +:107090000000000650500805000000000D0D2323DD +:0770A00031004080000101F6 +:1070AC00CDEC700E07CD050032EB700E0CCD05004B +:1070BC007D32EA7011E971CDCA7111A372CDCA711A +:1070CC0011F971CDCA7111D272CDCA71CDC77121AE +:0E70DC00257322A3703E4032A570CD3972C9D3 +:1070EC002A0100110300192214711103001922172F +:1070FC007111030019221A7111030019221D71114B +:10710C001E0019221F71C9C30000C30000C3000078 +:10711C00C30000C300000E14064605C226710DC242 +:10712C0024713DC22271C9D511FD72CDCA71D1C96C +:10713C003AEA70FE30FA73713A5C00B7CA4F713D8F +:10714C00C354710E19CD05005F0E2ECD050006033C +:10715C00AF0E032183002B7E1F770DC2627105C217 +:10716C005C715E2356EBC90E1BCD0500EB2AA77094 +:10717C0023010000D51A1E0817DA897103572B7DDD +:10718C00B4CA9A717A1DC28471D113C38071D1694A +:10719C00603AAA70D603C8293DC2A371C91E20C388 +:1071AC0056721E20CD56721E25C35672C3C771115E +:1071BC001173C3CA71111B73C3CA7111E671E5D582 +:1071CC00C50E09CD0500C1D1E1C9E1232323E97E18 +:1071DC001223130B78B1C2DB71C90D0A24636F6ED5 +:1071EC006669677572656420666F72202420776902 +:1071FC00746820244350585357542E41534D202823 +:10720C003130292020372D4A616E2D31393931200A +:10721C00244350585359532E41534D202834302970 +:10722C00202032382D4175672D38392024C9C9C921 +:10723C00C9C924E65FC3D6717BC97BC97BC9C9C9DF +:10724C00C9C90E061EFFCD0500C90E06CD0500C925 +:10725C00DBFFE601CA5C727BD3FEC9DBFFE602C82A +:10726C00DBFEC9CD6772B7C26F72C9AFC9D5CD4845 +:10727C0072A7CA86720E05CD0500D1C91E08C35669 +:10728C00721E20CD56721E08C35672110C73C3CADF +:10729C007111E671C3CA714D6963726F446563699C +:1072AC0073696F6E2049244350585644552E4153F0 +:1072BC004D2020283629202031322D4F63742D315A +:1072CC003939302024C947656E65726963202844BA +:1072DC00756D622920435254205465726D696E613C +:1072EC006C20747970652073656C656374656420BB +:1072FC00240D0A5374617274696E67202E2E2E242D +:10730C005E550D0A240D0A525061636B3A20240D10 +:09731C000A535061636B3A20240E +:0000000000 diff --git a/cpvusm.hex b/cpvusm.hex new file mode 100644 index 0000000..ad15c91 --- /dev/null +++ b/cpvusm.hex @@ -0,0 +1,53 @@ +:10700000AC00060000721D72C34C72C35C72C36791 +:1070100072C36F72C34D72C35672C34E72C379721C +:10702000C37772C30000C30000C39772C38D72C3DD +:107030008872C39D72C3B871C3B871C3B871C3A954 +:1070400071C3AE71C3B871C3BB71C3C171C3AC703E +:10705000C33A72C33B72C33C72C33D72C33F72C337 +:107060004472C34A72C34B72C34B72C33371C3E5DC +:1070700072C33C71C3DB71C3CA7100000000000021 +:10708000000000000010FF1CFFFFFFFF00000001D8 +:107090000000000650500805000000000D0D2323DD +:0770A00031004080000101F6 +:1070AC00CDEC700E07CD050032EB700E0CCD05004B +:1070BC007D32EA7011E971CDCA7111A372CDCA711A +:1070CC0011F971CDCA7111E672CDCA71CDC771219A +:0E70DC00397322A3703E4032A570CD3972C9BF +:1070EC002A0100110300192214711103001922172F +:1070FC007111030019221A7111030019221D71114B +:10710C001E0019221F71C9C30000C30000C3000078 +:10711C00C30000C300000E28064605C226710DC22E +:10712C0024713DC22271C9D5111173CDCA71D1C957 +:10713C003AEA70FE30FA73713A5C00B7CA4F713D8F +:10714C00C354710E19CD05005F0E2ECD050006033C +:10715C00AF0E032183002B7E1F770DC2627105C217 +:10716C005C715E2356EBC90E1BCD0500EB2AA77094 +:10717C0023010000D51A1E0817DA897103572B7DDD +:10718C00B4CA9A717A1DC28471D113C38071D1694A +:10719C00603AAA70D603C8293DC2A371C91E20C388 +:1071AC0056721E20CD56721E25C35672C3C771115E +:1071BC002573C3CA71112F73C3CA7111E671E5D55A +:1071CC00C50E09CD0500C1D1E1C9E1232323E97E18 +:1071DC001223130B78B1C2DB71C90D0A24636F6ED5 +:1071EC006669677572656420666F72202420776902 +:1071FC00746820244350585357542E41534D202823 +:10720C003130292020372D4A616E2D31393931200A +:10721C00244350585359532E41534D202834302970 +:10722C00202032382D4175672D38392024C9C9C921 +:10723C00C9C924E65FC3D6717BC97BC97BC9C9C9DF +:10724C00C9C90E061EFFCD0500C90E06CD0500C925 +:10725C00DB01E604CA5C727BD300C9DB01E602C821 +:10726C00DB00C9CD6772B7C26F72C9AFC9D5CD4843 +:10727C0072A7CA86720E05CD0500D1C91E08C35669 +:10728C00721E20CD56721E08C35672112073C3CACB +:10729C007111E671C3CA71552E20532E204D6963AE +:1072AC00726F53616C6573207573696E67207072B1 +:1072BC00696E74657220706F727424435058564412 +:1072CC00552E41534D2020283629202031322D4F68 +:1072DC0063742D313939302024C947656E65726964 +:1072EC0063202844756D62292043525420546572E2 +:1072FC006D696E616C20747970652073656C656363 +:10730C0074656420240D0A5374617274696E67206D +:10731C002E2E2E245E550D0A240D0A525061636BDD +:0D732C003A20240D0A535061636B3A20246F +:0000000000 diff --git a/cpvvec.hex b/cpvvec.hex new file mode 100644 index 0000000..55f04b1 --- /dev/null +++ b/cpvvec.hex @@ -0,0 +1,60 @@ +:10700000AC0006009972B672C3E572C3F572C30094 +:1070100073C30873C3E672C3EF72C3E772C312731C +:10702000C31073C30000C30000C34373C33973C3E9 +:107030003373C34973C3F871C3D471C3C871C3BC7C +:1070400071C3C271C3DD71C3E671C3EF71C3AC70AC +:10705000C3D372C3D472C3D572C3D672C3D872C33A +:10706000DD72C3E372C3E472C3E472C32771C32148 +:1070700073C34F71C32572C314726F730000000095 +:10708000000000000010017EFFFFFFFF0000000174 +:107090000000000650500805000000000D0D2323DD +:0770A00031004080000101F6 +:1070AC00CDE0700E07CD050032DF700E0CCD050063 +:1070BC007D32DE70113372CD1472114F73CD147298 +:1070CC00CD1172219B7322A3703E4032A570CDD29C +:0270DC0072C977 +:1070E0002A01001103001922087111030019220B53 +:1070F0007111030019220E7111030019221171116F +:107100001E0019221371C9C30000C30000C3000090 +:10711000C30000C300000E14064605C21A710DC25A +:1071200018713DC21671C9D5115F73CD1472D1CDDE +:1071300014721E5BCDEF72114F73CD1472114A722F +:10714000CD14723A8D70B7C8118272CD1472C93ADB +:10715000DE70FE30FA86713A5C00B7CA62713DC3D8 +:1071600067710E19CD05005F0E2ECD05000603AF29 +:107170000E032183002B7E1F770DC2757105C26F30 +:10718000715E2356EBC90E1BCD0500EB2AA77023B9 +:10719000010000D51A1E0817DA9C7103572B7DB425 +:1071A000CAAD717A1DC29771D113C39371D1696051 +:1071B0003AAA70D603C8293DC2B671C9011404C3E6 +:1071C0002173011405C32173010C06CD217311979E +:1071D00073C31472010107CD2173C3CE710101087D +:1071E000CD2173C3CE71010809CD2173C3CE7101C6 +:1071F000080BCD2173C3CE713A8D70B7CA057201E9 +:10720000010DC30872010109CD2173119373C314D9 +:1072100072113072E5D5C50E09CD0500C1D1E1C9A5 +:10722000E1232323E97E1223130B78B1C22572C90F +:107230000D0A24636F6E6669677572656420666FF8 +:10724000722024207769746820245D0D0A0D0A4E8F +:10725000756D626572206F66207061636B65747313 +:107260003A0D0A4E756D626572206F662072657404 +:10727000726965733A0D0A46696C65206E616D65C9 +:107280003A240D0A0D0A0D0A527061636B3A0D0A19 +:107290000D0A537061636B3A244350585357542E70 +:1072A00041534D20283130292020372D4A616E2D41 +:1072B0003139393120244350585359532E41534DBD +:1072C0002028343029202032382D4175672D383957 +:1072D0002024C9C9C9C9C924E65FC320727BC97B00 +:1072E000C97BC9C9C9C9C90E061EFFCD0500C90E93 +:1072F00006CD0500C9DB05E601CAF5727BD304C9DA +:10730000DB05E602C8DB04C9CD0073B7C20873C948 +:10731000AFC9D5CDE172A7CA1F730E05CD0500D147 +:10732000C9050DC51E1BCDEF72D1D5CDEF72D15A57 +:10733000C3EF72116A73C314721E20CDEF721E0860 +:10734000C3EF72116773C31472116573C31472565D +:107350006563746F72204772617068696373240497 +:107360000D0A09092404240D1124082008082415F5 +:107370002400000A2400001A240000240000002435 +:10738000000000240000002400000002240000157A +:0B739000240000102400001124000065 +:0000000000 diff --git a/cpvxer.hex b/cpvxer.hex new file mode 100644 index 0000000..521773c --- /dev/null +++ b/cpvxer.hex @@ -0,0 +1,86 @@ +:10700000AC0006009972D072C38B74C39A74C3A586 +:1070100074C3AD74C38B74C39474C38C74C3B774DA +:10702000C3B574C30000C30000C3EB74C3E174C3F1 +:10703000DB74C3F174C3F871C3D471C3C871C3BC2A +:1070400071C3C271C3DD71C3E671C3EF71C3AC70AC +:10705000C30373C30473C30E73C30F73C35773C3E4 +:107060009773C39973C39A73C38A74C32771C3C3D5 +:1070700074C34F71C32572C3147214759E7319744F +:10708000000000000010011DFFFFFFFF00000001D5 +:107090000000000650500805000000000D0D2323DD +:0770A00031004080000101F6 +:1070AC00CDE0700E07CD050032DF700E0CCD050063 +:1070BC007D32DE70113372CD147211F774CD1472EF +:1070CC00CD117221407522A3703E4032A570CDEBDC +:0270DC0072C977 +:1070E0002A01001103001922087111030019220B53 +:1070F0007111030019220E7111030019221171116F +:107100001E0019221371C9C30000C30000C3000090 +:10711000C30000C300000E19064605C21A710DC255 +:1071200018713DC21671C9D5110175CD1472D1CD3A +:1071300014721E5BCD947411F774CD1472114A72DF +:10714000CD14723A8D70B7C8118272CD1472C93ADB +:10715000DE70FE30FA86713A5C00B7CA62713DC3D8 +:1071600067710E19CD05005F0E2ECD05000603AF29 +:107170000E032183002B7E1F770DC2757105C26F30 +:10718000715E2356EBC90E1BCD0500EB2AA77023B9 +:10719000010000D51A1E0817DA9C7103572B7DB425 +:1071A000CAAD717A1DC29771D113C39371D1696051 +:1071B0003AAA70D603C8293DC2B671C9011404C3E6 +:1071C000C374011405C3C374010C06CDC374113C10 +:1071D00075C31472010107CDC374C3CE71010108D8 +:1071E000CDC374C3CE71010809CDC374C3CE710180 +:1071F000080BCDC374C3CE713A8D70B7CA05720146 +:10720000010DC30872010109CDC374113875C3148F +:1072100072113072E5D5C50E09CD0500C1D1E1C9A5 +:10722000E1232323E97E1223130B78B1C22572C90F +:107230000D0A24636F6E6669677572656420666FF8 +:10724000722024207769746820245D0D0A0D0A4E8F +:10725000756D626572206F66207061636B65747313 +:107260003A0D0A4E756D626572206F662072657404 +:10727000726965733A0D0A46696C65206E616D65C9 +:107280003A240D0A0D0A0D0A527061636B3A0D0A19 +:107290000D0A537061636B3A244350585357542E70 +:1072A00041534D20283130292020372D4A616E2D41 +:1072B0003139393120244350585359532E41534DBD +:1072C00020283335292030312D4465632D3836246C +:1072D0004350584242492E41534D20283429202002 +:1072E000372D4A616E2D313939312411F9720E0A68 +:1072F0001A13D3060DC2F072C91818044401000312 +:10730000C105EAC9110B73CD1472C90D0A24C91144 +:107310001673CD1472C90D0A4220205472616E7327 +:107320006D6974206120425245414B0D0A4820206E +:1073300048616E677570207573696E67204454529A +:107340000D0A572020576970652073637265656E5A +:1073500020636C65617224E65FFE42CA7273FE4868 +:10736000CA6B73FE57CAF174C32072160A1EFFC39C +:107370008173169A1E1E3E01D306DB06E601CA760D +:10738000733E05D3063E6AB2D3067BCD16713E0529 +:10739000D3063EEAD306C97BC9C97BD300C9100313 +:1073A00031313024020204313230302407070531F4 +:1073B00033342E35240303033135302404040431DF +:1073C000383030240808053139323030240F0F04AA +:1073D000323030302409090432343030240A0A03B0 +:1073E0003330302405050433363030240B0B04349D +:1073F000383030240C0C0235302400000336303095 +:107400002406060437323030240D0D0237352401AE +:10741000010439363030240E0E0D0A20202035307C +:1074200020202020203735202020203131302020FE +:1074300020203133342E35202031353020202020BB +:1074400033303020202020363030202020313230A0 +:10745000300D0A20313830302020203230303020BA +:10746000202032343030202020333630302020208D +:107470003438303020202037323030202020393648 +:1074800030302020313932303024C9C90E061EFF79 +:10749000CD0500C90E06CD0500C9DB06E604CA9A73 +:1074A000747BD304C9DB06E601C8DB04C9CDA5742F +:1074B000B7C2AD74C9AFC9D5A7CAC1740E05CD0591 +:1074C00000D1C9C5110C75CD1472E17CC61F5FE5F2 +:1074D000CD9474E17DC61F5FC39474110F75C314FE +:1074E000721E20CD94741E08C39474110975C314C0 +:1074F00072110775C314725865726F782038323074 +:10750000241A0D0A0909241A240D18241B3D2408E5 +:10751000200808240B2400000A2400000C2400008A +:10752000082400001A2400002400000024000000A9 +:107530001E2400000B240000112400001824000069 +:0000000000 diff --git a/cpvz00.hex b/cpvz00.hex new file mode 100644 index 0000000..9fb5ed9 --- /dev/null +++ b/cpvz00.hex @@ -0,0 +1,61 @@ +:10700000AC0006009972B672C3E672C3F672C30191 +:1070100073C30973C3E772C3F072C3E872C3157315 +:10702000C31173C30000C30000C34B73C34173C3D8 +:107030003C73C35173C3F871C3D471C3C871C3BC6B +:1070400071C3C271C3DD71C3E671C3EF71C3AC70AC +:10705000C3D372C3D472C3D572C3D672C3D872C33A +:10706000DD72C3E372C3E472C3E572C32771C32444 +:1070700073C34F71C32572C3147284730000000080 +:10708000000000000010001CFFFFFFFF00000001D7 +:107090000000000650500805000000000D0D2323DD +:0770A00031004080000101F6 +:1070AC00CDE0700E07CD050032DF700E0CCD050063 +:1070BC007D32DE70113372CD1472115773CD147290 +:1070CC00CD117221B07322A3703E4032A570CDD287 +:0270DC0072C977 +:1070E0002A01001103001922087111030019220B53 +:1070F0007111030019220E7111030019221171116F +:107100001E0019221371C9C30000C30000C3000090 +:10711000C30000C300000E28064605C21A710DC246 +:1071200018713DC21671C9D5116F73CD1472D1CDCE +:1071300014721E5BCDF072115773CD1472114A7226 +:10714000CD14723A8D70B7C8118272CD1472C93ADB +:10715000DE70FE30FA86713A5C00B7CA62713DC3D8 +:1071600067710E19CD05005F0E2ECD05000603AF29 +:107170000E032183002B7E1F770DC2757105C26F30 +:10718000715E2356EBC90E1BCD0500EB2AA77023B9 +:10719000010000D51A1E0817DA9C7103572B7DB425 +:1071A000CAAD717A1DC29771D113C39371D1696051 +:1071B0003AAA70D603C8293DC2B671C9011404C3E6 +:1071C0002473011405C32473010C06CD247311AC80 +:1071D00073C31472010107CD2473C3CE710101087A +:1071E000CD2473C3CE71010809CD2473C3CE7101C0 +:1071F000080BCD2473C3CE713A8D70B7CA057201E6 +:10720000010DC30872010109CD247311A873C314C1 +:1072100072113072E5D5C50E09CD0500C1D1E1C9A5 +:10722000E1232323E97E1223130B78B1C22572C90F +:107230000D0A24636F6E6669677572656420666FF8 +:10724000722024207769746820245D0D0A0D0A4E8F +:10725000756D626572206F66207061636B65747313 +:107260003A0D0A4E756D626572206F662072657404 +:10727000726965733A0D0A46696C65206E616D65C9 +:107280003A240D0A0D0A0D0A527061636B3A0D0A19 +:107290000D0A537061636B3A244350585357542E70 +:1072A00041534D20283130292020372D4A616E2D41 +:1072B0003139393120244350584845412E41534DEE +:1072C00020283429202033312D4175672D3139385C +:1072D0003924C9C9C9C9C924E65FC320727BC97BE7 +:1072E000C97BC9C9C9C9C9C90E061EFFCD0500C9D8 +:1072F0000E06CD0500C9DBEDE601CAF6727BD3ECC4 +:10730000C9DBEDE602C8DBECC9CD0173B7C2097376 +:10731000C9CD1371C9D5CDE172A7CA22730E05CDAF +:107320000500D1C9C5118173CD1472E17CC61F5F00 +:10733000E5CDF072E17DC61F5FC3F0721E08C3F099 +:10734000721E20CDF0721E08C3F072117D73C3143B +:1073500072117873C3147248656174682F5A656E30 +:10736000697468205A2D3130302043502F4D241B32 +:10737000481B4A0D0A0909241B481B4A240D1B4BB4 +:10738000241B59241B4124001B4224001B432400BE +:107390001B4424001B4524001B4624001B472400DB +:1073A0001B4824001B4924001B4A24001B4B2400BB +:0000000000 diff --git a/cpvz80.hex b/cpvz80.hex new file mode 100644 index 0000000..561778a --- /dev/null +++ b/cpvz80.hex @@ -0,0 +1,52 @@ +:10700000AC0006000C722972C35672C36372C36867 +:1070100072C36D72C35672C35F72C35772C3777205 +:10702000C37572C30000C30000C39572C38B72C3E3 +:107030008672C39B72C3B871C3B871C3B871C3A958 +:1070400071C3AE71C3B871C3BB71C3C171C3AC703E +:10705000C34472C34572C34672C34772C34872C306 +:107060004D72C35372C35472C35572C33371C3D0CC +:1070700072C33C71C3E771C3CA7100000000000015 +:10708000000000000010FF1CFFFFFFFF00000001D8 +:107090000000000650500805000000000D0D2323DD +:0770A00031004080000101F6 +:1070AC00CDEC700E07CD050032EB700E0CCD05004B +:1070BC007D32EA7011F571CDCA7111A172CDCA7110 +:1070CC00110572CDCA7111D172CDCA71CDC77121A2 +:0E70DC00247322A3703E4032A570CD4372C9CA +:1070EC002A0100110300192214711103001922172F +:1070FC007111030019221A7111030019221D71114B +:10710C001E0019221F71C9C30000C30000C3000078 +:10711C00C30000C300000E02064605C226710DC254 +:10712C0024713DC22271C9D511FC72CDCA71D1C96D +:10713C003AEA70FE30FA73713A5C00B7CA4F713D8F +:10714C00C354710E19CD05005F0E2ECD050006033C +:10715C00AF0E032183002B7E1F770DC2627105C217 +:10716C005C715E2356EBC90E1BCD0500EB2AA77094 +:10717C0023010000D51A1E0817DA897103572B7DDD +:10718C00B4CA9A717A1DC28471D113C38071D1694A +:10719C00603AAA70D603C8293DC2A371C91E20C388 +:1071AC005F721E20CD5F721E25C35F72C3C7711143 +:1071BC001073C3CA71111A73C3CA7111F271E5D578 +:1071CC00C51A13FE24CADE71D55F4FCD5F72D1C3D1 +:1071DC00CD71C1D1E1C9E1232323E97E1223130B25 +:1071EC0078B1C2E771C90D0A24636F6E6669677561 +:1071FC0072656420666F722024207769746820247D +:10720C004350585357542E41534D20283130292088 +:10721C0020372D4A616E2D31393931202443505895 +:10722C005A38302E41534D20202831292020322D20 +:10723C004465632D383724C9C9C9C9C9E65FC3E29F +:10724C00717BC97BC97BC9C9C9C9C90E061EFFCDD3 +:10725C000500C94BC319714BCD12FFC9CD15FFA742 +:10726C00C9CD6872B7C26D72C9AFC9D5CD5172A7FD +:10727C00CA84720E05CD0500D1C91E08C35F721EEB +:10728C0020CD5F721E08C35F72110B73C3CA7111DC +:10729C00F271C3CA715A38304D55206F6E20494275 +:1072AC004D20504320244350585644552E41534DA5 +:1072BC002020283629202031322D4F63742D31396E +:1072CC0039302024C947656E65726963202844757E +:1072DC006D622920435254205465726D696E616C45 +:1072EC0020747970652073656C6563746564202403 +:1072FC000D0A5374617274696E67202E2E2E245EF3 +:10730C00550D0A240D0A525061636B3A20240D0A64 +:08731C00535061636B3A202419 +:0000000000 diff --git a/cpxapp.asm b/cpxapp.asm new file mode 100644 index 0000000..be4abd5 --- /dev/null +++ b/cpxapp.asm @@ -0,0 +1,749 @@ +IF NOT lasm +.printx * CPXAPP.ASM * +ENDIF ;NOT lasm +; 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 file contains the system-dependent code and data for KERMIT. +; It will be probably be broken into independent files to generate +; overlays for the various systems, one or more overlay possible +; from each file. For now, we will leave it in one piece. +; +; revision history: +; edit 2, 22 July, 1987 by OBSchou. Massaged code to work with CPXCOM.ASM +; +; edit 1, 2nd June, 1987 by OBSchou. Extracted all Apple related code. +; +; +; Family is the string used in VERSION to say which of several +; smaller overlay files are used. These are (will be) derived from +; the juge CPXSYS.ASM file, in which case we will never get here. +; Just a Dollar, but put a sting in for a family of machines. +; +family: db 'CPXAPP.ASM (2) 22-jul-87$' ; Used for family versions.... +; + +IF apple +.printx * Assembling KERMIT-80 for the Apple ][ * +ENDIF;apple +IF apmmdm +.printx * with Z80 Softcard & Micromodem II * +ENDIF;apmmdm +IF ap6551 +.printx * with Z80 Softcard & 6551 ACIA * +ENDIF;ap6551 +IF ap6850;[32] +.printx * with Z80 Softcard & 6850 ACIA * +ENDIF;ap6850 [32] +IF apcps;[22] +.printx * with Softcard & CPS Multifunction card * +ENDIF;apcps + +; + +IF ap6551 OR ap6850 OR apcps;[9] [14] + ;jb eg. Apple SSC, Videx PSIO, Basis 108 +apslot EQU 2 ;jb set equal to slot containing serial card + ;jb set to 1 for Basis built-in port +ENDIF;jb ap6551 [9] apcps ap6850 [14] +IF ap6850 ;[14] offset in slot I/O space for ACIA registers + ;e.g. PACT=00,01: AIO-I=05,04: AIO-II=0D,0C: Aristocard=0B,0A +apdat EQU 0DH ;data reg.=0E080h+apslot*10h*apdat +apstat EQU 0CH ;comm/stat reg.=0E080h+apslot*10h+apstat +ENDIF;ap6850 + + +IF apmmdm +;APPLE Slot 2 contains Micromodem II. +MNPORT EQU 0E0A7H ;Communications Port. +mnprts EQU 0E0A6H ;Communications Port Status. +mnmodm EQU 0E0A5H ;Modem Control Port. +orgmod EQU 8EH ;Modem Originate Mode. +OUTPUT EQU 02H ;Output Buffer Empty. +INPUT EQU 01H ;Input Register Full. +apinc1 EQU 03H ;First Init Character for 6850 ACIA (Reset) +apinc2 EQU 11H ;Second Init Character for ACIA (8-bits) +apoffh EQU 80H ;Set if OFFHOOK +AP300 EQU 1 ;300 Baud +z80 EQU TRUE ;Z80 Softcard +ENDIF;apmmdm + +IF ap6551 ;jb +mnport EQU 0E088H+(10H*apslot) ;jb Communications Port. +mnprts EQU 0E089H+(10H*apslot) ;jb Communications Port Status. +mnprtc EQU 0E08BH+(10H*apslot) ;jb Communications Control +mnprtm EQU 0E08AH+(10H*apslot) ;jb Communications Master (command) +output EQU 10H ;jb Output Buffer Empty. +input EQU 08H ;jb Input Register Full. +mncinb EQU 18H ;jb Control Port Initialization Byte + ;jb (8-bit, no parity, 1-stop, 1200 baud) +mnminb EQU 0BH ;jb Master Port Initialization Byte + ;jb (DTR, RTS, no interrupts) +z80 EQU TRUE ;Z80 Softcard +ENDIF;ap6551 + +IF ap6850 ;[32] +mnport EQU 0E080H+(10H*apslot)+apdat ;Communications Port. +mnprts EQU 0E080H+(10H*apslot)+apstat ;Communications Port Status. +OUTPUT EQU 02H ;Output Buffer Empty. +INPUT EQU 01H ;Input Register Full. +apinc1 EQU 03H ;First Init Character for 6850 ACIA (Reset) +apinc2 EQU 15H ;Second Init Character for ACIA (8 data, 1 stop bit) +z80 EQU TRUE ;Z80 Softcard +ENDIF;[32] ap6850 + +IF apcps ;[22] +mnport EQU 0E0FAH+(100H*apslot) ; Communications Port. +mnprts EQU 0E0FBH+(100H*apslot) ; Communications Port Status. +mnprtc EQU 0E0FEH+(100H*apslot) ; Communications Control +output EQU 1 ; Output Buffer Empty. +input EQU 2 ; Input Register Full. +TxEmpty EQU 04h ; Transmitter empty flag +apmod1 EQU 4EH ; Mode Byte 1 (1 stop, no parity,8-bit, 16x) + ; Mode Byte 2 is speed control byte +apcmd EQU 37H ; Command Byte (RTS,Error reset,RxE,DTR,TxE) +z80 EQU TRUE ;Z80 Softcard +ENDIF;[22] apcps + +IF apple +defesc EQU ']'-100O ;The default escape character. +ENDIF;apple + + +; default to VT52-EMULATION ON. + +vtval EQU 1 + + + +sysxin: ; continuation of systemm dependent initialisation code + +IF ap6551 + lda mnprtc ; read control port + ani 0fH ; extract low order nybble + sta speed ; store as comm line speed + sta speed+1 ; (16 bits, to match speed table entries) + mvi a,mnminb ;jb initialization routine + sta mnprts ;jb + sta mnprtm ;jb initialize master (command) port + mvi a,mncinb ;jb + sta mnprtc ;jb initialize control port +ENDIF;ap6551 + +IF ap6850 ;[32] + mvi a,apinc1 ;Init ACIA + sta mnprts + mvi a,apinc2 ;Set ACIA bits per character + sta mnprts +ENDIF;[32] ap6850 + +IF apcps ;[22] + lxi h,3737h ;Default 1200 baud + shld speed ;Store as port speed + xchg + call sysspd ;Initialise the port +ENDIF;[22] apcps + + ret ; return from system-dependent routine + +; + +; +; system-dependent termination processing +; If we've changed anything, this is our last chance to put it back. +sysexit: + + ret + +; +; system-dependent processing for start of CONNECT command +; +syscon: +IF apmmdm + call ckdial ;See if dialing is required. + jmp kermit ;Go to command loop if aborted. +ENDIF;apmmdm + + ret + +conmsg: ; Messages printed when entering transparent (CONNECT) mode: +; + +IF apmmdm +;This code was mostly taken from +; APMODEM.ASM V2.1 +; Based on MODEM.ASM by Ward Christensen +; Modified for the Apple ][ by Gordon Banks 1-Jan-81 +; Micromodem ][ dialer option by Dav Holle 2-Feb-81 +; Code modified for KERMIT by Scott Robinson 14-Oct-82 +; +;Come here to see if we need to dial a number. +; +ckdial: lda mnport ;access the data port + lda mnprts ;check status + ani 4 ;do we already have carrier? + jz rskp ;Yes, just continue + xra a ;Hangup Phone for starters + sta mnmodm + lxi b,1000 ;Delay for a second + call delay + mvi a,8FH ;orgmod+ap300+apoffh + sta holdd ;storing mode for after dialing + mvi A,8DH ;Go Offhook to start dialing sequence + sta mnmodm + mvi a,apinc1 ;Init ACIA + sta mnport + mvi a,apinc2 ;Set ACIA bits per character + sta mnport + + lxi b,2500 ;wait 2.5 seconds for dial tone + call delay + lxi d,dialms ;Ask the user for the number + call prtstr +; +gtdial: mvi c,conin ;Get a character + call bdos + push psw ;save it + cpi 30H ;is it big enough to dial? + jc dialed ;no + cpi 3AH ;is it too big to dial? + jnc dialed ;yes + ani 0FH ;ok, it's a digit, get its value + jnz dialnz ;dial nonzero digits as-is + mvi A,10 ;dial zero as ten +; +dialnz: mov e,a ;count pulses in E-reg +dopuls: mvi a,0DH ;put it on-hook + sta mnmodm + lxi b,61 ;61-millisec pulse + call delay + mvi a,8DH ;take it off-hook again... + sta mnmodm + lxi b,39 ;39-millisec delay between pulses + call delay + dcr e ;any more pulses to do? + jnz dopuls ;yep, do 'em + lxi b,600 ;delay 600 msecs between digits + call delay +; +dialed: pop psw ;get back the char + cpi cr ;do we have a CR (done dialing)? + jnz gtdial ;no, keep on dialin' + lxi d,dialm2 + call prtstr + +tictoc: mvi c,dconio ;Direct console input. + mvi e,0FFH + call bdos + ora a ;Have a charcter? + jnz nodial ;If so we abort + lda mnport ;access the data port + lda mnprts ;get modem status + ani 4 ;carrier? + jnz tictoc ;No +; + lda holdd ;get the old modem control byte + sta mnmodm ;turn our carrier on + + lxi d,dialm3 + call prtstr + jmp rskp +nodial: xra a ;Hangup the modem. + sta mnmodm + ret ;Return to abort the command. +; +holdd: db 0 ;Modem setup code +dialms: DB 'Number to Dial: $' +dialm2: DB CR,LF,'Awaiting Carrier....(any key aborts)$' +dialm3: DB cr,lf,'Connected.',CR,LF,'$' +; +;DELAY wait for the number of millisecs in B,C +; +delay: push b ;save B,C + push d ;save D,E + inr b ;bump B for later DCR +; +delay1: mvi e,126 ;delay count for 1 millisec (Apple Z80 + ;clock=2.041MHz) +; +delay2: dcr e ;count + jnz delay2 ;down +; + dcr c ;more millisecs? + jnz delay1 ;yes + dcr b ;no - more in hi byte? + jnz delay1 ;yes + pop d ;no, restore D,E + pop b ; restore B,C + ret +ENDIF;apmmdm +; + +; +; syscls - system-dependent close routine +; called when exiting transparent session. +; +syscls: + ret +; + +; +; sysinh - help for system-dependent special functions. +; called in response to <escape>?, after listing all the +; system-independent escape sequences. +; +sysinh: +IF apmmdm OR apcps OR ap6850 ; + lxi d,inhlps ; we got options... + call prtstr ; print them. +ENDIF ;apmmdm OR apcps OR ap6850 + + ret + + +;additional, system-dependent help for transparent mode +; (two-character escape sequences) +inhlps: + +IF apcps OR ap6850 + db cr,lf,'B Transmit a BREAK' +ENDIF;apcps OR ap6850 + +IF apmmdm + db cr,lf,'D Drop the line' +ENDIF;apmmdm + + db '$' ;[hh] table terminator + +; +; sysint - system dependent special functions +; called when transparent escape character has been typed; +; the second character of the sequence is in A (and in B). +; returns: +; non-skip: sequence has been processed +; skip: sequence was not recognized +sysint: ani 137O ; convert lower case to upper, for testing... +IF apmmdm + cpi 'D' ;Disconnect Modem? + jnz intc00 ;No. + xra a ;Yes, hangup the modem + sta mnmodm + ret ; command has been executed +intc00: +ENDIF;apmmdm + +IF ap6850 OR apcps ; [22] [25] ... some more + cpi 'B' ; send break? + jz sendbr ; yes, go do it. return nonskip when through. +ENDIF;[22] ap6850 OR apcps + + jmp rskp ; take skip return - command not recognized. + + +; + +IF ap6850 ;[32] +sendbr: +; +; Ensure that the transmitter has finished sending buffered chars +sndbr1: lda mnprts ; get UART status + ani output ; everything sent? + jz sndbr1 ; no, wait a bit more +; +; Begin sending a break + mvi a,apinc2 + ori 60h ;transmit break level, CTS high + sta mnprts +; +; Wait for 250 milliseconds (using hundredths second delay routine) + mvi a,25 + call delay +; +; Resume normal operation + mvi a,apinc2 + sta mnprts +; + ret ;done +ENDIF;[32] ap6850 + +IF apcps ;[22] +sendbr: +; +; Ensure that the transmitter has finished sending buffered chars +sndbr1: lda mnprts ; get UART status + ani TxEmpty ; everything sent? + jz sndbr1 ; no, wait a bit more +; +; Unmask command register + mvi a,80h + sta mnprtc +; +; Begin sending a break by setting bit in UART command register + mvi a,3Fh ; Set TxEna, DTR, RxEna, SBreak, ErrRst, RTS + sta mnprts +; +; Wait for 250 milliseconds (using hundredths second delay routine) + mvi a,25 + call delay +; +; Resume normal operation by clearing the SendBreak command bit + mvi a,37h ;Set TxEna, DTR, RxEna, ErrRst, RTS + sta mnprts +; +; Remask command register + mvi a,0 + sta mnprtc +; + ret ;done +ENDIF;[22] apcps + +; + +; +; sysflt - system-dependent filter +; called with character in E. +; if this character should not be printed, return with A = zero. +; preserves bc, de, hl. +; note: <xon>,<xoff>,<del>, and <nul> are always discarded. +sysflt: + mov a,e ; get character for testing + + ret + +; mdmflt - modem filter [30] +; called with character to be sent to printer in E +; with parity set as appropriate. +; return with accumulator = 0 do do nothing, +; <> 0 to send char in E. +mdmflt: + mov a,e ;[30] get character to test + ret + + + +; prtflt - printer filter [30] +; called with character to be sent to printer in E +; returns with a = 0 to do nothing +; a <> 0 to print it. +; +; this routine for those printer that automatically insert +; a lf on cr, or cr for lf. Should this be shifted to +; the system indep. stuff, in say 4.06? +prtflt: + mov a,e ; [30] get character to test + + ret + + +; + +; +; system-dependent processing for BYE command. +; for apmmdm, heath, and lobo, hang up the phone. +sysbye: +IF apmmdm + xra a ;Hangup our end, too. + sta mnmodm +ENDIF;apmmdm + + ret +; + +; This is the system-dependent command to change the baud rate. +; DE contains the two-byte value from the baud rate table; this +; value is also stored in 'speed'. +sysspd: + +; Set the speed for Apple with 6551 ACIA +IF ap6551 + lda mnprtc ;jb read control port + ani 0F0H ;jb zap low order nybble + ora e ;jb put rate in low order nybble + sta mnprtc ;jb send to control port + ret +ENDIF;ap6551 + +; Set the speed for Apple with CPS Multifunction card +IF apcps ;[22] + mvi a,80h + sta mnprtc + lda mnprts ;read command register to reset 2651 + mvi a,apmod1 ;first mode byte + sta mnport + mvi a,4 ;waste some time before sending second byte +spdwt: dcr a ; 4 T-states + jnz spdwt ; 10 T-states + mov a,e ;second mode byte is speed byte + sta mnport + mvi a,apcmd ;command byte + sta mnprts + xra a + sta mnprtc + ret +ENDIF;[22] apcps + + +IF ap6551 ;jb +spdtbl: db 0DH ;jb 13 entries + db 03H,'110$', 03H,03H ;jb + db 04H,'1200$', 08H,08H ;jb + db 05H,'134.5$', 04H,04H ;jb + db 03H,'150$', 05H,05H ;jb + db 04H,'1800$', 09H,09H ;jb + db 05H,'19200$', 0FH,0FH ;jb + db 04H,'2400$', 0AH,0AH ;jb + db 03H,'300$', 06H,06H ;jb + db 04H,'3600$', 0BH,0BH ;jb + db 04H,'4800$', 0CH,0CH ;jb + db 03H,'600$', 07H,07H ;jb + db 04H,'7200$', 0DH,0DH ;jb + db 04H,'9600$', 0EH,0EH ;jb + +sphtbl: db cr,lf,' 110 134.5 150 300 600 1200 1800' + db cr,lf,' 2400 3600 4800 7200 9600 19200$' +ENDIF;ap6551 + +IF apcps ;[22] +spdtbl: db 10H ; 16 entries + db 03H,'110$', 32h,32h + db 04H,'1200$', 37h,37h + db 05H,'134.5$', 33h,33h + db 03H,'150$', 34h,34h + db 04H,'1800$', 38h,38h + db 05H,'19200$', 3fh,3fh + db 04H,'2000$', 39h,39h + db 04H,'2400$', 3ah,3ah + db 03H,'300$', 35h,35h + db 04H,'3600$', 3bh,3bh + db 04H,'4800$', 3ch,3ch + db 02H,'50$', 30h,30h + db 03H,'600$', 36h,36h + db 04H,'7200$', 3dh,3dh + db 02H,'75$', 31h,31h + db 04H,'9600$', 3eh,3eh + +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;[22] apcps + + + +; The following conditionals were once a huge if not statement. There +; wasn't enough room to add the lobo to the list, so it had to be broken +; into 2, which you can't do with an if not. I redid it as two ifs and +; applied them to those that wouldn't set baud. [Hal Hostetler] +IF apmmdm OR ap6850 ;[32] +spdtbl equ 0 ; SET BAUD not supported. +sphtbl equ 0 +ENDIF;appmdm OR ap6850 [32] +; +; +; no ports available for Apple +prttbl EQU 0 ;SET PORT not supported +prhtbl EQU 0 + +; +; + +; This is the system-dependent SET PORT command. +; HL contains the argument from the command table. +sysprt: + + ret +; + +; +; selmdm - select modem port +; selcon - select console port +; selmdm is called before using inpmdm or outmdm; +; selcon is called before using inpcon or outcon. +; For iobyt systems, diddle the I/O byte to select console or comm port; +; For Decision I, switches Multi I/O board to console or modem serial +; port. [Toad Hall] +; For the rest, does nothing. +; preserves bc, de, hl. +selmdm: + ret + +selcon: + ret +; + +; Get character from console, or return zero. +; result is returned in A. destroys bc, de, hl. +; +inpcon: + mvi c,dconio ;Direct console I/O BDOS call. + mvi e,0FFH ;Input. + call BDOS + ret +; + +; +; Output character in E to the console. +; destroys bc, de, hl +; +outcon: + + mvi c,dconio ;Console output bdos call. + call bdos ;Output the char to the console. + ret +; + +; +; outmdm - output a char from E to the modem. +; the parity bit has been set as necessary. +; returns nonskip; bc, de, hl preserved. +outmdm: +IF apple + push h +outmd1: lxi h,mnprts ;address of the port status register +outmd2: mov a,m ; get port status in A + ani output ;Loop till ready. + jz outmd2 +outmd3: lxi h,mnport ;address of port data register + mov m,e ; write the character + pop h + ret +ENDIF;apple + + + + +; + +; +; get character from modem; return zero if none available. +; for IOBYT systems, the modem port has already been selected. +; destroys bc, de, hl. +inpmdm: +IF apple +inpmd1: lda mnprts ;Get the port status into A. + ani input ;See if the input ready bit is on. + rz ;If not then return. +inpmd2: lda mnport ;If so, get the char. +ENDIF;apple + + +ret ; return with character in A + + +; +; flsmdm - flush comm line. +; Modem is selected. +; Currently, just gets characters until none are available. + +flsmdm: call inpmdm ; Try to get a character + ora a ; Got one? + jnz flsmdm ; If so, try for another + ret ; Receiver is drained. Return. +; + +; +; lptstat - get the printer status. Return a=0ffh if ok, or 0 if not. +lptstat: + xra a + ret + +; +; outlpt - output character in E to printer +; console is selected. +; preserves de. +outlpt: + push d ; save DE in either case + call prtflt ; go through printer filter [30] + ana a ; if A = 0 do nothing, + jz outlp1 ; [30] if a=0 do nothing + + mvi c,lstout + call bdos ;Char to printer + +outlp1: pop d ; restore saved register pair + ret +; + +; +; Screen manipulation routines +; csrpos - move to row B, column C +; +; csrpos for terminals that use a leadin sequence followed +; by (row + 31.) and (column + 31.) +; +csrpos: push b ; save coordinates + lxi d,curldn ; get cursor leadin sequence + call prtstr ; print it + pop h ; restore coordinates + mov a,h ; get row + adi (' '-1) ; space is row one + mov e,a + push h + call outcon ; output row + pop h + mov a,l ; get column + adi (' '-1) ; space is column one + mov e,a + jmp outcon ; output it and return + +; +; delchr - make delete look like a backspace. Unless delete is a printing +; character, we just need to print a backspace. (we'll output clrspc +; afterwards) +; For Kaypro and Vector General, delete puts a blotch on the screen. +; For Apple and Osborne 1, delete moves but doesn't print. +delchr: + + lxi d,delstr + jmp prtstr + +; erase the character at the current cursor position +clrspc: mvi e,' ' + call outcon + mvi e,bs ;get a backspace + jmp outcon + +; erase the current line +clrlin: lxi d,eralin + jmp prtstr + +; erase the whole screen, and go home. preserves b (but not c) +clrtop: lxi d,erascr + jmp prtstr + +IF apple +sysver: db 'Apple II CP/M$' +outlin: db ('^'-100O),esc,'Y',cr,lf,' $' +erascr: db ('^'-100O),esc,'Y$' ;Clear screen and go home. +eralin: db cr,esc,'T$' ;Clear line. +delstr: db bs,bs,'$' ; Adjust for delete +curldn: db esc,'=$' ;Cursor lead-in +ttab: ;Table start location. +ta: db ('K'-100O),'$',0,0 ;Cursor up. +tb: db 12O,'$',0,0 ;Cursor down. +tc: db ('F'-100O),'$',0,0 ;Cursor right. +td: db '$',0,0,0 ;(can't) Cursor left +te: db '$',0,0,0 ;(can't) Clear display +tf: db '$',0,0,0 ;(can't) Enter graphics mode +tg: db '$',0,0,0 ;(can't) Exit graphics mode +th: db ('^'-100O),'$',0,0 ;Cursor home. +ti: db ('K'-100O),'$',0,0 ;Reverse linefeed. +tj: db esc,'Y$',0 ;Clear to end of screen. +tk: db esc,'T$',0 ;Clear to end of line. +ENDIF;apple + +ovlend equ $ ; End of overlay + + END diff --git a/cpxbbi.asm b/cpxbbi.asm new file mode 100644 index 0000000..ffbdc14 --- /dev/null +++ b/cpxbbi.asm @@ -0,0 +1,618 @@ +IF NOT lasm +.printx * CPXBBI.ASM * +ENDIF ;NOT lasm +; KERMIT - (Celtic for "FREE") +; +; This is the CP/M-80 implementation of the Columbia University +; KERMIT file transfer protocol. +; +; Version 4.08 +; +; 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. +; +; +; +; revision history: +; +;edit 4, 7-Jan-1991 by MF. Added code to support the Ampro Little Board. +; The code was contributed by Jay S. Rouman; 913 North Drive; +; Mt. Pleasant, MI 48858 (voice (517)773-7887). +; edit 3, 23 July by OBSchou to massage file to suit CPXCOM.ASM +; +; edit 2 23 May 1987 by C.J.MILES@UMRCC. +; Reorganised file to be similar in structure to that +; of the Amstrad sys-dep file. Added hangup in clear +; screen options in CONNECT mode. +; +; edit 1 10 May 1987 by Chris Miles (C.J.MILES@UMRCC) +; Removed Kaypro, Xerox and Big Board from CPXSYS.ASM +; and grouped them into this file as CPXBBI.ASM. +; +; +; +; Original code broken off and modified by: +; +; Chris Miles +; 344, Claremont Road, +; Rusholme, +; MANCHESTER, +; M14 6WB. +; +; Tel: (061) 226 7839 +; + +; +; *** MAIN CODE START *** +; +; +; Keep module name, edit number, and last revision date in memory. + +sysedt: db 'CPXSYS.ASM (35) 01-Dec-86$' +family: db 'CPXBBI.ASM (4) 7-Jan-1991$' + + +; Assembly time message announcing which version we're building + +IF kpii +.printx * Assembling Kaypro II KERMIT-80 * +ENDIF + +IF xer820 +.printx * Assembling Xerox 820 KERMIT-80 * +ENDIF + +IF bbII +.printx * Assembling BigBoard II KERMIT-80 * +ENDIF + +IF ampro +.printx * Assembling Ampro Little Board KERMIT-80 * +ENDIF + +z80 EQU TRUE ; They all use Z80s + +IF xer820 +defesc EQU ']'-100O ;The default escape character for Xerox +ENDIF;xer820 + +IF kpII +defesc EQU '\'-100O ;The default escape character for Kaypro +ENDIF;kpII + +; If one of the above, default to VT52-EMULATION ON. +IF kpII OR xer820 +vtval EQU 1 +ENDIF;kpII OR xer820 + + +; +; Specific machine hardware information +; +IF bbI +mnport equ 04h ; Modem data port +mnprts equ 06h ; Modem status port +output equ 04h ; Transmit buffer empty +input equ 01h ; Receive data available +baudrt equ 00h ; Baud rate port for channel A +ENDIF;bbI + + +IF bbII +mnport equ 80h ; Modem data port (SIO channel A) +mnprts equ 81h ; Modem status port +output equ 04h ; Transmit buffer empty +input equ 01h ; Receive data available +baudrt equ 89h ; Baud rate port for channel A +ENDIF;bbII + +IF ampro +mnport equ 88h ; Modem data port (SIO channel B) +mnprts equ 8Ch ; Modem status port +output equ 04h ; Transmit buffer empty +input equ 01h ; Receive data available +baudrt equ 50h ; Baud rate port for channel B +ENDIF;ampro +; + +sysxin: ;continuation of system initialisation code + lxi d,siotbl ; Load the address of the status able + mvi c,siolen ; Length of status table +siolup: ; Loop back here for each command byte + ldax d ; Load the first byte into A + inx d ; Index the pointer + out mnprts ; Send it to the status port + dcr c ; Decrement the byte counter + jnz siolup ; Jump back for more commands + ret ; return from system-dependent routine + +; List of commands to set up SIO channel A for asynchronous operation. + +siotbl: DB 18H ; Channel reset + DB 18H ; another, in case register 0 wasn't selected + DB 04H ; Select register 4 + DB 44H ; 1 stop bit, clock*16 + DB 01H ; Select register 1 + DB 00H ; No interrupts enabled + DB 03H ; Select register 3 + DB 0C1H ; Rx enable, 8 bit Rx character + DB 05H ; Select register 5 + DB 0EAH ; Tx enable, 8 bit Tx character, + ; raise DTR and RTS +siolen equ $-siotbl ; length of command list + + +; +; sysexit - System-dependent termination processing +; if we've changed anything, this is our last +; chance to put it back. +; +sysexit: + ret + +; +; syscon - System-dependent processing for start +; of CONNECT command. +; +syscon: + lxi d,conmsg + call prtstr + ret + +conmsg: ; Messages printed when entering transparent (CONNECT) mode: + db cr,lf,'$' +; +; syscls - system-dependent close routine +; called when exiting transparent session. +; +syscls: + ret +; +; sysinh - help for system-dependent special functions. +; called in response to <escape>?, after listing +; all the system-independent escape sequences. +; +sysinh: + lxi d,inhlps ; we got options... + call prtstr ; print them. + ret + + +; additional, system-dependent help for transparent mode +; (two-character escape sequences) +inhlps: + db cr,lf,'B Transmit a BREAK' + db cr,lf,'H Hangup using DTR' + db cr,lf,'W Wipe screen clear' + db '$' + +; sysint - system dependent special functions +; called when transparent escape character has been typed; +; the second character of the sequence is in A (and in B). +; returns:- +; non-skip: sequence has been processed +; skip : sequence was not recognized +; +sysint: ani 137O ; convert lower case to upper, for testing... + cpi 'B' ; send break ? + jz sendbr ; then jump to send break routine + cpi 'H' ; hang up ? + jz hangup ; then jump to hangup routine + cpi 'W' ; clear screen ? + jz clrtop ; then jump to clear screen routine + jmp rskp ; take skip return - command not recognized. + +; +; Hangup and Break routines +; +hangup: + mvi d,0ah ; set up hangup bit mask + mvi e,255 ; time for hangup is 2 1/2 secs + jmp setbit ; skip Tx empty test + +sendbr: + mvi d,9ah ; set up break bit mask + mvi e,30 ; time for break is 300 ms + +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 break or DTR bit on the SIO +; +setbit: + mvi a,5 ; select Write Register 5 + out mnprts + mvi a,6ah ; Tx enable, 8 bit Tx character, + ora d ; OR with appropriate bit mask + out mnprts ; +; +; Now, delay for duration of hangup or break + mov a,e ; delay count + call delay +; +; Time's up. Put transmitter back in normal state and return. + mvi a,5 ; select Write Register 5 + out mnprts + mvi a,0eah ; Tx enable, 8 bit Tx character, + out mnprts ;. + ret ; done. + +; sysflt - system-dependent filter +; called with character in E. +; if this character should not be printed, return with A = zero. +; preserves bc, de, hl. +; note: <xon>,<xoff>,<del>, and <nul> are always discarded. +; +sysflt: + mov a,e ; get character for testing + ret + +; +; sysbye - system-dependent processing for BYE command. +; +sysbye: + ret +; +; This is the system-dependent command to change the baud rate. +; DE contains the two-byte value from the baud rate table; this +; value is also stored in 'speed'. +; +sysspd: + +; Set the speed for bigboard II +IF bbII + di ; don't let anything between the data bytes + mvi a,01000111b ; get the command byte (load time constant) + out baudrt ; output it to CTC + mov a,e ; Get the parsed value. + out baudrt ; Tell the baud rate generator. + ei ; end of critical section + ret +ENDIF;bbII + + +; Set the speed for bigboard I +IF bbI + mov a,e ; get the parsed value + out baudrt ; Tell the baud rate generator. + ret +ENDIF;bbI + +; set the speed for the Ampro Little Board +if ampro + mvi e,3fh ; offset to port b ctc 3f hex bytes + call getbios + mvi a,47h ; counter mode,ctc reset,value follows + mov m,a ; store value + lda speed+1 ; get ctc divisor + inx h ; location of ctc divisor + mov m,a ; store new divisor +; +; set up wr4 clock divisor according to mspeed +; + mvi e,50h ; offset to dart wr4 + call getbios + mvi a,3fh ; mask for wr4 clock bits + ana m ; mask off bits + mov m,a ; and save to wr4 + lda speed ; get clock flag + ora a ; set flags, zero = 300 bps + mvi a,80h ; x32 clock bit + jz lbps ; setup wr4 for 300 bps x32 clock +; +; set up wr4 value for 1200 bps x16 clock 'hl' has wr4 loc +; +hbps: mvi a,40h ; x16 clock +; +; setup wr4 value for 300 bps x32 clock 'hl' has wr4 loc +; +lbps: ora m ; set clock bits saving parity + mov m,a ; store new clock divisor to wr4 value +; +; initialize sio/dart +; +intsio: lxi h,intend + push h ; set up for return + mvi e,36h ; offset to ioinit + call getbios + pchl ; we pushed return address +intend: ret + +; +; return bios location in 'hl' called with offset in 'e' +; +getbios: + lhld 1 ; get bios location + mvi d,0 ; clear 'd' + dad d + ret +; +ENDIF;ampro + +; +; Speed tables +; (Note that speed tables MUST be in alphabetical order for later +; lookup procedures, and must begin with a value showing the total +; number of entries. The speed help tables are just for us poor +; humans. + +; db string length,string,divisor (2 identical bytes or 1 word) +; [Toad Hall] + +IF bbI +spdtbl: db 10h ;16 entries + db 03h,'110$', 02h,02h + db 04h,'1200$', 07h,07h + db 05h,'134.5$', 03h,03h + db 03h,'150$', 04h,04h + db 04h,'1800$', 08h,08h + db 05h,'19200$', 0fh,0fh + db 04h,'2000$', 09h,09h + db 04h,'2400$', 0ah,0ah + db 03h,'300$', 05h,05h + db 04h,'3600$', 0bh,0bh + db 04h,'4800$', 0ch,0ch + db 02h,'50$', 00h,00h + db 03h,'600$', 06h,06h + db 04h,'7200$', 0dh,0dh + db 02h,'75$', 01h,01h + db 04h,'9600$', 0eh,0eh + +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;bbI + +IF bbII +spdtbl: db 8 ; 8 entries + db 04h,'1200$', 20h,20h + db 05h,'19200$', 02h,02h + db 04h,'2400$', 10h,10h + db 03h,'300$', 80h,80h + db 05h,'38400$', 01h,01h + db 04h,'4800$', 08h,08h + db 03h,'600$', 40h,40h + db 04h,'9600$', 04h,04h + +sphtbl: db cr,lf,' 300 600 1200 2400 4800 9600 19200 38400$' +ENDIF;bbII + + +IF ampro +spdtbl: db 6 ; 6 entries + db 04h,'1200$', 1,104 + db 04h,'2400$', 1,52 + db 03h,'300$', 0,208 + db 04h,'4800$', 1,26 + db 03h,'600$', 1,208 + db 04h,'9600$', 1,13 + +sphtbl: db cr,lf,' 300 600 1200 2400 4800 9600$' +ENDIF;ampro + +; This is the system-dependent SET PORT command. +; HL contains the argument from the command table. +; +sysprt: + ret +; + +prttbl equ 0 ; SET PORT is not supported +prhtbl equ 0 + +; +; selmdm - select modem port +; selcon - select console port +; selmdm is called before using inpmdm or outmdm; +; selcon is called before using inpcon or outcon. +; preserves BC, DE, HL. +; +selmdm: +selcon: + ret +; +; Get character from console, or return zero. +; result is returned in A. destroys bc, de, hl. +; +inpcon: + mvi c,dconio ;Direct console I/O BDOS call. + mvi e,0FFH ;Input. + call BDOS + ret +; +; +; Output character in E to the console. +; destroys bc, de, hl +; +outcon: + + mvi c,dconio ;Console output bdos call. + call bdos ;Output the char to the console. + + ret +; +; +; outmdm - output a char from E to the modem. +; the parity bit has been set as necessary. +; returns nonskip; bc, de, hl preserved. +outmdm: + in mnprts ;Get the output done flag. + ani output ;Is it set? + jz outmdm ;If not, loop until it is. + mov a,e + out mnport ;Output it. + ret + + +; +; get character from modem; return zero if none available. +; destroys bc, de, hl. +inpmdm: + in mnprts ;Get the port status into A. + ani input ;See if the input ready bit is on. + rz ;If not then return. + in mnport ;If so, get the char. + + ret ; return with character in A + + +; +; flsmdm - flush comm line. +; Modem is selected. +; Currently, just gets characters until none are available. + +flsmdm: call inpmdm ; Try to get a character + ora a ; Got one? + jnz flsmdm ; If so, try for another + ret ; Receiver is drained. Return. +; +; lptstat - get the printer status. Return a=0ffh if ok, or 0 if not. +lptstat: + xra a ; assume it is ok.. this may not be necessary + ret + +; +; outlpt - output character in E to printer +; console is selected. +; preserves de. +outlpt: + push d ; save DE in either case + ana a ; if A = 0 do nothing, + jz outlp1 ; [30] if a=0 do nothing + mvi c,lstout + call bdos ;Char to printer +outlp1: pop d ; restore saved register pair + ret +; + +; +; Screen manipulation routines +; csrpos - move to row B, column C +; +; csrpos for terminals that use a leadin sequence followed +; by (row + 31.) and (column + 31.) +; +IF NOT (bbII OR ampro) ;[obs I think ] +csrpos: push b ; save coordinates + lxi d,curldn ; get cursor leadin sequence + call prtstr ; print it + pop h ; restore coordinates + mov a,h ; get row + adi (' '-1) ; space is row one + mov e,a + push h + call outcon ; output row + pop h + mov a,l ; get column + adi (' '-1) ; space is column one + mov e,a + jmp outcon ; output it and return +ENDIF ; NOT bbII OR ampro + +; +; delchr - make delete look like a backspace. Unless delete is a +; printing character, we just need to print a backspace +; (we'll output clrsp afterwards) +delchr: + +IF bbI + lxi d,delstr + jmp prtstr +ENDIF;bbI + + +IF NOT bbI + mvi e,bs ;get a backspace + jmp outcon +ENDIF;NOT bbI + +; erase the character at the current cursor position +clrspc: mvi e,' ' + call outcon + mvi e,bs ;get a backspace + jmp outcon + +; erase the current line +clrlin: lxi d,eralin + jmp prtstr + +; erase the whole screen, and go home. preserves b (but not c) +clrtop: lxi d,erascr + jmp prtstr + +; If its a BigBoard or Ampro, we need a terminal, so link to CPXVDU.ASM +IF bbII +sysver: db 'Big Board II$' +ENDIF;bbII + +IF ampro +sysver: db 'Ampro Little Board$' +ENDIF;ampro + +IF (bbII AND lasm) ; we need a terminal as well +LINK CPXVDU.ASM +ENDIF ;(bbII AND lasm) + +IF (ampro AND lasm) ; we need a terminal as well +LINK CPXVDU.ASM +ENDIF ;(ampro AND lasm) + +;If here, we are Kaypro or Xerox 820, or if from M80, we should skip +; a few lines if Bigboard. + +IF kpii +sysver: +ttytyp: db 'Kaypro II$' +outlin: db subt,cr,lf,tab,tab,'$' +erascr: db subt,'$' ;Clear screen and home. +eralin: db cr,18H,'$' ;Clear line. +curldn: db esc,'=$' ;Cursor lead-in +delstr: db bs,' ',bs,bs,'$' ; adjust for echoing delete character +ttab: ;Table start location. +ta: db 0BH,'$',0,0 ;Cursor up. +tb: db 0AH,'$',0,0 ;Cursor down. +tc: db 0CH,'$',0,0 ;Cursor right. +td: db bs,'$',0,0 ;Cursor left +te: db subt,'$',0,0 ;Clear display +tf: db esc,'G$',0 ; Enter Graphics Mode (select Greek) +tg: db esc,'A$',0 ; Exit Graphics mode (select ASCII) +th: db 1EH,'$',0,0 ; Cursor home. [UTK016] +ti: db esc,'E','$',0 ; Reverse linefeed. (insert line) +tj: db 'W'-100O,'$',0,0 ; Clear to end of screen. +tk: db 'X'-100O,'$',0,0 ; Clear to end of line. +ENDIF ; kpii +; + +IF xer820 +ttytyp: +sysver: db 'Xerox 820$' +outlin: db subt,cr,lf,tab,tab,'$' +erascr: db subt,'$' ;Clear screen and home. +eralin: db cr,18H,'$' ;Clear line. +curldn: db esc,'=$' ;Cursor lead-in +delstr: db bs,' ',bs,bs,'$' ; adjust for echoing delete character +ttab: ;Table start location. +ta: db 0BH,'$',0,0 ;Cursor up. +tb: db 0AH,'$',0,0 ;Cursor down. +tc: db 0CH,'$',0,0 ;Cursor right. +td: db bs,'$',0,0 ;Cursor left +te: db subt,'$',0,0 ;Clear display +tf: db '$',0,0,0 ; Enter Graphics Mode (can't) +tg: db '$',0,0,0 ; Exit Graphics mode (can't) +th: db 1EH,'$',0,0 ; Cursor home. [UTK016] +ti: db 0BH,'$',0,0 ; Reverse linefeed. (cursor up) +tj: db 11H,'$',0,0 ; Clear to end of screen. +tk: db 18H,'$',0,0 ; Clear to end of line. +ENDIF ; xer820 +ovlend equ $ ; End of overlay + + END diff --git a/cpxbee.asm b/cpxbee.asm new file mode 100644 index 0000000..7333c2a --- /dev/null +++ b/cpxbee.asm @@ -0,0 +1,996 @@ +IF NOT lasm +.printx * CPXBEE.ASM * +ENDIF ;NOT lasm +; KERMIT - (Celtic for "FREE") +; +; This is the CP/M-80 implementation of the Columbia University +; KERMIT file transfer protocol. +; +; Version 4.09 +; +; 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. +; +; +; +; revision history: +; +; edit 1, 1st September 1990 +; Original version by Russell Lang <rjl@monu1.cc.monash.edu.au> +; The 'microbee' is designed and manufactured in Australia +; by Microbee Systems Ltd (previously Applied Technology). +; The microprocessor is a Z80 at 3.375MHz. +; The video screen is memory mapped from 0F000h to 0F7FFh, +; with Programmable Characters 80-FF from 0F800h to 0FFFFh. +; The serial and parallel ports are implemented using a Z80 PIO. +; The early model microbees were ROM-Basic computers with up +; to 32k of battery backed RAM. Later models dropped the +; ROM-Basic and added disk drives and CP/M. The disk systems +; include the 56k (64k) APC (5.25" drives), 64k Computer-In-A-Book +; (3.5"), 128k Dynamic (5.25" or 3.5"), 256TC (3.5"). +; +; This version of kermit was developed on a 56k APC. +; It has been tested on 56k, 64k, 128k and 256k Microbees. +; +; The serial port is implemented in software NOT hardware. +; A special transmit routine allows simultaneous receiving +; for all speeds except 75/1200, 1200/75, 4800, 9600. +; The receive routine is interrupt driven with a 2 kbyte buffer. +; The 9600 bit/s speed is marginal on receive - if the transmitter +; is slightly fast (more than about 1%), the serial routine will +; not have enough time to put the character in the buffer before +; the next character arrives. + + +; +; *** MAIN CODE START *** +; +; +; Keep module name, edit number, and last revision date in memory. + +sysedt: db 'CPXSYS.ASM (35) 01-Dec-86$' +family: db 'CPXBEE.ASM (1) 01-Sep-90$' + + +; Assembly time message announcing which version we're building + +.printx * Assembling Microbee Kermit-80 * + +z80 EQU TRUE ; They all use Z80s + +defesc EQU ']'-100O ;The default escape character for Microbee + +vtval EQU 0 ; use default emulation which is adm3a superset + +; +sysxin: ;continuation of system initialisation code + ; set up baud rate + lxi h,t300 + shld speed + xchg + call setbaud + ; change the interrupt vector so that we intercept rs232 input + db 0EDh,57h ;ld a,i ;get old interrupt reg + sta oldint + mvi a,int ;new value + db 0EDh,47h ;ld i,a + ret ; return from system-dependent routine + + +; +; sysexit - System-dependent termination processing +; if we've changed anything, this is our last +; chance to put it back. +; +sysexit: + lda oldint ;restore old interrupt reg + db 0EDh,47h ;ld i,a + ret + +; +; syscon - System-dependent processing for start +; of CONNECT command. +; +syscon: + lxi d,conmsg + call prtstr + ret + +conmsg: ; Messages printed when entering transparent (CONNECT) mode: + db cr,lf,'$' +; +; syscls - system-dependent close routine +; called when exiting transparent session. +; +syscls: + ret +; +; sysinh - help for system-dependent special functions. +; called in response to <escape>?, after listing +; all the system-independent escape sequences. +; +sysinh: + lxi d,inhlps ; we got options... + call prtstr ; print them. + ret + + +; additional, system-dependent help for transparent mode +; (two-character escape sequences) +inhlps: + db cr,lf,'B Transmit a BREAK (0.3s)' + db cr,lf,'L Transmit a LONG BREAK (1.8s)' + db cr,lf,'W Wipe screen clear' + db '$' + +; sysint - system dependent special functions +; called when transparent escape character has been typed; +; the second character of the sequence is in A (and in B). +; returns:- +; non-skip: sequence has been processed +; skip : sequence was not recognized +; +sysint: ani 137O ; convert lower case to upper, for testing... + cpi 'B' ; send break ? + jz sendbr ; then jump to send break routine + cpi 'L' ; long break ? + jz longbr ; then jump to long break routine + cpi 'W' ; clear screen ? + jz clrtop ; then jump to clear screen routine + jmp rskp ; take skip return - command not recognized. + +; +; Break routines +; +longbr: + mvi e,180 ; time for long break is 1800 ms + jmp setbit + +sendbr: + mvi e,30 ; time for break is 300 ms + +setbit: + in portb + ani 0dfh ; mask with tx bit + out portb +; +; Now, delay for duration of hangup or break + mov a,e ; delay count + call delay +; +; Time's up. Put transmitter back in normal state and return. + in portb + ori 20h ; mask with tx bit + out portb + ret ; done. + +; sysflt - system-dependent filter +; called with character in E. +; if this character should not be printed, return with A = zero. +; preserves bc, de, hl. +; note: <xon>,<xoff>,<del>, and <nul> are always discarded. +; +sysflt: + mov a,e ; get character for testing + ret + +; +; sysbye - system-dependent processing for BYE command. +; +sysbye: + ret + +; +; This is the system-dependent command to change the baud rate. +; DE contains the two-byte value from the baud rate table; this +; value is also stored in 'speed'. +; +sysspd: + call setbaud + ret + +; +; Speed tables +; (Note that speed tables MUST be in alphabetical order for later +; lookup procedures, and must begin with a value showing the total +; number of entries. The speed help tables are just for us poor +; humans. + +; db string length,string,divisor (2 identical bytes or 1 word) +; [Toad Hall] + +spdtbl: db 11 ;11 entries + db 03h,'110$' + dw t110 + db 04h,'1200$' + dw t1200 + db 07h,'1200/75$' + dw t1275 + db 03h,'150$' + dw t150 + db 04h,'2400$' + dw t2400 + db 03h,'300$' + dw t300 + db 04h,'4800$' + dw t4800 + db 03h,'600$' + dw t600 + db 02h,'75$' + dw t75 + db 07h,'75/1200$' + dw t7512 + db 04h,'9600$' + dw t9600 + +sphtbl: db cr,lf,'75 75/1200 110 150 300 600 1200 1200/75' + db ' 2400 4800 9600$' + + +; +; This is the system-dependent SET PORT command. +sysprt: + ret + +prttbl equ 0 ; SET PORT is not supported +prhtbl equ 0 + + +; +; selmdm - select modem port +; selcon - select console port +; selmdm is called before using inpmdm or outmdm; +; selcon is called before using inpcon or outcon. +; preserves BC, DE, HL. +; +selmdm: +selcon: + ret +; +; Get character from console, or return zero. +; result is returned in A. destroys bc, de, hl. +; +inpcon: + mvi c,dconio ;Direct console I/O BDOS call. + mvi e,0FFH ;Input. + call BDOS + ret +; +; +; Output character in E to the console. +; destroys bc, de, hl +; +outcon: + + mvi c,dconio ;Console output bdos call. + call bdos ;Output the char to the console. + ret + + + +; +; +; outmdm - output a char from E to the modem. +; the parity bit has been set as necessary. +; returns nonskip; bc, de, hl preserved. +outmdm: +; + push psw + push b + push d + push h + mov a,e + lxi h,outm2 ; return address + push h + lhld txcall + pchl ; send to rs232 port +outm2: pop h + pop d + pop b + pop psw + ret + + +; +; get character from modem; return zero if none available. +; bc, de, hl preserved. +inpmdm: + call rsin ; get char if available + ret ; return with character in A + + +; +; flsmdm - flush comm line. +; Modem is selected. +; Currently, just gets characters until none are available. +flsmdm: call inpmdm ; Try to get a character + ora a ; Got one? + jnz flsmdm ; If so, try for another + ret ; Receiver is drained. Return. + +; +; lptstat - get the printer status. Return a=0 if ok, or 0ffh if not. +lptstat: + lda pflag + ret + +; +; outlpt - output character in E to printer +; console is selected. +; preserves de. +outlpt: + push d ; save DE in either case + ana a ; if A = 0 do nothing, + jz outlp1 ; [30] if a=0 do nothing + mov a,e + call parout +outlp1: pop d ; restore saved register pair + ret + + +; +; +; Screen manipulation routines +; csrpos - move to row B, column C +; +; csrpos for terminals that use a leadin sequence followed +; by (row + 31.) and (column + 31.) +; +csrpos: push b ; save coordinates + lxi d,curldn ; get cursor leadin sequence + call prtstr ; print it + pop h ; restore coordinates + mov a,h ; get row + adi (' '-1) ; space is row one + mov e,a + push h + call outcon ; output row + pop h + mov a,l ; get column + adi (' '-1) ; space is column one + mov e,a + jmp outcon ; output it and return + +; +; delchr - make delete look like a backspace. Unless delete is a +; printing character, we just need to print a backspace +; (we'll output clrsp afterwards) +delchr: + lxi d,delstr + jmp prtstr + + +; erase the character at the current cursor position +clrspc: mvi e,' ' + call outcon + mvi e,bs ;get a backspace + jmp outcon + +; erase the current line +clrlin: lxi d,eralin + jmp prtstr + +; erase the whole screen, and go home +clrtop: lxi d,erascr + jmp prtstr + + +sysver: db 'Microbee$' +outlin: db 1AH,cr,lf,tab,'$' ;(Clear screen, home cursor) +erascr: db 1AH,'$' ;Clear screen and go home. +eralin: db cr,esc,'T$' ;Clear line. +delstr: db bs,'$' ; Adjust for delete +curldn: db esc,'=$' ;Cursor lead-in +ttab: ;Table start location. +ta: db ('K'-100O),'$',0,0 ;Cursor up. +tb: db 12O,'$',0,0 ;Cursor down. +tc: db ('L'-100O),'$',0,0 ;Cursor right. +td: db bs,'$',0,0 ;Cursor left. +te: db subt,'$',0,0 ;Clear screen. +tf: db '$',0,0,0 ;(can't) Enter graphics mode +tg: db '$',0,0,0 ;(can't) Exit graphics mode +th: db ('^'-100O),'$',0,0 ;Cursor home. +ti: db ('K'-100O),'$',0,0 ;Reverse linefeed. +tj: db esc,'Y$',0 ;Clear to end of screen. +tk: db esc,'T$',0 ;Clear to end of line. + + +;Microbee software serial port routines +porta equ 0 +portb equ 2 + + +; interrupt vectors +; We change the Z80 Interrupt register to point to these vectors. +; Instead of trying to identify a particular Microbee system, +; we just put vectors here for all systems. +; +; known vectors are: +; 48h : 56k (64k apc) - tested 19-Jun-1990 +; 48k : 64k - tested 01-Sep-1990 +; 50h : dreamdisk (3rd party disk for Microbee) +; e0h : 128k - tested 19-Jun-1990 +; e0h : 256k - tested 01-Sep-1990 + + org ($ and 0ff00h) + 100h +int equ $/256 ; byte for interrupt register + + dw inta ; printer vector + dw intb ; rs232 vector + dw inta + dw intb + dw inta + dw intb + dw inta + dw intb + dw inta + dw intb + dw inta + dw intb + dw inta + dw intb + dw inta + dw intb + dw inta + dw intb + dw inta + dw intb + dw inta + dw intb + dw inta + dw intb + dw inta + dw intb + dw inta + dw intb + dw inta + dw intb + dw inta + dw intb + dw inta + dw intb + dw inta + dw intb + dw inta + dw intb + dw inta + dw intb + dw inta + dw intb + dw inta + dw intb + dw inta + dw intb + dw inta + dw intb + dw inta + dw intb + dw inta + dw intb + dw inta + dw intb + dw inta + dw intb + dw inta + dw intb + dw inta + dw intb + dw inta + dw intb + dw inta + dw intb + dw inta + dw intb + dw inta + dw intb + dw inta + dw intb + dw inta + dw intb + dw inta + dw intb + dw inta + dw intb + dw inta + dw intb + dw inta + dw intb + dw inta + dw intb + dw inta + dw intb + dw inta + dw intb + dw inta + dw intb + dw inta + dw intb + dw inta + dw intb + dw inta + dw intb + dw inta + dw intb + dw inta + dw intb + dw inta + dw intb + dw inta + dw intb + dw inta + dw intb + dw inta + dw intb + dw inta + dw intb + dw inta + dw intb + dw inta + dw intb + dw inta + dw intb + dw inta + dw intb + dw inta + dw intb + dw inta + dw intb + dw inta + dw intb + dw inta + dw intb + dw inta + dw intb + dw inta + dw intb + + +; tables for baud rates +t75: db 124,13 ; full delay + db 55,7 ; semi delay + db 168,255 ; txrx delay + dw trout ; address of subroutine to transmit char +t7512: db 124,13 ; 75R/1200T + db 55,7 + db 194,1 ; txout delay + dw txout +t110: db 129,9 + db 55,5 + db 5,217 + dw trout +t150: db 59,7 + db 23,4 + db 2,158 + dw trout +t300: db 26,4 + db 134,2 + db 3,75 + dw trout +t600: db 139,2 + db 191,1 + db 2,34 + dw trout +t1200: db 195,1 + db 90,1 + db 3,13 + dw trout +t1275: db 195,1 ; 1200R/75T + db 90,1 + db 124,13 + dw txout +t2400: db 94,1 + db 40,1 + db 2,3 + dw trout +t4800: db 44,1 + db 15,1 + db 44,1 + dw txout +t9600: db 19,1 + db 1,1 + db 19,1 + dw txout + + +; copy table entries to locations used by serial routines +setbaud: + lxi h,fulldel + mvi b,8 +setb2: ldax d + mov m,a + inx h + inx d + dcr b + jnz setb2 + ret + + +;transmit character in E +; destroys all regs +txout: mvi b,ntotal ;total number of bits to send + di + in portb ;c = portb with tx bit zeroed + ani 0dfh + mov c,a + ora a ;carry=0 (start bit) +txout2: mov a,c ; 4T + jnc txout4 ;10T skip if space + ori 20h ; 3T (average) set mark +txout4: out portb ;11T + lhld txrxdel ;16T +txout6: dcr l ;delay + jnz txout6 + dcr h + jnz txout6 ; 14*L + 14*H + 3584*(H-1) + stc ; 4T carry=1 (stop bit) + mov a,e ; 4T shift next bit to carry + rar ; 4T + mov e,a ; 4T + dcr b ; 4T + jnz txout2 ;10T + ;loop = 74T + (delay loop) + ei + ret + + +; +;transmit character in E +;simultaneous receive char if necessary +trout: mov a,e + mvi b,ndata + lxi h,0 +tro2: rrc ;shift tx char to hl + mov c,a + mov a,l + ral + mov l,a + mov a,h + ral + mov h,a + mov a,c ;recover + dcr b + jnz tro2 +tro10: mvi b,tqfudge ;adjust char in hl to align with + ;tx bit of portb +tro12: stc ; pad out + mov a,l + ral + mov l,a + mov a,h + ral + mov h,a + dcr b + jnz tro12 + mvi a,0ffh ;flag to say we are not receiving + sta trtemp ;save it + mvi d,tqbit ;total number of qtr bits to send + in portb ;b = portb with tx bit zeroed + ani 0dfh + mov b,a + mvi e,0 ;we are not receiving yet +tro14: in portb + ori 8h ;test CTS + jz tro14 ;loop till Clear To Send + out 09h ;Color Wait OFF + di + call qbit + lda trtemp ;are we receiving + ora a + jnz tro22 ;skip if not + in portb ;is last bit a mark? + ori 10h + jz tro18 ;skip if mark (don't wait for stop) + lhld fulldel ;delay to stop bit +tro16: dcr l + jnz tro16 + dcr h + jnz tro16 +tro18: lhld wptr ; check buffer + xchg + lhld rptr + dcx d ; decrement queue pointer + mov a,d + ora e + jnz tro20 ; skip if no queue wrap around + lxi d,maxque-1 ; wrap around +tro20: mov a,l ; sub hl,de + sub e + mov l,a + mov a,h + sbb d + mov h,a + ora l ; check for zero + jz tro22 ; skip if buffer full + xchg + shld wptr ; update queue + lxi d,rqueue + dad d + mov m,c ; put char in queue +tro22: ei + ret ;ret + + +; routine for quarter bit timing +; for transmit and simultaneous receive +; total execution time is 223T + L*14T + H*34T +qbit: call txrx ;17T + 162T + lda txrxdel ;13T +qbit2: dcr a ; 4T + jnz qbit2 ;10T + lda txrxdel+1 ;13T +qbit4: dcr a ; 4T + nop ; 4T + nop ; 4T + nop ; 4T + nop ; 4T + nop ; 4T + jnz qbit4 ;10T + mov a,d ; 4T Check if still sending or receiving + ora e ; 4T + jnz qbit ;10T + ret + + +;simultaneous transmit/receive +;do next quarter bit +; regs: b = portb with tx bit zeroed +; c = character being received +; d = number of qtr bits remaining to send +; e = number of qtr bits remaining to receive (0 if not receiving) +; hl = character being transmitted +;this subroutine always executes in 162T (or 163T) +txrx: mov a,d ; 4T qtr bits remaining to send + ora a ; 4T + jz txrx12 ;10T skip if no bits remaining (may be receiving) + ani 03h ; 7T a complete bit? + jnz txrx10 ;10T skip if not + dad h ;11T shift tx bit to bit 5 of h + mov a,h ; 4T + ani 20h ; 7T extract tx bit + ora b ; 4T combine with portb + out portb ;11T send it +txrx2: dcr d ; 4T one less qtr bit to send + ;76T total +;now receive part +txrx4: mov a,e ; 4T qtr bits remaining to receive + ora a ; 4T + jz txrx16 ;10T skip if not receiving + ani 3h ; 7T a complete bit? + jnz txrx14 ;10T skip if not + in portb ;11T get input + ani 10h ; 7T extract rx bit + sui 1 ; 7T bit to carry + mov a,c ; 4T bit to c + rar ; 4T + mov c,a ; 4T +txrx6: dcr e ; 4T one less qtr bit to receive +txrx8: ret ;10T + ;86T total + +;come here if transmitting, but not a complete bit +;delay to match up execution times +txrx10: + ora a ; 4T + ora a ; 4T + ora a ; 4T + ora a ; 4T + ora a ; 4T + ori 00h ; 7T + jmp txrx2 ;10T + +;come here if not sending (but still receiving) +;delay to match up execution times +txrx12: ora a ; 4T + ora a ; 4T + ora a ; 4T + ora a ; 4T + ora a ; 4T + ora a ; 4T + ora a ; 4T + ora a ; 4T + ora a ; 4T + ora a ; 4T + ora a ; 4T + ora a ; 4T + jmp txrx4 ;10T + +;come here if receiving (but not a complete bit) +;delay to match up execution time +txrx14: ora a ; 4T + ora a ; 4T + ora a ; 4T + ora a ; 4T + ora a ; 4T + ori 00h ; 7T + jmp txrx6 ;10T + +;come here if not receiving +txrx16: in portb ;11T check if start bit + ani 10h ; 7T + jz txrx18 ;10T skip if mark + mvi e,rqbit ; 7T get quarter bit count for receive + xra a ; 4T + sta trtemp ;13T store flag to say we are receiving + ori a ; 7T delay (should be 6T) + ret ;10T + +txrx18: ora a ; 4T + ora a ; 4T + ora a ; 4T + ora a ; 4T + ora a ; 4T + jmp txrx8 ;10T + + + + +; RS232 input interrupt routine +; stores received character in queue +; ;semi delay starts here +intb: ;20T (approx.) for interrupt + push psw ;11T + push b ;11T + push d ;11T + push h ;11T + in portb ;11T + ani 10h ; 7T test input for start bit + jz intb16 ;10T skip if no start bit. + out 09h ;11T + lhld semidel ;16T half bit delay +intb2: dcr l ; 4T + jnz intb2 ;10T inner loop 14T*L + dcr h ; 4T + jnz intb2 ;10T outer loop (14*H + 256*14*(H-1))T + mvi e,8 ; 6T number of data bits + ;semi delay ends here (125T + delay loop) + ;full delay starts here +intb4: lhld fulldel ;16T full bit delay +intb6: dcr l + jnz intb6 + dcr h + jnz intb6 ; 14*L + 14*H + 3584*(H-1) + in portb ;11T test input + ani 10h ; 7T + sui 1 ; 7T input bit to carry + mov a,c ; 4T + rar ; 4T + mov c,a ; 4T and then to C + dcr e ; 4T bit count + jnz intb4 ;10T loop till all data bits collected + ;full delay ends here (67T + delay loop) + in portb + ani 10h + jz intb12 ; skip if mark + lhld fulldel ; wait for stop bit +intb10: dcr l + jnz intb10 + dcr h + jnz intb10 +intb12: lhld wptr ; check buffer + xchg + lhld rptr + dcx d ; decrement queue pointer + mov a,d + ora e + jnz intb14 ; skip if no queue wrap around + lxi d,maxque-1 ; wrap around +intb14: mov a,l ; sub hl,de + sub e + mov l,a + mov a,h + sbb d + mov h,a + ora l ; check for zero + jz intb16 ; skip if buffer full + xchg + shld wptr ; update queue + lxi d,rqueue + dad d + mov m,c ; put char in queue +intb16: pop h + pop d + pop b + pop psw + ei + db 0EDh,4Dh ;reti + +; +; get char from serial port buffer. +; exit: A=char or Z if no char +rsin: push d + push h + lhld rptr + xchg + lhld wptr + mov a,l ;sub hl,de + sub e + mov l,a + mov a,h + sbb d + mov h,a + ora l ;check for zero + jnz rsi4 ;get char +rsi2: pop h + pop d + ret + +rsi4: push psw + dcx d ; decrement queue pointer + mov a,d + ora e + jnz rsi6 ; skip if no queue wrap around + lxi d,maxque-1 ; wrap around +rsi6: pop psw + xchg + shld rptr + lxi d,rqueue + dad d + mov e,m ;get char from queue + ori 0ffh ;set NZ + mov a,e + jmp rsi2 + +; printer routines + +inta: sta ptemp + mvi a,0 + sta pflag + lda ptemp + ei + db 0EDh,4Dh ;reti + +parout: push h + lxi h,pflag +par2: db 0CBh,46h ;bit 0,(hl) + jnz par2 + mvi m,0ffh + out porta + pop h + ret + +; data storage + +oldint: db 0 ; storage for old i reg +trtemp: db 0 +ptemp: db 0 ;temp storage used by inta interrupt +pflag: db 0 ;0ffh if waiting for printer. 00h if ready + +;receive queue pointers +maxque equ 2048 ; receiver queue size +rptr: dw maxque-1 +wptr: dw maxque-1 + +;transmit +ndata equ 8 ; 8 data bits +nstrt equ 1 ; 1 start bit +nstop equ 1 ; 1 stop bit +ntotal equ nstrt+ndata+nstop +rqbit equ 4*(nstrt+ndata) ;number of quarter bits to receive +tqbit equ 4*(nstrt+ndata+nstop) ;number of quarter bits to transmit +tqfudge equ 13-nstrt-ndata + +;H=0 or L=0 behave as 256 +;receive delays. +fulldel: dw 0 ; 3584(H-1) + 14H + 14L + 67 cycles +semidel: dw 0 ; 3584(H-1) + 14H + 14L + 125 cycles +;1/4 bit transmit and simultaneous tx/rx delay 34H + 14L + 223 cycles +;or full bit delay 3584(H-1) + 14H + 14L + 74 cycles +txrxdel: dw 0 ; +txcall: dw trout ; address of subroutine to transmit char + +; receiver queue +rqueue: ds maxque + + +ovlend equ $ ; End of overlay + +IF lasm + END +ENDIF diff --git a/cpxcif.asm b/cpxcif.asm new file mode 100644 index 0000000..d4568c4 --- /dev/null +++ b/cpxcif.asm @@ -0,0 +1,746 @@ +IF NOT lasm +.printx * CPXCIF.ASM * +ENDIF ;NOT lasm +; 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 file contains the system dependent part for Cifer systems, and +; is based on code contributed by John Shearwood of Birmingham +; University. This file was originally CPXTOR.ASM but now an +; FAMILY file on its own. +; +; This file has code that supports Cifer 1886/2886 systems, running +; either CP/M Version 2.2 or 3.0, and driving the VL or AUX port. +; xxx is a three letter abbrev. for the system you are adding. +; +; revision history: +; +; edit 2, 21 July, 1987 by OBSchou to bring it into line for use with +; CPXCOM.ASM. +; +; edit 1, 14 July by OBSchou for John Shearwood of Birmingham University, UK. +; His edits ar based on the former CPXTOR.ASM family file. +; +; edit 4, Apr 7 1987, JA Shearwood. Add support for Cifer Aux port. +; edit 2, Mar 17 1987, JA Shearwood Add support for Cifer CP/M Plus +; +; Keep module name, edit number, and last revision date in memory. +family: db 'CPXCIF.ASM (2) 14-Jul-87 $' +; +; Assembly time message to let me know I'm building the right version. +; LASM generates an 'S' error along with the message, which is messy, but +; better than trying to put everything inside a IF m80 OR mac80 conditional, +; because LASM doesn't like nested IF's, either. + +IF cifer +.printx * Assembling Kermit-80 for Cifer 1886 * +ENDIF + +IF cifer3 +.printx * with CP/M Plus +ENDIF + +IF cifaux +.printx * with AUX port +ENDIF + +; +;========================================================================= +; I/O Byte assignments (2-bit fields for 4 devices at loc 3) +; +;bits 6+7 LIST field +; 0 LIST is Teletype device (TTY:) +; 1 LIST is CRT device (CRT:) +; 2 LIST is Lineprinter (LPT:) +; 3 LIST is user defined (UL1:) +; +;bits 4+5 PUNCH field +; 0 PUNCH is Teletype device (TTY:) +; 1 PUNCH is high speed punch (PUN:) +; 2 PUNCH is user defined #1 (UP1:) +; 3 PUNCH is user defined #2 (UP2:) +; +;bits 2+3 READER field +; 0 READER is Teletype device (TTY:) +; 1 READER is high speed reader (RDR:) +; 2 READER is user defined #1 (UR1:) +; 3 READER is user defined #2 (UR2:) +; +;bits 0+1 CONSOLE field +; 0 CONSOLE is console printer (TTY:) +; 1 CONSOLE is CRT device (CRT:) +; 2 CONSOLE is in Batch-mode (BAT:);READER = Input, +; LIST = Output +; 3 CONSOLE is user defined (UC1:) +; +;========================================================================= + +iobyte EQU 03H ;Location of I/O byte + +IF cifer ;[13] +batio equ 80h ; tty: as console +defio equ 81h ; crt: as console +z80 SET TRUE ; although it really is... +ENDIF;cifer [13] + +defesc EQU ']'-100O ;The default escape character. + +; Select initial setting for VT-52 emulation flag. +vtval EQU 1 + +IF iobyt ; only CP/M 2.2 and VL port use coniob in CPXCOM + ; rest use this one +coniob: db 0 ; default console bit pattern +ENDIF ;iobyt + + + +sysxin: ;system initialisation not covered by sysinit + mvi a,defio + sta coniob + +IF cifer AND NOT cifaux ; [JAS] Not if AUX port + lxi d,ciferi + call prtstr +ENDIF ;cifer AND NOT cifaux + +IF cifaux ; [JAS] Only Aux Port + lhld 00047h ; Get address of CIOPS table + lxi d,6fh + dad d ; Calculate address of SETLNSPD + shld cifiop + inx h + inx h + inx h + shld ciflod ; Next entry LODEF + lxi d,81h-72h + dad d ; Calculate address of LIDEF + shld ciflid + lhld 00045h ; Get address of SYSPTRS table + lxi d,12h ; Offset for LIDEF pointer + dad d ; Add to table address + mov e,m ; Get low byte LIDEF pointer + inx h + mov d,m ; Get high byte LIDEF pointer + push d + inx h ; LIPARM pointer next + mov a,m ; Get low byte of LIPARM pointer + sta ciptbl ; Keep + inx h + mov a,m ; Get high byte + sta ciptbl+1 ; Keep + lxi d,1eh-15h ; Offset to LODEF + dad d + mov e,m ; Low byte + inx h + mov d,m ; High byte + inx h ; LOPARM is next entry + mov a,m + sta coptbl ; Keep low byte LOPARM + inx h + mov a,m + sta coptbl+1 ; Keep high byte +; Now set up port for no parity 8 bits xon/xoff protocol both ways + xchg ; LODEF into hl register + push h ; Needed later + mvi a,0 + mov m,a ; Clear byte 0 + inx h + mov m,a ; Clear byte 1 + inx h + mvi a,099h ; XON/XOFF protocol, 8bits, no parity + mov m,a ; Flag into byte 2 + pop h ; Restore address of LODEF +ciflod equ $+1 + call $ ; LODEF routine (poked above) + pop h ; LIDEF (PUSHed from de earlier) + push h ; Needed later + mvi a,0 + mov m,a ; Clear byte 0 + inx h + mov m,a ; Clear byte 1 + inx h + mvi a,099h ; XON/XOFF protocol, 8bits, no parity + mov m,a ; Flag into byte 2 + pop h ; Restore address of LIDEF +ciflid equ $+1 + call $ ; LIDEF routine (poked above) + lhld ciptbl ; Get current input speed + mov a,m + sta speed + sta speed+1 + mov e,a + mov d,a + call sysspd ; Make sure ip and op are the same +ENDIF; cifer AND cifaux + + ret ; return from system-dependent routine + +; +; +; system-dependent termination processing +; If we've changed anything, this is our last chance to put it back. +sysexit: + +IF cifer AND NOT cifaux + lxi d,cifero + call prtstr +ENDIF;cifer AND NOT cifaux + + ret + +; +; system-dependent processing for start of CONNECT command +; +syscon: + ret + +conmsg: ; Messages printed when entering transparent (CONNECT) mode: +; +; +; syscls - system-dependent close routine +; called when exiting transparent session. +; +syscls: + ret +; +; +; sysinh - help for system-dependent special functions. +; called in response to <escape>?, after listing all the +; system-independent escape sequences. +; +sysinh: lxi d,inhlps ; we got options... + call prtstr ; print them. + + ret + + +;additional, system-dependent help for transparent mode +; (two-character escape sequences) +inhlps: + +; [16] [18] have added super brain and Torch to the list of Breaking machines. + +IF (cifer AND NOT cifaux) + db cr,lf,'B Transmit a BREAK' +ENDIF ;(cifer AND NOT cifaux) + db '$' ;[hh] table terminator + +; +; sysint - system dependent special functions +; called when transparent escape character has been typed; +; the second character of the sequence is in A (and in B). +; returns: +; non-skip: sequence has been processed +; skip: sequence was not recognized +sysint: ani 137O ; convert lower case to upper, for testing... + +; [19] have added superbrain and torch to the list + +IF (cifer AND NOT cifaux) + cpi 'B' ; send break? + jz sendbr ; yes, go do it. return nonskip when through. +ENDIF ;(cifer AND NOT cifaux) + + jmp rskp ; take skip return - command not recognized. + +; + +IF (cifer AND NOT cifaux) +sendbr: lxi d,brkmes ; send a break by sending esc * " + call prtstr ; send to screen => breaks to port + ret +ENDIF;cifer + +; sysflt - system-dependent filter. +; called with the character in E. +; preserves bc, de, hl. +; note: <xon>,<xoff>,<del>, and <nul> are always discarded. +sysflt: + mov a,e ; get character for testing + ret + +; mdmflt - modem filter [30] +; called with character to be sent to printer in E +; with parity set as appropriate. +; return with accumulator = 0 do do nothing, +; <> 0 to send char in E. +mdmflt: + mov a,e ;[30] get character to test + ret + + + +; prtflt - printer filter [30] +; called with character to be sent to printer in E +; returns with a = 0 to do nothing +; a <> 0 to print it. +; +; this routine for those printer that automatically insert +; a lf on cr, or cr for lf. Should this be shifted to +; the system indep. stuff, in say 4.06? +prtflt: + mov a,e ; [30] get character to test + ret + + +; +; +; system-dependent processing for BYE command. +; for apmmdm, heath, and lobo, hang up the phone. +sysbye: + ret +; +; This is the system-dependent command to change the baud rate. +; DE contains the two-byte value from the baud rate table; this +; value is also stored in 'speed'. +sysspd: + +IF (cifer AND NOT cifaux); This one is wierd.. + ; send an escape string to the screen to set rate. + push d ; Save the data returned + lxi d,cifbrt ; send the start of the escape string (esc ?) + call prtstr ; + pop psw ; get data into a (and flags>..) + inr a ; need to send (a+1-1) 'N' to screen + push psw ; we will need the data again + call cifnos ; send a set of Ns to the screen + pop psw ; (which then sets the VL line on the screen + call cifnos ; processor card) + call prcrlf ; cr will terminate.. a crlf is handy + ret + +cifnos: dcr a ; if result = 0 then done + jz cifno1 ; if done then say 'Y' for yes. + push psw + mvi e,'N' ; else send a string of Ns to screen processor + mvi c,dconio + call bdos + pop psw + jmp cifnos +cifno1: mvi e,'Y' + mvi c,dconio + call bdos + ret ; sent a sring of 0 or more N then a Y + +cifbrt: db esc,'?$' ; start setting baud rate string +ENDIF ;cifer AND NOT cifaux + +IF cifaux; [JAS] Set baud rate by massaging LIPARM/LOPARM and calling + ;CIOPS routine +; Set up speed byte in first location of tables + lhld coptbl ; Now sort out baud rate + mov a,e ; That's output speed + mov m,a + xchg + lhld ciptbl + mov m,a ; Input speed +; Call CIOPS routine SETLNSPD with tables in appropriate rp's +cifiop equ $+1 + call $ ; Poked by sysinit + ret + +coptbl: dw 0 +ciptbl: dw 0 +ENDIF; cifaux + +; +; Speed tables +; (Note that speed tables MUST be in alphabetical order for later +; lookup procedures, and must begin with a value showing the total +; number of entries. The speed help tables are just for us poor +; humans. + +; db string length,string,divisor (2 identical bytes or 1 word) +; [Toad Hall] + +IF cifer +spdtbl: db 10h ;16 entries + db 03h,'110$', 02h,02h + db 04h,'1200$', 07h,07h + db 05h,'134.5$', 03h,03h + db 03h,'150$', 04h,04h + db 04h,'1800$', 08h,08h + db 05h,'19200$', 0fh,0fh + db 04h,'2000$', 09h,09h + db 04h,'2400$', 0ah,0ah + db 03h,'300$', 05h,05h + db 04h,'3600$', 0bh,0bh + db 04h,'4800$', 0ch,0ch + db 02h,'50$', 00h,00h + db 03h,'600$', 06h,06h + db 04h,'7200$', 0dh,0dh + db 02h,'75$', 01h,01h + db 04h,'9600$', 0eh,0eh + +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;cifer + +; The following conditionals were once a huge if not statement. There +; wasn't enough room to add the lobo to the list, so it had to be broken +; into 2, which you can't do with an if not. I redid it as two ifs and +; applied them to those that wouldn't set baud. [Hal Hostetler] +; +; This is the system-dependent SET PORT command. +; HL contains the argument from the command table. +sysprt: +IF iobyt + mov a,m ;Get the I/O byte + sta prtiob ;Save the desired IO byte for this port + inx h ;Point at next entry + mov a,m ;Get the output function + sta prtfun ;Save it +ENDIF;iobyt + + ret +; +; +; +; Port tables for GENERIC CPM 2.2 +IF gener +; help text +prhtbl: db cr,lf,'CRT device' + db cr,lf,'PTR device' + db cr,lf,'TTY device' + db cr,lf,'UC1 device' + db cr,lf,'UR1 device' + db cr,lf,'UR2 device$' + +; command table +prttbl: db 06H ;Six devices to choose from + db 03H,'CRT$' + dw crtptb + db 03H,'PTR$' + dw ptrptb + db 03H,'TTY$' + dw ttyptb + db 03H,'UC1$' + dw uc1ptb + db 03H,'UR1$' + dw ur1ptb + db 03H,'UR2$' + dw ur2ptb + +; port entry table +; table entries are: +; db iobyte-value, BDOS output function, reserved +crtptb: db crtio,conout,0 +ptrptb: db ptrio,punout,0 +ttyptb: db ttyio,conout,0 +uc1ptb: db uc1io,conout,0 +ur1ptb: db ur1io,punout,0 +ur2ptb: db ur2io,punout,0 +ENDIF;gener + +; +; +IF cifer ; no ports yet... +prttbl EQU 0 +prhtbl EQU 0 ; +ENDIF; cifer + +IF iobyt +prtfun: db punout ;Function to use for output to comm port +prtiob: db batio ;I/O byte to use for communicating +ENDIF;iobyt + +IF NOT (iobyt OR lobo OR cifer) ;[hh] +prttbl equ 0 ; SET PORT is not supported +prhtbl equ 0 +ENDIF;NOT (iobyt OR lobo OR cifer) + +; +; +; selmdm - select modem port +; selcon - select console port +; selmdm is called before using inpmdm or outmdm; +; selcon is called before using inpcon or outcon. +; For iobyt systems, diddle the I/O byte to select console or comm port; +; For Decision I, switches Multi I/O board to console or modem serial +; port. [Toad Hall] +; For the rest, does nothing. +; preserves bc, de, hl. +selmdm: +IF iobyt + lda prtiob ;Set up for output to go to the comm port + sta iobyte ;Switch byte directly +ENDIF;iobyt + + ret + +selcon: +IF iobyt + lda coniob ;Set up for output to go to the console port + sta iobyte ;Switch directly +ENDIF;iobyt + + ret +; +; Get character from console, or return zero. +; result is returned in A. destroys bc, de, hl. +; +inpcon: +IF NOT iobyt + mvi c,dconio ;Direct console I/O BDOS call. + mvi e,0FFH ;Input. + call BDOS +ENDIF;NOT iobyt + +IF iobyt + call bconst ;Get the status + ora a ;Anything there? + rz ;No, forget it + call bconin ;Yes, get the character +ENDIF;iobyt + ret +; +; +; Output character in E to the console. +; destroys bc, de, hl +; +outcon: + +IF NOT iobyt + mvi c,dconio ;Console output bdos call. + call bdos ;Output the char to the console. +ENDIF;NOT iobyt + +IF iobyt + mov c,e ;Character + call bcnout ;to Console +ENDIF;iobyt + ret +; +; +; outmdm - output a char from E to the modem. +; the parity bit has been set as necessary. +; returns nonskip; bc, de, hl preserved. +outmdm: +IF inout + in mnprts ;Get the output done flag. + ani output ;Is it set? + jz outmdm ;If not, loop until it is. + mov a,e + out mnport ;Output it. + ret +ENDIF;inout + +IF iobyt +;**** Note that we enter from outpkt with the I/O byte already set up for +; output to go to the comm port + push h + push b + lda prtfun ;Get the output function + mov c,a ;Into C + call bdos ;And output the character + pop b + pop h + ret +ENDIF;iobyt + +IF cifer3 ; [JAS] + push h + push b + mvi c,auxout ;Output to the aux output device + call bdos + pop b + pop h + ret +ENDIF;cifer3 + + +; +; +; get character from modem; return zero if none available. +; for IOBYT systems, the modem port has already been selected. +; destroys bc, de, hl. +inpmdm: +IF iobyt + call bconst ;Is Char at COMM-Port? + ora a ;something there? + rz ; return if nothing there + call bconin ; data present. read data. +ENDIF;iobyt + +IF inout +;Note: modem port should already be selected for mdI. [Toad Hall] + in mnprts ;Get the port status into A. + ani input ;See if the input ready bit is on. + rz ;If not then return. + in mnport ;If so, get the char. +ENDIF;inout + +IF cifer3 ; [JAS] + mvi c,auxist + call bdos ;is char at auxin? + ora a ;something there? + rz ;no + mvi c,auxin + call bdos ;read char from auxin +ENDIF;cifer3 + +ret ; return with character in A + + +; +; flsmdm - flush comm line. +; Modem is selected. +; Currently, just gets characters until none are available. + +flsmdm: call inpmdm ; Try to get a character + ora a ; Got one? + jnz flsmdm ; If so, try for another + ret ; Receiver is drained. Return. + + +; +; +; lptstat - get the printer status. Return a=0 if ok, or 0ffh if not. +lptstat: +IF iobyte ;[33] + call bprtst ; get status +ENDIF ;iobyte[33] +IF NOT iobyte ;[33] + xra a ; assume it is ok.. this may not be necessary +ENDIF ;iobyte [33] + ret +; +; +; outlpt - output character in E to printer +; console is selected. +; preserves de. +outlpt: + push d ; save DE in either case + call prtflt ; go through printer filter [30] + ana a ; if A = 0 do nothing, + jz outlp1 ; [30] if a=0 do nothing + +IF NOT iobyte + mvi c,lstout + call bdos ;Char to printer +ENDIF;NOT iobyt +IF iobyt + mov c,e + call blsout +ENDIF;iobyt + +outlp1: pop d ; restore saved register pair + ret +; +; +; Screen manipulation routines +; csrpos - move to row B, column C +; +; csrpos for terminals that use a leadin sequence followed +; by (row + 31.) and (column + 31.) +; +IF cifer ; [14] cifer does it colums then rows.. swap b and c +csrpos: push b ; save coordinates + lxi d,curldn ; get cursor leadin sequence + call prtstr ; print it + pop h ; restore coordinates + mov a,l ; [obs] get column + adi (' '-1) ; space is column one + mov e,a + push h + call outcon ; output row + pop h + mov a,h ; [obs] get row + adi (' '-1) ; space is row one + mov e,a + jmp outcon ; output it and return +ENDIF; cifer + +; +; +; delchr - make delete look like a backspace. Unless delete is a printing +; character, we just need to print a backspace. (we'll output clrspc +; afterwards) +; For Kaypro and Vector General, delete puts a blotch on the screen. +; For Apple and Osborne 1, delete moves but doesn't print. +delchr: + mvi e,bs + call outcon + +; erase the character at the current cursor position +clrspc: mvi e,' ' + call outcon + mvi e,bs ;get a backspace + jmp outcon + +; erase the current line +clrlin: lxi d,eralin + jmp prtstr + +; erase the whole screen, and go home. preserves b (but not c) +clrtop: lxi d,erascr + jmp prtstr + + +IF cifer AND NOT cifaux ;[13] +ttytyp: db 'Cifer 1886 (Parity set to space only)$' +ENDIF; cifer AND NOT cifaux + +IF cifaux ;JAS +ttytyp: db ' Cifer 1886 $' +ENDIF; cifaux + +IF cifer ;[JAS] +sysver: db ' Cifer 1886 $' ; +outlin: db esc,'J',cr,lf,tab,tab,'$' +eralin: db esc,'^K$' ;Clear to end of line. +erascr: db esc,'J$' ;Clear screen and go home. +curldn: db esc,'P$' ;Cursor lead-in +ttab: ;Table start location. +ta: db esc,'A$',0 ;Cursor up. +tb: db esc,'@$',0 ;Cursor down. +tc: db esc,'C$',0 ;Cursor right. +td: db esc,'D$',0 ;Cursor left. +te: db esc,'J',0,0 ;Clear screen and home cursor +tf: db '$',0,0,0 ;(can't) Enter Graphics mode +tg: db '$',0,0,0 ;(can't) Exit Graphics mode +th: db esc,'H$',0 ;Cursor home. +ti: db esc,'@$',0 ;reverse linfeed +tj: db esc,'B$',0 ;Clear to end of screen +tk: db esc,'K$',0 ;Clear to end of line. +ENDIF;cifer +; +IF cifer AND NOT cifaux ;[JAS] +; Setup string for the Cifer.. called as a prtstr param. from sysinit +ciferi: db esc,'/' ;Setup cifer for on line + db esc,'*[' ; direct mode on + db esc,'%' ; protocol on host line on + db esc,'*~x' ; protocol is xon/xoff + db esc,'*(' ; protocol out on host is xon/xoff + db esc,'? NNNY',cr ; set VL port to space parity + ; It cannot do NONE.. Thanks a lot + db '$' ; all done +; Finish string for the Cifer.. called as a prtstr param. from sysexit +cifero: db esc,'&' ; Host input protocol off + db esc,'*)' ; Host output protocol off + db esc,'*]' ; Direct mode off + db esc,'\' ; Setup cifer for off line + db '$' +; Break string for cifer VL port. +brkmes: db esc,'*"$' ;Send a break command string +ENDIF;cifer AND NOT cifaux [13] + +ovlend equ $ ; End of overlay + + END + diff --git a/cpxcom.asm b/cpxcom.asm new file mode 100644 index 0000000..7c3034e --- /dev/null +++ b/cpxcom.asm @@ -0,0 +1,486 @@ +IF NOT lasm +.printx * CPXCOM.ASM * +ENDIF ; NOT lasm +; 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 file contains part common code required for most if not all +; systems. Specifiacally, SYSINIT, INIADR, MOVER, and DELAY to name +; the most important ones. +; +; revision history: +; +; edit 1, 21st July 1987 by OBSchou. Regretably, I have had to include +; some system dependent IFs, mainly for CRT, TORCH and OSI. Inclusion +; here means simpler family files later on. (Regrettably, the delay +; loop for APMMDM differs too.) +; +; Set the fuzzy timeout value. Range is 1 (VERY short) through 0ffffH to zero +; (maximum). The actual duration is a function of the loop length and the +; processor speed. For now, we'll make it zero for everybody, but feel free +; to change it for your system. +; [OBS] make it a little less than max, say 1000H. More useful. +fuzval EQU 1000H + +; +; System-dependent initialization +; Called once at program start. +sysinit: +; +; [13] Had to move this call to here, as the prtstr routine needs this +; before the config message is sent out. It has only been moved. +; + call iniadr ;Initialize the BIOS addresses + mvi c,gtiob ;Get current I/O byte + call bdos ;From CP/M + sta coniob ;Remember where console is + mvi c,getvnm ; get the BDOS version number (e.g. 22H, 31H) + call bdos + mov a,l + sta bdosvr ; and store it away for future reference + lxi d,cfgmsg ; "configured for " + call prtstr + lxi d,sysver ; get configuration we're configured for + call prtstr ; print it. +; +; If we're set up to do special terminal handling, say what kind +; of terminal we expect... (unless it's the generic 'crt') +IF termin + lxi d,witmsg ; " with " + call prtstr + lxi d,ttytyp ; terminal type + call prtstr +ENDIF;termin + call prcrlf ; print CR/LF +; +; now, to work... +; +; locate large buffer for multi-sector I/O +; What we want to do here is find the ccp. Space between ovlend and the ccp +; is available for buffering, except we don't want to use more than maxsec +; buffers (if we use too many, the remote end could time out while we're +; writing to disk). maxsec is system-dependent, but for now we'll just +; use 8Kbytes. If you get retransmissions and other protocol errors after +; transferring the first maxsec sectors, lower maxsec. + +maxsec EQU (8*1024)/bufsiz ; 8K / number of bytes per sector + + lxi h,ovlend ; get start of buffer + shld bufadr ; store in linkage section + mvi a,maxsec ; get size of buffer, in sectors + sta bufsec ; store that, too. + + call sysxin ; call system specific init code + + ret ; return from system-dependent routine + +bdosvr: ds 1 ; space to save the BDOS version number +IF NOT iobyt +coniob: ds 1 ; space to save copy of IO byte +ENDIF ;NOT iobyt +; +; This one is hopefully the last "improvement" in view of GENERIC +;Kermit. It uses for Character-I/O the BIOS-routines ( instead of the +;"normal" BDOS routines. What does it give us (hopefully) : More speed, +;higher chance of success ( I/O byte implemented in BIOS [if at all]), +;but no "extra" device handling - that's done by BDOS. +; +; How do we "get" the call-adresses? Location 0 has a JMP Warm-Boot +;in CP/M which points into the second location of the BIOS JMP-Vector. The +;next three locations of the JMP-Vector point to the CONSTAT,CONIN,CONOUT +;BIOS-routines. CONOUT wants the character in C. +; +;- Bernie Eiben + +iniadr: lhld 1 ;get BIOS Warmstart-address + lxi d,3 ;next adress is CONSTAT in BIOS + dad d + shld bconst+1 ;stuff it into the call-instruction + lxi d,3 ;next adress is CONIN in BIOS + dad d + shld bconin+1 ; + lxi d,3 ;next adress is CONOUT in BIOS + dad d + shld bcnout+1 + lxi d,3 ;next address is LIST in BIOS + dad d + shld blsout+1 + lxi d,10*3 ; get printer status routine + dad d + shld bprtst + ret ;And return + +bconst: jmp $-$ ;Call BIOS directly (filled in by iniadr) + +bconin: jmp $-$ ;Call BIOS directly (filled in by iniadr) + +bcnout: jmp $-$ ;Call BIOS directly (filled in by iniadr) + +blsout: jmp $-$ ; .... + +bprtst: jmp $-$ ; Call BIOS directly for printer status + +IF NOT apmmdm ; Shame about this, but the Apple needs a different delay +; +;[cjc] Delay routine. Called with time (hundredths of seconds) in A. +; The inner loop delays 1001 T-states, assuming no wait states are +; inserted; this is repeated CPUSPD times, for a total delay of just +; over 0.01 second. (CPUSPD should be set to the system clock rate, +; in units of 100KHz: for an unmodified Kaypro II, that's 25 for +; 2.5 MHz. Some enterprising soul could determine whether or not the +; Kaypro actually inserts a wait state on instruction fetch (a common +; practice); if so, the magic number at delay2 needs to be decreased. +; (We also neglect to consider time spent at interrupt level). +; +; called by: sendbr +; destroys BC + +delay: mvi c,cpuspd ; Number of times to wait 1000 T-states to + ; make .01 second delay +delay2: mvi b,70 ; Number of times to execute inner loop to + ; make 1000 T-state delay +delay3: dcr b ; 4 T-states (* 70 * cpuspd) + jnz delay3 ; 10 T-states (* 70 * cpuspd) + dcr c ; 4 T-states (* cpuspd) + jnz delay2 ; 10 T-states (* cpuspd) + ; total delay: ((14 * 70) + 14) * cpuspd + ; = 1001 * cpuspd + dcr a ; 4 T-states + jnz delay ; 10 T-states + ret ; grand total: ((1001 * cpuspd) + 14) * a +ENDIF ; NOT apmmdm +; +; +; Set up screen display for file transfer +; called with kermit version in DE +; +sysscr: push d ; save version for a bit + lxi d,outlin ; clear screen, position cursor + call prtstr ; do it + pop d ; get Kermit's version +IF NOT (osi OR crt) ; got cursor control? + call prtstr ; print it + mvi e,'[' ; open bracket + call outcon ; print it (close bracket is in outln2) + lxi d,sysver ; get name and version of system module + call prtstr + lxi d,outln2 ; yes, print field names + call prtstr + lda dbgflg ; is debugging enabled? + ora a + rz ; finished if no debugging + lxi d,outln3 ; set up debugging fields + call prtstr +ENDIF;NOT (osi OR crt) + ret +; +; Calculate free space for current drive +; returns value in HL +sysspc: + lda bdosvr ;cpm3's alloc vect may be in another bank + cpi 30H ;cpm3 or later? + jm cp2spc ;no: use cp/m 2 algorithm + lda fcb ;If no drive, get + ora a ; logged in drive + jz dir180 + dcr a ;FCB drive A=1 normalize to be A=0 + jmp dir18a + +dir180: mvi c,rddrv + call bdos +dir18a: mov e,a ;drive in e + mvi c,getfs ;get free space BDOS funct + call bdos ;returns free recs (3 bytes in buff..buff+2) + mvi b,3 ;conv recs to K by 3 bit shift +dir18b: xra a ;clear carry + mvi c,3 ;for 3 bytes + lxi h,buff+3 ;point to addr + 1 +dir18c: dcx h ;point to less sig. byte + mov a,m ;get byte + rar ;carry -> A -> carry + mov m,a ;put back byte + dcr c ;for all bytes (carry not mod) + jnz dir18c + dcr b ;shift 1 bit 3 times + jnz dir18b + mov e,m ;get least sig byte + inx h + mov d,m ;get most sig byte + xchg ;get K free in HL + ret + +; the rest are CP/M 2.2 systems, so use the alloc vector +cp2spc: mvi c,getalv ;Address of CP/M Allocation Vector + call bdos + xchg ;Get its length + lhld bmax + inx h + lxi b,0 ;Initialize Block count to zero +dir19: push d ;Save allocation address + ldax d + mvi e,8 ;set to process 8 blocks +dir20: ral ;Test bit + jc dir20a + inx b +dir20a: mov d,a ;Save bits + dcx h + mov a,l + ora h + jz dir21 ;Quit if out of blocks + mov a,d ;Restore bits + dcr e ;count down 8 bits + jnz dir20 ;do another bit + pop d ;Bump to next count of Allocation Vector + inx d + jmp dir19 ;process it + +dir21: pop d ;Clear Allocation vector from stack + mov l,c ;Copy block to 'HL' + mov h,b + lda bshiftf ;Get Block Shift Factor + sui 3 ;Convert from records to thousands + rz ;Skip shifts if 1K blocks +dir22: dad h ;Multiply blocks by 'K per Block' + dcr a + jnz dir22 + ret + +; +----|----|----|----|----|----|----|... +; 1 | +; 2 | Kermit-80 v4.0 [system] +; 3 | +; 4 |Number of packets: ____ +; 5 |Number of retries: ____ +; 6 |File name: ____________ +; 7 |<error>... +; 8 |<status>... +; 9 |RPack: ___(if debugging)... +; 10 | +; 11 |SPack: ___(if debugging)... +; 12 | +; 13 |Kermit-80 A:> (when finished) +; +; For the PX-8, the display looks like: +; 5 10 15 20 25 30 35 40 45 50 55 +; +----|----|----|----|----|----|----|----|----|----|----|----|---- +; 1 |Kermit-80 v4.05 [Epson PX-8] Number of retries: ____ +; 2 |Number of packets: ____ File name: ________.___ +; 3 |<error>... +; 4 |<status>... +; 5 |RPack: ___ (if debugging)... +; 6 | +; 7 |SPack: ___ (if debugging)... +; 8 | +; 9 |Kermit-80 A:> (when finished) +; + +IF NOT px8 ; [29] +nppos EQU 4*100h+20 +rtpos EQU 5*100h+20 +fnpos EQU 6*100h+12 +errlin EQU 7 +stlin EQU 8 +rplin EQU 9 +splin EQU 11 +prplin EQU 13 +ENDIF ; NOT px8 + +IF px8 +nppos EQU 2*100h+20 +rtpos EQU 1*100h+59 +fnpos EQU 2*100h+51 +errlin EQU 3 +stlin EQU 4 +rplin EQU 5 +splin EQU 7 +prplin EQU 9 +ENDIF ; px8 [29] + + +IF NOT (osi OR crt );[26] +scrnp: lxi b,nppos + jmp csrpos + +scrnrt: lxi b,rtpos + jmp csrpos + +scrfln: lxi b,fnpos + call csrpos +clreol: + lxi d,tk + jmp prtstr + +screrr: lxi b,errlin*100H+1 + call csrpos + jmp clreol + +scrst: lxi b,stlin*100H+1 + call csrpos + jmp clreol + +rppos: lxi b,rplin*100H+8 + call csrpos + jmp clreol + +sppos: lxi b,splin*100H+8 + call csrpos + jmp clreol + +; [29] Modify scrend to make the cursor line conditional on use of debugging +; This means that in most cases the entire file transfer will fit on PX-8 lcd +scrend: lda dbgflg + ora a + jz scr1nd + lxi b,prplin*100H+1 ; debugging in use [29] + jmp scr2nd +scr1nd: lxi b,rplin*100H+1 ; no debugging +scr2nd: call csrpos +clreos: lxi d,tj + jmp prtstr +; [29] and nop out the rest for now... +; +;scrend: lxi b,prplin*100H+1 +; call csrpos +;clreos: lxi d,tj +; jmp prtstr +ENDIF;NOT (osi OR crt ) [26] + + +IF osi OR crt ; no cursor control +scrnp: mvi e,' ' + jmp outcon + +scrnrt: mvi e,' ' + call outcon + mvi e,'%' + jmp outcon + +scrfln: +screrr: +scrst: +scrend: jmp prcrlf ;Print CR/LF [Toad Hall] + +rppos: lxi d,prpack + jmp prtstr + +sppos: lxi d,pspack + jmp prtstr +ENDIF;osi OR crt + +; Some frequently-used routines (duplicates of those in CPSMIT): +; prcrlf - output a CR/LF +; prtstr - output string in DE +; rskp - return, skipping over error return +prcrlf: lxi d,crlf +prtstr: +; [17] added this to avoid prtstr.. emulate function 9 call. +; Works on most machines. +IF (torch OR px8 OR z80mu) +; +; Modified print string as the CP/N (for Nut) system traps control +; characters in a function 9 call.. rot its cotton socks. + push h + push d + push b +prtst1: + ldax d + inx d + cpi '$' ; if a dollar then end of string + jz prtst2 + push d + mov e,a + mov c,a ; also to c if its via conout in BIOS + call outcon ; send it to the screen + pop d + jmp prtst1 + +prtst2: pop b + pop d + pop h + ret ; regs restored.. just in case +ENDIF ;(torch OR px8 OR z80mu) + +IF NOT (torch OR px8 or z80mu) ;ie any machine that can send ctrl chrs via dos call 9 + PUSH H + PUSH D + push b + mvi c,9 ; Dos call 9 (print a string) + call bdos + pop b + POP D + POP H + ret ; all done for good machines +ENDIF ;NOT (torch OR px8 OR z80mu) + +; +; rskp - return to calling address + 3. +rskp: pop h ; Get the return address + inx h ; Increment by three + inx h + inx h + pchl + +; Copy block of data +; source in HL, destination in DE, byte count in BC +; called by: cpxsys, mfname +; +mover: +;IF NOT z80 ; 8080's have to do it the hard way +;OBS assume its an 8080 for now - this will work on Z80s anyway. + mov a,m + stax d + inx h + inx d + dcx b + mov a,b + ora c + jnz mover +;ENDIF;NOT z80 +;IF z80 +; db 0EDh,0B0h ; Z80 LDIR instruction +;ENDIF;z80 + ret + +; +; Miscellaneous messages +; +crlf: db cr,lf,'$' +cfgmsg: db 'configured for $' +witmsg: db ' with $' ; Its included if we get here ('with terminal') + +IF NOT (osi OR crt OR px8) ; [29] got cursor control? +outln2: db ']',cr,lf,cr,lf,'Number of packets:' + db cr,lf,'Number of retries:' + db cr,lf,'File name:$' +ENDIF;NOT (osi OR crt OR px8) + +IF px8 ; [29] +outln2: db '] Number of retries:', cr, lf + db 'Number of packets: File name:$' +ENDIF ; px8 [29] + +IF NOT (osi OR crt) ; [29] +outln3: db cr,lf,cr,lf ; debugging messages + db cr,lf,'Rpack:' + db cr,lf ; Blank line in case of long packet + db cr,lf,'Spack:$' +ENDIF ; NOT (osi OR crt) [29] + +IF lasm +LINK CPXSWT.ASM +ENDIF ;lasm + diff --git a/cpxgni.asm b/cpxgni.asm new file mode 100644 index 0000000..615103f --- /dev/null +++ b/cpxgni.asm @@ -0,0 +1,440 @@ +; CPXGNI.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 file contains the system-dependent code and data for various +; Genie 3 CPM kermit +; +; This has the Family name of CPXGNI.ASM. +; +; revision history (last edit first) +; edit 3: 27 October, a987 by OBSchou. Massaged file to suit V4.09 structure. +; +; Edit 2: Aug 27 1987 GDS Put in code for BREAK and fillited out +; a lot of unnecessary IF's +; +;Edit 1: Nov. 28, 1986 Geof Smith Clinical Research centre Harrow UK. + +.printx * Assembling for Eaca Genie 3 * +; +drtime EQU 05H ;Default receive time out interval. +; +; the basics... +; +mnport EQU 0E8H +mnprts EQU 0EDH +output EQU 20H +input EQU 01H +lctrl EQU 0EBH +divlsb EQU 0E8H +divmsb EQU 0E9H +z80 EQU TRUE +brkval EQU 40H + +defesc EQU ']'-100O ;The default escape character. + + +;Select initial setting for VT-52 emulation flag. + +; default to VT52-EMULATION ON. +; +vtval EQU 1 +; +; + +; Family is the string used in VERSION to say which of several +; smaller overlay files are used. These are (will be) derived from +; the huge CP4SYS.ASM file, in which case we will never get here. +; Just a Dollar, but put a sting in for a family of machines. +; +family:db 'CPXGNI.ASM (3) 27-Oct-87$' ; Used for family versions.... + + + +; +; System-dependent initialization +; Called once at program start. +sysxin: +; + ;Set up 9600 bd, 8bit words, no parity 1stop bit + + mvi a,83H ;enable DLAB by setting bit 7 + out lctrl ;and outputting to control port + mvi a,14H ;get word = 20 decimal + out divlsb ;and put it out + mvi a,00H ;as two separate + out divmsb ;bytes + lda pstore ;get parity etc + out lctrl ;do it resetting DLAB at same time + + ret ; return from system-dependent routine + + +; +; system-dependent termination processing +; If we've changed anything, this is our last chance to put it back. +sysexit: + + ret + +; +; system-dependent processing for start of CONNECT command +; +syscon: + ret + +conmsg: ; Messages printed when entering transparent (CONNECT) mode: +; + + +; +; syscls - system-dependent close routine +; called when exiting transparent session. +; +syscls: + ret +; + + +; +; sysinh - help for system-dependent special functions. +; called in response to <escape>?, after listing all the +; system-independent escape sequences. +; +sysinh: + lxi d,inhlps ; we got options... + call prtstr ; print them. + ret + + +;additional, system-dependent help for transparent mode +; (two-character escape sequences) +inhlps: + + db cr,lf,'B Transmit a BREAK' + + db '$' ;[hh] table terminator + +; +; sysint - system dependent special functions +; called when transparent escape character has been typed; +; the second character of the sequence is in A (and in B). +; returns: +; non-skip: sequence has been processed +; skip: sequence was not recognized +sysint: ani 137O ; convert lower case to upper, for testing... + cpi 'B' ; send break? + jz sendbr ; yes, go do it. return nonskip when through. + + jmp rskp ; take skip return - command not recognized. + + +;------------------------------------------------------------------------------- +sendbr: +; +; Ensure that the transmitter has finished sending buffered chars +sndbr1: in mnprts ; get UART status + ani output ; everything sent? + jz sndbr1 ; no, wait a bit more +; +; Begin sending a break by setting bit in UART command register + mvi a,brkval ; SBreak, + out lctrl +; +; Wait for 250 milliseconds (using hundredths second delay routine) + mvi a,25 + call delay +; +; Resume normal operation by clearing the SendBreak command bit + lda pstore ;and restoring value from parity store + out mnprts +; + ret ;done + +; +; + +; +; sysflt - system-dependent filter +; called with character in E. +; if this character should not be printed, return with A = zero. +; preserves bc, de, hl. +; note: <xon>,<xoff>,<del>, and <nul> are always discarded. +sysflt: + mov a,e ; get character for testing + ret + +; mdmflt - modem filter [30] +; called with character to be sent to modem in E +; with parity set as appropriate. +; return with accumulator = 0 do do nothing, +; <> 0 to send char in E. +mdmflt: mov a,e ; get character to a + ret + + + +; prtflt - printer filter [30] +; called with character to be sent to printer in E +; returns with a = 0 to do nothing +; a <> 0 to print it. +; +; this routine for those printer that automatically insert +; a lf on cr, or cr for lf. Should this be shifted to +; the system indep. stuff, in say 4.06? +prtflt: + mov a,e ; [30] get character to test + ret + + +; + + +; +; system-dependent processing for BYE command. +; for apmmdm, heath, and lobo, hang up the phone. +sysbye: + ret +; + + +; This is the system-dependent command to change the baud rate. +; DE contains the two-byte value from the baud rate table; this +; value is also stored in 'speed'. +sysspd: + + ;Set up baud rate 8bit words, no parity 1stop bit + mvi a,83H ;enable DLAB by setting bit 7 + out lctrl ;and outputting to control port + mov a,d ;get LSB + out divlsb ;and put it out + mov a,e ;get MSB + out divmsb ;output it as well + lda pstore ;get parity etc + out lctrl ;do it resetting DLAB at same time + ret + +pstore: db 03H ;Default value for parity word length and stop bits + +spdtbl: db 11h ;17 entries + db 03h,'110$', 06H,0D1H + db 04h,'1200$', 00H,0A0H + db 05h,'134.5$', 05H,94H + db 03h,'150$', 05H,00H + db 04h,'1800$', 00H,6BH + db 05h,'19200$', 00H,0AH + db 04h,'2000$', 00H,60H + db 04h,'2400$', 00H,50H + db 03h,'300$', 02H,80H + db 04h,'3600$', 00H,35H + db 05h,'38400$', 00H,05H + db 04h,'4800$', 00H,28H + db 02h,'50$', 0FH,00H + db 03h,'600$', 01H,40H + db 04h,'7200$', 00H,1BH + db 02h,'75$', 0AH,00H + db 04h,'9600$', 00H,14H + +sphtbl: db cr,lf,' 50 75 110 134.5 150 300 600 1200' + db cr,lf,' 1800 2000 2400 3600 4800 7200 9600 19200 38400$' + +; This is the system-dependent SET PORT command. +; HL contains the argument from the command table. +sysprt: + + ret +; +prttbl equ 0 ; SET PORT not supported +prhtbl equ 0 + +; + +; +; selmdm - select modem port +; selcon - select console port +; selmdm is called before using inpmdm or outmdm; +; selcon is called before using inpcon or outcon. +; For iobyt systems, diddle the I/O byte to select console or comm port; +; For Decision I, switches Multi I/O board to console or modem serial +; port. [Toad Hall] +; For the rest, does nothing. +; preserves bc, de, hl. +selmdm: + ret + +selcon: + ret +; + + +; Get character from console, or return zero. +; result is returned in A. destroys bc, de, hl. +; +inpcon: + mvi c,dconio ;Direct console I/O BDOS call. + mvi e,0FFH ;Input. + call BDOS + + ret +; +; Output character in E to the console. +; destroys bc, de, hl +; +outcon: + + mvi c,dconio ;Console output bdos call. + call bdos ;Output the char to the console. + + ret +; +; +; outmdm - output a char from E to the modem. +; the parity bit has been set as necessary. +; returns nonskip; bc, de, hl preserved. +outmdm: + + in mnprts ;Get the output done flag. + ani output ;Is it set? + jz outmdm ;If not, loop until it is. + mov a,e + out mnport ;Output it. + ret + +;-------------------------------------------------------------------------- +; +; get character from modem; return zero if none available. +; for IOBYT systems, the modem port has already been selected. +; destroys bc, de, hl. +inpmdm: +;Note: modem port should already be selected for mdI. [Toad Hall] + in mnprts ;Get the port status into A. + ani input ;See if the input ready bit is on. + rz ;If not then return. + in mnport ;If so, get the char. + ret ; return with character in A + + +; +; flsmdm - flush comm line. +; Modem is selected. +; Currently, just gets characters until none are available. + +flsmdm: call inpmdm ; Try to get a character + ora a ; Got one? + jnz flsmdm ; If so, try for another + ret ; Receiver is drained. Return. +;----------------------------------------------------------------------------- +; +; lptstat - get the printer status. Return a=0 if ok, or 0ffh if not. +lptstat: + xra a ; assume it is ok.. this may not be necessary + ret + +; +; outlpt - output character in E to printer +; console is selected. +; preserves de. +outlpt: + push d ; save DE in either case + call prtflt ; go through printer filter [30] + ana a ; if A = 0 do nothing, + jz outlp1 ; [30] if a=0 do nothing + + mvi c,lstout + call bdos ;Char to printer +outlp1: pop d ; restore saved register pair + ret +;------------------------------------------------------------------------------ +; +; Screen manipulation routines +; csrpos - move to row B, column C +; +; csrpos for terminals that use a leadin sequence followed +; by (row + 31.) and (column + 31.) +; +csrpos: push b ; save coordinates + lxi d,curldn ; get cursor leadin sequence + call prtstr ; print it + pop h ; restore coordinates + mov a,h ; get row + adi (' '-1) ; space is row one + mov e,a + push h + call outcon ; output row + pop h + mov a,l ; get column + adi (' '-1) ; space is column one + mov e,a + jmp outcon ; output it and return + +; +; delchr - make delete look like a backspace. Unless delete is a printing +; character, we just need to print a backspace. (we'll output clrspc +; afterwards) +; For Kaypro and Vector General, delete puts a blotch on the screen. +; For Apple and Osborne 1, delete moves but doesn't print. +delchr: + + mvi e,bs ;get a backspace + jmp outcon + +; erase the character at the current cursor position +clrspc: mvi e,' ' + call outcon + mvi e,bs ;get a backspace + jmp outcon + +; erase the current line +clrlin: lxi d,eralin + jmp prtstr + +; erase the whole screen, and go home. preserves b (but not c) +clrtop: lxi d,erascr + jmp prtstr + +;[2] I see no real saving in having all screens in separate file and +;therefore have included screen definition here and commented out +;the link to VDU file +; +;Specific definitions for the Genie III screen +; +sysver: db 'Eaca Genie III$' +outlin: db 1aH,cr,lf,' $' +erascr: db 1AH,'$' +eralin: db cr,18H,'$' +curldn: db esc,'=$' +ttab: +ta: db 0BH,'$',0,0 ;Cursor up +tb: db 0AH,'$',0,0 ;Cursor down +tc: db 0CH,'$',0,0 ;Cursor right +td: db 08H,'$',0,0 ;Cursor left +te: db 1AH,'$',0,0 ;Clear display +tf: db esc,'R$',0 ;Reverse on +tg: db esc,'S$',0 ;Reverse off +th: db 1EH,'$',0,0 ;Cursor home +ti: db 0BH,'$',0,0 ;Reverse linefeed +tj: db 19H,'$',0,0 ;Clear to end of screen +tk: db 18H,'$',0,0 ;Clear to end of line + +ovlend equ $ ;End of overlay + +END + + + + + diff --git a/cpxhea.asm b/cpxhea.asm new file mode 100644 index 0000000..e78d9df --- /dev/null +++ b/cpxhea.asm @@ -0,0 +1,921 @@ +IF NOT lasm +.printx * CPXHEA.ASM * +ENDIF ;NOT lasm +; 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 file contains the system-dependent code and data for KERMIT +; specific to the Heath/Zenith H89 and Z100, the Telcon Zorba, +; and the OEM ScreenTyper. All but the latter use VT52 (or a +; replica thereof) for screen output; the ScreenTyper uses the +; same serial port chip as the H89 (an Intel 8250). +; +; revision history: +; +; Edit 4, 31-Aug-1989 by Mike Freeman, 301 N.E. 107th Street; Vancouver wa +; 98685 USA; Telephone (206)574-8221: Added Baud-rate Selection and +; Break-sending ability for the Telcon Zorba portable. +; +; edit 3, 22 July, 1987 by OBSchou to massage code to conform to new set +; of overlay files (stripping out common code to CPXCOM.ASM) +; +; edit 2 by OBSchou to add in old Kermit-80 V3.5 heath-8 code, formerly +; in CPM directory. Entry from CP/M file: +; +; This file contains an upgrade to the CPMBASE.M80 KERMIT +; to allow setting and display of baud rates, a bug fix in +; telnet, and an extension of the HELP to show GET (which works +; in this release, on the H8). Look for the new symbol "h8quad" +; (for the heath quad i/o board that it uses) in the conditionals. +; Note that the Heath H8 is NOT the same machine as the H89. The H89 +; code does not run 'as is' on the H8, and does NOT initialize the +; UART. Also there was a bug in the telnet section that is fixed +; here, though I expect that it has already been found and fixed +; by now - this is from the DECUS FALL 83 tape. The comments were +; stripped out of this file to make it small enough for my H8 to +; assemble, however, I have put the first section back in to make +; it easier for you to identify. Thanks for a nice product to use +; and work on. Major insertions are heavily commented, edit as needed. +; +; This modification done by John Mealing, InteCom Inc, 601 Intecom Dr., +; Allen, TX 75002 (214)797-9141, x-2493, 5 Nov 84. +; +; [OBSchou notes: This is the header, and the bugs in telnet are +; unknown. telnet routine has been substantially changed anyway with +; 4.08-4.09 revision. As for the major insertions: they probably went +; with the 4.xx re-write. I am unable to test this version: can +; anyone else do so??] +; +; +; edit 01 5th Mar 1987 by M J Carter, Nottingham Uni [majoc] +; Split off from CPXSYS.ASM, in order to install support for +; the OEM ScreenTyper. I can't test anything other than the +; ScreenTyper as I haven't the hardware. Any offers? +; Thanks are due to Paul Bartlett of John Elmer +; Electronics Ltd, who provided me with his modified sources +; for (a slightly antiquated) CP/M 4.05 Kermit on which this +; is based. +; +; Keep module name, edit number, and last revision date in memory. +;sysedt: db 'CPXSYS.ASM (35) 01-Dec-86 $' +; [majoc 870305] Now in CPXFRK. I'll have to consult on this ... +; +; +; +; Assembly time message to let me know I'm building the right version. +; LASM generates an 'S' error along with the message, which is messy, but +; better than trying to put everything inside a IF m80 OR mac80 conditional, +; because LASM doesn't like nested IF's, either. + +IF heath +.printx * Assembling KERMIT-80 for the Heath/Zenith 89 * +ENDIF + +IF h8quad +.printx * Assembling KERMIT-80 for the Heath-8 with Quad IO board * +ENDIF + +IF z100 +.printx * Assembling KERMIT-80 for the Heath/Zenith Z100 * +ENDIF + +IF telcon +.printx * Assembling KERMIT-80 for the Telcon Zorba * +ENDIF + +IF scntpr +.printx * Assembling KERMIT-80 for the OEM ScreenTyper * +ENDIF +; + +; + +IF heath +mnport EQU 330O ;Modem data port +ENDIF ; heath + +IF h8quad +mnport EQU 330O ;all port addresses can be set by user - +mnprts EQU mnport + 05 ; in octal cause heath wrote documents that +output EQU 20H ; way -- relative addressing on the UART +input EQU 01H ; registers, just to be nice +baudls EQU mnport ;ls baud divisor latch when DALB set +baudms EQU mnport + 1 ;ms baud divisor latch when DALB set +linctl EQU mnport + 3 ;line control register +modctl EQU mnport + 4 ;MODEM control register +dalbon EQU 80H ;enables speed selection +linset EQU 03H ;force hardware 8 bit, even parity +; +; The line control register (linctl) is bit mapped as follows: +; bit # function value +; 0,1 select word size 00 -> 5 bit, 10 -> 7 bit +; 01 -> 6 bit, 11 -> 8 bit +; 2 select stop bits 0 -> 1 stop bit, 1 -> 1 1/2 for 5 bit, +; 1 -> 2 for 6 bit words +; 3 parity enable 0 -> no parity, 1 -> parity as set by 4 +; 4 Even parity select 0 -> Odd parity, 1 -> Even parity +; 5 Stick parity 1 -> Parity of bit 4 is inverted +; 6 Break control 1 -> output forced to spacing (break) +; 7 DALB 1 -> access divisor latches to set baud rate +; +; The value in linset is loaded into linctl when KERMIT comes up. +; +ms300 EQU 001O ;set for 300 baud as default +ls300 EQU 200O +rtsoff EQU 20O ;direct control of modem lines +rtson EQU 11O +z80 EQU FALSE ;[2] or is it? +ENDIF ;h8quad + +IF scntpr +mnport EQU 8 ;Modem data port +ENDIF ; scntpr +IF heath OR scntpr + +; Definitions for the 8250 ACE + +acerbr EQU 0 ; ACE Receiver Buffer Register offset (R/O) (DLAB = 0) +acethr EQU 0 ; ACE Transmitter Holding Register offset (W/O) +acedll EQU 0 ; ACE Divisor Latch (Low) (DLAB = 1) +acedlh EQU 1 ; ACE Divisor Latch (High) (DLAB = 1) +aceier EQU 1 ; ACE Interrupt Enable Register (DLAB = 0) +aceiir EQU 2 ; ACE Interrupt Identification Register +acelcr EQU 3 ; ACE Line Control Register +acemcr EQU 4 ; ACE Modem Control Register +acelsr EQU 5 ; ACE Line Status Register offset +acemsr EQU 6 ; ACE Modem Status Register + +ace8bw EQU 00000011b ; 8 bit words +acesb EQU 01000000b ; set break +acedla EQU 10000000b ; divisor latch access +acedtr EQU 00000001b ; data terminal ready +aceloo EQU 00010000b ; loopback mode +acedr EQU 00000001b ; data ready +acethe EQU 00100000b ; transmitter holding register empty + +;mnport EQU 330O ;Modem data port +; [35a: majoc 870305] Shifted up above joint IF, to save nesting. +mnprts EQU mnport+acelsr ;Modem status port +output EQU acethe ;Transmitter empty +input EQU acedr ;Input data available +z80 EQU TRUE ;H89 uses the Z80 +ENDIF;heath OR scntpr + +IF z100 +mnport EQU 0ECH ;Modem data port +mnprts EQU 0EDH ;Modem status port +output EQU 01H ;Transmitter empty +input EQU 02H ;Input data available +z80 EQU FALSE ;[hh] this one's an 8085. +ENDIF;z100 + + +IF telcon +MNPORT EQU 20H ;Modem data port +MNPRTS EQU 21H ;Modem status port +OUTPUT EQU 01H ;Transmitter empty +INPUT EQU 02H ;Input data available +BRPORT EQU 00H ;8254-2 Baud Rate Generator Timer for Port A +COMMND EQU 03H ;8254-2 Timer Control Port +z80 EQU TRUE ;[MF]A real Z80 +ENDIF;telcon +; + +IF telcon +defesc EQU ']'-100O ;The default escape character. +ENDIF;telcon + +IF heath OR h8quad OR z100 OR scntpr +defesc EQU '\'-100O ;The default is Control \ -- it's easier B.E. +ENDIF;heath OR h8quad OR z100 OR scntpr + +; Select initial setting for VT-52 emulation flag. +IF (heath OR h8quad OR z100 OR telcon) +vtval EQU 0 ; we don't need VT52 emulation +ENDIF;heath OR h8quad OR z100 OR telcon OR vt52 [OBS question - ok for h8quad?] +; If none of the above, default to VT52-EMULATION ON. +IF scntpr +vtval EQU 1 ; we do VT52 emulation +ENDIF;scntpr + + +; +; Family is the string used in VERSION to say which of several +; smaller overlay files are used. These are (will be) derived from +; the juge CPXSYS.ASM file, in which case we will never get here. +; Just a Dollar, but put a sting in for a family of machines. +; +family: db 'CPXHEA.ASM (4) 31-Aug-1989$' ; Used for family versions.... + +; +sysxin: ; continuation of initialisation code +IF heath OR scntpr +; +; System dependent startup for H89 and OEM ScreenTyper +; + + call mdmofl ; keep the line safe from garbage + +; First, tell Kermit the modem port's current speed + in mnport+acelcr + ori acedla + out mnport+acelcr ; access the ACE's divisor latch + in mnport+acedll ; get the low byte + sta speed + in mnport+acedlh ; and the high byte + sta speed+1 + +; Now set up the port for Kermit + mvi a,ace8bw ; 8 data bits, 1 stop bit, no parity + out mnport+acelcr + in mnport+acemcr + ori acedtr ; raise DTR (just in case) + out mnport+acemcr + call mdmonl ; and put the ACE back on line + ret + +; Take the ACE off line before modifying its state +mdmofl: + in mnport+aceier ; save the ACE's interrupt state + sta iersav + xra a + out mnport+aceier ; and disable ACE interrupts + in mnport+acemcr ; now put the ACE in loopback mode + ori aceloo + out mnport+acemcr + ret + +; Put the ACE back on line +mdmonl: + in mnport ; flush left-over garbage in the receive buffer + mvi a,7 ; wait about 2 300-baud character times + call delay + in mnport ; and flush more garbage + in mnport+acemcr ; take the ACE out of loopback mode + ani 0FFH-aceloo + out mnport+acemcr + lda iersav + out mnport+aceier ; and restore the ACE's interrupt state + ret + +iersav: ds 1 +ENDIF;heath OR scntpr + +IF h8quad +h8init: lxi d,180h ; [2] set up for 300 baud +h8baud: mvi a,rtsoff ;disable modem for now + out modctl + mvi a,dalbon ;set for UART speed programming + out linctl + mov a,d ; [2] get ms bits for rate + out baudms + mov a,e ; [2] get ls bits for rate + out baudls + mvi a,linset ;force 8 bit, no parity and clear dalb + out linctl + in mnport ;clear the recieve side + mvi a,rtson ;get ready + out modctl ;modem is on and ready to go +ENDIF ;h8quad + + ret ; return from system-dependent routine + +; +; +; system-dependent termination processing +; If we've changed anything, this is our last chance to put it back. +sysexit: + ret + +; +; system-dependent processing for start of CONNECT command +; +syscon: + ret + +conmsg: ; Messages printed when entering transparent (CONNECT) mode: +; +; +; syscls - system-dependent close routine +; called when exiting transparent session. +; +syscls: + ret +; +; +; sysinh - help for system-dependent special functions. +; called in response to <escape>?, after listing all the +; system-independent escape sequences. +; +sysinh: +IF heath OR scntpr OR telcon;[4] + lxi d,inhlps ; we got options... + call prtstr ; print them. +ENDIF;heath OR scntpr OR telcon + + ret + + +;additional, system-dependent help for transparent mode +; (two-character escape sequences) +inhlps: +IF heath OR scntpr OR telcon;[4] + db cr,lf,'B Transmit a BREAK' +ENDIF;heath OR scntpr OR telcon + +IF heath OR scntpr + db cr,lf,'D Drop the line' +ENDIF;heath OR scntpr + + db '$' ;[hh] table terminator + +; +; sysint - system dependent special functions +; called when transparent escape character has been typed; +; the second character of the sequence is in A (and in B). +; returns: +; non-skip: sequence has been processed +; skip: sequence was not recognized +sysint: ani 137O ; convert lower case to upper, for testing... + +IF heath OR scntpr + cpi 'D' ; drop line? + jnz intc00 ; no: try next function character + +mdmdrp: in mnport+acemcr ; (we also get here from sysbye) + ani 0FFH-acedtr + out mnport+acemcr ; yes: drop DTR + mvi a,50 ; for half a second + call delay + in mnport+acemcr + ori acedtr + out mnport+acemcr ; and then restore it + ret +intc00: +ENDIF;heath OR scntpr + +IF heath OR scntpr OR telcon;[4] + cpi 'B' ; send break? + jz sendbr ; yes, go do it. return nonskip when through. +ENDIF;heath OR scntpr OR telcon + jmp rskp ; take skip return - command not recognized. + + +; +IF heath OR scntpr +; +; Send BREAK on H89 or ScreenTyper +; +sendbr: in mnport+acelcr + ori acesb + out mnport+acelcr ; set ACE break condition + mvi a,30 + call delay ; wait 300 milliseconds + in mnport+acelcr + ani 0FFH-acesb + out mnport+acelcr ; and clear ACE break condition + ret + +ENDIF;heath OR scntpr +; +IF telcon ;[4] +; +; Send break on Telcon Zorba +; +sendbr: mvi a,3fH ;DTR normal, break on + out mnprts ;Set break on + mvi a,30 ;Wait 300 ms + call delay ;... + mvi a,37h ;DTR normal, tx, rx enabled + out mnprts ;Restore normal condition + ret ;and return +; +ENDIF ;telcon + +; +; +; sysflt - system-dependent filter +; called with character in E. +; if this character should not be printed, return with A = zero. +; preserves bc, de, hl. +; note: <xon>,<xoff>,<del>, and <nul> are always discarded. +sysflt: + mov a,e ; get character for testing + ret + +; mdmflt - modem filter [30] +; called with character to be sent to printer in E +; with parity set as appropriate. +; return with accumulator = 0 do do nothing, +; <> 0 to send char in E. +mdmflt: + mov a,e ;[30] get character to test + ret + + + +; prtflt - printer filter [30] +; called with character to be sent to printer in E +; returns with a = 0 to do nothing +; a <> 0 to print it. +; +; this routine for those printer that automatically insert +; a lf on cr, or cr for lf. Should this be shifted to +; the system indep. stuff, in say 4.06? +prtflt: + mov a,e ; [30] get character to test + ret + + +; +; +; system-dependent processing for BYE command. +; for apmmdm, heath, scntpr, and lobo, hang up the phone. +sysbye: +IF heath OR scntpr + call mdmdrp ; Sleazy but effective +ENDIF;heath OR scntpr + + ret +; +; This is the system-dependent command to change the baud rate. +; DE contains the two-byte value from the baud rate table; this +; value is also stored in 'speed'. +sysspd: + +IF heath OR scntpr +; +; Set speed for H89 +; + call mdmofl ; keep the line safe from garbage + in mnport+acelcr + ori acedla + out mnport+acelcr ; access the ACE's divisor latch + mov a,e ; low byte of speed is in E + out mnport+acedll ; set the low byte + mov a,d ; high byte of speed is in D + out mnport+acedlh ; set the high byte + in mnport+acelcr + ani 0FFH-acedla + out mnport+acelcr ; de-access the ACE's divisor latch + call mdmonl ; and put the ACE back on line +ENDIF;heath OR scntpr + +IF h8quad ;[2][obs] A bit of guesswork this. Enter with date in de + call h8baud ; [2] routine is in initialisation bit +ENDIF ; h8quad[2] +; +IF telcon ;[4] + MVI A,36H ;Set square wave + OUT COMMND ;... + MOV A,E ;Get LSB of Baud rate + OUT BRPORT ;Send to generator + MOV A,D ;Get msb of baud rate + OUT BRPORT ;Send to Baud rate generator +ENDIF ;telcon +; + ret + +; +; +; Speed tables +; (Note that speed tables MUST be in alphabetical order for later +; lookup procedures, and must begin with a value showing the total +; number of entries. The speed help tables are just for us poor +; humans. +; +; db string length,string,divisor (2 identical bytes or 1 word) +; [Toad Hall] + +IF heath +; +; Speed selection table for H89 (OK, so I got a little carried away...) +; + +spdtbl: db 19 ; 19 entries + db 3,'110$' + dw 1047 + db 4,'1200$' + dw 96 + db 5,'134.5$' + dw 857 + db 4,'1800$' + dw 64 + db 5,'19200$' + dw 6 + db 3,'200$' + dw 576 + db 4,'2400$' + dw 48 + db 3,'300$' + dw 384 + db 4,'3600$' + dw 32 + db 5,'38400$' + dw 3 + db 3,'450$' + dw 256 + db 4,'4800$' + dw 24 + db 2,'50$' + dw 2304 + db 5,'56000$' + dw 2 + db 3,'600$' + dw 192 + db 4,'7200$' + dw 16 + db 2,'75$' + dw 1536 + db 3,'900$' + dw 128 + db 4,'9600$' + dw 12 + +sphtbl: db cr,lf + db ' 50 75 110 134.5 200 300 450 600 900 1200' + db cr,lf,' 1800 2400 3600 4800 7200 9600 19200 38400 56000$' +ENDIF;heath + +IF h8quad +spdtbl: db 6 ;[2] 6 entries + db 3,'300$', 1,80h ; divisor for 300 baud + db 3,'600$', 0,0c0h + db 4,'1200$', 0,60h + db 4,'2400$', 0,30h + db 4,'4800$', 0,18h + db 4,'9600$', 0,0ch +; +; The strings to display the speed selected from the table above +; +sphtbl: db cr,lf,' 300 600 1200 2400 4800 9600$' +ENDIF ;h8quad + +IF scntpr +; [35a: majoc 870305] +; +; Speed selection table for ScreenTyper +; + +spdtbl: db 14 ; 14 entries + db 3,'110$' + dw 470H + db 4,'1200$' + dw 68H + db 5,'134.5$' + dw 3a1H + db 4,'1800$' + dw 45H + db 5,'19200$' ; This was in PB's table, but not in the + dw 7H ; accompanying text string. Oversight? +; db 3,'200$' +; dw 576 + db 4,'2400$' + dw 34H + db 3,'300$' + dw 1a1H + db 4,'3600$' + dw 23H +; db 5,'38400$' +; dw 3 +; db 3,'450$' +; dw 256 + db 4,'4800$' + dw 1aH + db 2,'50$' + dw 964H +; db 5,'56000$' +; dw 2 + db 3,'600$' + dw 0d0H + db 4,'7200$' + dw 11H + db 2,'75$' + dw 683H +; db 3,'900$' +; dw 128 + db 4,'9600$' + dw 0dH + +sphtbl: db cr,lf,' 50 75 110 134.5 300 600 1200' + db cr,lf,' 1800 2400 3600 4800 7200 9600 (19200?)$' +ENDIF;scntpr +; +IF telcon ;[4] +; +; Speed selection tables for the Telcon Zorba (I overdid it, also) +; +; **NOTE** that when Kermit is first executed, the baud rate is +; unknown to Kermit, having been set by CP/M upon cold-boot, SETUP.COM, +; another communications program, etc. The easiest way to insure that +; the baud rate is known upon Kermit start-up is to set it +; in KERMIT.INI. +; +spdtbl: db 20 ;[4]Number of entries (some of these + ;speeds are *weird* but the Zorba + ;supports them so I'll put them in + db 3,'110$' + dw 4545 + db 4,'1200$' + dw 417 + db 5,'134.5$' + dw 3717 + db 3,'150$' + dw 3333 + db 4,'1760$' + dw 284 + db 4,'1800$' + dw 278 + db 5,'19200$' + dw 26 + db 3,'200$' + dw 2500 + db 4,'2000$' + dw 250 + db 4,'2400$' + dw 208 + db 3,'300$' + dw 1667 + db 4,'3520$' + dw 142 + db 4,'3600$' + dw 139 + db 4,'4800$' + dw 104 + db 2,'50$' + dw 10000 + db 3,'600$' + dw 833 + db 4,'62.5$' + dw 8000 + db 4,'7200$' + dw 69 + db 2,'75$' + dw 6667 + db 4,'9600$' + dw 52 +; +; Help table +; +sphtbl: db cr,lf + db ' 50 62.5 75 110 134.5 150 200 300 600 1200' + db cr,lf,' 1760 1800 2000 2400 3520 3600 4800 7200' + db cr,lf,' 9600 19200$' +; +ENDIF ;Telcon + +; The following conditionals were once a huge if not statement. There +; wasn't enough room to add the lobo to the list, so it had to be broken +; into 2, which you can't do with an if not. I redid it as two ifs and +; applied them to those that wouldn't set baud. [Hal Hostetler] +IF z100 +spdtbl equ 0 ; SET BAUD not supported. +sphtbl equ 0 +ENDIF;z100 +; +; +; This is the system-dependent SET PORT command. +; HL contains the argument from the command table. +sysprt: + ret +; +prttbl equ 0 ; SET PORT is not supported +prhtbl equ 0 +; +; +; +; selmdm - select modem port +; selcon - select console port +; selmdm is called before using inpmdm or outmdm; +; selcon is called before using inpcon or outcon. +; For iobyt systems, diddle the I/O byte to select console or comm port; +; For Decision I, switches Multi I/O board to console or modem serial +; port. [Toad Hall] +; For the rest, does nothing. +; preserves bc, de, hl. +selmdm: + ret + +selcon: + ret + +; Get character from console, or return zero. +; result is returned in A. destroys bc, de, hl. +; +inpcon: +IF NOT iobyt + mvi c,dconio ;Direct console I/O BDOS call. + mvi e,0FFH ;Input. + call BDOS +ENDIF;NOT iobyt + + ret +; +; +; Output character in E to the console. +; destroys bc, de, hl +; +outcon: +IF NOT iobyt + mvi c,dconio ;Console output bdos call. + call bdos ;Output the char to the console. +ENDIF;NOT iobyt + ret +; +; +; outmdm - output a char from E to the modem. +; the parity bit has been set as necessary. +; returns nonskip; bc, de, hl preserved. +outmdm: +IF inout + in mnprts ;Get the output done flag. + ani output ;Is it set? + jz outmdm ;If not, loop until it is. + mov a,e + out mnport ;Output it. + ret +ENDIF;inout + +IF iobyt +;**** Note that we enter from outpkt with the I/O byte already set up for +; output to go to the comm port + push h + push b + lda prtfun ;Get the output function + mov c,a ;Into C + call bdos ;And output the character + pop b + pop h + ret +ENDIF;iobyt + +; +; +; get character from modem; return zero if none available. +; for IOBYT systems, the modem port has already been selected. +; destroys bc, de, hl. +inpmdm: +IF NOT iobyt ;[2] this routine not in submitted file, so I guess + ; guess this is what it is supposed to do. + in mnprts ; input status port + ani input ; anything t read in? + rz ; nope + in mnport ; else read in the data + ret ; return with character in A +ENDIF ; NOT iobyte [2] + +; +; flsmdm - flush comm line. +; Modem is selected. +; Currently, just gets characters until none are available. + +flsmdm: call inpmdm ; Try to get a character + ora a ; Got one? + jnz flsmdm ; If so, try for another + ret ; Receiver is drained. Return. +; +; +; lptstat - get the printer status. Return a=0ffh if ok, or 0 if not. +lptstat: + call bprtst ; assume it is ok.. this may not be necessary + ret + +; +; outlpt - output character in E to printer +; console is selected. +; preserves de. +outlpt: + push d ; save DE in either case + call prtflt ; go through printer filter [30] + ana a ; if A = 0 do nothing, + jz outlp1 ; [30] if a=0 do nothing + +IF NOT iobyt + mvi c,lstout + call bdos ;Char to printer +ENDIF;NOT iobyt +outlp1: pop d ; restore saved register pair + ret +; +; +; Screen manipulation routines +; csrpos - move to row B, column C +; +; csrpos for terminals that use a leadin sequence followed +; by (row + 31.) and (column + 31.) +; +csrpos: push b ; save coordinates + lxi d,curldn ; get cursor leadin sequence + call prtstr ; print it + pop h ; restore coordinates + mov a,h ; get row + adi (' '-1) ; space is row one + mov e,a + push h + call outcon ; output row + pop h + mov a,l ; get column + adi (' '-1) ; space is column one + mov e,a + jmp outcon ; output it and return + +; +; delchr - make delete look like a backspace. Unless delete is a printing +; character, we just need to print a backspace. (we'll output clrspc +; afterwards) +; For Kaypro and Vector General, delete puts a blotch on the screen. +; For Apple and Osborne 1, delete moves but doesn't print. +delchr: + mvi e,bs ;get a backspace + jmp outcon + +; erase the character at the current cursor position +clrspc: mvi e,' ' + call outcon + mvi e,bs ;get a backspace + jmp outcon + +; erase the current line +clrlin: lxi d,eralin + jmp prtstr + +; erase the whole screen, and go home. preserves b (but not c) +clrtop: lxi d,erascr + jmp prtstr + +IF telcon +sysver: db 'Telcon Zorba$' +ENDIF;telcon + +IF heath +sysver: db 'Heath/Zenith 89$' +ENDIF;heath + +IF h8quad +sysver: db 'Heath H8 with quad I/O card$' +ENDIF + +IF z100 +sysver: db 'Heath/Zenith Z-100 CP/M$' +ENDIF;z100 + +IF scntpr +; [35a: majoc 870305] +sysver: db 'OEM ScreenTyper: 4MHz Z80 running OS/M$' +ENDIF;scntpr + +IF heath OR h8quad OR z100 OR telcon +outlin: db esc,'H',esc,'J',cr,lf,tab,tab,'$' +erascr: db esc,'H',esc,'J$' ;Clear screen and go home. +eralin: db cr,esc,'K$' ;Clear line. +curldn: db esc,'Y$' ;cursor leadin +ttab: ;Table start location. +ta: db esc,'A$',0 ;Cursor up. +tb: db esc,'B$',0 ;Cursor down. +tc: db esc,'C$',0 ;Cursor right. +td: db esc,'D$',0 ;Cursor left +te: db esc,'E$',0 ;Clear display +tf: db esc,'F$',0 ;Enter Graphics Mode +tg: db esc,'G$',0 ;Exit Graphics mode +th: db esc,'H$',0 ;Cursor home. +ti: db esc,'I$',0 ;Reverse linefeed. +tj: db esc,'J$',0 ;Clear to end of screen. +tk: db esc,'K$',0 ;Clear to end of line. +ENDIF;heath OR h8quad OR z100 OR telcon +; + +IF scntpr ; [35a: majoc 870305] +outlin: db 1aH, cr, lf, '$' +erascr: db 1aH, '$' ;Clear screen and go home. +eralin: db cr,esc,'*$' ;Clear line. +curldn: db esc,'=$' ;cursor leadin +ttab: ;Table start location. +ta: db 1eH,'$',0,0 ;Cursor up. +tb: db 1fH,'$',0,0 ;Cursor down. +tc: db 1cH,'$',0,0 ;Cursor right. +td: db 1dH,'$',0,0 ;Cursor left +te: db 1aH,'$',0,0 ;Clear display +tf: db 0,0,0,0 ;(Can't)Enter Graphics Mode +tg: db 0,0,0,0 ;(Can't)Exit Graphics mode +th: db 15H,'$',0,0 ;Cursor home. +ti: db 1eH,'$',0,0 ;Reverse linefeed. +tj: db esc,'%$',0 ;Clear to end of screen. +tk: db esc,'*$',0 ;Clear to end of line. +ENDIF;scntpr + +ovlend EQU $ ; End of overlay + END ; Phew ... [majoc 870305] diff --git a/cpxlnk.asm b/cpxlnk.asm new file mode 100644 index 0000000..30dd080 --- /dev/null +++ b/cpxlnk.asm @@ -0,0 +1,206 @@ +; CPXLNK.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 +; 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 file describes the areas used to communicate between KERMIT +; and the customizing overlay. It is included by the overlay. +; This file should be changed only to reflect changes in the +; system-independent portion of Kermit (enhancements, I hope). +; +; revision history: +;edit 8, 14-Sep-1990 by MF. Added variable "incflg" to hold incomplete- +; file status for SET INCOMPLETE-FILES command. +; edit 7: 8 April, 1987 by OBSchou. Added a new entry EXTERN to leap off to +; code written by the user to emulate any terminal they want. All +; characters are sent here in stead of conout during connect state. +; In due course, Ill trap all prtstrs and dconio as well. +; +; edit 6: May 30, 1986 by OBSchou. Added two more entries to the link area: +; first to point to a "family" string giving the family name of the +; system. If the older CP4SYS.ASM still has the code, then the +; string is null. Secondly, a JMP to give printer status (should be +; a BIOS function). If 0 then printer is ready, if 0ffh then printer +; busy. This makes version 4.07 incompatable with 4.05 +; +; edit 5: February 6, 1985 +; Added a storage variable, "PORT", for the port-in-use value +; required for the port status routine (same purpose as SPEED). +; Also moved the printer copy flag (PRNFLG:) into the commun- +; ications storage area so machine dependant overlay can access it. +; [Hal Hostetler] +; Also, replace assembly-time conditional "ffussy" with run-time +; switch (CJC). +; +; edit 4: August 21, 1984 (CJC) +; Define a use for the third word of the linkage section: it points +; to the version string for CP4SYS.ASM. Add flsmdm, to flush comm line +; on startup. Add bufadr and bufsec for multiple-sector buffer support. +; Shift the entry section up two bytes so we can exit cleanly from DDT. +; +; edit 3: August 3, 1984 (CJC) +; put "mover" in CP4SYS, so we can do a Z80 block move if so inclined. +; +; edit 2: July 10, 1984 (CJC) +; integrate Toad Hall changes for LASM compatibility: CP4LNK is linked +; by CP4DEF, and links CP4SYS. +; +; edit 1: May, 1984 (CJC) +; extracted from CPMBASE.M80 version 3.9; modifications are described +; in the accompanying .UPD file. +; + +; Define the entry section. These addresses contain jumps to +; useful routines in KERMIT. To show we know what we're doing, +; we store the length of this section (entsiz) in our linkage +; section. I didn't use ORG and DS because I don't want zeroes +; generated for all the space between here and the actual start +; of cp4sys. +entry equ 105H ; start of entry section +kermit equ entry+0 ; reentry address +nout equ entry+3 ; output HL in decimal +entsiz equ 2*3 ; 2 entries, so far. +; +; End of entry section. +; +; Linkage section. This block (through the definition of lnksiz) +; is used by Kermit to reach the routines and data in the overlay. +; The section length is stored at the beginning of the overlay +; area so Kermit can verify that the overlay section is (a) present, +; (b) in the right place, and (c) the same size as (and therefore +; presumably the same as) the linkage section Kermit is expecting. +; + ASEG + ORG OVLADR +; +lnkflg: dw lnksiz ; linkage information for consistency check. + dw entsiz ; length of entry table, for same. + dw swtver ; address of switcher. CPXSYS now a family + dw family ;*NEW* for V4.08. Address of the family string +; +; hooks for system-dependent routines: +; +; Input/output routines. +; + jmp selmdm ; select modem for I/O + jmp outmdm ; output character in E to modem + jmp inpmdm ; read character from modem. return character or 0 in A. + jmp flsmdm ; flush pending input from modem + jmp selcon ; select console for I/O + jmp outcon ; output character in E to console + jmp inpcon ; read char from console. return character or 0 in A + jmp outlpt ; output character in E to printer + jmp lptstat ;*NEW* get the status for the printer. + ; 0=>ok, 0ffh=> not ok + jmp 0 ;*NEW for 4.09* Terminal Emulation code (optional) + ; If terminal is set to EXTERNAL and this address + ; has been filled, then user uses their own code. +xbdos: jmp 0 ;*NEW* Address of the BDOS trap in the independent + ; code. Use this enty for BDOS calls if you want + ; the printer handler to work properly. + +; screen formatting routines + jmp clrlin ; erase current line + jmp clrspc ; erase current position (after backspace) + jmp delchr ; make delete look like backspace + jmp clrtop ; erase screen and go home +; +; these routines are called to display a field on the screen. + jmp scrend ; move to prompt field + jmp screrr ; move to error message field + jmp scrfln ; move to filename field + jmp scrnp ; move to packet count field + jmp scrnrt ; move to retry count field + jmp scrst ; move to status field + jmp rppos ; move to receive packet field (debug) + jmp sppos ; move to send packet field (debug) +; + jmp sysinit ; program initialization + jmp sysexit ; program termination + jmp syscon ; remote session initialization + jmp syscls ; return to local command level + jmp sysinh ; help text for interrupt (escape) extensions + jmp sysint ; interrupt (escape) extensions, including break + jmp sysflt ; filter for incoming characters. + ; called with character in E. + jmp sysbye ; terminate remote session + jmp sysspd ; baud rate change routine. + ; called with value from table in DE + jmp sysprt ; port change routine. + ; called with value from table in HL + jmp sysscr ; screen setup for file transfer + ; called with Kermit's version string in DE + jmp csrpos ; move cursor to row B, column C + jmp sysspc ; calculate free space for current drive + jmp mover ; do block move + jmp prtstr ; *** NEW *** Link from system indep equivalent +; +; Local parameter values +; +pttab: dw ttab ; points to local equivalents to VT52 escape sequences +spdtab: dw spdtbl ; address of baud rate command table, or zero +spdhlp: dw sphtbl ; address of baud rate help table, or zero +prttab: dw prttbl ; address of port command table, or zero +prthlp: dw prhtbl ; address of port help table, or zero +timout: dw fuzval ; Fuzzy timeout. +vtflg: db vtval ; VT52 emulation flag +escchr: db defesc ; Storage for the escape character. +speed: dw 0FFFFH ; storage for the baud rate (initially unknown) +port: dw 0FFFFH ; storage for port value (initially unknown) [hh] +prnflg: db 0 ; printer copy flag [hh] +dbgflg: db 0 ; debugging flag +ecoflg: db 0 ; Local echo flag (default off). +flwflg: db 1 ; File warning flag (default on). +ibmflg: db 0 ; IBM flag (default off). +cpmflg: db 0 ;[bt] file-mode flag (default is DEFAULT) +incflg: db 0 ;[MF]incomplete-file flag (default is DISCARD) +parity: db defpar ; Parity. +spsiz: db dspsiz ; Send packet size. +rpsiz: db drpsiz ; Receive packet size. +stime: db dstime ; Send time out. +rtime: db drtime ; Receive time out. +spad: db dspad ; Send padding. +rpad: db drpad ; Receive padding. +spadch: db dspadc ; Send padding char. +rpadch: db drpadc ; Receive padding char. +seol: db dseol ; Send EOL char. +reol: db dreol ; Receive EOL char. +squote: db dsquot ; Send quote char. +rquote: db drquot ; Receive quote char. +chktyp: db dschkt ; Checksum type desired +tacflg: ; TACtrap status: +IF tac + db tacval ; when non-zero, is current TAC intercept character; +ENDIF;tac +IF NOT tac + db 0 ; when zero, TACtrap is off. +ENDIF;tac +tacchr: db tacval ; Desired TAC intercept character (even when off) +bufadr: dw buff ; Address of possibly multi-sector buffer for I/O +bufsec: db 1 ; Number of sectors big buffer can hold (0 means 256) +ffussy: db 1 ; if nonzero, don't permit <>.,;?*[] in CP/M filespec. +; space used by directory command; here because space calculation is +; (operating) system-dependent +bmax: ds 2 ; highest block number on drive +bmask: ds 1 ; (records/block)-1 +bshiftf: ds 1 ; number of shifts to multiply by rec/block +nnams: ds 1 ; counter for filenames per line + +lnksiz equ $-lnkflg ; length of linkage section, for consistency check. + +IF lasm ; If we're assembling with LASM, + LINK CPXCOM ; get the next section. +ENDIF;lasm diff --git a/cpxmrl.asm b/cpxmrl.asm new file mode 100644 index 0000000..31d6849 --- /dev/null +++ b/cpxmrl.asm @@ -0,0 +1,454 @@ +IF NOT lasm +.printx * CPXMRL.ASM * +ENDIF ; NOT lasm +; 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. +; +; CPXMRL.ASM created 16 July, 1987 from submitted code by William Rose. +; +; Kermit system dependent file for Rair Black Box (British Telecom +; Merlin, ICL PC etc) originally submitted by William Rose, and +; modified by OBSchou to work with the Kermit-80 V4.08 and later +; files. Wills original overlay file a stripped down CPXSYS.ASM +; file. +; +; KERSYS.ASM - version 0.6A dated 17 Jun 87. +; +; Cutdown CP4SYS.ASM for Telecom Merlin M2215 only. (ICL PC, Rair Black Box) +; +; This uses TTY1: only, and cannot alter it's parameters. It resets the +; interrupt flag to prevent use of the buffer, and is generally a kludge. +; However it runs at 4800 baud, and tidying the code might get 9600. +; +; Revision History (Last entry first) +; +; edit 2, 22 July by OBSchou to massage frile to fit with CPXCOM.ASM +; +; edit 1, 17 July by OBSchou for Will Rose, to make file suitable for V4.08 +; overlay etc. +; +; Keep module name, edit number, and last revision date in memory. +; +family: db 'CPXMRL.ASM (2) 22-Jun-87 $' ; Telecom Merlin added + +; +; Assembly time message to let me know I'm building the right version. +; + +IF m2215 + .printx * Assembling Kermit-80 for Merlin M2215 * +ENDIF + +IF m2215 ;equates removed because interrupts stopped port access +;iobase equ 14h ; base address of TTY1 +;mnport equ iobase ; rx and tx data ports +;mnprts equ iobase+1 ; status port +;mnmode equ iobase+2 ; mode port +;mncmd equ iobase+3 ; PCI command port +;txrdy equ 1 ; tx ready bit set if free +;output equ txrdy +;rxrdy equ 2 ; RX ready bit +;input equ rxrdy +z80 equ false ; For Merlin M2215 +ENDIF + + +sysxin: ; Continue system initialisation fro sysinit + +IF FALSE ; unable to penetrate the 8085 interrupts + in mncmd ; clear command register counter + mvi a,4eh ; 0100$1110 - 1 stop bit, 8 data bits, + ; / by 16 counter + out mnmode + mvi a,30h+7 ; 0011$0000 - select internal rate generator + ; use 1200 baud by default + out mnmode + mvi a,27h ; 0010$0111 - enable tx and rx, RTS and DTR low + out mncmd + mvi h, 12 + mvi l, 12 + shld speed ; to show its been set up + +ENDIF + + ret + +porbuf: ds 3 ; original port settings + +; +; system-dependent KERMIT termination processing +; If we've changed anything, this is our last chance to put it back. +; +sysexit: + ret + +; +; system-dependent processing for start of CONNECT command +; +syscon: + ret + +conmsg: ; Messages printed when entering transparent (CONNECT) mode: + + db '$' + +; +; syscls - system-dependent close routine +; called when exiting transparent session. +; +syscls: + ret + +; +; sysinh - help for system-dependent special functions. +; called in response to <escape>?, after listing all the +; system-independent escape sequences. +; +sysinh: + ; still can't pentrate interrupts + ret + +; Additional, system-dependent help for transparent mode +; (two-character escape sequences) +; +inhlps: + +IF m2215 + db cr, lf, 'B Transmit a BREAK' +ENDIF + + db '$' ; string terminator + +; +; sysint - system dependent special functions +; called when transparent escape character has been typed; +; the second character of the sequence is in A (and in B). +; returns: +; non-skip: sequence has been processed +; skip: seqence was not recognized +; +sysint: ani 137O ; convert lower case to upper, for testing... + +IF FALSE ; as always + cpi 'B' ; send break ? + jz sendbr +ENDIF + jmp rskp ; take skip return - command not recognised + +; Actual commands + +IF FALSE ;as always +sendbr: + in mnprts + ani 04h ; make sure shift reg is clear + jz sendbr + + mvi a,2fh ; set for a break + out mncmd + mvi a,100 ; wait a bit + call delay + mvi a,27h ; restore mode + out mncmd + + ret +ENDIF + + ret + +; +; sysflt - system-dependent filter +; called with character in E. +; if this character should not be printed, return with A = zero. +; preserves bc, de, hl. +; note: <xon>,<xoff>,<del>, and <nul> are always discarded. +; +sysflt: + mov a,e ; get character for testing + ret + +; +; mdmflt - modem filter +; called with character to be sent to printer in E +; with parity set as appropriate. +; return with accumulator = 0 do do nothing, +; <> 0 to send char in E. +mdmflt: + mov a,e ; get character to test + ret + +; +; prtflt - printer filter +; called with character to be sent to printer in E +; returns with a = 0 to do nothing +; a <> 0 to print it. +; +; this routine for those printer that automatically insert +; a lf on cr, or cr for lf. Should this be shifted to +; the system indep. stuff, in say 4.06? +; +prtflt: + mov a,e ; get character to test + +IF FALSE ; strip out lf from printer stream + ani 7fh ; make sure it is parity less + cpi lf ; is it a line feed? + rnz ; no, print it +; xra a ; yes, don't. + +ENDIF + + ret + +; +; system-dependent processing for BYE command. +; +sysbye: + ret + +; +; This is the system-dependent command to change the baud rate. +; DE contains the two-byte value from the baud rate table; both +; bytes of this value are also stored in 'speed'. +; +sysspd: + +IF FALSE ; as always + in mncmd ; clear register counter + mvi a,4eh ; set for 1 stop, 8 data bits + out mnmode ; save in mode 1 port + mvi a,30h ; set bits for rate etc.. + add e ; add baud rate (bits 0 - 3) + out mnmode ; set mode port 2 + mvi a,27h ; set tx/rx ready, RTS CTS active + out mncmd + ret +ENDIF + ret ; if routine not supported +; +; Speed tables +; (Note that speed tables MUST be in alphabetical order for later +; lookup procedures, and must begin with a value showing the total +; number of entries. The speed help tables are just for us poor +; humans. +; +; db string length, string, divisor (2 bytes or 1 word, ab) +; the data byte a is return in A and E, and b in D +; only byte 'a' is the key for the table + +IF FALSE ; as always +spdtbl: db 16 ; sixteen entries for PCI + db 3,'110$', 2,2 + db 4,'1200$', 7,7 + db 3,'134$', 3,3 + db 3,'150$', 4,4 + db 4,'1800$', 8,8 + db 5,'19200$', 15,15 + db 4,'2000$', 9,9 + db 4,'2400$', 10,10 + db 3,'300$', 5,5 + db 4,'3600$', 11,11 + db 4,'4800$', 12,12 + db 2,'50$', 0,0 + db 3,'600$', 6,6 + db 4,'7200$', 13,13 + db 2,'75$', 1,1 + db 4,'9600$', 14,14 + +sphtbl: db ' 50 75 110 134 150 300 600 1200 ' + db cr,lf,'1800 2000 2400 3600 4800 7200 9600 19200$' +ENDIF + +IF m2215 +spdtbl equ 0 ; routine unsupported +sphtbl equ 0 +ENDIF + +; +; This is the system-dependent SET PORT command. +; HL contains the argument from the command table. +; +sysprt: + +IF m2215 +prttbl equ 0 ; SET PORT is not supported +prhtbl equ 0 ; Merlin M2215 could, I suppose +ENDIF + +; +; selmdm - select modem port +; selcon - select console port +; selmdm is called before using inpmdm or outmdm; +; selcon is called before using inpcon or outcon. +; For iobyt systems, diddle the I/O byte to select console or comm port; +; For the rest, does nothing. +; preserves bc, de, hl. +; +selmdm: + ret + +selcon: + ret + +; +; Get character from console, or return zero. +; result is returned in A. destroys bc, de, hl. +; +inpcon: + call 0f55dh ;CONST BIOS vector + ora a ;set flags + rz + call 0f56eh ;CONIN BIOS vector + ret + +; +; Output character in E to the console. +; destroys bc, de, hl +; +outcon: + mov c, e + call 0f57fh ;CONOUT BIOS vector + ret + +; +; outmdm - output a char from E to the modem. +; the parity bit has been set as necessary. +; returns nonskip; bc, de, hl preserved. +; +outmdm: + +IF m2215 + push psw + push h + push d + push b + + mov c, e + mvi a, 1 ; ie: tty1: + mov d, a + call 0f6a2h ;PUN BIOS vector + + pop b + pop d + pop h + pop psw +ENDIF + + ret + +; +; for IOBYT systems, the modem port has already been selected. +; destroys bc, de, hl. +; +inpmdm: + +IF m2215 + ; check status + lda 0fa32h ; ie. tty1: + ora a + rz + + mvi a, 1 ; RDR BIOS vector + mov d, a + call 0f651h +; ani 7fh + + push a + di + mvi a, 0 + sta 0fa32h ; remove interrupt flag + sta 0f2d3h ; zero buffer counter + lda 0f2d4h + sta 0f2d5h + ei + nop + pop a + + ret +ENDIF + +; +; flsmdm - flush comm line. +; Modem is selected. +; Currently, just gets characters until none are available. +; +flsmdm: + + call inpmdm ; Try to get a character + ora a ; Got one? + jnz flsmdm ; If so, try for another + ret ; Receiver is drained. Return. + + +; + +; +; lptstat - get the printer status. Return a=0 if ok, or 0ffh if not. +lptstat: +IF iobyte ;[33] + call bprtst ; get status +ENDIF ;iobyte[33] + +IF NOT iobyte ;[33] + xra a ; assume it is ok.. this may not be necessary +ENDIF ;iobyte [33] + ret +; +; outlpt - output character in E to printer +; console is selected. +; preserves de. +; +outlpt: + push d ; save DE in either case + call prtflt ; go through printer filter [30] + ana a ; if A = 0 do nothing, + jz outlp1 ; if a=0 do nothing + +outlp1: pop d ; restore saved register pair + ret + +; delchr - make delete look like a backspace. Unless delete is a printing +; character, we just need to print a backspace. (we'll output clrspc +; afterwards) +delchr: + + mvi e,bs ;get a backspace + jmp outcon + +; erase the character at the current cursor position +clrspc: mvi e,' ' + call outcon + mvi e,bs ;get a backspace + jmp outcon + +; erase the current line +clrlin: lxi d,eralin + jmp prtstr + +; erase the whole screen, and go home. preserves b (but not c) +clrtop: lxi d,erascr + jmp prtstr + + +IF m2215 +sysver: db 'BT Merlin M2215, port TTY1:, settings unchanged.$' +ENDIF + +tstmsg: db 'Test message',cr,lf,'$' + +IF lasm +LINK CPXVDU.ASM ; link to the Terminal definition tables +ENDIF ;lasm diff --git a/cpxnor.asm b/cpxnor.asm new file mode 100644 index 0000000..2648060 --- /dev/null +++ b/cpxnor.asm @@ -0,0 +1,587 @@ +IF NOT LASM +.printx * CPXNOR.ASM * +ENDIF ;NOT lasm +; 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 file contains the system-dependent code and data for various +; NorthStar KERMITs. This has the Family name of CPXNOR.ASM. +; +; revision history (last edit first) +; +;edit 4, 16-Jan-1991 by MF. Fixed a bug in OUTCON wherein the final RET +; was missing (bug reported by David P. Arnot of Scottish +; Agricultural College). +;edit 3, 12-Oct-1990 by MF. Added a semicolon before the comment +; beginning "Family is the string so we don't get errors +; edit 2, 23 July, 1987 by OBSchou to massage file to suit CPXCOM.ASM. +; +; edit 1: 1 June, 1986 by OBSchou, Loughborogh University, UK. +; Hived off northstar and Comart system dependent modules from +; CPXSYS.ASM. This assembles ok, but I cannot test it. Any comments? + + +IF norths +.printx * Assembling for NorthStar Horizon with HSIO-4 board * +ENDIF;norths + +IF horizon ;[25] +.printx * Assembling KERMIT-80 for the NorthStar Horizon * +ENDIF;horizon + +IF advant ;[22] +.printx * Assembling kermit-80 for North Star Advantage * +ENDIF ;[22] + +IF basicns ;[29] +.printx * Assembling KERMIT-80 for the Northstar Horizon using printer port * +ENDIF ;basicns [29] + +IF comart +.printx * Assembling KERMIT-80 for Comart Communicator * +ENDIF ; comart + +; the basics... +IF norths ;The basic Northstar Horizon BIOS does not access ports 2-5 +port0d equ 02h ;Port 0 data (console) +port0s equ 03h ;Port 0 status +port1d equ 04h ;Port 1 data (printer) +port1s equ 05h ;Port 1 status + +port2b equ 10h ;Port 2 baud +port2i equ 11h ;Port 2 interrupt mask +port2d equ 12h ;Port 2 data +port2s equ 13h ;Port 2 status + +port3b equ 14h ;Port 3 baud +port3i equ 15h ;Port 3 interrupt mask +port3d equ 16h ;Port 3 data +port3s equ 17h ;Port 3 status + +port4b equ 18h ;Port 4 baud +port4i equ 19h ;Port 4 interrupt mask +port4d equ 1Ah ;Port 4 data +port4s equ 1Bh ;Port 4 status + +port5b equ 1Ch ;Port 5 baud +port5i equ 1Dh ;Port 5 interrupt mask +port5d equ 1Eh ;Port 5 data +port5s equ 1Fh ;Port 5 status + +NS19K2 EQU 00H ;19.2 kilobaud +NS9600 EQU 01H ;9600 baud +NS4800 EQU 02H ;4800 baud +NS2400 EQU 03H ;2400 baud +NS1200 EQU 04H ;1200 baud +NS0600 EQU 05H ; 600 baud +NS0300 EQU 06H ; 300 baud +NS0110 EQU 07H ; 110 baud +;; Set to use port 5 at 1200 baud +mnport equ port5d ;Data port +mnprts equ port5s ;Status port +baudrt equ port5b ;Baud rate port +baudini equ ns1200 ;Initial baud rate +output EQU 1 ;Bit of UART status for transmitter ready +input EQU 2 ;Bit of UART status for receiver ready +z80 EQU TRUE ;This one's a Z80. +ENDIF;norths + +IF basicns ;[29] +mnport equ 04h ;printer port data +mnprts equ 05h ; printer port status +output equ 1 ;transmitter ready +input equ 2 ;receiver ready +z80 equ FALSE ; not important +ENDIF ;basicns [29] + +IF horizon ;[25] +mnport EQU 004H ;Modem data port +mnprts EQU 005H ;Modem status port +output EQU 01H ;Transmitter empty +input EQU 02H ;Input data available +TxEmpty EQU 04h ;Transmitter empty +;Note: Needs terminal definition (vt100, vt52, tvi925, adm3a or crt above) +z80 EQU TRUE ;This one's a Z80. +ENDIF;horizon + +IF advant ;[22] +vtval EQU 1 ; we do emulation of VT52s +slot EQU 1 ;SIO card slot +mnport EQU (6-slot)*16 ;Modem data port +mnprts EQU mnport+1 ;Modem status port +baudrt EQU mnport+8 ;Baud rate register +output EQU 01H ;Transmitter buffer empty +input EQU 02H ;Input data available +TxEmpty EQU 04h ;Transmitter empty flag +z80 EQU TRUE +ENDIF;[22] advant + +IF comart ;[25] +mnport EQU 002H ;Modem data port +mnprts EQU 003H ;Modem status port +output EQU 01H ;Transmitter empty +input EQU 02H ;Input data available +TxEmpty EQU 04h ;Transmitter empty +;Note: Needs terminal definition (vt100, vt52, tvi925, adm3a or crt above) +z80 EQU TRUE ;This one's a Z80. +ENDIF;comart + + +IF advant +defesc EQU '\'-100O +ENDIF;advant + +; +; Family is the string used in VERSION to say which of several +; smaller overlay files are used. These are (will be) derived from +; the juge CP4SYS.ASM file, in which case we will never get here. +; Just a Dollar, but put a sting in for a family of machines. +; +family: db 'CPXNOR.ASM (4) 16-Jan-1991$' ; Used for family versions.... + + + +sysxin: ; continuation of system dependent initialisation code +IF advant ;[22] + mvi a,40h + out mnprts ; Reset USART + lxi h,7070h ; Default to 1200 baud + shld speed ; store current speed + xchg + call sysspd ; set default baud rate + mvi a,4Eh ; Set UART mode to async 16x clock, 8 data + out mnprts ; bits, no parity, and 1 stop bit + mvi a,37h ; Set command to Tx enable, DTR on, Rx enable, + out mnprts ; break off, error reset, and RTS on +ENDIF;[22] advant + +IF norths + mvi a,baudini ;Get initial speed + out baudrt + sta speed ;save for status display + sta speed+1 +ENDIF;norths + +IF comart OR horizon ;[25] +; The PD8251/PD8251A is reset by three successive 00 Hex or two +; successive 80 Hex command instructions followed by a software +; reset command instruction (40 Hex). + mvi a,80h ; Send UART reset + out mnprts + mvi a,80h + out mnprts + mvi a,40h + out mnprts + mvi a,4Eh ; Set UART mode to async 16x clock, 8 data + out mnprts ; bits, no parity, and 1 stop bit + mvi a,37h ; Set command to Tx enable, DTR on, Rx enable, + out mnprts ; break off, error reset, and RTS on +ENDIF;comart OR horizon + + + ret ; return from system-dependent routine +; + +; +; system-dependent termination processing +; If we've changed anything, this is our last chance to put it back. +sysexit: + + ret + +; +; system-dependent processing for start of CONNECT command +; +syscon: + ret + +conmsg: ; Messages printed when entering transparent (CONNECT) mode: +; + +; +; syscls - system-dependent close routine +; called when exiting transparent session. +; +syscls: + ret +; + +; +; sysinh - help for system-dependent special functions. +; called in response to <escape>?, after listing all the +; system-independent escape sequences. +; +sysinh: +IF advant OR comart OR horizon ; some more + lxi d,inhlps ; we got options... + call prtstr ; print them. +ENDIF;[22] advant OR comart OR horizon [29] + + ret + + +;additional, system-dependent help for transparent mode +; (two-character escape sequences) +inhlps: + +; [16] [18] have added super brain and Torch to the list of Breaking machines. +IF advant OR comart OR horizon ; ... some more + db cr,lf,'B Transmit a BREAK' +ENDIF;[22] advant OR comart OR horizon + + db '$' ;[hh] table terminator + +; +; sysint - system dependent special functions +; called when transparent escape character has been typed; +; the second character of the sequence is in A (and in B). +; returns: +; non-skip: sequence has been processed +; skip: sequence was not recognized +sysint: ani 137O ; convert lower case to upper, for testing... +IF advant OR comart OR horizon ; [22] [25] ... some more + cpi 'B' ; send break? + jz sendbr ; yes, go do it. return nonskip when through. +ENDIF;advant OR comart OR horizon [32] + + jmp rskp ; take skip return - command not recognized. + + +; + +IF advant OR comart OR horizon ;[lmj] +sendbr: +; +; Ensure that the transmitter has finished sending buffered chars +sndbr1: in mnprts ; get UART status + ani TxEmpty ; everything sent? + jz sndbr1 ; no, wait a bit more +; +; Begin sending a break by setting bit in UART command register + mvi a,3Fh ; Set TxEna, DTR, RxEna, SBreak, ErrRst, RTS + out mnprts +; +; Wait for 250 milliseconds (using hundredths second delay routine) + mvi a,25 + call delay +; +; Resume normal operation by clearing the SendBreak command bit + mvi a,37h ;Set TxEna, DTR, RxEna, ErrRst, RTS + out mnprts +; + ret ;done +ENDIF;advant OR comart OR horizon + +; + +; +; sysflt - system-dependent filter +; called with character in E. +; if this character should not be printed, return with A = zero. +; preserves bc, de, hl. +; note: <xon>,<xoff>,<del>, and <nul> are always discarded. +sysflt: + mov a,e ; get character for testing +IF advant ;[22] + cpi 'D'-100O ;Control-D's reset video + rnz ; if not control-D, it's ok. + xra a ; don't allow control-D out. +ENDIF;[22] advant + ret + +; mdmflt - modem filter [30] +; called with character to be sent to printer in E +; with parity set as appropriate. +; return with accumulator = 0 do do nothing, +; <> 0 to send char in E. +mdmflt: + mov a,e ;[30] get character to test + ret + + + +; prtflt - printer filter [30] +; called with character to be sent to printer in E +; returns with a = 0 to do nothing +; a <> 0 to print it. +; +; this routine for those printer that automatically insert +; a lf on cr, or cr for lf. Should this be shifted to +; the system indep. stuff, in say 4.06? +prtflt: + mov a,e ; [30] get character to test + ret + + +; + +; +; system-dependent processing for BYE command. +; for apmmdm, heath, and lobo, hang up the phone. +sysbye: + ret +; + +; This is the system-dependent command to change the baud rate. +; DE contains the two-byte value from the baud rate table; this +; value is also stored in 'speed'. +sysspd: +IF norths OR advant ; + mov a,e ; get the parsed value + out baudrt ; Tell the baud rate generator. + ret +ENDIF;norths OR advant + +IF advant ;[22] +spdtbl: db 6 ; 6 entries + db 04,'1200$', 70h,70h + db 04,'2400$', 78h,78h + db 03,'300$', 40h,40h + db 04,'4800$', 7Ch,7Ch + db 03,'600$', 60h,60h + db 04,'9600$', 7Eh,7Eh + +sphtbl: db cr,lf,' 300 600 1200 2400 4800 9600$' +ENDIF;[22] advant + + +IF norths +spdtbl: db 8 ; 8 entries + db 3,'110$', 07H,07H + db 4,'1200$', 04H,04H + db 5,'19200$', 00H,00H + db 4,'2400$', 03H,03H + db 3,'300$', 06H,06H + db 4,'4800$', 02H,02H + db 3,'600$', 05H,05H + db 4,'9600$', 01H,01H + + +sphtbl: db cr,lf + db ' 110 300 600 12000 2400 4800 9600 19200$' +ENDIF;norths + +; The following conditionals were once a huge if not statement. There +; wasn't enough room to add the lobo to the list, so it had to be broken +; into 2, which you can't do with an if not. I redid it as two ifs and +; applied them to those that wouldn't set baud. [Hal Hostetler] +IF NOT (advant OR norths) +spdtbl EQU 0 ;[hh] SET BAUD not supported. +sphtbl EQU 0 ;[hh] ran out of room above... +ENDIF ;NOT (advant OR norths) +; +; + +; This is the system-dependent SET PORT command. +; HL contains the argument from the command table. +sysprt: + ret + +prttbl equ 0 ; SET PORT not supported +prhtbl equ 0 +; + +; +; selmdm - select modem port +; selcon - select console port +; selmdm is called before using inpmdm or outmdm; +; selcon is called before using inpcon or outcon. +; For iobyt systems, diddle the I/O byte to select console or comm port; +; For Decision I, switches Multi I/O board to console or modem serial +; port. [Toad Hall] +; For the rest, does nothing. +; preserves bc, de, hl. +selmdm: +selcon: + ret +; + +; Get character from console, or return zero. +; result is returned in A. destroys bc, de, hl. +; +inpcon: + mvi c,dconio ;Direct console I/O BDOS call. + mvi e,0FFH ;Input. + call BDOS + ret +; + +; +; Output character in E to the console. +; destroys bc, de, hl +; +outcon: + mvi c,dconio ;Console output bdos call. + call bdos ;Output the char to the console. + ret ;[MF]per David P. Arnot +; + +; +; outmdm - output a char from E to the modem. +; the parity bit has been set as necessary. +; returns nonskip; bc, de, hl preserved. +outmdm: + in mnprts ;Get the output done flag. + ani output ;Is it set? + jz outmdm ;If not, loop until it is. + mov a,e + out mnport ;Output it. + ret +; + +; +; get character from modem; return zero if none available. +; for IOBYT systems, the modem port has already been selected. +; destroys bc, de, hl. +inpmdm: +;Note: modem port should already be selected for mdI. [Toad Hall] + in mnprts ;Get the port status into A. + ani input ;See if the input ready bit is on. + rz ;If not then return. + in mnport ;If so, get the char. + ret ; return with character in A + + +; +; flsmdm - flush comm line. +; Modem is selected. +; Currently, just gets characters until none are available. + +flsmdm: call inpmdm ; Try to get a character + ora a ; Got one? + jnz flsmdm ; If so, try for another + ret ; Receiver is drained. Return. +; + +; +; lptstat - get the printer status. Return a=0ffh if ok, or 0 if not. +lptstat: + xra a ; assume it is ok.. this may not be necessary + ret + +; +; outlpt - output character in E to printer +; console is selected. +; preserves de. +outlpt: + push d ; save DE in either case + call prtflt ; go through printer filter [30] + ana a ; if A = 0 do nothing, + jz outlp1 ; [30] if a=0 do nothing + mvi c,lstout + call bdos ;Char to printer +outlp1: pop d ; restore saved register pair + ret +IF advant ; all others require terminals +; + +; +; Screen manipulation routines +; csrpos - move to row B, column C +; +; csrpos for terminals that use a leadin sequence followed +; by (row + 31.) and (column + 31.) +; +csrpos: push b ; save coordinates + lxi d,curldn ; get cursor leadin sequence + call prtstr ; print it + pop h ; restore coordinates + mov a,h ; get row + adi (' '-1) ; space is row one + mov e,a + push h + call outcon ; output row + pop h + mov a,l ; get column + adi (' '-1) ; space is column one + mov e,a + jmp outcon ; output it and return +ENDIF ;advant + +; +; delchr - make delete look like a backspace. Unless delete is a printing +; character, we just need to print a backspace. (we'll output clrspc +; afterwards) +; For Kaypro and Vector General, delete puts a blotch on the screen. +; For Apple and Osborne 1, delete moves but doesn't print. +delchr: +IF advant ;[22] + ret +ENDIF;advant +IF NOT (advant );[22] + mvi e,bs ;get a backspace + jmp outcon +ENDIF;NOT (advant) [22] + +; erase the character at the current cursor position +clrspc: mvi e,' ' + call outcon + mvi e,bs ;get a backspace + jmp outcon + +; erase the current line +clrlin: lxi d,eralin + jmp prtstr + +; erase the whole screen, and go home. preserves b (but not c) +clrtop: lxi d,erascr + jmp prtstr + + +IF norths +sysver: db 'Northstar Horizon$' +ENDIF;norths + +IF basicns ;[29] +sysver: db 'Northstar using printer port$' +ENDIF ;basicns [29] + +IF comart ;[25] +sysver: db 'Comart Communicator$' +ENDIF;comart + +IF horizon ;[25] +sysver: db 'Northstar Horizon$' +ENDIF;horizon + +IF advant ;[22] +sysver: db 'North Star Advantage$' +outlin: db 04H,cr,lf,tab,'$' +erascr: db 04H,'$' ;Clear screen and go home. +eralin: db cr,0EH,'$' ;Clear line. +curldn: db esc,'=$' ;cursor leadin +ttab: ;Table start location. +ta: db 0BH,'$',0,0 ;Cursor up. +tb: db 0AH,'$',0,0 ;Cursor down. +tc: db 0CH,'$',0,0 ;Cursor right. +td: db bs,'$',0,0 ;Cursor left +te: db 04H,'$',0,0 ;Clear display +tf: db 12H,'$',0,0 ;Enter Graphics Mode +tg: db 13H,'$',0,0 ;Exit Graphics mode +th: db 1EH,'$',0,0 ;Cursor home. +ti: db 0BH,'$',0,0 ;Reverse linefeed. +tj: db 0FH,'$',0,0 ;Clear to end of screen. +tk: db 0EH,'$',0,0 ;Clear to end of line. +ENDIF;[22] advant +IF lasm AND (NOT advant) +LINK CPXVDU.ASM +ENDIF ;lasm - m80 will INCLUDE CPXVDU.ASM + +IF lasm ; here if not a terminal selected and in LASM +ovlend equ $ + END +ENDIF ;lasm diff --git a/cpxpcw.asm b/cpxpcw.asm new file mode 100644 index 0000000..554fd61 --- /dev/null +++ b/cpxpcw.asm @@ -0,0 +1,912 @@ +IF NOT lasm +.printx * CPXPCW.ASM * +ENDIF ;NOT lasm +; +; KERMIT - (Celtic for "FREE") +; +; This is the CP/M-80 implementation of the Columbia University +; KERMIT file transfer protocol. +; +; Version 4.08 +; +; 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. +; +; This file contains the system-dependent code and data for KERMIT +; on the Amstrad range of personal computers. +; +; +; Revision history: +; +;edit 9, 22-Jan-1991 by MF. Added "sysinit" code at "init04" from Kermit +; version 4.08 which had been left out of version 4.09 to reserve +; space for the Amstrad's I/O buffers. Amstrad Kermit now stores +; files correctly (version 4.09 had garbled files). Again, +; this fix comes from Mr. D. P. Arnot of the Scottish Agricultural +; College in the UK. +;edit 8, 16-Jan-1991 by MF. Added a "bs" left out of "delstr" per +; instruction from David P. Arnot of Scottish Agricultural +; College, Auchincruive, Ayr, UK. +; E-mail: <D.P.Arnot@edinburgh.ac.uk> +; edit 7, 22 July 1987 by OBSchou to massage code to fit with CPXCOM.ASM +; Had to rename bcnout to bcnot as the former label clashed with +; one of the same name in CPXCOM.ASM. Sorry, folks. +; +; edit 6, 14th July, 1987 by OBSchou for Phillip Wade, Hull University +; Computer Centre. Change to delchr routine for PCW machines, +; as character 127 decimal is a printing character on +; the Amstrad PCW. The routine has been replaced +; by a bs,space,bs,bs string. (OBS Comment - why a total of THREE bs?) +; +; edit 5 9 May 1987 by C.J.MILES@UK.AC.UMRCC +; Hangup phone and clear screen options added to +; terminal mode. +; +; edit 4 23 March 1987 by C.J.MILES@UK.AC.UMRCC +; Use direct input drom SIO for CPC machines instead +; of using BDOS. Improvement reduces time for file +; transfer to 65% of time used by BDOS method. +; Add reverse Prestel baud rate. +; +; edit 3 20 March 1987 by Chris Miles (C.J.MILES@UK.AC.UMRCC) +; (Greater Manchester Archaeological Unit, Manchester Univ.). +; Added support for Amstrad CPC CP/M Plus machines, +; Added 31250 baud rate option, +; Bug fixed in sending BREAK, +; Bug fixed in 1200/75 baud setup +; Machine and CP/M version checks added. +; +; edit 2 11 Febuary, 1987 by OBSchou for Ian Young. +; Changes to the send break routine to change two lines of code from +; ori 018h ; send break, Tx enable +; and ori 0008h ; Tx enable +; +; to ori 01ah ; send break, Tx enable, RTS +; and ori 00ah ; Tx enable, RTS +; +; This is a bug fix to hopefully keep RTS actve during breaks. +; +; [Ed. (OBSchou) 21/1/87. +; This file linked FROM cpxsys.asm, so do NOT rename this +; file. The diffculty of needing a HUGE CPXSYS.ASM file on your floppy +; only to act as a switcher remains, but hopefully will be better in +; the future. If you ARE stuck, then rename this CPXSYS.ASM but add the +; label SYSEDT: to the FAMILY label. A bit messy.] +; +; +; The "author" of this system-dependent file is: +; +; Ian A. Young +; Lattice Logic Ltd +; 9 Wemyss Place +; Edinburgh +; +; Some other addresses: +; +; ian@latlog.uucp +; ...seismo!mcvax!ukc!latlog!ian +; or c/o OBSchou@uk.ac.lut.multics +; +; ... although much of the code concerned was written by others. +; + + +; Keep module name, edit number, and last revision date in memory. + +;sysedt: db 'CPXSYS.ASM (36) 20-Mar-87$' +family: db 'CPXPCW.ASM (9) 22-Jan-1991$' + + +; +; Assembly-time message announcing which version we are building +; + +IF pcw +.printx * Assembling Amstrad PCW Kermit-80 * +ENDIF + +IF cpc +.printx * Assembling Amstrad CPC Kermit-80 * +ENDIF + +; +; Miscellany of parameter settings +; +z80 EQU TRUE ; all Amstrads have a Z80. +defesc EQU '\'-100O ; The default escape character. +vtval EQU 0 ; we don't need VT52 emulation + +; +; Amstrad CPC machines use 16 bit I/O address decoding and therefore +; the Z80 instructions OUT (C),A and IN A,(C) must be defined. +; +outc EQU 79edh ; IN A,(C) +inpc EQU 78edh ; OUT (C),A + +; +; hardware information +; +; There is a Z80-DART (Mostek/SGS 8470) at I/O addresses E0..E3 (PCW) +; and FADC..FADD (CPC), and a 8253 programmable divider running it at +; E4..E7 (PCW) and FBDC..FBDF (CPC) +; + +input EQU 01h ; input data available +output EQU 04h ; output buffer ready + +IF pcw +mnport EQU 0E0h ; data register for SIO +mnprts EQU 0E1h ; control register for SIO +ctc0 EQU 0E4h ; 8253 load counter 0 +ctc1 EQU 0E5h ; 8253 load counter 1 +ctcmod EQU 0E7h ; 8253 write mode word +ENDIF + +IF cpc +mnport EQU 0FADCh ; data register for SIO +mnprts EQU 0FADDh ; control register for SIO +ctc0 EQU 0FBDCh ; 8253 load counter 0 +ctc1 EQU 0FBDDh ; 8253 load counter 1 +ctcmod EQU 0FBDFh ; 8253 write mode word +ENDIF + +; +; SIO input buffering +; +siosz EQU 4096 ; size of SIO input buffer +siomsk EQU 4095 ; mask for wrapping buffer round + +; +; Extended BIOS jump-block addresses; reached through USERF +; +sainit EQU 00B6h ; initialise SIO +sabaud EQU 00B9h ; set baud rate +saparm EQU 00BCh ; fetch SIO parameters +teask EQU 00BFh ; find out cursor position +cdvers EQU 00E3h ; get version numbers +cdinfo EQU 00E6h ; get BIOS system information + +; +; System-dependent initialization +; Called once at program start. +sysxin: ; continuation of system initialzation +; +; check for correct CP/M version +; + mvi c,12 ; get CP/M version BDOS call + call bdos + mov a,l ; check if CP/M Plus + cpi 31h + jz init08 + lxi d,wrong2 ; point to error message + call prtstr + mvi c,0 ; warm boot + call bdos +; +init08: ;[OBS] Moved the Cinfigured for message out as + ;[OBS] it is in CPXCOM.ASM +; +; get addresses of BIOS routines +; +; BIOS USERF is used to get to extended BIOS routines +; + lhld 1 ; warm boot vector + lxi d,87 ; offset to USERF vector + dad d ; DE now has USERF vector address + shld userf+1 ; ready for jumping to... +; +; BIOS routines for fast character I/O +; + lhld 1 ; warm boot vector (#1) + lxi d,3 + dad d ; next is #2, CONST + shld bcnst+1 + dad d ; next is #3, CONIN + shld bcnin+1 + dad d ; next is #4, CONOUT + shld bcnot+1 ;[obs] Was bcnout, but this conflicts + ;[obs] with a label in CPXCOM.ASM + dad d ; next is #5, LIST + shld blist+1 + dad d ; next is #6, AUXOUT + dad d ; next is #7, AUXIN + shld baxin+1 + lhld 1 ; warm boot vector again + lxi d,002Ah ; offset to LISTST (#15) + dad d + shld lptstat+1 + lhld 1 ; warm boot vector again + lxi d,0033h ; offset to AUXIST (#18) + dad d + shld baxist+1 +; +; check if running on correct Amstrad +; + call userf + dw cdvers +IF pcw + cpi 0 +ENDIF +IF cpc + cpi 1 +ENDIF + jnz init06 + lxi d,wrong1 ; point to error message + call prtstr + mvi c,0 + call bdos +; +; verify presence of SIO board by asking the BIOS. +; +init06: call userf ; C gets 00 if not fitted + dw cdinfo + xra a ; a <- 0 + ora c ; zero => no serial port + jnz init03 ; non-zero => OK + lxi d,nosio ; snooty message... + call prtstr + mvi c,0 ; warm boot out of here + call bdos +init03: +; +; find initial baud rate and other information +; + call userf ; gives B=rx baud, C=tx baud, D=stop bits, + ; E=parity, H=rx bits, L=tx bits. + dw saparm ; get SIO parameters + push h ; save bit settings + mov a,b ; if TX and RX speeds same, they are OK + cmp c + jz init01 + cpi 8 ; rx=1200? + jnz init02 ; no, can't be Prestel + mov a,c + cpi 2 ; tx=75? + jnz init02 ; no, can't be Prestel + lxi b,0 ; otherwise 1200/75 comes out as 0s. +init01: push b ; assign value to SPEED + pop h + shld speed +init02: ; here if we leave it as is + pop h ; get bit settings + mov a,l ; no of TX data bits set + sui 5 ; make into 00, 01, 10, 11. + rrc + rrc + rrc + sta txbits ; we may need it later +; +; set handshake mode: there are two parts to this, interrupts and +; hardware handshake. The MODE byte used by the firmware expresses +; this combination as -(int*2 + hand*1). Thus, both options on would +; be (-3) or 0FDh. +; +; Here, we set the interrupt part of the mode on; it helps the BIOS cope. +; Unfortunately, >sigh<, according to Soft971, this will only work +; if you have BIOS V1.4 or higher. I have no idea what would happen +; if we tried random hanshake mode flags with lower versions, so we +; just skip over if it would be dangerous... +; + call userf ; fetch all parameters + dw saparm + sta orgmode ; remember original mode for later + + call userf ; get BIOS version to B,C + dw cdvers + mov a,b ; BIOS major version number (eg 1) + ora a ; if zero, too low... + jz init04 + cpi 1 ; if not 1, definitely OK + jnz init05 + mov a,c ; otherwise, its 1.X; want >= 4 + cpi 4 + jm init04 ; <4 => too low + +init05: call userf ; get the original flags back + dw saparm + xri 0FFh ; make mode into bit mask + inr a + ori 2 ; set interrupt mode + xri 0FFh ; turn back into mode value + inr a + call userf ; feed change back to BIOS + dw sainit +init04: ; come here if not setting mode + +; Locate large buffers for multi-sector I/O and SIO input buffering. +; Space above ovlend is available for buffers; we have pretty well the machine +; to ourselves in an Amstrad PCW because they all gave 61K TPAs. We don't even +; bother to perform any checking. +; We don't want to use more than maxsec for disk buffers because +; if we use too many, the remote end could time out while we're +; writing to disk. maxsec is system-dependent, but for now we'll just +; use 8Kbytes. If you get retransmissions and other protocol errors after +; transferring the first maxsec sectors, lower maxsec. +; +maxsec EQU (8*1024)/bufsiz ; 8K / number of bytes per sector + + lxi h,ovlend+siosz ; get start of buffer + shld bufadr ; store in linkage section + mvi a,maxsec ; get size of buffer, in sectors + sta bufsec ; store that, too. + + + ret ; return from system-dependent routine + +; +; message complaining about wrong Amstrad machine +; +wrong1: db 'Error - This Kermit will only run on the Amstrad ' +IF pcw + db 'PCW 8256/8512' +ENDIF +IF cpc + db 'CPC 464/664/6128' +ENDIF + db cr,lf,'$' +; +; message complaining about version of CP/M being used +; +wrong2: db 'Error - Incorrect CP/M version, needs CP/M 3.x' + db cr,lf,'$' +; +; message complaining of no SIO board +; +nosio: db 'Error - No SIO option fitted to this machine' + db cr, lf, '$' + +; +; jumps to BIOS character I/O routines. +; Addresses filled in by initialisation code above. +; +bcnst: jmp $-$ ; console status +bcnin: jmp $-$ ; console input +bcnot: jmp $-$ ; console output [obs - was bcnout] +blist: jmp $-$ ; printer output +baxin: jmp $-$ ; aux port input +baxist: jmp $-$ ; aux port status +lptstat:jmp $-$ ; printer status + +; +; Other BIOS routines +; +userf: jmp $-$ ; call extended BIOS function + +; +; saved value of some original parameters +; +orgmode:ds 1 +txbits: ds 1 + +; +; system-dependent termination processing +; If we've changed anything, this is our last chance to put it back. +sysexit: + call userf ; fetch firmware parameters + dw saparm + lda orgmode ; replace with original mode + call userf ; inform BIOS + dw sainit + ret + +; +; system-dependent processing for start of CONNECT command +; +syscon: + lxi d,conmsg ; how to get escape char message + call prtstr + ret + +conmsg: ; Messages printed when entering transparent (CONNECT) mode: +IF pcw + db '(Use boxed minus key next to space bar to generate a Control-\)' +ENDIF + db cr,lf,'$' + +; +; syscls - system-dependent close routine +; called when exiting transparent session. +; +syscls: + ret + +; +; sysinh - help for system-dependent special functions. +; called in response to <escape>?, after listing all the +; system-independent escape sequences. +; +sysinh: + lxi d,inhlps ; we got options... + call prtstr ; print them. + ret + +; +; additional, system-dependent help for transparent mode +; (two-character escape sequences) +; +inhlps: + db cr,lf,'B Transmit a BREAK' + db cr,lf,'H Hangup using DTR' + db cr,lf,'W Wipe screen clear' + db '$' ;[hh] table terminator + +; +; sysint - system dependent special functions +; called when transparent escape character has been typed; +; the second character of the sequence is in A (and in B). +; returns: +; non-skip: sequence has been processed +; skip : sequence was not recognized +; +sysint: ani 137O ; convert lower case to upper, for testing... + cpi 'B' ; send break ? + jz sendbr ; yes, go do it. return nonskip when through. + cpi 'H' ; hang up ? + jz hangup + cpi 'W' ; clear screen ? + jz clrtop + jmp rskp ; take skip return - command not recognized. + +; +; Hangup (drop DTR) and Break send routine +; + +hangup: + mvi d,0ah ; set up hangup bit mask + mvi e,255 ; time for hangup is 2 1/2 secs + jmp setbit ; skip Tx empty test + +sendbr: + mvi d,9ah ; set up break bit mask + mvi e,30 ; time for break is 300 ms + +sndbr1: mvi a,1 ; select Read Register 1 + +IF pcw ; allow 8 bit I/O instructions + out mnprts + in mnprts ; read the contents +ENDIF + +IF cpc ; use 16 bit I/O instructions + lxi b,mnprts + dw outc ; OUT (C),A + dw inpc ; IN A,(C) +ENDIF + + ani 1 ; test "all done" flag + jz sndbr1 ; loop until it's nonzero. +; +; Next, set the break or hangup bit on the SIO. +; +setbit: + mvi a,5 ; select Write Register 5 +IF pcw + out mnprts +ENDIF +IF cpc + dw outc ; OUT (C),A +ENDIF + lda txbits ; get txbits (already in correct bit positions) + ora d ; send break, Tx Enable, RTS +IF pcw + out mnprts +ENDIF +IF cpc + dw outc ; OUT (C),A +ENDIF + +; +; Now, delay for duration of hangup or break +; + mov a,e ; delay count + call delay +; +; Time's up. Put transmitter back in normal state and return. +; + mvi a,5 ; select Write Register 5 +IF pcw + out mnprts +ENDIF +IF cpc + lxi b,mnprts + dw outc ; OUT (C),A +ENDIF + lda txbits ; get txbits again + ori 8ah ; Reset break, Tx Enable, RTS +IF pcw + out mnprts +ENDIF +IF cpc + dw outc ; OUT (C),A +ENDIF + ret ; done. + +; +; sysflt - system-dependent filter +; called with character in E. +; if this character should not be printed, return with A = zero. +; preserves bc, de, hl. +; note: <xon>,<xoff>,<del>, and <nul> are always discarded. +; +sysflt: + mov a,e ; get character for testing + ret +; +; system-dependent processing for BYE command. +; +sysbye: + ret + +; +; This is the system-dependent command to change the baud rate. +; DE contains the two-byte value from the baud rate table; this +; value is also stored in 'speed'. +; +sysspd: + push d ; move to HL for firmware + pop h + mov a,h ; if h=0 then Prestel rates + ora a + jnz spd01 ; if not 1200/75 then skip + lxi h,0802H ; else set 1200/75 into HL + jmp spd03 ; jump to normal setup + +spd01: cpi 11h ; if h=11h then reverse Prestel + jnz spd02 ; if not 75/1200 then skip + lxi h,0208h ; else set 75/1200 into HL + jmp spd03 ; jump to normal setup + +spd02: cpi 10h ; if h=10h then 31250 baud + jnz spd03 ; if not 31250 then skip to normal setup + mvi a,36h ; set 8253 for mode 2 binary count + lxi b,ctcmod ; output to CTC mode register + dw outc + lxi b,ctc0 ; select transmit clock + mov a,4 ; timer value for 31250 (04h) + dw outc + mov a,0 ; timer value for 31250 (04h) + dw outc + lxi b,ctc0 ; select receive clock + mov a,4 ; timer value for 31250 (04h) + dw outc + mov a,0 ; timer value for 31250 (04h) + dw outc + ret + +spd03: call userf ; set whatever we have now... + dw sabaud ; using BIOS routine + ret + +; +; Speed tables +; (Note that speed tables MUST be in alphabetical order for later +; lookup procedures, and must begin with a value showing the total +; number of entries. The speed help tables are just for us poor +; humans. +; +; db string length,string,divisor (2 identical bytes or 1 word) +; +spdtbl: db 12h ;18 entries + db 03h,'110$', 03h,03h + db 04h,'1200$', 08h,08h + db 07h,'1200/75$', 00h,00h ; real values faked up when required + db 05h,'134.5$', 04h,04h + db 03h,'150$', 05h,05h + db 04h,'1800$', 09h,09h + db 05h,'19200$', 0fh,0fh + db 04h,'2400$', 0ah,0ah + db 03h,'300$', 06h,06h + db 05h,'31250$',10h,10h ; flag to direct setup routine + db 04h,'3600$', 0bh,0bh + db 04h,'4800$', 0ch,0ch + db 02h,'50$', 01h,01h + db 03h,'600$', 07h,07h + db 04h,'7200$', 0dh,0dh + db 02h,'75$', 02h,02h + db 07h,'75/1200$',11h,11h ; real values faked up when required + db 04h,'9600$', 0eh,0eh + +sphtbl: db cr,lf,lf + db 'Normal rates: 50 75 110 134.5 150 300 600' + db cr,lf + db ' 1200 1800 2400 3600 4800 7200 9600 19200' + db cr,lf,lf + db 'High speed : 31250 (only between Amstrads)' + db cr,lf,lf + db 'Split rates : 1200/75 (Rx=1200, Tx= 75)' + db cr,lf + db ' 75/1200 (Rx= 75, Tx=1200)' + db cr,lf,'$' + +; +; This is the system-dependent SET PORT command. +; HL contains the argument from the command table. +; +sysprt: + ret + +prttbl equ 0 ; SET PORT is not supported +prhtbl equ 0 + +; +; selmdm - select modem port +; selcon - select console port +; selmdm is called before using inpmdm or outmdm; +; selcon is called before using inpcon or outcon. +; preserves bc, de, hl. +; +selmdm: +selcon: + ret + +; +; Get character from console, or return zero. +; result is returned in A. destroys bc, de, hl. +; +inpcon: + call bcnst ; get console status + ora a ; anything there? + rz ; no, forget it + jmp bcnin ; yes, get the character + +; +; Output character in E to the console. +; destroys bc, de, hl +; +outcon: + mov a,e ; TAB? + cpi tab + jz out001 + mov c,e ; set correct arg register + jmp bcnot ; output to console via BIOS [obs was bcnout] + +; +; perform tab expansion ourselves +; +out001: call userf ; get column in L + dw teask + mov a,l ; a <- column 0..n + ani 7 ; column 0..7 + xri 0FFh ; not(col 0..7) + adi 9 ; a is 8-(colf7) +out002: ora a ; any left? + rz ; return if not + dcr a ; one less now, anyhow + push psw ; save over BIOS call (just in case) + mvi c,' ' ; print one space + call bcnot ;[obs was bcnout] + call suck ; in case any stuff coming in + pop psw ; fetch count back + jmp out002 ; and go round again + +; +; outmdm - output a char from E to the modem. +; the parity bit has been set as necessary. +; returns nonskip; bc, de, hl preserved. +outmdm: +IF cpc + push b ; save BC for CPC 16 bit I/O +ENDIF +outmd1: + call xsuck ; keep checking for incoming characters +IF pcw + in mnprts ; get the output done flag. +ENDIF +IF cpc + lxi b,mnprts + dw inpc ; IN A,(C) +ENDIF + ani output ; is it set? + jz outmd1 ; if not, loop until it is. + mov a,e +IF pcw + out mnport ; output it. +ENDIF +IF cpc + lxi b,mnport + dw outc ; OUT (C),A + pop b ; restore BC +ENDIF + ret + +; +; get character from modem; return zero if none available. +; destroys bc, de, hl. +; +inpmdm: + call suck ; get any characters pending + lhld sioct ; count of chars in buffer + mov a,h ; or together to get result + ora l + rz ; not got any, return now + + dcx h ; down count + shld sioct + + lhld siord ; read pointer + mov c,m ; fetch character ** NB TO C FOR NOW ** + + lxi d,1-ovlend ; bump pointer, subtract base + dad d + mov a,h ; mask high byte of offset + ani siomsk/256 + mov h,a + lxi d,ovlend ; add in base again + dad d + shld siord + + mov a,c ; get to proper register + ret + +; +; flsmdm - flush comm line. +; Modem is selected. +; Currently, just gets characters until none are available. + +flsmdm: call inpmdm ; Try to get a character + ora a ; Got one? + jnz flsmdm ; If so, try for another + ret ; Receiver is drained. Return. + +; +; SIO input buffer handling. The buffer pointers are held as pointers into +; the buffer. The read pointer +; is to the next unused character, the write pointer to the next unused space. +; +siord: dw ovlend ; next char to read +siowr: dw ovlend ; next char to write +sioct: dw 0 ; number in buffer + +xsuck: push d ; save regs version of suck + push b + push h + call suck + pop h + pop b + pop d + ret + +; +; suck +; +; this routine is called whenever it would be possible that some +; characters might be available in the SIO device; they are all +; transferred (there may be up to 4 pending) to the buffer. +; +; all registers are destroyed +; +suck: +IF pcw + call baxist ; check input status via BDOS + ora a ; check if zero +ENDIF +IF cpc + lxi b,mnprts ; get input status directly + dw inpc ; IN A,(C) + ani input ; mask for Rx ready +ENDIF + rz ; return if no + +IF pcw + call baxin ; fetch character via BDOS +ENDIF +IF cpc + lxi b,mnport ; fetch character directly from SIO + dw inpc ; IN A,(C) +ENDIF + + lhld siowr ; write pointer + mov m,a ; put character + + lxi d,1-ovlend ; take off base, bump pointer + dad d + mov a,h ; top byte of offset + ani siomsk/256 ; masked off + mov h,a + lxi d,ovlend ; add on base again + dad d + shld siowr ; replace pointer + + lhld sioct ; bump count in buffer + inx h + shld sioct + + jmp suck ; go round in case any more + +; +; outlpt - output character in E to printer +; console is selected. +; preserves de. +outlpt: + push d ; save DE in either case + mov c,e ; correct arg register + call blist + pop d ; restore saved register pair + ret + +; +; Screen manipulation routines +; csrpos - move to row B, column C +; +; csrpos for terminals that use a leadin sequence followed +; by (row + 31.) and (column + 31.) +; or (row) and (column) +; +csrpos: push b ; save coordinates + lxi d,curldn ; get cursor leadin sequence + call prtstr ; print it + pop h ; restore coordinates + mov a,h ; get row + adi (' '-1) ; space is row one + mov e,a + push h + call outcon ; output row + pop h + mov a,l ; get column + adi (' '-1) ; space is column one + mov e,a + jmp outcon ; output it and return + +; +; delchr - make delete look like a backspace. Unless delete is a printing +; character, we just need to print a backspace. (we'll output clrspc +; afterwards) +; For Kaypro and Vector General, delete puts a blotch on the screen. +; For Apple and Osborne 1, delete moves but doesn't print. +delchr: +IF pcw ;[6] OBS for Phillip Wade + lxi d,delstr ;[5] send a string rather than a single character + call prtstr + +delstr: db bs,' ',bs,'$' ;[OBS] Was bs,space,bs,bs +ENDIF ;pcw + + mvi e,bs ;get a backspace + jmp outcon + +; erase the character at the current cursor position +clrspc: mvi e,' ' + call outcon + mvi e,bs ;get a backspace + jmp outcon + +; erase the current line +clrlin: lxi d,eralin + jmp prtstr + +; erase the whole screen, and go home. preserves b (but not c) +clrtop: lxi d,erascr + jmp prtstr + + +IF pcw +sysver: db 'Amstrad PCW with SIO option$' +ENDIF +IF cpc +sysver: db 'Amstrad CPC with CP/M Plus$' +ENDIF + +outlin: db esc,'H',esc,'J',cr,lf,' $' + +erascr: db esc,'H',esc,'J$' ;Clear screen and go home. +eralin: db cr,esc,'K$' ;Clear line. +curldn: db esc,'Y$' ;cursor leadin +ttab: ;Table start location. +ta: db esc,'A$',0 ;Cursor up. +tb: db esc,'B$',0 ;Cursor down. +tc: db esc,'C$',0 ;Cursor right. +td: db esc,'D$',0 ;Cursor left +te: db esc,'E$',0 ;Clear display +tf: db '$',0,0,0 ;Enter Graphics Mode +tg: db '$',0,0,0 ;Exit Graphics mode +th: db esc,'H$',0 ;Cursor home. +ti: db esc,'I$',0 ;Reverse linefeed. +tj: db esc,'J$',0 ;Clear to end of screen. +tk: db esc,'K$',0 ;Clear to end of line. + +ovlend equ $ ; End of overlay + + END diff --git a/cpxpro.asm b/cpxpro.asm new file mode 100644 index 0000000..9099b04 --- /dev/null +++ b/cpxpro.asm @@ -0,0 +1,561 @@ +IF NOT lasm +.printx * CPXPRO.ASM * +ENDIF ;NOT lasm +; 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. +; +; revision history: +; +;edit 2, 16-Oct-1990 by MF. Reformatted speed tables according to +; current usage and reworked sysspd routine accordingly. +; Also eliminated cursor-positioning routines as we now link to +; cpxvdu.asm. Reworked version message according to current usage. +;edit 1, 17 November, 1987, by OBSchou. Extracted Compupro code +; from CPMPRO.ASM and massaged fort CP/M kermit V4.09 +; +; Modifications to KERMIT-80 for use with Compupro Interfacer 3/4 "[gv]" +; +; Guy Valiquette, M.D. +; Black Bldg. Rm 322 +; Dept. of Neurology +; College of Physicians & Surgeons +; Columbia University +; 630 W. 168th Street +; New York, NY 10032 +; (212) 694-3965 +; +; I/O routines for Interfacer 3/4 board +; Allow sending break with <ESC> B while CONNECTed +; Terminal control sequences for Wyse Technology WY-100 +; Add calls to "hangup" subroutine in EXIT and BYE to hang-up phone if +; using a smart modem by disabling UART (and withdrawing DTR signal) +; +; +; Using KERMIT with Compupro Interfacer 3/4: +; - Set compro below to TRUE, all other to FALSE +; - Select the ABSOLUTE USER number you want with the user EQUate +; - Select the terminal control string set needed (or write your +; own if not there) +; - Note that I had to use a kludge to get the signon message right. +; Code in KERMIT as I found it did not, nor could it, work. Search +; for the section of code under: IF compro AND wy100 and imitate. +; - If you have a smart modem, CONNECT puts you in contact with your +; modem. Use your usual "wake-up" character sequence to dial out. +; You can CONNECT and return to KERMIT repeateadly without hanging up +; UNLESS you change the baud rate, execute the BYE command or EXIT. +; - Baud rate set up in code to use 1200 baud as default. Can easily +; be changed to 300 (or whatever). The byte defined at label "baudrt" +; is the mode register 2 used to initialize the UART on first CONNECT. +; The low order nibble of this byte is the baud rate. Refer to the +; Compupro manual to set whatever default baud rate desired by changing +; this low nibble at baudrt db 0011$xxxxb. +; +; Note: "Wrapup" work (outlined below) to clean up code not done since +; new version of KERMIT is due out in a few weeks (says fdc) +; +; WRAPUP: +; - outchri modification done for IF inout ONLY +; - stchr routine implemented for IF inout ONLY +; and used by outchr only +; +; +; Keep module name, edit number, and last revision date in memory. +family: db 'CPXPRO.ASM (2) 16-Oct-1990 $' +; +; Assembly time message to let me know I'm building the right version. +; LASM generates an 'S' error along with the message, which is messy, but +; better than trying to put everything inside a IF m80 OR mac80 conditional, +; because LASM doesn't like nested IF's, either. + +IF compro +.printx * Assembling Kermit-80 for Compupro Interfacer 4 (or 3) * +ENDIF + +iobyte EQU 03H ;Location of I/O byte + +IF compro +if4 EQU 10H ;standard base address of Interfacer 4/3 board +datap EQU if4+0 ;data port (read/write) +stat EQU if4+1 ;status port (read/write) +mode EQU if4+2 ;mode registers (read/write) +command EQU if4+3 ;command register (read/write) +txint EQU if4+4 ;transmit interrupts status/mask (read/write) +rxint EQU if4+5 ;receive interrupts status/mask (read/write) +; if4+6 not used +usersel EQU if4+7 ;absolute user number select register +output EQU 1 +input EQU 2 +; Note: tested with CP/M Ver2.2, and Racal-Vadic Auto Dial VA212 modem +; and USRobotics Password modems. [gv] +user EQU 7 ;ABSOLUTE user number on IF4 or IF3 +; Also remember to select a terminal!!! +ENDIF;compro +; + +sysxin: ;system initialisation not covered by sysinit + ret ; return from system-dependent routine + +; +; +; system-dependent termination processing +; If we've changed anything, this is our last chance to put it back. +sysexit: + ret + +; +; system-dependent processing for start of CONNECT command +; +syscon: + ret + +; +; +; syscls - system-dependent close routine +; called when exiting transparent session. +; +syscls: + ret +; +; +; sysinh - help for system-dependent special functions. +; called in response to <escape>?, after listing all the +; system-independent escape sequences. +; +sysinh: + lxi d,inhlps ; we got options... + call prtstr ; print them. + ret +inhlps: + + db cr,lf,'D - drop the line' + db cr,lf,'B - send a break' + db cr,lf + db '$' ;[hh] table terminator + +; +; sysint - system dependent special functions +; called when transparent escape character has been typed; +; the second character of the sequence is in A (and in B). +; returns: +; non-skip: sequence has been processed +; skip: sequence was not recognized +sysint: + ani 137O ; convert lower case to upper, for testing... + + cpi 'D' ;Disconnect modem? + jnz intc00 ;no +hangup: xra a ;get a null byte + out command ;disable UART + sta ckdialf ;pull down flag to reinitialize UART + ret ;most smart modems will hang up on loosing DTR +intc00: + cpi 'B' ; Send a reak? + jz sendbr + ret + + +;send a break +sendbr: mvi a,user ;select our UART + di ;quiet + out usersel ;select it + in command ;get current command byte + ori 00001000b ;set "send break" bit + out command ;send to UART + ei + + ;now for 300 msec timing loop (at 4 MHz, 0 wait state) + mvi a,30 ;[obs] call delay for 300 ms + call delay + + mvi a,user ;now, go back to UART + di ;quiet + out usersel + in command ;get current command + ani 11110111b ;reset "send break" bit + ori 00010000b ;and set "reset errors" command bit (in case) + out command ;send back to UART + ei + jmp rskp + + +ckdial: + lda ckdialf ;check flag that forces reinitialization + ora a ;test it + jz ckdial0 ;must redo it + mvi a,user ;user number + di + out usersel ;select it + in command ;get current command register + ei + ani 00000111b ;mask for normal operating mode + ;(DTR on, RX and TX both enabled) + cpi 00000111b ;is it? + jz rskp ;UART is on, start terminal emulation +; else initialize UART... +ckdial0:di + mvi a,user ;select user + out usersel + mvi a,0001$0000b ;reset errors command + out command ;send to command register + out command + out command ;...make sure it got it + in command ;confirm + lda moderg1 ;get mode register 1 + out mode ;send it + lda moderg2 ;get mode register 2 + out mode ;send it + mvi a,0011$0111b ;command register to start things + out command ;send it + ei ;turn interrupts back on + mvi a,0ffh ;get a non-zero byte + sta ckdialf ;pull down flag +; + jmp rskp ;start terminal emulation + + +; sysflt - system-dependent filter. +; called with the character in E. +; preserves bc, de, hl. +; note: <xon>,<xoff>,<del>, and <nul> are always discarded. +sysflt: + mov a,e ; get character for testing + ret + +; mdmflt - modem filter [30] +; called with character to be sent to printer in E +; with parity set as appropriate. +; return with accumulator = 0 do do nothing, +; <> 0 to send char in E. +mdmflt: + mov a,e ;[30] get character to test + ret + + +; prtflt - printer filter [30] +; called with character to be sent to printer in E +; returns with a = 0 to do nothing +; a <> 0 to print it. +; +; this routine for those printer that automatically insert +; a lf on cr, or cr for lf. Should this be shifted to +; the system indep. stuff, in say 4.06? +prtflt: + mov a,e ; [30] get character to test + ret + + +; +; +; system-dependent processing for BYE command. +; for apmmdm, heath, and lobo, hang up the phone. +sysbye: + + call hangup + ret +; +; This is the system-dependent command to change the baud rate. +; DE contains the two-byte value from the baud rate table; this +; value is also stored in 'speed'. +sysspd: + + +IF compro + lda speed ;[MF]Get requested baud-rate + mov b,a ;Save the number. + lxi h,baudrt ;point to current baud rate + mov a,m ;get it + ani 0f0h ;keep high nibble + ora b ;merge back baud rate + mov m,a ;store back + xra a ;clear A + sta ckdialf ;put up flag to force reinitialization + ret ;...at next connect + +ENDIF;compro + + +; + +; Speed tables +; (Note that speed tables MUST be in alphabetical order for later +; lookup procedures, and must begin with a value showing the total +; number of entries. The speed help tables are just for us poor +; humans. + +; db string length,string,divisor (2 identical bytes or 1 word) +; [Toad Hall] + +spdtbl: db 8 ;[MF]8 entries in speed table + db 3,'110$' + db 02h,02h ;[MF]110 baud + db 4,'1200$' + db 07h,07h ;[MF]1200 baud + db 5,'134.5$' + db 03h,03h ;[MF]134.5 baud + db 3,'150$' + db 04h,04h ;[MF]150 baud + db 4,'1800$' + db 08h,08h ;[MF]1800 baud + db 5,'19200$' + db 0fh,0fh ;[MF]19200 baud + db 4,'2000$' + db 09h,09h ;[MF]2000 baud + db 4,'2400$' + db 0ah,0ah ;[MF]2400 baud + db 3,'300$' + db 05h,05h ;[MF]300 baud + db 4,'3600$' + db 0bh,0bh ;[MF]3600 baud + db 4,'4800$' + db 0ch,0ch ;[MF]4800 baud + db 2,'50$' + db 00h,00h ;[MF]50 baud + db 3,'600$' + db 06h,06h ;[MF]600 baud + db 4,'7200$' + db 0dh,0dh ;[MF]7200 baud + db 2,'75$' + db 01h,01h ;[MF]75 baud + db 4,'9600$' + db 0eh,0eh ;[MF]9600 baud + +sphtbl: db cr,lf,'50 75 110 134 150 300 600 1200' + db cr,lf,'1800 2000 2400 3600 4800 7200 9600 19200$' + +ckdialf:db 0 ;force UART initialization on entry +baudrt: db 0011$0111b ;default baud rate: 1200 baud +moderg1:db 0100$1110b ;default mode register 1: + ; -asynch, 8 data bits, 1 stop bit, + ; -parity odd, disabled +moderg2 EQU baudrt +ENDIF;compro +; + +; +; The following conditionals were once a huge if not statement. There +; wasn't enough room to add the lobo to the list, so it had to be broken +; into 2, which you can't do with an if not. I redid it as two ifs and +; applied them to those that wouldn't set baud. [Hal Hostetler] +; This is the system-dependent SET PORT command. +; HL contains the argument from the command table. +sysprt: + ret +; +; +; Port table not applicable +prttbl EQU 0 +prhtbl EQU 0 ; + +; +; +; selmdm - select modem port +; selcon - select console port +; selmdm is called before using inpmdm or outmdm; +; selcon is called before using inpcon or outcon. +; For iobyt systems, diddle the I/O byte to select console or comm port; +; For Decision I, switches Multi I/O board to console or modem serial +; port. [Toad Hall] +; For the rest, does nothing. +; preserves bc, de, hl. +selmdm: + ret + +selcon: + ret +; +; Get character from console, or return zero. +; result is returned in A. destroys bc, de, hl. +; +inpcon: + mvi c,dconio ;Direct console I/O BDOS call. + mvi e,0FFH ;Input. + call BDOS + ret +; +; +; Output character in E to the console. +; destroys bc, de, hl +; +outcon: + mvi c,dconio ;Console output bdos call. + call bdos ;Output the char to the console. + ret +; +; +; outmdm - output a char from E to the modem. +; the parity bit has been set as necessary. +; returns nonskip; bc, de, hl preserved. +outmdm: +;************************System Dependent**************************** +; +; Addition by [gv], 16/7/84 +; Return the status of the modem port: +; Z flag set if NO input available +; C flag set in NOT output ready +; Destroys A and flags, preserves all other registers +; +stchr: + di + mvi a,user + out usersel + in stat + ani output + in stat + ei + jz outmdm ;not output ready, try again +; else... + di ;no interrupts + mvi a,user + out usersel + mov a,e ;get back character + out datap + ei + ret + +; + +; +; +; get character from modem; return zero if none available. +; for IOBYT systems, the modem port has already been selected. +; destroys bc, de, hl. +inpmdm: +; + di + mvi a,user + out usersel + in stat + ei + ani input ;test for input status (C flag reset by ANI n) + rz ; no input available +; +;************************System Dependent**************************** +; +; Addition by [gv], 16/7/84 +; get a character "raw" (i.e. just get it in A) +; +; Note: MUST have character ready before call, use stchr + mvi a,user + di + out usersel + in datap + ei + ret +; +; + +; +; flsmdm - flush comm line. +; Modem is selected. +; Currently, just gets characters until none are available. + +flsmdm: call inpmdm ; Try to get a character + ora a ; Got one? + jnz flsmdm ; If so, try for another + ret ; Receiver is drained. Return. + + +; +; +; lptstat - get the printer status. Return a=0 if ok, or 0ffh if not. +lptstat: + xra a ; assume it is ok.. this may not be necessary + ret +; +; +; outlpt - output character in E to printer +; console is selected. +; preserves de. +outlpt: + push d ; save DE in either case + call prtflt ; go through printer filter [30] + ana a ; if A = 0 do nothing, + jz outlp1 ; [30] if a=0 do nothing + mvi c,lstout + call bdos ;Char to printer +outlp1: pop d ; restore saved register pair + + + +IF inout +prtout: +ENDIF ;inout +IF compro AND inout + di + mvi a,user + out usersel + in stat + ei +ENDIF;compro AND inout +IF (NOT compro) AND inout + in mnprts ;Get the output ready flag. +ENDIF;(NOT compro) AND inout +IF inout + ani output ;Is it set? + jz prtout ;If so, loop until it isn't. +ENDIF ;inout +IF compro AND inout + di + mvi a,user + out usersel + mov a,e + out datap + ei +ENDIF;compro AND inout +IF (NOT compro) AND inout + mov a,e ;Get the char to output. +prtou2: out mnport ;Output it. +ENDIF;(NOT compro) AND inout + ret + + +; + +; +; Screen manipulation routines +; +; delchr - make delete look like a backspace. Unless delete is a printing +; character, we just need to print a backspace. (we'll output clrspc +; afterwards) +; For Kaypro and Vector General, delete puts a blotch on the screen. +; For Apple and Osborne 1, delete moves but doesn't print. +delchr: + mvi e,bs + call outcon + +; erase the character at the current cursor position +clrspc: mvi e,' ' + call outcon + mvi e,bs ;get a backspace + jmp outcon + +; erase the current line +clrlin: lxi d,eralin + jmp prtstr + +; erase the whole screen, and go home. preserves b (but not c) +clrtop: lxi d,erascr + jmp prtstr + + +IF compro; [gv] +sysver: db '[Compupro IF4-',user+'0',']$' +ENDIF;compro + +IF lasm +LINK CPXVDU.ASM +ENDIF ;lasm diff --git a/cpxsb.asm b/cpxsb.asm new file mode 100644 index 0000000..3beefe7 --- /dev/null +++ b/cpxsb.asm @@ -0,0 +1,696 @@ +IF NOT lasm +.printx * CPXSB.ASM * +ENDIF ;NOT lasm +; 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 file created 16 July, 1987 by OBSchou from code submitted +; by William Rose for the Micromint SB180 systems (as featured in +; BYTE magazine, 1986). This file has been modified to fit in with +; Kermit-80 V4.08 etc. His file KERSYS.ASM is a stripped down version +; of CPXSYS.ASM (formerly CP4SYS.ASM). +; +; revision history: +; KERSYS.ASM - version 0.8 dated 13 Jul 87. +; +; Cutdown CP4SYS.ASM for SB-180/Ampro 230. +; +; +; While this is a single CPU version (to ease editing) the assembler +; conditionals have been kept to identify machine specific code. +; +; Note that the baud setting routine also sets parity, but this does not +; change the parity given by Kermit's 'stat' command. I assume that the +; main body of the program does its own parity check. +; +; Revision history (last entry first) +; +; edit 2, 22 July by OBSchou to massage file to fit with CPXCOM.ASM. +; +; edit 1, 15 July, 1987 by OBSchou for William Rose who submitted +; the code for Kermit-80 V 4.05. Modified code as appropriate +; for 4.08 compatability. +; + +delfac EQU 150 ; Delay factor in SB-180 input loop - a fudge + +; +; Keep module name, edit number, and last revision date in memory. +; +;sysedt: db 'KERSYS.ASM (03) 12-FEB-87 $' ; last SB-180 revision +;sysedt: db 'KERSYS.ASM (04) 12-APR-87 $' ; Telecom Merlin added +;sysedt: db 'KERSYS.ASM (5) 9-May-87 $' ; Minor tidying +;sysedt: db 'KERSYS.ASM (6A) 17-Jun-87 $' ; BT Merlin M2215 only +;sysedt: db 'KERSYS.ASM (7) 19-Jun-87 $' ; SB-180 only +;sysedt: db 'KERSYS.ASM (8) 13-Jul-87 $' ; 6/9 MHz version +family: db 'CPXSB.ASM (2) 22-Jul-87$' ; First entry for V4.08/9 + +; +; Assembly time message to let me know I'm building the right version. +; + +IF sb180 +.printx * Assembling Kermit-80 for Micromint SB-180 * +ENDIF + + +IF sb180 +mnctrla EQU 000H ;Modem control port - CNTLA0 +mnctrlb EQU 002H ;Modem control port - CNTLB0 +mnstat EQU 004H ;Modem status port - STAT0 +mntxdat EQU 006H ;Modem output port - TDR0 +mnrddat EQU 008H ;Modem input port - RDR0 +output EQU 002H ;Transmit data register empty mask - TDRE +input EQU 080H ;Receive data register full mask - RDRF +z80 EQU TRUE ;This one's an HD64180, but Z80 will do +ENDIF + + +sysxin: ; continuation of system initialisation from sysinit + +IF sb180 + lxi h, porbuf ; park the original settings + db 0EDh, 038h, mnctrla ; HD64180 code IN0 g,(m) + mov m, a + inx h + db 0EDh, 038h, mnctrlb + mov m, a + inx h + db 0EDh, 038h, mnstat + mov m, a +ENDIF + ; re-initialise for KERMIT +IF sb6 + mvi h, 08h ; 0000$1001 - 9600 baud, (even) parity + mvi l, 08h ; 'speed' is two bytes +ENDIF + +IF sb9 + mvi h, 21h ; 0010$0001 - 9600 baud, (even) parity + mvi l, 21h ; 'speed' is two bytes +ENDIF + +IF sb180 + shld speed + lxi h, parind + mvi m, 8 ; index for 8 bits, no parity, 2 stop + call setpor +ENDIF + + ret + +porbuf: ds 3 ; original port settings + +; +; system-dependent KERMIT termination processing +; If we've changed anything, this is our last chance to put it back. +; +sysexit: + +IF sb180 + lxi h, porbuf + mov a, m ; output parity + db 0EDh, 039h, mnctrla ; HD64180 code OUT0 (m),g + inx h + mov a, m ; output baud rate + db 0EDh, 039h, mnctrlb + inx h + mov a, m ; output to clear error flags + db 0EDh, 039h, mnstat + ; read twice to reset DCD0 ? + db 0EDh, 038h, mnstat + db 0EDh, 038h, mnstat +ENDIF + + ret + +; +; system-dependent processing for start of CONNECT command +; +syscon: + ret + +conmsg: ; Messages printed when entering transparent (CONNECT) mode: + + db '$' + +; +; syscls - system-dependent close routine +; called when exiting transparent session. +; +syscls: + ret + +; +; sysinh - help for system-dependent special functions. +; called in response to <escape>?, after listing all the +; system-independent escape sequences. +; +sysinh: + +IF sb180 + lxi d, inhlps + call prtstr +ENDIF + + ret + +; Additional, system-dependent help for transparent mode +; (two-character escape sequences) +inhlps: + +IF sb180 + db cr, lf, 'V Cycle port parameters' +ENDIF + + db '$' ; string terminator + +; +; sysint - system dependent special functions +; called when transparent escape character has been typed; +; the second character of the sequence is in A (and in B). +; returns: +; non-skip: sequence has been processed +; skip: seqence was not recognized +; +sysint: +; ani 137O ; convert lower case to upper, for testing... + ; does this work? +IF sb180 + cpi 'V' ; cycle port ? + jz pcycl + cpi 'v' + jz pcycl +ENDIF + + jmp rskp ; take skip return - command not recognised + +; Actual commands + +IF sb180 +pcycl: + lxi h, parind ; increment parval, modulo 12 + mov a, m + adi 1 + cpi 13 + jnz pcy1 + mvi a, 1 +pcy1: mov m, a ; update the storage + ; get index of name in parstr + ora a ; clear flags + dcr a + rlc + rlc + mov c, a + mvi b, 0 + lxi h, parstr + inx h + dad b + push h + lxi d, cgmsg1 + call prtstr + pop d + call prtstr + lxi d, cgmsg2 + call prtstr + call setpor ; reset the port + + ret + +cgmsg1: db '<$' +cgmsg2: db '>$' +ENDIF + + ret + +; +; Delay routine. Called with time (hundredths of seconds) in A. +; The inner loop delays 1001 T-states, assuming no wait states are +; inserted; this is repeated CPUSPD times, for a total delay of just +; over 0.01 second. (CPUSPD should be set to the system clock rate, +; in units of 100KHz: for an unmodified Kaypro II, that's 25 for +; 2.5 MHz. Some enterprising soul could determine whether or not the +; Kaypro actually inserts a wait state on instruction fetch (a common +; practice); if so, the magic number at delay2 needs to be decreased. +; (We also neglect to consider time spent at interrupt level). +; +; called by: sendbr +; destroys BC +; +;delay: mvi c,cpuspd ; Number of times to wait 1000 T-states to +; ; make .01 second delay +;delay2: mvi b,70 ; Number of times to execute inner loop to +; ; make 1000 T-state delay +;delay3: dcr b ; 4 T-states (* 70 * cpuspd) +; jnz delay3 ; 10 T-states (* 70 * cpuspd) +; dcr c ; 4 T-states (* cpuspd) +; jnz delay2 ; 10 T-states (* cpuspd) +; ; total delay: ((14 * 70) + 14) * cpuspd +; ; = 1001 * cpuspd +; dcr a ; 4 T-states +; jnz delay ; 10 T-states +; +; ret ; grand total: ((1001 * cpuspd) + 14) * a + +; +; sysflt - system-dependent filter +; called with character in E. +; if this character should not be printed, return with A = zero. +; preserves bc, de, hl. +; note: <xon>,<xoff>,<del>, and <nul> are always discarded. +; +sysflt: + mov a,e ; get character for testing + ret + +; +; mdmflt - modem filter +; called with character to be sent to printer in E +; with parity set as appropriate. +; return with accumulator = 0 do do nothing, +; <> 0 to send char in E. +mdmflt: + mov a,e ; get character to test + ret + +; +; prtflt - printer filter +; called with character to be sent to printer in E +; returns with a = 0 to do nothing +; a <> 0 to print it. +; +; this routine for those printer that automatically insert +; a lf on cr, or cr for lf. Should this be shifted to +; the system indep. stuff, in say 4.06? +; +prtflt: + mov a,e ; get character to test + +IF FALSE ; strip out lf from printer stream + ani 7fh ; make sure it is parity less + cpi lf ; is it a line feed? + rnz ; no, print it +; xra a ; yes, don't. + +ENDIF + + ret + +; +; system-dependent processing for BYE command. +; +sysbye: + ret + +; +; This is the system-dependent command to change the baud rate. +; DE contains the two-byte value from the baud rate table; both +; bytes of this value are also stored in 'speed'. +; +sysspd: + +IF sb180 + lxi d, prtmsg ; ask for variables + call prtstr + + lxi d, tbuf ; get suitable string + mvi c, 10 + call bdos + + lxi h, tbuf1 + mov a, m + ora a + jz setpor ; leave unchanged if string zero length + + cpi 3 ; check given length + jnz spd1 ; error - wrong length + inx h + inx h + mov a, m + ani 137O ; convert parity code to upper case + mov m, a + + lxi d, tbuf1 ; get index of given parameter + lxi h, parstr + call sposn + ora a + jnz spd2 ; or fall through if error +spd1: lxi d, invmsg ; invalid input - try again + call prtstr + jmp sysspd + +spd2: adi 3 ; get index to parval table + rrc ; by dividing by 4 + rrc + ani 15 ; mask out high bits + lxi h, parind + mov m, a ; and store it + call setpor ; set up port iaw index and speed bytes + + ret + +prtmsg: db cr,lf,'Enter bit/char, parity, and stop bits required.' + db cr,lf,'(Bit 7/8 Parity N/O/E Stop 1/2 - CR same) : $' +invmsg: db cr,lf,'Invalid parameters$' + +parind: db 8 ; default <8N2> index +parstr: db 48,'7N1$7N2$7O1$7O2$7E1$7E2$' + db '8N1$8N2$8O1$8O2$8E1$8E2$' +parval: db 0,1,16+2,16+3,2,3 + db 4,5,16+6,16+7,6,7 +tbuf db 6 +tbuf1 db 3,'8N2','$$$$' + +; +; Set up the port using the table index in parind and the speed byte +; +setpor: + lxi h, parind + mov a, m + dcr a + lxi h, parval ; table base + mvi b, 0 + mov c, a + dad b ; HL points at parameter value + mov a, m + mov b, a ; park parval + + ani 16 ; the parity switch bit + lxi h, speed + add m ; this is now the baud rate byte + mov c, a ; park it + + mov a, b ; sort out the parameter byte + ani 7 ; b/p/s only wanted + adi 96 ; RE, TE enable + db 0EDh,039h,mnctrla ; output parity etc. + mov a, c + db 0EDh,039h,mnctrlb ; output baud rate + mvi a, 0 + db 0EDh,039h,mnstat ; clear status + db 0EDh,038h,mnstat ; read twice to reset DCD0 + db 0EDh,038h,mnstat + ret + +; +; Find substring position - Leventhal page 293, modified +; enter with subtring in DE and string in HL +; returns index in A or 0 for failure +; +sposn: + mov a, m ; exit if either string length zero + ora a + jz notfnd + sta slen + mov b, a + inx h + shld string + xchg + mov a, m + ora a + jz notfnd + sta sublen + mov c, a + inx h + shld substg + mov a, b + +; no of searches = stringlen - substrlen + 1 +; if substr longer than string quit immediately + + sub c + jc notfnd + inr a + mov c, a + xra a + sta index + +; search until remaining string shorter than substring + +slp1: lxi h, index + inr m + lda sublen + mov b, a + lhld substg + xchg + lhld string + +; try to match substring starting at index + +cmplp: ldax d + cmp m + jnz slp2 + dcr b + jz found + inx h + inx d + jmp cmplp + +; arrive here if match fails + +slp2: dcr c + jz notfnd + lhld string + inx h + shld string + jmp slp1 + +; found, return index + +found: lda index + ret + +; not found, return zero + +notfnd: sub a + ret + +string: ds 2 +substg: ds 2 +slen: ds 1 +sublen: ds 1 +index: ds 1 +ENDIF + + ret + +; +; Speed tables +; (Note that speed tables MUST be in alphabetical order for later +; lookup procedures, and must begin with a value showing the total +; number of entries. The speed help tables are just for us poor +; humans. +; +; db string length, string, divisor (2 bytes or 1 word, ab) +; the data byte a is return in A and E, and b in D +; only byte 'a' is the key for the table + +IF sb6 +spdtbl: db 9 ; 9 entries + db 04h,'1200$', 0Bh,0Bh + db 03h,'150$', 0Eh,0Eh + db 05h,'19200$', 01h,01h + db 04h,'2400$', 0Ah,0Ah + db 03h,'300$', 0Dh,0Dh + db 05h,'38400$', 00h,00h + db 04h,'4800$', 09h,09h + db 03h,'600$', 0Ch,0Ch + db 04h,'9600$', 08h,08h + +sphtbl: db cr,lf + db ' 150 300 600 1200 2400 4800 9600 19200 38400$' +ENDIF + +IF sb9 +spdtbl: db 7 ; 7 entries + db 04h,'1200$', 24h,24h + db 05h,'19200$', 20h,20h + db 04h,'2400$', 23h,23h + db 03h,'300$', 26h,26h + db 04h,'4800$', 22h,22h + db 03h,'600$', 25h,25h + db 04h,'9600$', 21h,21h + +sphtbl: db cr,lf + db ' 300 600 1200 2400 4800 9600 19200$' +ENDIF + + +; +; This is the system-dependent SET PORT command. +; HL contains the argument from the command table. +; +sysprt: + ret + +IF sb180 +prttbl EQU 0 ; SET PORT is not supported +prhtbl EQU 0 +ENDIF + +; +; selmdm - select modem port +; selcon - select console port +; selmdm is called before using inpmdm or outmdm; +; selcon is called before using inpcon or outcon. +; For iobyt systems, diddle the I/O byte to select console or comm port; +; For the rest, does nothing. +; preserves bc, de, hl. +; +selmdm: + ret + +selcon: + ret + +; +; Get character from console, or return zero. +; result is returned in A. destroys bc, de, hl. +; +inpcon: + mvi c,dconio ;Direct console I/O BDOS call. + mvi e,0FFH ;Input. + call BDOS + + ret + +; +; Output character in E to the console. +; destroys bc, de, hl +; +outcon: + mvi c,dconio ;Console output bdos call. + call bdos ;Output the char to the console. + + ret + +; +; outmdm - output a char from E to the modem. +; the parity bit has been set as necessary. +; returns nonskip; bc, de, hl preserved. +; +outmdm: + +IF sb180 + db 0EDh,038h,mnstat + ani output ; check status + jz outmdm ; wait until port is available + mov a, e + db 0EDh,039h,mntxdat ; transmit +ENDIF + + ret + +; +; get character from modem; return zero if none available. +; for IOBYT systems, the modem port has already been selected. +; destroys bc, de, hl. +; +inpmdm: + +IF sb180 + lxi h, delfac ; loops to give delay +inpm1: db 0EDh,038h,mnstat + ani input ; check status + jz inpm2 + db 0EDh,038h,mnrddat ; get a byte + ret + +inpm2: dcx h ; no data + mov h, a + ora l + jnz inpm1 ; still tries left + ret ; with zero in A +ENDIF + + ret + +; +; flsmdm - flush comm line. +; Modem is selected. +; Currently, just gets characters until none are available. +; +flsmdm: + call inpmdm ; Try to get a character + ora a ; Got one? + jnz flsmdm ; If so, try for another + ret ; Receiver is drained. Return. + +; + +; +; lptstat - get the printer status. Return a=0 if ok, or 0ffh if not. +lptstat: +IF iobyte ;[33] + call bprtst ; get status +ENDIF ;iobyte[33] +IF NOT iobyte ;[33] + xra a ; assume it is ok.. this may not be necessary +ENDIF ;iobyte [33] + ret +; +; outlpt - output character in E to printer +; console is selected. +; preserves de. +; +outlpt: + push d ; save DE in either case + call prtflt ; go through printer filter [30] + ana a ; if A = 0 do nothing, + jz outlp1 ; if a=0 do nothing + +outlp1: pop d ; restore saved register pair + ret + +; delchr - make delete look like a backspace. Unless delete is a printing +; character, we just need to print a backspace. (we'll output clrspc +; afterwards) +delchr: + + mvi e,bs ;get a backspace + jmp outcon + +; erase the character at the current cursor position +clrspc: mvi e,' ' + call outcon + mvi e,bs ;get a backspace + jmp outcon + +; erase the current line +clrlin: lxi d,eralin + jmp prtstr + +; erase the whole screen, and go home. preserves b (but not c) +clrtop: lxi d,erascr + jmp prtstr + +IF sb180 +sysver: db 'MicroMint SB 180 ' +ENDIF + +IF sb6 + db ' (6 MHz)' +ENDIF + +IF sb9 + db ' (9 MHz)' +ENDIF + db '$' + +IF lasm +LINK CPXVDU.ASM ; get terminal defs etc +ENDIF ;lasm diff --git a/cpxswt.asm b/cpxswt.asm new file mode 100644 index 0000000..32b0d11 --- /dev/null +++ b/cpxswt.asm @@ -0,0 +1,294 @@ +IF NOT lasm +.printx * CPXSWT.ASM * +ENDIF ; NOT lasm +; 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 file is a simple family or system file switcher, selecting +; one of several family files, or selectin CPXSYS.ASM (now modified) +; if a family file does not exist. +; +; +; revision history: +; +;edit 10, 7-Jan-1991 by MF. Added code by Jay S. Rouman to support the +; Ampro Little Board (see CPXBBI.ASM) and PRINTX for the HP-125. +; edit 9, 1st September 1990 by Russell Lang, rjl@monu1.cc.monash.edu.au. +; Added Microbee support. +; edit 8, 2 December by OBSchou. Added Z80MU "system" to allow kermit-80 +; debugging on a PC! +; +; edit 7, 27 October, 1987 by OBSchou. Added bits for Sanyo, Compupro, +; Genie and TRS-80 M4. +; +; edit 6, 16 July, 1987 for Will Rose, who has submitted code for +; Micromint SB180 (6 and 9 Mhz) and a BT Merlin (alias RAIR) +; +; edit 5, 15 July, 1987 by OBSchou for David Moore, who has submitted +; code for a Teletek SYSTEMASTER and for ADM22 terminals. +; +; edit 4, 14 July 1987 by OBSchou for JA Shearwood of Birmingham University, +; Chris Miles of Manchester University. Added a Cifer family file +; for John, and added a BigBoard-Kaypro-Xerox family file for Chris +; Finally, added in new family file for Heath, telcon, z100 and scntpr +; systems for Martin Carter of Nottingham University. +; +; edit 3, 6 April, 1986 by OBSchou. +; Added in switching for NCR Desision Mate V and Amstrad CPC 664/6128 +; systems. +; +; edit 2, March 16, 1987 by OBSchou. +; added in support for m80 macro assembler. +; +; edit 1 28 January, 1987 by OBSchou. +; Take out the series of printx etx and selection of systems and +; leave this with only the system dep. code for systems without +; a family file. Hopefully, this file will go alltogether in time. +; +; Keep module name, edit number, and last revision date in memory. +swtver: db 'CPXSWT.ASM (10) 7-Jan-1991 $' +; +; Assembly time message to let me know I'm building the right version. +; LASM generates an 'S' error along with the message, which is messy, but +; better than trying to put everything inside a IF m80 OR mac80 conditional, +; because LASM doesn't like nested IF's, either. + + +IF (torfam AND lasm) +;Link to the module with the code for Superbrains, Torch, Cifer and pci2651 +LINK CPXTOR.ASM ; also NCR DMV systems +ENDIF;(torfam AND lasm) - m80 use: INCLUDE from CPXTYP.ASM + +IF (ciffam AND LASM) +; Link to the Cifer family file. (Cifer code previously on CPXTOR.ASM) +LINK CPXCIF.ASM ; Cifer family file +ENDIF ;(ciffam AND lasm) - m80 use: INCLUDE from CPXTYP.ASM + +IF (appfam AND lasm) ;[33] apple frogs as a separate family.. +; Link to the APPLE family... +LINK CPXAPP.ASM +ENDIF ;(appfam AND lasm) - m80 use: INCLUDE from CPXTYP.ASM + +IF (norfam AND lasm); Link to the Northstar family (and Comart) +; Link to the NorthStar family file +LINK CPXNOR.ASM +ENDIF; (norfam AND lasm) - m80 use: INCLUDE from CPXTYP.ASM + +IF (pcwfam AND lasm) ;[35] Amstrad PCW 8256/8512 or CPC systems +; Link to the Amstrad PCW family +LINK CPXPCW.ASM +ENDIF ;(cpwfam AND lasm) - m80 use: INCLUDE from CPXTYP.ASM + +IF (bbifam AND lasm) ;Bigboard, Kaypro and Xerox 820 file +; Link to the Bigboard family +.printx * Linking to the BigBoard family * +LINK CPXBBI.ASM +ENDIF ;(bbifam AND lasm) - m80 use: INCLUDE from CPXTYP.ASM + +IF (heafam AND lasm) ; heath, z100, telcon, and scntpr systems +; Link to the Heath-telcon-screentyper family +.printx * Linking to the Heath-telcon-screentyper family * +LINK CPXHEA.ASM +ENDIF ;(heafam) - m80 use: INCLUDE from CPXTYP.ASM + +IF (sbfam AND lasm) +; Link to the SB180 Family file +,printx * Linking to the SB180 Family file * +LINK CPXSB.ASM +ENDIF ; (sbfam AND lasm) - m80 use: INCLUDE from CPXTYP.ASM + +IF (m2215 AND lasm) +; Link to the RAIR/ BT Merlin code +.printx * Linking to the Merlin/Rair code * +LINK CPXMRL.ASM +ENDIF ; (m2215 AND lasm) - m80 use: INCLUDE from CPXTYP.ASM + +IF (sanfam AND lasm) +; Link to the Sanyo code +.printx * linking to the sanyo code * +LINK CPXSYO.ASM +ENDIF ; (sanfam AND lasm) - m80 use: INCLUDE from CPXTYP.ASM + +IF (comfam AND lasm) +; Link to the compupro code +.printx * linking to the Compupro code * +LINK CPXPRO.ASM +ENDIF ; (comfam AND lasm) - m80 use: INCLUDE from CPXTYP.ASM + +IF (genfam AND lasm) +; Link to the Genie family code +.printx * linking to the Genie code * +LINK CPXGNI.ASM +ENDIF ; (genfam AND lasm) - m80 use: INCLUDE from CPXTYP.ASM + +IF (trsfam AND lasm) +; Link to the TRS-80 family file +.printx * linking to the TRS family file* +LINK CPXTM4.ASM +ENDIF ; (trsfam AND lasm) - m80 use: INCLUDE from CPXTYP.ASM + +IF (z80fam AND lasm) +; Link to the Z80MU family file +.printx * linking to the Z80MU family file* +LINK CPXZ80.ASM +ENDIF ; (z80fam AND lasm) - m80 use: INCLUDE from CPXTYP.ASM + +IF (beefam AND lasm) +; Link to the Microbee family file +.printx * linking to the Microbee family file * +LINK CPXBEE.ASM +ENDIF ; (beefam AND lasm) - m80 use: INCLUDE from CPXTYP.ASM + + +; If we have come here, we are assembling the CPXSYS.ASM file + +IF robin +.printx * Assembling KERMIT-80 for the DEC VT180 * +ENDIF + +IF vector +.printx * Assembling KERMIT-80 for the Vector Graphics * +ENDIF + +IF osi +.printx * Assembling KERMIT-80 for the Ohio Scientific * +ENDIF + +IF heath +.printx * Assembling KERMIT-80 for the Heath/Zenith 89 * +ENDIF + +IF z100 +.printx * Assembling KERMIT-80 for the Heath/Zenith Z100 * +ENDIF + +IF trs80 +.printx * Assembling KERMIT-80 for the TRS-80 II * +ENDIF + +IF osbrn1 +.printx * Assembling KERMIT-80 for the Osborne 1 * +ENDIF + +IF telcon +.printx * Assembling KERMIT-80 for the Telcon Zorba * +ENDIF + +IF dmII +.printx * Assembling KERMIT-80 for the DECmate II * +ENDIF + +IF gener +.printx * Assembling Generic KERMIT-80 * +ENDIF + +IF cpm3 +.printx * Assembling Generic KERMIT-80 for CP/M 3.0 * +ENDIF + +IF hp125 +.printx * Assembling Kermit-80 for the HP-125 Series 100 * +ENDIF ;hp125 + +IF kpii +.printx * Assembling Kaypro II KERMIT-80 * +ENDIF + +IF xer820 ;[pcc001] +.printx * Assembling Xerox 820 KERMIT-80 * +ENDIF ;[pcc001] + +IF bbII +.printx * Assembling BigBoard II KERMIT-80 * +ENDIF + +IF ampro +.printx * Assembling Ampro Little Board KERMIT-80 * +ENDIF + +IF mdI +.printx * Assembling for Morrow Decision I * +ENDIF ;mdI [Toad Hall] + +IF mmdI +.printx * Assembling for Morrow Micro Decision I * +ENDIF ;mmdI + +IF mikko +.printx * Assembling MikroMikko Kermit-80 * +ENDIF + +IF delphi ;[7] +.printx * Assembling Digicomp Delphi 100 Kermit-80 * +ENDIF ;[7] + +IF cpt85xx +.printx * Assembling CPT-85xx (under CompuPak CP/M) Kermit-80 * +ENDIF + +IF cmemco ;[25] +.printx * Assembling KERMIT-80 for the Cromemco (TU-ART) * +ENDIF;cmemco + +IF bbc ;[22] +.printx * Assembling Kermit-80 for BBC with Z80 co-processor * +ENDIF ;[22] + +IF rm380z ;[22] +.printx * Assembling Kermit-80 for Research Machines 380Z * +ENDIF ;[22] + +IF px8 ;[29] +.printx * Assembling Kermit-80 for Epson PX-8 * +ENDIF ;px8 [29] + +IF mmate ;[29] +.printx * Assembling KERMIT-80 for the PMC MicroMate * +ENDIF ;mmate [29] + +IF disc ;[29] +.printx * Assembling KERMIT-80 for the A. C. E. Discovery * +ENDIF ;disc [29] + +IF s1008 ;[29] +.printx * Assembling KERMIT-80 for the MicroSales s1008 * +ENDIF ;s1008 [29] + +IF access ;[29] +.printx * Assembling Kermit-80 for the ACCESS-MATRIX computer * +ENDIF ;access [29] + +IF lobo ;[hh] +.printx * Assembling Kermit-80 for the Lobo MAX-80 * +ENDIF;lobo [hh] + +IF teletek +.printx * Assembling Kermit-80 for the Teletek * +ENDIF ;teletek + +; +; +; If here, we have not linked to a family, so link to CPXSYS.ASM +IF lasm + LINK CPXSYS.ASM +ENDIF ;lasm +; +; If we are using m80, then the CPXSYS.ASM file will be INCLUDED from CPXTYP +; + + + diff --git a/cpxsy2.asm b/cpxsy2.asm new file mode 100644 index 0000000..a420d37 --- /dev/null +++ b/cpxsy2.asm @@ -0,0 +1,1364 @@ +IF NOT lasm +.printx * CPXSY2.ASM * +ENDIF ;NOT lasm +; 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 file contains the system-dependent code and data for KERMIT. +; It will be probably be broken into independent files to generate +; overlays for the various systems, one or more overlay possible +; from each file. For now, we will leave it in one piece. +; +; revision history: +; +; +; This is the system-dependent command to change the baud rate. +; DE contains the two-byte value from the baud rate table; this +; value is also stored in 'speed'. +sysspd: + + +IF px8 ; [29] + push d + call rsclose ; baud rate can only be set on opening rs232 + pop d + mov a, e + sta px8blk+4 ; set param block + call rsopen ; to set rate + ret +ENDIF ; px8 [29] + +; Set the speed for the Osborne I +IF osbrn1 + mvi a,osbin1 ;Reset the ACIA + call osstst ;Write the control port +osbs1: inr c ;Waiting loop + jnz osbs1 + mov a,e ; get the specified speed + jmp osstst ;Write the control reg. +ENDIF;osbrn1 + +;[hh] set the speed for a lobo MAX-80 +IF lobo + mov a,e ;[hh] get the parsed value +setbd: sta baudrt ;[hh] and send it to the baud rate port + ret ;[hh] +ENDIF;lobo + +; Set the speed for bigboard I or the delphi or the CPT-85xx +; or Cromemco (TU-ART) +IF delphi OR cpt85xx OR cmemco OR mmate ;[22] [29] + mov a,e ; get the parsed value + out baudrt ; Tell the baud rate generator. + ret +ENDIF;delphi OR cpt85xx OR cmemco OR mmate [22] [29] + +;[22] Set the speed for Acorn BBC +IF bbc + mov l,e + mvi a,7 ;Set receive baud rate + call osbyte ;*FX7,?e + mov l,e + mvi a,8 ;Set transmit baud rate + call osbyte ;*FX8,?e + ret +ENDIF;[22] bbc + +;[22] Set speed for RM 380Z +IF rm380z + mvi a,4 ;device type (SI/O4) in A + rst 6 ; EMT + db 29h ; SETLST + ret +ENDIF;[22] rm380z + +; Set the speed for MicroMikko. DE is baud rate multiplier +IF mikko + di + lxi h,txclk + mov m,d ;LSB first (swapped in memory) + mov m,e ;MSB last + lxi h,rxclk + mov m,d + mov m,e + mvi b,0 ;"modifier" for 1 stop bit + mvi a,2 ;Test MSB of speed >2 (110 bps or less) + cmp e + jp miksp1 + mvi b,00001000B ;"modifier" for 2 stop bits +miksp1: mvi a,4 ;Select SIO Reg 4 + lxi h,sioac + mov m,a + mvi a,sion4 ;Get values + ora b ;Add modifier + mov m,a ;Set value (stop bits) + ei + ret +ENDIF;mikko + + +; Set the speed for the Decision I +IF mdI + call selmdm ;Let's be absolutely sure, huh? + mvi a,dlab+wls1+wls0+stb ;Set data latch access bit + out lcr ;Out to Line Control Register + lhld speed ;Load baudrate multiplier + xchg + mov a,d ;Get low order byte for baud rate + out dlm ;Out to the MSB divisor port + mov a,e ;...and the high order byte + out dll ;Out to the LSB divisor port + mvi a,wls1+wls0+stb ;Enable Divisor Access Latch + out lcr ;Out to ACE Line Control Register + xra a ;Clear A + out ier ;Set no interrupts + out lsr ;Clear status + in msr ;Clear Modem Status Register + in lsr ;Clear Line Status Register + in rbr ;Clear Receiver Buffers + in rbr + ret +ENDIF ;mdI [Toad Hall] + +IF teletek + di + mov a,e ; first speed byte + out baudrt + mov a,d ; second speed byte + out baudrt + ei + ret +ENDIF ;teletek + +IF access ;[29] + 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 [29] + + +IF disc ;[29] +; 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 [29] +; Speed tables +; (Note that speed tables MUST be in alphabetical order for later +; lookup procedures, and must begin with a value showing the total +; number of entries. The speed help tables are just for us poor +; humans. + +; db string length,string,divisor (2 identical bytes or 1 word) +; [Toad Hall] + +IF delphi OR lobo ;[hh] +spdtbl: db 10h ;16 entries + db 03h,'110$', 02h,02h + db 04h,'1200$', 07h,07h + db 05h,'134.5$', 03h,03h + db 03h,'150$', 04h,04h + db 04h,'1800$', 08h,08h + db 05h,'19200$', 0fh,0fh + db 04h,'2000$', 09h,09h + db 04h,'2400$', 0ah,0ah + db 03h,'300$', 05h,05h + db 04h,'3600$', 0bh,0bh + db 04h,'4800$', 0ch,0ch + db 02h,'50$', 00h,00h + db 03h,'600$', 06h,06h + db 04h,'7200$', 0dh,0dh + db 02h,'75$', 01h,01h + db 04h,'9600$', 0eh,0eh + +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;delphi OR lobo ;[hh] + +IF cpt85xx +spdtbl: db 15 ; 15 entries + db 03,'110$', 03h,03h + db 04,'1200$', 09h,09h + db 05,'134.5$', 04h,04h + db 03,'150$', 05h,05h + db 04,'1800$', 0Ah,0Ah + db 04,'2400$', 0Bh,0Bh + db 03,'300$', 06h,06h + db 04,'3600$', 0Ch,0Ch + db 04,'4800$', 0Dh,0Dh + db 02,'50$', 01h,01h + db 03,'600$', 07h,07h + db 04,'7200$', 0Eh,0Eh + db 02,'75$', 02h,02h + db 03,'900$', 08h,08h + db 04,'9600$', 0Fh,0Fh + +sphtbl: db cr,lf,' 50 75 110 134.5 150 300 600 900' + db cr,lf,' 1200 1800 2400 3600 4800 7200 9600$' +ENDIF;cpt85xx + +IF bbc ;[22] +spdtbl: db 8 ; 8 entries + db 04,'1200$', 04h,04h + db 03,'150$', 02h,02h + db 05,'19200$', 08h,08h + db 04,'2400$', 05h,05h + db 03,'300$', 03h,03h + db 04,'4800$', 06h,06h + db 02,'75$', 01h,01h + db 04,'9600$', 07h,07h + +sphtbl: db cr,lf,' 75 150 300 1200 2400 4800 9600 19200$' +ENDIF;[22] bbc + +IF rm380z ;[22] +spdtbl: db 7 ; 7 entries + db 03,'110$', 00h,00h + db 04,'1200$', 03h,03h + db 04,'2400$', 04h,04h + db 03,'300$', 01h,01h + db 04,'4800$', 05h,05h + db 03,'600$', 02h,02h + db 04,'9600$', 06h,06h + +sphtbl: db cr,lf,' 110 300 600 1200 2400 4800 9600$' +ENDIF;[22] rm380z + +IF px8 ; [29] +spdtbl: db 9 ; 9 entries + db 03,'110$', 02h,02h + db 04,'1200$', 0ah,0ah + db 03,'150$', 04h,04h + db 05,'19200$', 0fh,0fh + db 04,'2400$', 0ch,0ch + db 03,'300$', 06h,06h + db 04,'4800$', 0dh,0dh + db 03,'600$', 08h,08h + db 04,'9600$', 0eh,0eh +sphtbl: db cr, lf + db ' 100 150 300 600 1200 2400 4800 9600 19200$' +ENDIF ; px8 [29] + +IF mikko +spdtbl: db 9h ;9 entries + db 03h,'110$' + dw 0369h + db 04h,'1200$' + dw 0050h + db 03h,'150$' + dw 0280h + db 04h,'2400$' + dw 0028h + db 03h,'300$' + dw 0140h + db 04h,'4800$' + dw 0014h + db 03h,'600$' + dw 00A0H + db 02h,'75$' + dw 0500h + db 04h,'9600$' + dw 000ah + +sphtbl: db cr,lf,' 75 110 150 300 600 1200 2400 4800 9600$' +ENDIF;mikko + +IF osbrn1 +spdtbl: db 02h ;2 entries + db 04h,'1200$', OSBI12,OSBI12 + db 03h,'300$', OSBI03,OSBI03 + +sphtbl: db cr,lf,' 300',cr,lf,' 1200$' +ENDIF;osbrn1 + + +IF mdI +spdtbl: db 0dh ; 13 entries + db 03h, '110$' + dw 1047 + db 04h, '1200$' + dw 96 + db 03h, '150$' + dw 768 + db 05h,'19200$' + dw 6 + db 04h, '2400$' + dw 48 + db 03h, '300$' + dw 384 + db 05h,'38400$' + dw 3 + db 03h, '450$' + dw 288 + db 04h, '4800$' + dw 24 + db 05h,'56000$' + dw 2 + db 03h, '600$' + dw 192 + db 02h, '75$' + dw 1536 + db 04h, '9600$' + dw 12 + +sphtbl: db cr,lf,' 75 110 150 300 450 600 1200' + db cr,lf,' 2400 4800 9600 19200 38400 56000$' + +;(Lord knows what you'll be communicating with at 56000 baud, but the +;Multi-I/O board literature says it'll do it, so what the heck.... +;might as well throw it in here just to show off...sure hope the +;port don't melt...) + +ENDIF ;mdI [Toad Hall] + +IF cmemco ;[25] +spdtbl: db 7 ; 7 entries + db 3,'110$', 01H,01H + db 4,'1200$', 88H,88H + db 3,'150$', 82H,82H + db 4,'2400$', 90H,90H + db 3,'300$', 84H,84H + db 4,'4800$', 0A0H,0A0H + db 4,'9600$', 0C0H,0C0H + +sphtbl: db cr,lf + db ' 110 150 300 1200 2400 4800 9600$' +ENDIF;cmemco + +IF access ;Similar to bbI with different values [29] +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 [29] + +IF mmate ;[29] +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 [29] + +IF disc ;[29] +; 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 [29] + +IF teletek +spdtbl: db 7 ; 7 entries + db 4, '1200$', 47h,40h + db 5,'19200$', 47h,04h + db 4, '2400$', 47h,20h + db 3, '300$', 47h,00h + db 4, '4800$', 47h,10h + db 3, '600$', 47h,80h + db 4, '9600$', 47h,08h + +sphtbl: db cr,lf + db ' 300 600 1200 2400 4800 9600 19200$' +ENDIF ;teletk + + +; The following conditionals were once a huge if not statement. There +; wasn't enough room to add the lobo to the list, so it had to be broken +; into 2, which you can't do with an if not. I redid it as two ifs and +; applied them to those that wouldn't set baud. [Hal Hostetler] +IF robin OR gener OR dmII OR vector OR trs80;[32] +spdtbl equ 0 ; SET BAUD not supported. +sphtbl equ 0 +ENDIF;robin OR gener OR dmII OR vector OR trs80 +; +IF mmdI OR osi OR cpm3 OR S1008 ; [29] +spdtbl EQU 0 ;[hh] SET BAUD not supported. +sphtbl EQU 0 ;[hh] ran out of room above... +ENDIF;mmdI OR osi OR cpm3 OR S1008 [29] +; +IF hp125 ;[MF] +spdtbl equ 0 ; SET BAUD not supported. +sphtbl equ 0 +ENDIF;hp125 [MF] +; +; This is the system-dependent SET PORT command. +; HL contains the argument from the command table. +sysprt: +IF lobo ;[hh] + mov a,l ;[hh] get the data port value and store at + sta outmd3+1 ;[hh] the two places we use... + sta inpmd2+1 ;[hh] MNPORT in the overlay + sta port ;[hh] inform program of the change in ports + inr a ;[hh] status port = data port + 1 in the Lobo + sta outmd1+1 ;[hh] store it at the three places... + sta inpmd1+1 ;[hh] we use MNPRTS... + sta outctl+1 ;[hh] in the overlay + mov a,h ;[hh] now get the baud rate port value + sta getbd+1 ;[hh] store it in the two places we use... + sta setbd+1 ;[hh] BAUDRT in the overlay + sta port+1 ;[hh] don't need to, but keeps it consistant +getbd: lda baudrt ;[hh] get baud rate value from port + sta speed ;[hh] tell STAT. baud rate for each port + ;[hh] is independant of the other +ENDIF ;lobo + +IF iobyt + mov a,m ;Get the I/O byte + sta prtiob ;Save the desired IO byte for this port + inx h ;Point at next entry + mov a,m ;Get the output function + sta prtfun ;Save it +ENDIF;iobyt + +IF iobyt AND robin + inx h ;Point at next entry + mov a,m ;Get the hardware address for the port + sta prtadr ;Store it +ENDIF;iobyt AND robin +; +IF hp125 ;[MF] + push psw + push b + push d + push h + xchg ;Put port connect sequence address in DE + call prtstr ;Connect proper port + pop h + pop d + pop b + pop psw +ENDIF;hp125 [MF] +; + ret +; +; Port tables for Lobo MAX-80 +IF lobo ;[hh] +; help text +prhtbl: db cr,lf,'RS-232 port A or B$' +; +; command table +prttbl: db 02H ;[hh] two entries + db 01H,'A$',0E4H,0D0H + db 01H,'B$',0E6H,0D4H +ENDIF ;lobo +; +; Port tables for GENERIC CPM 2.2 +IF gener +; help text +prhtbl: db cr,lf,'CRT device' + db cr,lf,'PTR device' + db cr,lf,'TTY device' + db cr,lf,'UC1 device' + db cr,lf,'UR1 device' + db cr,lf,'UR2 device$' + +; command table +prttbl: db 06H ;Six devices to choose from + db 03H,'CRT$' + dw crtptb + db 03H,'PTR$' + dw ptrptb + db 03H,'TTY$' + dw ttyptb + db 03H,'UC1$' + dw uc1ptb + db 03H,'UR1$' + dw ur1ptb + db 03H,'UR2$' + dw ur2ptb + +; port entry table +; table entries are: +; db iobyte-value, BDOS output function, reserved +crtptb: db crtio,conout,0 +ptrptb: db ptrio,punout,0 +ttyptb: db ttyio,conout,0 +uc1ptb: db uc1io,conout,0 +ur1ptb: db ur1io,punout,0 +ur2ptb: db ur2io,punout,0 +ENDIF;gener + +; +; Port tables for DECmate II or MicroMikko or Acorn BBC +; +IF dmII OR mikko OR bbc ;[22] +; help text +prhtbl: db cr,lf,'COMMUNICATIONS port$' + +; command table +prttbl: db 01H ;Only one port known at this point + db 0EH,'COMMUNICATIONS$' + dw comptb ;address of info + +; port entry table +; table entries are: +; db iobyte-value, BDOS output function, reserved +comptb: db batio,punout,0 + +ENDIF;[22] dmII OR mikko OR bbc +; +; Port tables for Robin +; +IF robin +; help text +prhtbl: db cr,lf,'COMMUNICATIONS port' + db cr,lf,'GENERAL purpose port' + db cr,lf,'PRINTER port$' + +; command table +prttbl: db 03H ;Three entries + db 0EH,'COMMUNICATIONS$' + dw comptb + db 07H,'GENERAL$' + dw gppptb + db 07H,'PRINTER$' + dw prnptb + +; port entry table +; table entries are: +; db iobyte-value, BDOS output function, hardware port address +; (control/status) +; +;At present, the hardware port address is only used for sending a break. +comptb: db batio,punout,comtst +gppptb: db gppio,conout,gentst +prnptb: db lptio,conout,prntst + +prtadr: db comtst ;space for current hardware port address +ENDIF;robin + +IF iobyt +prtfun: db punout ;Function to use for output to comm port +prtiob: db batio ;I/O byte to use for communicating +coniob: db defio ;I/O byte to use for console +ENDIF;iobyt +; +IF hp125 ;[MF] +; Help table +prhtbl: db cr,lf,'Communications port' + db cr,lf,'Printer port$' +; command table +prttbl: db 02H ;2 entries + db 0eH,'COMMUNICATIONS$' + dw mapon1 + db 07H,'PRINTER$' + dw mapon2 +;Port table entries are the addresses of the escape sequences to connect +;the ports. +; +ENDIF;hp125 [MF] + +IF NOT (iobyt OR lobo OR hp125) ;[hh] [MF] +prttbl equ 0 ; SET PORT is not supported +prhtbl equ 0 +ENDIF;NOT iobyt OR lobo OR hp125 [MF] +; +; selmdm - select modem port +; selcon - select console port +; selmdm is called before using inpmdm or outmdm; +; selcon is called before using inpcon or outcon. +; For iobyt systems, diddle the I/O byte to select console or comm port; +; For Decision I, switches Multi I/O board to console or modem serial +; port. [Toad Hall] +; For the rest, does nothing. +; preserves bc, de, hl. +selmdm: +IF iobyt + lda prtiob ;Set up for output to go to the comm port + sta iobyte ;Switch byte directly +ENDIF;iobyt + +IF mdI + lda group + ori mdmgrp ;Mask modem serial port + out grpsel +ENDIF;mdI [Toad Hall] + + ret + +selcon: +IF iobyt + lda coniob ;Set up for output to go to the console port + sta iobyte ;Switch directly +ENDIF;iobyt + +IF mdI + lda group + ori congrp ;Mask console serial port (1) + out grpsel +ENDIF;mdI [Toad Hall] + + ret +; Get character from console, or return zero. +; result is returned in A. destroys bc, de, hl. +; +inpcon: +IF NOT iobyt + mvi c,dconio ;Direct console I/O BDOS call. + mvi e,0FFH ;Input. + call BDOS +ENDIF;NOT iobyt + +IF iobyt + call bconst ;Get the status + ora a ;Anything there? + rz ;No, forget it + call bconin ;Yes, get the character +ENDIF;iobyt + ret +; +; Output character in E to the console. +; destroys bc, de, hl +; +outcon: + +IF rm380z ;[22] + mov a,e + cpi cr ;cr produces cr + lf + jnz outcn1 + mvi e,'N'-100O ;Control-N produces cr only +outcn1: ;continue +ENDIF;[22] rm380z + +IF NOT iobyt + mvi c,dconio ;Console output bdos call. + call bdos ;Output the char to the console. +ENDIF;NOT iobyt + +IF iobyt + mov c,e ;Character + call bcnout ;to Console +ENDIF;iobyt + ret +; +; outmdm - output a char from E to the modem. +; the parity bit has been set as necessary. +; returns nonskip; bc, de, hl preserved. +outmdm: +IF osi OR lobo ;[hh] + push h +outmd1: lxi h,mnprts ;address of the port status register +outmd2: mov a,m ; get port status in A + ani output ;Loop till ready. + jz outmd2 +outmd3: lxi h,mnport ;address of port data register + mov m,e ; write the character + pop h + ret +ENDIF;osi OR lobo + +IF osbrn1 + call osldst ;Read the status port + ani output ;Loop till ready. + jz outmdm + mov a,e + jmp osstda ;Write to the data port +ENDIF;osbrn1 + +IF px8 ; [29] + push h + push b + push d +outmd1: call rsoutst ; get the output status + ora a + jz outmd1 ; check if output enabled + pop d + mov c, e ; char in C + push d + call rsput + pop d + pop b + pop h + ret +ENDIF; px8 [29] + +IF inout + in mnprts ;Get the output done flag. + ani output ;Is it set? + jz outmdm ;If not, loop until it is. + mov a,e + out mnport ;Output it. + ret +ENDIF;inout + +IF iobyt +;**** Note that we enter from outpkt with the I/O byte already set up for +; output to go to the comm port + push h + push b + lda prtfun ;Get the output function + mov c,a ;Into C + call bdos ;And output the character + pop b + pop h + ret +ENDIF;iobyt + +IF cpm3 OR hp125 ;[MF] + push h + push b + mvi c,auxout ;Output to the aux output device + call bdos + pop b + pop h + ret +ENDIF;cpm3 OR hp125 [MF] + +;org $+100h AND 0FF00h ; get rid of phase error + +; +; get character from modem; return zero if none available. +; for IOBYT systems, the modem port has already been selected. +; destroys bc, de, hl. +inpmdm: +IF iobyt + call bconst ;Is Char at COMM-Port? + ora a ;something there? + rz ; return if nothing there + call bconin ; data present. read data. +ENDIF;iobyt + +IF cpm3 + mvi c,auxist + call bdos ;is char at auxin? + ora a ;something there? + rz ;no + mvi c,auxin + call bdos ;read char from auxin +ENDIF;cpm3 +; +IF hp125 ;[MF] + lxi b,70ffh ;SEt subfunction to get RDR (auxin) status + call bdos ;is char at RDR? + ora a ;something there? + rz ;no + mvi c,auxin + call bdos ;read char from RDR +ENDIF;hp125 [MF] + +IF osi OR lobo ;[hh] +inpmd1: lda mnprts ;Get the port status into A. + ani input ;See if the input ready bit is on. + rz ;If not then return. +inpmd2: lda mnport ;If so, get the char. +ENDIF;osi OR lobo + +IF osbrn1 + call osldst ;Read the status port + ani input ;Something there? + rz ;Nope + call osldda ;Read the data port +ENDIF;osbrn1 + +IF inout +;Note: modem port should already be selected for mdI. [Toad Hall] + in mnprts ;Get the port status into A. + ani input ;See if the input ready bit is on. + rz ;If not then return. + in mnport ;If so, get the char. +ENDIF;inout + +IF px8 ; [29] + call rserst ; check error status + ani 64h ; this assumes 'not open' cannot occur + jnz inpmd1 ; error has occurred! + call rsinst ; any chars outstanding? + ora a + rz ; exit if none + call rsget ; get char in A + ret +; return the 'no char outstanding' indication on error +inpmd1: mvi a, 0 +ENDIF; px8 [29] + + ret ; return with character in A + + +; +; flsmdm - flush comm line. +; Modem is selected. +; Currently, just gets characters until none are available. + +flsmdm: call inpmdm ; Try to get a character + ora a ; Got one? + jnz flsmdm ; If so, try for another + ret ; Receiver is drained. Return. +; +; lptstat - get the printer status. Return a=0ffh if ok, or 0 if not. +lptstat: +IF iobyt ;[33] + call bprtst ; +call bprtst ; get status +ENDIF ;iobyt[33] +IF NOT iobyt ;[33] + xra a ; assume it is ok.. this may not be necessary +ENDIF ;iobyt [33] + ret + +; +; outlpt - output character in E to printer +; console is selected. +; preserves de. +outlpt: + push d ; save DE in either case + call prtflt ; go through printer filter [30] + ana a ; if A = 0 do nothing, + jz outlp1 ; [30] if a=0 do nothing + +IF NOT iobyt + mvi c,lstout + call bdos ;Char to printer +ENDIF;NOT iobyt +IF iobyt + mov c,e + call blsout +ENDIF;iobyt + +outlp1: pop d ; restore saved register pair + ret +; +; Screen manipulation routines +; csrpos - move to row B, column C +; +; csrpos for terminals that use a leadin sequence followed +; by (row + 31.) and (column + 31.) +; +IF NOT (robin OR dmII OR osi OR vector OR termin OR hp125) + ;[MF] Terminals code in CPXVDU +csrpos: push b ; save coordinates + lxi d,curldn ; get cursor leadin sequence + call prtstr ; print it + pop h ; restore coordinates + mov a,h ; get row + adi (' '-1) ; space is row one + mov e,a + push h + call outcon ; output row + pop h + mov a,l ; get column + adi (' '-1) ; space is column one + mov e,a + jmp outcon ; output it and return +ENDIF;NOT (robin OR dmII OR osi OR vector OR termin OR hp125)[MF] +; +; +; +; csrpos for ANSI terminals +; +IF robin OR dmII +csrpos: push b ; save coordinates + lxi d,curldn ; get cursor leadin sequence + call prtstr ; print it + pop h ; peek at coordinates + push h ; then save away again + mov l,h ; l = row + mvi h,0 ; hl = row + call nout ; output in decimal + mvi e,';' ; follow with semicolon + call outcon ; print it + pop h ; restore column + mvi h,0 ; hl = column + call nout + mvi e,'H' ; terminate with 'move cursor' command + jmp outcon ; output it and return +ENDIF;robin OR dmII +; +; csrpos for the HP-125 [MF] +; +IF hp125 ;[MF] +csrpos: dcr b ;HP-125 uses zero-based addressing + dcr c ;... + push b ; save coordinates + lxi d,curldn ; get cursor leadin sequence + call prtstr ; print it + pop h ; peek at coordinates + push h ; then save away again + mov l,h ; l = row + mvi h,0 ; hl = row + call nout ; output in decimal + mvi e,'R'+20h ;Say it was a row + call outcon ; print it + pop h ; restore column + mvi h,0 ; hl = column + call nout + mvi e,'C' ; terminate with 'move cursor' command + jmp outcon ; output it and return +ENDIF;hp125 [MF] +; +; csrpos for the Vector General. It's weird. +; +IF vector +csrpos: dcr b ; vector uses zero-based addressing? + dcr c + push b ; save coordinates + mvi e,esc ; print an escape + call outcon + pop d ; peek at coordinates + push d + call outcon ; output column + pop d + mov e,d ; get row + jmp outcon ; output and return +ENDIF;vector + +IF osi ; systems without cursor positioning +csrpos: ret ; dummy routine referenced by linkage section +ENDIF;osi + + +; +; delchr - make delete look like a backspace. Unless delete is a printing +; character, we just need to print a backspace. (we'll output clrspc +; afterwards) +; For Kaypro and Vector General, delete puts a blotch on the screen. +; For Apple and Osborne 1, delete moves but doesn't print. +delchr: + +IF vector OR osbrn1 OR lobo + lxi d,delstr + jmp prtstr +ENDIF ;vector OR osbrn1 OR lobo + +IF bbc OR rm380z ;[22] + ret +ENDIF;bbc OR rm380z + +IF NOT (vector OR osbrn1 OR bbc OR rm380z);[22] + mvi e,bs ;get a backspace + jmp outcon +ENDIF;NOT (vector OR osbrn1 OR bbc OR rm380z [22] + +; erase the character at the current cursor position +clrspc: mvi e,' ' + call outcon + mvi e,bs ;get a backspace + jmp outcon + +; erase the current line +clrlin: lxi d,eralin + jmp prtstr + +; erase the whole screen, and go home. preserves b (but not c) +clrtop: lxi d,erascr + jmp prtstr + + +IF robin +sysver: db 'VT180 Robin$' +ENDIF;robin + +IF dmII +sysver: db 'DECmate II CP/M-80$' +ENDIF;dmII + +IF delphi ; [7] new system +sysver: db 'Digicomp Delphi 100$' +endif;delphi + +IF access +sysver: db 'Actrix CP/M$' +endif; + +IF teletek +sysver: db 'Teletek SYSTEMASTER CP/M-80$' +ENDIF ;teletek + +IF cpt85xx +sysver: db 'CPT-85xx under CompuPak CP/M$' +ENDIF;cpt85xx + +IF mdI +sysver: db 'Morrow Decision I$' +ENDIF;mdI [Toad Hall] + +IF mmdI +sysver: db 'MicroDecision I$' +ENDIF;mmdI + +IF osi +sysver: db 'Ohio Scientific$' +ENDIF;osi + +IF mmate ;[29] +sysver: db 'PMC Micromate using port I/O$' +ENDIF;mmate [29] + +IF disc ;[29] +sysver: db 'Discovery using 83U board port B$' +ENDIF ;disc [29] + +IF s1008 ;[29] +sysver: db 'U. S. MicroSales using printer port$' +ENDIF ;s1008 [29] + +IF cmemco ;[25] +sysver: db 'Cromemco (TU-ART)$' +ENDIF;cmemco +; +IF robin OR dmII +; Note that we cannot support Graphics Mode or the H19 erase-screen command +; (<esc>E), because the sequences are more than three bytes. +defesc EQU '\'-100O ;Still Control-\ (just ran out of room...) +vtval EQU 0 ; we probably don't want VT52 emulation +outlin: db esc,3CH,esc,'[H',esc,'[J',cr,lf,tab,tab,'$' +erascr: db esc,'[H',esc,'[J$' ;Clear screen and go home. +eralin: db cr,esc,'[K$' ;Clear line. +curldn: db esc,'[$' ; Cursor leadin +ttab: +ta: db esc,'[A$' ; Cursor up. +tb: db esc,'[B$' ; Cursor down. +tc: db esc,'[C$' ; Cursor right. +td: db esc,'[D$' ; Cursor left +te: db '$',0,0,0 ; (can't) Clear display +tf: db '$',0,0,0 ; (don't) Enter Graphics Mode +tg: db '$',0,0,0 ; (don't) Exit Graphics mode +th: db esc,'[H$' ; Cursor home. +ti: db esc,'M$',0 ; Reverse linefeed. +tj: db esc,'[J$' ; Clear to end of screen. +tk: db esc,'[K$' ; Clear to end of line. +ENDIF;robin OR dmII + +IF mikko +sysver: db 'MikroMikko$' +outlin: db subt,cr,lf,tab,'$' +erascr: db subt,'$' ;Clear screen and go home. +eralin: db cr,1CH,'$' ;Clear line. +curldn: db esc,'=$' ;cursor leadin +ttab: ;Table start location. +ta: db 0BH,'$',0,0 ;Cursor up. +tb: db 0AH,'$',0,0 ;Cursor down. +tc: db 0CH,'$',0,0 ;Cursor right. +td: db bs,'$',0,0 ;Cursor left +te: db subt,'$',0,0 ;Clear display +tf: db '$',0,0,0 ;(can't) Enter Graphics Mode +tg: db '$',0,0,0 ;(can't) Exit Graphics mode +th: db 1EH,'$',0,0 ;Cursor home. +ti: db '$',0,0,0 ;(can't) Reverse linefeed. +tj: db 1cH,'$',0,0 ;Clear to end of screen. +tk: db 1cH,'$',0,0 ;Clear to end of line. +ENDIF;mikko +; +IF bbc ;[22] +sysver: db 'BBC (Z80)$' +outlin: db 0CH,esc,'=',21H,30H,'$' +erascr: db 0CH,'$' ;Clear screen and go home. +eralin: db cr,esc,'@$' ;Clear line. +curldn: db esc,'=$' ;cursor leadin +ttab: ;Table start location. +ta: db 0BH,'$',0,0 ;Cursor up. +tb: db 0AH,'$',0,0 ;Cursor down. +tc: db tab,'$',0,0 ;Cursor right. +td: db bs,'$',0,0 ;Cursor left +te: db 0CH,'$',0,0 ;Clear display +tf: db '$',0,0,0 ;(can't) Enter Graphics Mode +tg: db '$',0,0,0 ;(can't) Exit Graphics mode +th: db 1EH,'$',0,0 ;Cursor home. +ti: db '$',0,0,0 ;(can't) Reverse linefeed. +tj: db esc,'?$',0,0 ;Clear to end of screen. +tk: db esc,'@$',0,0 ;Clear to end of line. +ENDIF;[22] bbc +; +IF rm380z ;[22] +sysver: db 'Research Machines 380Z$' +outlin: db 1FH,cr,tab,'$' +erascr: db 1FH,'$' ;Clear screen and go home. +eralin: db 0EH,19H,'$' ;Clear line. +curldn: db 16H,'$' ;cursor leadin +ttab: ;Table start location. +ta: db 0BH,'$',0,0 ;Cursor up. +tb: db 0AH,'$',0,0 ;Cursor down. +tc: db 18H,'$',0,0 ;Cursor right. +td: db bs,'$',0,0 ;Cursor left +te: db 1FH,'$',0,0 ;Clear display +tf: db '$',0,0,0 ;(can't) Enter Graphics Mode +tg: db '$',0,0,0 ;(can't) Exit Graphics mode +th: db 1DH,'$',0,0 ;Cursor home. +ti: db '$',0,0,0 ;(can't) Reverse linefeed. +tj: db 1EH,'$',0,0 ;Clear to end of screen. +tk: db 19H,'$',0,0 ;Clear to end of line. +ENDIF;[22] rm380z + +IF lobo ;[hh] +sysver: db 'Lobo MAX-80$' +outlin: db esc,'*',cr,lf,tab,tab,'$' +erascr: db esc,'*$' ;[hh] clear screen and home cursor +eralin: db cr,esc,'R$' ;[hh] clear line +curldn: db esc,'=$' ;[hh] cursor lead-in string +delstr: db bs,' ',bs,bs,'$' ;[hh] ??adjust for echoing delete +ttab: ;[hh] table start location +ta: db 0BH,'$',0,0 ;[hh] cursor up +tb: db 0AH,'$',0,0 ;[hh] cursor down +tc: db 0CH,'$',0,0 ;[hh] cursor right +td: db 08H,'$',0,0 ;[hh] cursor left +te: db esc,'*$',0 ;[hh] clear display (homes cursor) +tf: db '$',0,0,0 ;[hh] (can't) enter graphics mode +tg: db '$',0,0,0 ;[hh] (can't) exit graphics mode +th: db 01EH,'$',0,0 ;[hh] home cursor +ti: db esc,'E$',0 ;[hh] reverse linefeed (insert line) +tj: db esc,'Y$',0 ;[hh] clear to end of screen +tk: db esc,'T$',0 ;[hh] clear to end of line +ENDIF ;lobo + +IF px8 ; [29] +sysver: db 'Epson PX-8$' +outlin: db esc,'*$' +erascr: db esc,'*$' ; clear screen and home +eralin: db cr,esc,'T$' ; clear line +curldn: db esc,'=$' ; cursor lead in +ttab: ; table start location +ta: db 30,'$',0,0 ; cursor up +tb: db 31,'$',0,0 ; cursor down +tc: db 28,'$',0,0 ; cursor right +td: db 29,'$',0,0 ; cursor left +te: db esc,'*$',0 ; clear display +tf: db '$',0,0,0 ; can't enter graphics graphics mode +tg: db '$',0,0,0 ; can't exit graphics mode +th: db 11,'$',0,0 ; home cursor +ti: db 30,'$',0,0 ; reverse linefeed +tj: db esc,'Y$',0 ; erase to end of screen +tk: db esc,'T$',0 ; erase to end of line +ENDIF ; px8 [29] + +; +IF osbrn1 +sysver: db 'Osborne 1$' +outlin: db 1AH,cr,lf,tab,'$' ;(Clear screen, home cursor) +erascr: db 1AH,'$' ;Clear screen and go home. +eralin: db cr,esc,'T$' ;Clear line. +delstr: db bs,bs,'$' ; Adjust for delete +curldn: db esc,'=$' ;Cursor lead-in +ttab: ;Table start location. +ta: db ('K'-100O),'$',0,0 ;Cursor up. +tb: db 12O,'$',0,0 ;Cursor down. +tc: db ('L'-100O),'$',0,0 ;Cursor right. +td: db bs,'$',0,0 ;Cursor left. +te: db subt,'$',0,0 ;Clear screen. +tf: db '$',0,0,0 ;(can't) Enter graphics mode +tg: db '$',0,0,0 ;(can't) Exit graphics mode +th: db ('^'-100O),'$',0,0 ;Cursor home. +ti: db ('K'-100O),'$',0,0 ;Reverse linefeed. +tj: db esc,'T$',0 ;(can't) Clear to end of screen. +tk: db esc,'T$',0 ;Clear to end of line. +ENDIF;osbrn1 +; +IF vector +sysver: db 'Vector Graphics$' +outlin: db ('D'-100O),cr,lf,tab,tab,'$' +erascr: db ('D'-100O),'$' ;Clear screen and go home. +eralin: db cr,('Q'-100O),'$' ;Clear line. +delstr: db bs,' ',bs,bs,'$' ; adjust for echoing delete character +ttab: ;Table start location. +ta: db ('U'-100O),'$',0,0 ;Cursor up. +tb: db 12O,'$',0,0 ;Cursor down. +tc: db ('Z'-100O),'$',0,0 ;Cursor right. +td: db '$',0,0,0 ;(can't) Cursor left +te: db '$',0,0,0 ;(can't) Clear display +tf: db '$',0,0,0 ;(can't) Enter graphics mode +tg: db '$',0,0,0 ;(can't) Exit graphics mode +th: db ('B'-100O),'$',0,0 ;Cursor home. +ti: db ('U'-100O),'$',0,0 ;Reverse linefeed. +tj: db ('P'-100O),'$',0,0 ;Clear to end of screen. +tk: db ('Q'-100O),'$',0,0 ;Clear to end of line. +ENDIF;vector + +IF trs80lb +sysver: db 'TRS-80 II Lifeboat CP/M$' +outlin: db esc,':',cr,lf,tab,tab,'$' +erascr: db esc,':$' ;Clear screen and go home. +eralin: db cr,esc,'T$' ;Clear line. +curldn: db esc,'=$' ;Cursor lead-in +ttab: ;Table start location. +ta: db 0BH,'$',0,0 ;Cursor up. +tb: db 0AH,'$',0,0 ;Cursor down. +tc: db 0CH,'$',0,0 ;Cursor right. +td: db bs,'$',0,0 ;Cursor left +te: db esc,':$',0 ;Clear display +tf: db '$',0,0,0 ;(can't) Enter Graphics Mode +tg: db '$',0,0,0 ;(can't) Exit Graphics mode +th: db 1EH,'$',0,0 ;Cursor home. +ti: db 0BH,'$',0,0 ;Reverse linefeed. +tj: db esc,'Y$',0 ;Clear to end of screen. +tk: db esc,'T$',0 ;Clear to end of line. +ENDIF;trs80lb +; +IF trs80pt +sysver: db 'TRS-80 II P+T CP/M$' +outlin: db 0CH,cr,lf,tab,tab,'$' +erascr: db 0CH,'$' ;Clear screen and go home. +eralin: db cr,01H,'$' ;Clear line. +curldn: db esc,'Y$' ;Cursor lead-in +ttab: ;Table start location ;Must be 4 bytes each +ta: db 1EH,'$',0,0 ;Cursor up. +tb: db 1FH,'$',0,0 ;Cursor down. +tc: db 1DH,'$',0,0 ;Cursor right. +td: db 1CH,'$',0,0 ;Cursor left +te: db 0CH,'$',0,0 ;Clear display +tf: db 11H,'$',0,0 ;Enter Graphics Mode +tg: db 14H,'$',0,0 ;Exit Graphics mode +th: db 06H,'$',0,0 ;Cursor home. +ti: db 1EH,'$',0,0 ;Reverse linefeed. +tj: db 02H,'$',0,0 ;Clear to end of screen. +tk: db 01H,'$',0,0 ;Clear to end of line. +ENDIF;trs80pt + +IF osi +outlin: db cr,lf,'Starting ...$' +erascr equ crlf ;"Home & clear" (best we can do). +eralin: db '^U',cr,lf,'$' ;Clear line. +prpack: db cr,lf,'RPack: $' +pspack: db cr,lf,'SPack: $' +ttab equ 0 ; no VT52 table +ENDIF;osi +; +IF hp125 ;[MF] +defesc EQU '\'-100O ;Still Control-\ (just ran out of room...) +vtval EQU 0 ; we probably don't want VT52 emulation +; +sysver: db 'HP-125 Series 100$' +; +outlin: db esc,'H',esc,'J',cr,lf,tab,tab,'$' +erascr: db esc,'H',esc,'J$' ;Clear screen and go home. +eralin: db cr,esc,'K$' ;Clear line. +curldn: db esc,'&a$' ;Cursor leadin +ttab: ;Table start location. +ta: db esc,'A$',0 ;Cursor up. +tb: db esc,'B$',0 ;Cursor down. +tc: db esc,'C$',0 ;Cursor right. +td: db esc,'D$',0 ;Cursor left +te: db esc,'J$',0 ;Clear display +tf: db '$',0,0,0 ;[hh] (can't) enter graphics mode +tg: db '$',0,0,0 ;[hh] (can't) exit graphics mode +th: db esc,'H$',0 ;Cursor home. +ti: db esc,'M$',0 ;Reverse linefeed. +tj: db esc,'J$',0 ;Clear to end of screen. +tk: db esc,'K$',0 ;Clear to end of line. +; +; +; Escape sequences to map CP/M Reader/Punch to Data Comm input/output, +; respectively and to turn off these mappings +; +mapon1: db esc,'&i10s18d9M' + db esc,'&i2s25d9M' + db esc,'&i10s16d2M' + db esc,'&i0s25d2M$';Esc. sequences to turn off DAtacomm2/turn + ;on Data Comm 1 +mapon2: db esc,'&i10s16d9M' + db esc,'&i0s25d9M' + db esc,'&i10s18d2M' + db esc,'&i2s25d2M$';Esc. sequences to turn off Datacomm1/turn + ;on Datacomm 2 +mapoff: db esc,'&i0s25d9M' + db esc,'&i10s16d9M' + db esc,'&i2s25d9M' + db esc,'&i10s18d9M$' +; +readin: call $-$ ;Read character into b + mov a,b ;Get 8-bit character + ret ;and return +; +jbuf: db 7 ;bios dispatch table vector argument block + db 0 ;to read RDR routine address + db 0c3h ;... + dw 0 ;... +; +ENDIF;hp125 ;[MF] + +IF lasm and termin ; if no terminal, no need to link +LINK CPXVDU.ASM +ENDIF ; lasm and termin + +ovlend EQU $ + +IF lasm + END ; If m80 then this ignored +ENDIF ; lasm diff --git a/cpxsyo.asm b/cpxsyo.asm new file mode 100644 index 0000000..5b1cb0e --- /dev/null +++ b/cpxsyo.asm @@ -0,0 +1,389 @@ +IF NOT lasm +.printx * CPXSYO.ASM * +ENDIF ;NOT lasm +; 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 file contains the system dependent part for Sanyo MBC 1100 +; systems, and has been extracted from the CPMSYO.ASM code (kermit +; version 3.5) +; +; revision history: +; +; edit 1, 27 October, 1987, by OBSchou. Extracted Sanyo code from CPMSYO.ASM +; and massaged fort CP/M kermit V4.09 +; +; Keep module name, edit number, and last revision date in memory. +family: db 'CPXSYO.ASM (1) 27-Oct-87 $' +; + +; Assembly time message to let me know I'm building the right version. +; LASM generates an 'S' error along with the message, which is messy, but +; better than trying to put everything inside a IF m80 OR mac80 conditional, +; because LASM doesn't like nested IF's, either. + +IF sanyo +.printx * Assembling Kermit-80 for Sanyo MBC 1100 * +ENDIF + +iobyte EQU 03H ;Location of I/O byte + +if sanyo +baudrt EQU 0DAH ;BAUD RATE MEMORY LOCATION +MNPORT EQU 0DCH ;COMMUNICATIONS PORT +MNPRTS EQU 0DDH ;COMMUNICATIONS PORT STATUS +OUTPUT EQU 01H ;OUTPUT READY BIT +INPUT EQU 02H ;INPUT READY BIT +ENDIF;SANYO + +defesc EQU '\'-100O ;The default escape character. + +; Select initial setting for VT-52 emulation flag. +vtval EQU 1 + + +sysxin: ;system initialisation not covered by sysinit + ret ; return from system-dependent routine + +; + +; +; system-dependent termination processing +; If we've changed anything, this is our last chance to put it back. +sysexit: + ret + +; +; system-dependent processing for start of CONNECT command +; +syscon: + ret + +; + +; +; syscls - system-dependent close routine +; called when exiting transparent session. +; +syscls: + ret +; + +; +; sysinh - help for system-dependent special functions. +; called in response to <escape>?, after listing all the +; system-independent escape sequences. +; +sysinh: + lxi d,inhlps ; we got options... + call prtstr ; print them. + ret +inhlps: + db '$' ;[hh] table terminator + +; +; sysint - system dependent special functions +; called when transparent escape character has been typed; +; the second character of the sequence is in A (and in B). +; returns: +; non-skip: sequence has been processed +; skip: sequence was not recognized +sysint: + ani 137O ; convert lower case to upper, for testing... + ret + +; sysflt - system-dependent filter. +; called with the character in E. +; preserves bc, de, hl. +; note: <xon>,<xoff>,<del>, and <nul> are always discarded. +sysflt: + mov a,e ; get character for testing + ret + +; mdmflt - modem filter [30] +; called with character to be sent to printer in E +; with parity set as appropriate. +; return with accumulator = 0 do do nothing, +; <> 0 to send char in E. +mdmflt: + mov a,e ;[30] get character to test + ret + + +; prtflt - printer filter [30] +; called with character to be sent to printer in E +; returns with a = 0 to do nothing +; a <> 0 to print it. +; +; this routine for those printer that automatically insert +; a lf on cr, or cr for lf. Should this be shifted to +; the system indep. stuff, in say 4.06? +prtflt: + mov a,e ; [30] get character to test + ret + + +; + +; +; system-dependent processing for BYE command. +; for apmmdm, heath, and lobo, hang up the phone. +sysbye: + ret +; + +; This is the system-dependent command to change the baud rate. +; DE contains the two-byte value from the baud rate table; this +; value is also stored in 'speed'. +sysspd: + ret + +; + +; Speed tables +; (Note that speed tables MUST be in alphabetical order for later +; lookup procedures, and must begin with a value showing the total +; number of entries. The speed help tables are just for us poor +; humans. + +; db string length,string,divisor (2 identical bytes or 1 word) +; [Toad Hall] + +IF sanyo +spdtbl EQU 0 ; No speed table for the Sanyo +sphtbl EQU 0 ; ditto help for speed. + +; The following conditionals were once a huge if not statement. There +; wasn't enough room to add the lobo to the list, so it had to be broken +; into 2, which you can't do with an if not. I redid it as two ifs and +; applied them to those that wouldn't set baud. [Hal Hostetler] +; + +; This is the system-dependent SET PORT command. +; HL contains the argument from the command table. +sysprt: + ret +; + +; +; Port table not applicable tot he Sanyo... +prttbl EQU 0 +prhtbl EQU 0 ; + +; + +; +; selmdm - select modem port +; selcon - select console port +; selmdm is called before using inpmdm or outmdm; +; selcon is called before using inpcon or outcon. +; For iobyt systems, diddle the I/O byte to select console or comm port; +; For Decision I, switches Multi I/O board to console or modem serial +; port. [Toad Hall] +; For the rest, does nothing. +; preserves bc, de, hl. +selmdm: + ret + +selcon: + ret +; + +; Get character from console, or return zero. +; result is returned in A. destroys bc, de, hl. +; +inpcon: + mvi c,dconio ;Direct console I/O BDOS call. + mvi e,0FFH ;Input. + call BDOS + ret +; + +; +; Output character in E to the console. +; destroys bc, de, hl +; +outcon: + mvi c,dconio ;Console output bdos call. + call bdos ;Output the char to the console. + ret +; + +; +; outmdm - output a char from E to the modem. +; the parity bit has been set as necessary. +; returns nonskip; bc, de, hl preserved. +outmdm: +IF inout + in mnprts ;Get the output done flag. + ani output ;Is it set? + jz outmdm ;If not, loop until it is. + mov a,e + out mnport ;Output it. + ret +ENDIF;inout + +; + +; +; get character from modem; return zero if none available. +; for IOBYT systems, the modem port has already been selected. +; destroys bc, de, hl. +inpmdm: +IF inout +;Note: modem port should already be selected for mdI. [Toad Hall] + in mnprts ;Get the port status into A. + ani input ;See if the input ready bit is on. + rz ;If not then return. + in mnport ;If so, get the char. +ENDIF;inout + ret ; return with character in A + + +; +; flsmdm - flush comm line. +; Modem is selected. +; Currently, just gets characters until none are available. + +flsmdm: call inpmdm ; Try to get a character + ora a ; Got one? + jnz flsmdm ; If so, try for another + ret ; Receiver is drained. Return. + + +; + +; +; lptstat - get the printer status. Return a=0 if ok, or 0ffh if not. +lptstat: + xra a ; assume it is ok.. this may not be necessary + ret +; + +; +; outlpt - output character in E to printer +; console is selected. +; preserves de. +outlpt: + push d ; save DE in either case + call prtflt ; go through printer filter [30] + ana a ; if A = 0 do nothing, + jz outlp1 ; [30] if a=0 do nothing + mvi c,lstout + call bdos ;Char to printer +outlp1: pop d ; restore saved register pair + ret +; + +; +; Screen manipulation routines +; csrpos - move to row B, column C +; +; csrpos for terminals that use a leadin sequence followed +; by (row + 31.) and (column + 31.) +; +csrpos: push b ; save coordinates + lxi d,curldn ; get cursor leadin sequence + call prtstr ; print it + pop h ; restore coordinates + mov a,h ; get row + adi (' '-1) ; space is row one + mov e,a + push h + call outcon ; output row + pop h + mov a,l ; get column + adi (' '-1) ; space is column one + mov e,a + jmp outcon ; output it and return +ENDIF;NOT (robin OR dmII OR osi OR vector OR termin) + + ret ; Can the Sany do cursor opsitioning?? + +; +; +; delchr - make delete look like a backspace. Unless delete is a printing +; character, we just need to print a backspace. (we'll output clrspc +; afterwards) +; For Kaypro and Vector General, delete puts a blotch on the screen. +; For Apple and Osborne 1, delete moves but doesn't print. +delchr: + mvi e,bs + call outcon + +; erase the character at the current cursor position +clrspc: mvi e,' ' + call outcon + mvi e,bs ;get a backspace + jmp outcon + +; erase the current line +clrlin: lxi d,eralin + jmp prtstr + +; erase the whole screen, and go home. preserves b (but not c) +clrtop: lxi d,erascr + jmp prtstr + + + +IF SANYO +outlin: DB ESC,'E',ESC,'H',CR,LF,TAB ;WHATEVER +sysver: DB 'KERMIT-80 V3.9 [SANYO MBC-1100]',CR,LF,'$' ;VERSION HEADING +DELSTR: DB ESC,'K','$' ;WHATS A STRING? +eralin: DB ESC,'P','$' ;CLEAR SPACE +;CLRLIN: DB ESC,'K','$' ;CLEAR LINE +erascr: DB ESC,'E',ESC,'H','$' ;CLEAR SCREEN AND CURSOR HOME +curldn: db esc,'=','$',0 ;cursor lead in +;SCRNP: DB ESC,'=',24H,25H,'$' ;SPOT FOR SCREEN PACKETS +;SCRNRT: DB ESC,'=',25H,25H,'$' ;SPOT FOR # OF RETRIES +;SCRFLN: DB ESC,'=',26H,25H,'$' ;SPOT FOR FILE NAME +;SCRST: DB ESC,'=',28H,25H,'$' ;SPOT FOR STATUS +;SCREND: DB ESC,'=',2AH,25H,'$' ;SPOT FOR PROMPT +;SCRERR: DB ESC,'=',2DH,25H,'$' ;SPOT FOR ERRORS +ttab: ;NO TRANSLATION TABLE +ta: DB ESC,'A',0,0 ;CURSOR UP +tb: DB ESC,'B',0,0 ;CURSOR DOWN +tc: DB ESC,'D',0,0 ;CURSOR RIGHT +td: DB ESC,'C',0,0 ;CURSOR LEFT +te: DB ESC,'E',0,0 ;CLEAR SCREEN +tf: DB 0,0,0,0 ;WHAT??? +tg: DB 0,0,0,0 ;WHAT??? +th: DB ESC,'H',0,0 ;CURSOR HOME +ti: DB ESC,'A',ESC,'C',0,0 ;REVERSE LINEFEED?? +tj: DB ESC,'J',0,0 ;CLEAR TO END OF SCREEN +tk: DB ESC,'K',0,0 ;CLEAR TO END OF LINE +ENDIF;SANYO + +ovlend equ $ ; End of overlay + + END + + + + + + + + + + + + + + + diff --git a/cpxsys.asm b/cpxsys.asm new file mode 100644 index 0000000..0b179b9 --- /dev/null +++ b/cpxsys.asm @@ -0,0 +1,1386 @@ +IF NOT lasm +.printx * CPXSYS.ASM * +ENDIF ;NOT lasm +; 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 file contains the system-dependent code and data for KERMIT. +; It will be probably be broken into independent files to generate +; overlays for the various systems, one or more overlay possible +; from each file. For now, we will leave it in one piece. +; +; revision history: +; +; +; Edit 40, 28-Aug-89 by Mike Freeman of Bonneville Power Administration, +; P.O. Box 491, Vancouver WA 98666 USA, Telephone (206)690-2307: +; Home address: 301 N.E. 107th Street; Vancouver, WA 98685 USA +; Home telephone: (206)574-8221 +; added support for Hewlett-Packard HP-125 Business Assistant computer +; running a HP-modified CP/M Version 2.2; communications on +; DAta Comm 1 or Data Comm 2 (8th-bit quoting must be used on +; Data Comm 2 to transfer binary files as Data Comm 2 only supports +; a 7-bit data path); printer cannot be used with communications on +; Data Comm 2 (the printer port). +; edit 39, 4 August, 1987b by OBSchou for Charles Lasner re. DECMATE II +; fixes to set xon/off control off for the duration of Kermit-80. +; +; His header reads: +; +; IBM mode restore program +; +; This routine must be run after using CP4DMF (and KERMIT-80) to restore +; the normal handling of XON/XOFF; the user may also elect to cold-boot +; the DECMATE instead. +; +; acknowledgments and limitations. +; +; This program is based on DECMATE specific implementation details +; provided by Walt Lamia of DEC. It is of course, specific to DECMATE +; implementations of CP/M-80 for DECMATE II, III, III-plus, etc. +; +; usage consists of merely: +; +; CP4DMF run xon/xoff disable program +; KERMIT80 then run kermit +; <KERMIT-80 commands used normally here, including SET IBM ON> +; CP4DMU run this program to restore normal XON +; +; unless CP4DMU is run following KERMIT-80, the normal handling of +; XON/XOFF provided by KERMIT-80 will not work (cold boot is another +; alternative). +; +; [Note - These edits now included in the init/de-init code] +; +; edit 38, 23 July, 1987 by OBSchou. Moved out commonly used code +; to CPXCOM.ASM, and adjusted this (ond other family) files accordingly. +; Also filtered out code now in other family files. +; +; edit 37 , 15 July 1987 by OBSchou for David Moore, who has submitted +; code for Teletek SYSTEMASTER (teletek) and for an ADM 22 terminal. +; +; edit 36 28 Jan 87 by OBSchou. +; Removed the printx etc and should only have this file if a system +; does not have a family file. +; +; edit 35 1st Dec 1986 by OBSchou. Added test for Amstrad PCW range (PCW) +; Links to CPXPCW.ASM, which was submitted by Ian Young, Lattice +; Logic Systems. +; +; edit 34 20 August by OBSchou for Brian Robertson, Aberdeen University: +; I have discovered a bug in my code for the BBC/Z80 version of Kermit. +; At startup the transmitter baud rate is read from the serial ULA. +; The TX and RX baud rates are then reset to this value and the +; value is stored in location 'baud:' for the STATUS (or SHOW) +; command. That is how it is supposed to work ! Unfortunately +; my code at present "misreads" the initial TX baud rate - there +; is some bit manipulation that needs to be done to extract the +; correct value. +; +; edit 33 30-May-86 OBSchou. Added two new enties to the overly. One for +; printer status and the other for the address of the family of +; computer using the overlay. If it is still in CPXSYS.ASM then it +; is a dollar only. +; +;edit 32, 27 May, 1986 by OBSchou Loughborough University for +; B Robertson, Aberdeen Univ. Computing Centre. Any mistakes my fault. +; 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. +; +; edit 31, 22 April, 1986, OBSchou. +; Kermit version 4.06 starts here. All previous edits have been +; put aside (leave in a BWR file?). Hived off some definitions +; to the CPSDEF.ASM file as that is where they belong. +; Start on splitting off individual +; systems from this huge file. It is done using the LINK facility +; LASM. We link to a collection of systems under CPXxxx.ASM. +; I have started with the systems I know, the Torch, Cifer and +; pci2651. These will all be held under CPXTOR.ASM +; +; +; Keep module name, edit number, and last revision date in memory. +family: db 'CPXSYS.ASM (40) 28-Aug-89 $' ; now a family... +; + + +; Processor speed in units of 100KHz +; for cpt85xx, advance, apple,bbc,px8 & rm380z timing loop [12] +IF rm380z +cpuspd SET 40 ; 4.0 MHz CPU +ENDIF; rm380z + +IF disc OR mmate OR s1008 OR access +cpuspd SET 40 ; 4.0 MHz CPU +ENDIF ;disc OR mmate OR s1008 OR access + +IF bbc ;[9] +cpuspd SET 60 ; BBC with 6Mhz Z80 +ENDIF;bbc + + +; the basics... + +IF gener +batio EQU 056H ;I/O byte CON=BAT,LIST=CRT,READER=RDR,PUNCH=PTP +defio EQU 095H ;I/O byte CON=CRT,LIST=LPT,READER=RDR,PUNCH=PTP +crtio equ 01010101B ; use CRT: device +ptrio equ 01010110B ; use PTR: device +ttyio equ 00000000B ; use TTY: device +uc1io equ 01010111B ; use UC1: device +ur1io equ 01101010B ; use UR1: device +ur2io equ 01111110B ; use UR2: device +ENDIF;gener + +IF robin +batio EQU 056H ;I/O byte CON=BAT,LIST=CRT,READER=RDR,PUNCH=PTP +defio EQU 095H ;I/O byte CON=CRT,LIST=LPT,READER=RDR,PUNCH=PTP +lptio EQU 054H ;I/O byte CON=TTY,LIST=CRT,READER=PTR,PUNCH=PTP +gppio EQU 057H ;I/O byte CON=UC1,LIST=CRT,READER=RDR,PUNCH=PTP +ENDIF;robin + + +IF dmII OR bbc ;[22] +batio EQU 042H ;I/O byte CON=BAT,LIST=CRT,READER=RDR +defio EQU 081H ;I/O byte CON=CRT,LIST=LPT,READER=RDR +ENDIF;dmII + +IF mikko +batio EQU 10110010B ; I/O byte console => serial line +defio EQU 10000001B ; I/O byte console => CRT and Keyboard +ENDIF;mikko +; +IF lobo ;[hh] +mnport EQU 0F7E4H ;Modem data port A +mnprts EQU 0F7E5H ;Modem status/conrtol port A +baudrt EQU 0F7D0H ;Baud rate port A +output EQU 04H ;Transmit buffer empty +input EQU 01H ;Receive data available +z80 SET TRUE ;a good z80, here +ENDIF;lobo + +IF osi +mnport EQU 0CF01H ;Modem data port +mnprts EQU 0CF00H ;Modem status port +output EQU 02H ;Transmitter empty +input EQU 01H ;Input data available +z80 SET FALSE ;I don't know... +ENDIF;osi + +IF vector +mnport EQU 04H ;Modem data port +mnprts EQU 05H ;Modem status port +output EQU 01H ;Transmitter empty +input EQU 02H ;Input data available +z80 SET FALSE ;I don't know... +ENDIF;vector + +IF delphi ;[7] +mnport EQU 22H ;[7] Modem data port +mnprts EQU 23H ;[7] Modem status port +output EQU 01H ;[7] Transmitter empty +input EQU 02H ;[7] Input data available +baudrt equ 29h ;[7] Baud rate port for channel 2 (default) +z80 SET true ;[7] We're using the z80 side of the dual processor +ENDIF;[7] delphi + +IF trs80 +;NEEDS display definition (e.g. trs80lb or trs80pt) +mnport EQU 0F4H ;Modem data port (0F5H for port B) +mnprts EQU 0F6H ;Modem status port (0F7H for port B) +output EQU 04H ;Transmitter empty +input EQU 01H ;Input data available +z80 SET TRUE ;[hh] All TRS-80's but the CoCo +ENDIF;trs80 + +IF teletek +mnport EQU 00H ;Modem data port (02 for port B (console)) +mnprts EQU 01H ;Modem status port (03 for port B (console)) +baudrt EQU 08H ;ctc0 control port (09 for port B (console)) +output EQU 04H ;Transmitter empty +input EQU 01H ;Input data available +z80 SET TRUE ;All Teleteks +ENDIF;teletek + +IF osbrn1 +;Osborne 1 uses 6850 ACIA, but memory mapped. Derived from Apple. +BAUDRT EQU 0EFC1H ;Memory location where baud rates are stored. +OSTOP EQU 4000H ;Where we move OSMOVE to at startup +OSPORT EQU 2A01H ;Communications Port. +OSPRTS EQU 2A00H ;Communications Port Status. +OUTPUT EQU 02H ;Output Buffer Empty. +INPUT EQU 01H ;Input Register Full. +OSBIN1 EQU 57H ;First Init Character for 6850 ACIA (Reset) +;(I would have thought 03, but prom code writes 57 there) +OSBI12 EQU 55H ;Second Init Character for ACIA (8-bits, 1200) +OSBI03 EQU 56H ;Second init char. for ACIA (8 bits, 300) +;(don't ask.. I don't know why SETUP writes 55 and 56 either) +z80 SET TRUE ;[hh] a z80 here, also +ENDIF;osbrn1 + +IF robin +;Those definitions below that are commented out are just for information +;***** NOT generally found in distributed documentation **** + +;pbausl EQU 90H ;The Baud-Rate register. +prntst EQU 49H ;Printer +;prndat EQU 48H +contst EQU 41H ;Console +;condat EQU 40H +gentst EQU 51H ;General port. +;gendat EQU 50H +comtst EQU 59H ;COMM-Port +;comdat EQU 58H +;output EQU 01H ;Output ready bit. +;input EQU 02H ;Input ready bit. +z80 SET TRUE ; This one's a Z80. +ENDIF;robin + +IF s1008 ;[29] +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;s1008 [29] + +IF mmate ;[29] +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 SET TRUE +ENDIF;mmate [29] + +IF disc ;[29] +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 SET TRUE +ENDIF;disc [29] + +IF cmemco ;[25] +tuart EQU 020H ;TU-ART address +mnport EQU tuart+1 ;Modem data port +mnprts EQU tuart ;Modem status port +output EQU 080H ;Transmitter empty +input EQU 040H ;Input data available +baudrt EQU tuart ;Baud rate port +;Note: Needs terminal definition +z80 SET TRUE ;This one's a Z80. +ENDIF;cmemco + +IF cpt85xx +baudrt EQU 4Ch ; Baud rate generater (National MM5307) +mnport EQU 4Bh ; Comm port data register (Intel 8251) +mnprts EQU 4Ah ; Comm port command/status register +output EQU 01h ; Transmitter buffer empty flag +input EQU 02h ; Reciver buffer full flag +TxEmpty EQU 04h ; Transmitter empty flag +z80 SET FALSE ; It's really an 8080 [or 8085 ... same thing] +ENDIF;cpt85xx + +IF mmdI ;Morrow MicroDecision - the single-board one +mnport EQU 0FEH ;Morrow Printer UART data port +mnprts EQU 0FFH ;Morrow Printer UART command/status +output EQU 01H ;Output ready bit. +input EQU 02H ;Input ready bit. +;Note: Needs terminal definition +z80 SET FALSE ;I don't know... +ENDIF;mmdI + +IF bbc ;[22] +osbyte EQU 0FFF4H ; OS entry point +osword EQU 0FFF1H ; " " " +term EQU 0FFC8H ;Terminal mode OS entry +z80 SET TRUE +ENDIF;[22] bbc + +;Two types of 380Z system +IF rm380zm ;[27] MDS - 5 1/4" discs +mnport EQU 0C8H ;Modem data port +mnprts EQU 0C9H ;Modem status port +ENDIF;[32] rm380zm + +IF rm380zf ;[32] FDS - 8" discs +mnport EQU 0E8H ;Modem data port +mnprts EQU 0E9H ;Modem status port +ENDIF;[32] rm380zf + +IF rm380z ;[32] Common to both systems +output EQU 01H ;Transmitter buffer empty +input EQU 02H ;Input data available +TxEmpty EQU 04h ;Transmitter empty flag +z80 SET TRUE +ENDIF;[22] rm380z + +IF px8 ; [29] +z80 SET TRUE +mnprts EQU 0dh ; used in sending a break +ENDIF ;px8 [29] + +IF mdI ;Morrow Decision I - the big sucker +mnport equ 48H ; Modem data port. +mnprts equ 4DH ; Modem status port. +output equ 20H ; Transmitter empty. +input equ 1 ; Input data available. +mbase equ 48H ; Base address of Multi I/O port + ; selector area. +grpsel equ 4FH ; Group select port. +rbr equ 48H ; Read Data Buffer. +group equ 1 ; Multi I/O Group byte for serial ports. +congrp equ 1 ; Serial Port 1 for console +mdmgrp equ 3 ; Serial Port 3 for modem. + +; Following are needed for baud rate changes...[Toad Hall] + +dlm equ 49H ; Baud Rate Divisor (Most Sig Bit) +dll equ 48H ; Baud Rate Divisor (Least Sig Bit) +ier equ 49H ; Interrupt Enable Register +lcr equ 4BH ; Line Control Register +lsr equ 4DH ; Line Status Register +msr equ 4EH ; Modem Status Register +dlab equ 80H ; Divisor Latch Access Bit +wls0 equ 1 ; Word Length Select Bit 0 +wls1 equ 2 ; Word Length Select Bit 1 for 8 bit word +stb equ 4 ; Stop bit count - 2 stop bits +imask equ 0 ; Interrupt mask (all disabled) +z80 SET TRUE ; This one's a Z80. +ENDIF ;mdI NOTE: needs terminal definition. [Toad Hall] + +IF mikko +sioac EQU 0FF12H ;SIO channel A register(s) address +sioo3 EQU 01000001B ;SIO Write Reg. 3 original setup (?) + ;RX 7 bits,synch mode bits 0,RX enable +sion3 EQU 11001111B ;SIO Write Reg. 3 KERMIT setup + ;RX 8 bits,synch mode bits 0,RX enable +sioo4 EQU 01001111B ;SIO Write Reg. 4 original setup (?) + ;X16 clock,8 bit synch(ignored), + ;2stop bits,par even(on) +sion4 EQU 01000100B ;SIO Write Reg. 4 KERMIT setup + ;X16 clock,8 bit synch(ignored), + ;1stop bit,par off +sioo5 EQU 10101010B ;SIO Write Reg. 5 original setup (?) + ;DTR,TX 7 bits,TX enable,RTS +sion5 EQU 11101010B ;SIO Write Reg. 5 KERMIT setup + ;DTR,TX 8 bits,TX enable,RTS +txclk EQU 0FF30H ;Baud rate generator (CTC) for transmitter +rxclk EQU 0FF31H ;Baud rate generator (CTC) for receiver +chmask EQU 0F1F2H ;Mask byte address for SIO ch. A reception +z80 SET TRUE ;It's got a SIO and a CTC, it must be a Z80 +ENDIF;mikko + + +IF access ;[29] +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 SET TRUE ;a good z80, here +ENDIF;access [29] + + +IF robin OR dmII +z80 SET TRUE ; This one's a Z80 +ENDIF;robin OR dmII + +IF hp125 ;[MF] +z80 SET TRUE ;HP-125 uses a Z80 +ENDIF;hp125 [MF] + +IF gener OR cpm3 ; To be truly generic, we must assume 8080. +z80 SET FALSE +ENDIF;gener OR cpm3 +; +IF osi +defesc EQU ']'-100O ;The default escape character. +ENDIF; osi + +IF vector +defesc EQU '~' ;Vector can't type ']'. +ENDIF;vector + +IF mikko OR osbrn1 OR lobo +defesc EQU '\'-100O ;The default is Control \ -- it's easier B.E. +ENDIF;mikko OR osbrn1 OR lobo + +IF cpt85xx +defesc EQU '\'-100O ;Still Control-\ (just ran out of room...) +ENDIF;cpt85xx + +IF bbc OR rm380z OR px8 OR access OR S1008 ;[22] [29] +defesc EQU '\'-100O ;Still Control-\ (just ran out of room...) +ENDIF ;bbc OR rm380z OR px8 OR access OR s1008[29] + +IF trs80 +defesc EQU '_'-100O ;CTRL-_ (Down-arrow on TRS-80 keyboard) +ENDIF;trs80 + +; Select initial setting for VT-52 emulation flag. + +IF vt52 ; If console looks like (or is) VT52 +vtval EQU 0 ; we don't need VT52 emulation +ENDIF;vt52 + +; If none of the above, default to VT52-EMULATION ON. +IF NOT (crt OR vt52 OR robin OR dmII OR vt100 OR hp125);[MF] +vtval EQU 1 +ENDIF;NOT (crt OR vt52 OR robin OR dmII OR vt100 OR hp125)[MF] + + +; sysxin - system dependent initialisation code, called from SYSINIT +; +sysxin: + +IF dmII +; edit added by OBSchou for C. Lasner. If this dont work, tell me whats +; wrong, as I have no DMII or IBM to play with +; +; IBM mode fixup program +; +; This routine must be run before attempting to use KERMIT-80 with half +; duplex KERMIT implementations such as CMS-KERMIT, as the 6120 processor +; will otherwise "swallow" the XON character. +; +; acknowledgments and limitations. +; +; This program is based on DECMATE specific implementation details +; provided by Walt Lamia of DEC. It is of course, specific to DECMATE +; implementations of CP/M-80 for DECMATE II, III, III-plus, etc. +; +; usage consists of merely: +; +; CP4DMF run this program +; KERMIT80 then run kermit +; <KERMIT-80 commands used normally here, including SET IBM ON> +; CP4DMU run companion program to restore normal XON +; +; unless CP4DMU is run following KERMIT-80, the normal handling of +; XON/XOFF provided by KERMIT-80 will not work (cold boot is another +; alternative). +; +; CP4DMF.ASM +; +; last edit: 12-jun-87 20:00:00 Charles J. Lasner (CJL) + +;oboff equ 3fh ; offset of outbyt routine for 6120 +;prtctl equ 02h ; port control +nocoxon equ 001h ; turn off comm. output XON + + lxi b,(nocoxon * 100h) + prtctl ; c/prtctl, b/no out. xon + call outbyt + ret ; and return + +;outbyt has been catered for (in break routine) +ENDIF ;dmII + +IF osbrn1 ;(Note now no longer needs code > 4000h as it is already there +; lxi d,ostop ;where we're moving it to +; lxi h,osmove ;what we're moving +; mvi b,osmct ;How many bytes we're moving +; call mover + lda baudrt ; Find out what speed is current + ani 1 + mvi a,osbi03 ; assume 300 baud + jz osstr1 + mvi a,osbi12 ; nope, it's 1200. +osstr1: sta speed ; save initial speed + sta speed+1 ; as 16 bits, to match speed table entries + mov d,a + mov e,a ; get initial speed in DE + call sysspd ;set up parity etc. +ENDIF;osbrn1 + +IF cpt85xx + mvi a,80h ; Send UART reset [force idle] by setting + out baudrt ; bit 7 of baud rate I/O port + lxi H,0f0fh ; Clear reset and default to 9600 baud [23] + shld speed ; store current speed + xchg + call sysspd ; set default baud rate + mvi a,4Eh ; Set UART mode to async 16x clock, 8 data + out mnprts ; bits, no parity, and 1 stop bit + mvi a,37h ; Set command to Tx enable, DTR on, Rx enable, + out mnprts ; break off, error reset, and RTS on +ENDIF ; cpt85x + +IF bbc ;[22] + lxi d,modstr ; Set MODE 3 + call prtstr + mvi a,1 ; Set terminal mode on + call term + mvi a,0F2H ; Read current transmit speed + lxi h,0FF00H ; .. 3 lsb of ULA register + call osbyte ; FX242,0,255 + mov a,l + ani 7 ; Mask of 3 lsb +; +; Edit of July 22, 1986 by B Robertson, Aberdeen Univ. Computing Centre. +; Correct bug in sysinit for BBC - reads the initial baud rate at +; start up incorrectly. +; +; + rar ; Reverse order of 3 lsb + rar ; Bit2 now in bit0 + jnc binit1 ; + ori 2 ; Restore bit1 +binit1: ana a ; Set sign bit as appropriate + jp binit2 ; + ori 4 ; Bit0 now in bit2 +binit2: ani 7 ; Mask off unwanted bits +; End of Edit + + xri 7 ; Stored as 2's complement + inr a + sta speed ; Store 16 bit value + sta speed+1 + mov e,a ; Ensure RX and TX speeds are the same + call sysspd +ENDIF;[22] bbc + +IF rm380z ;[22] + mvi e,11h ;Output ctrl-Q to clear autopaging + call outcon +ENDIF;[22] rm380z + + +IF lobo ;[hh] + lxi d,siotbl ;[hh] address of status table + mvi c,siolen ;[hh] length of the table +siolup: ;[hh] loop here for each command byte + ldax d ;[hh] load first byte into A + inx d ;[hh] index pointer to next bute + sta mnprts ;[hh] send it to status port A + sta mnprts+2 ;[hh] and to status port B + dcr c ;[hh] decrement the counter + jnz siolup ;[hh] loop back for more commands + mvi a,05H ;[hh] value for 300 baud + sta baudrt ;[hh] starting default for port A + sta baudrt+4 ;[hh] and for port B + sta speed ;[hh] tell program they're set + mvi a,0E4H ;[hh] value for port A + sta port ;[hh] tell program we've set this, too + mvi a,0D0H ;[hh] port A baud rate value + sta port+1 ;[hh] save this as well, for consistancy +ENDIF ;lobo + +IF mikko + lxi d,mintbl ;Address of KERMIT Reg values (what) + mvi c,minlen ;Length of table (how many) + lxi h,sioac ;Send data to ch. A SIO registers (to where) + call movmik + mvi a,0FFH ;Set ch. A mask to use all bits + sta chmask +ENDIF;mikko + +IF mdI + lxi h,96 ;Default 1200 baud modem port speed + shld speed ;Store as modem port speed + call sysspd ;Initialize the port +ENDIF;mdI [Toad Hall] + +IF cmemco ;[25] + mvi a,01h ; Reset TU-ART + out tuart+2 + mvi a,90h ; Set default baud rate (2400), and 1 stop bit + out tuart + sta speed ; save for status display + sta speed+1 +ENDIF;cmemco + +IF delphi ;[7] +; +; shove the default baud rate (1200) in to the Delphi port address +; for the baud rate generator on port 2, the default port; save this +; value so we can tell what speed is selected. +; + mvi a,07h ;[7] get value for 1200 baud + out baudrt ;[7] set it for port 2 + sta speed ;[7] save for status display + sta speed+1 +ENDIF;[7] delphi + +IF px8 ; [29] + lda 0f6a9h ; get baud rate value set by CONFIG + sta px8blk+4 ; put into parameter block + mov h, a ; initialise global speed indicator + mov l, a + shld speed + lhld 6 ; base of CP/M +; buffer starts at ovlend+8192, immediately after sector buffer +; We must also allow (800h) for the CCP as Kermit exits with a RET + lxi d, ovlend+8192+800h ; calc buffer length + ora a ; clear carry + db 0edh, 52h ; sbc hl, de + shld px8blk+2 + call rsopen +ENDIF ; px8 [29] + +IF disc ;[29] +;Initialization sequence for Discovery 83U port B +;Sets port to 9600 baud, 8 data bits, 1 stop bit, no parity + 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 [29] +; +; +IF mikko ;currently for MIKROMIKKO only +; copy command block into memory-mapped SIO. +movmik: di ;disable interrupts +movmk1: ldax d ;Get a register value + mov m,a ;Output it + inx d ;Next value + dcr c ;Decrement counter + jnz movmk1 ;Repeat until done + ei + ret +ENDIF;mikko + +; +IF osbrn1 +osmove: +osflag equ 0EF08H ;Osborne 1 Bank-2 flag +; +; return modem status in A +; +OSLDST: + DI + OUT 0 + LDA osprts ;Read the status port + OUT 1 + EI + ret +; +; set modem status from A +; +OSSTST: + DI + OUT 0 + STA osprts ;Write the control port + jmp osstex +; +; read character from modem into A +; +OSLDDA: + DI + OUT 0 + LDA osport + OUT 1 + EI + ret +; +; output character in A to modem +; +OSSTDA: + DI + OUT 0 + STA osport +osstex: + OUT 1 + mvi a,1 + sta osflag + EI + ret +ENDIF;osbrn1 + +IF lobo +; List of commands to set up SIO channel A for asynchronous operation. +siotbl: DB 18H ; Channel reset + DB 18H ; another, in case register 0 wasn't selected + DB 04H ; Select register 4 + DB 44H ; 1 stop bit, clock*16 + DB 01H ; Select register 1 + DB 00H ; No interrupts enabled + DB 03H ; Select register 3 + DB 0C1H ; Rx enable, 8 bit Rx character + DB 05H ; Select register 5 + DB 0EAH ; Tx enable, 8 bit Tx character, + ; raise DTR and RTS +siolen equ $-siotbl ; length of command list +ENDIF;lobo + +IF mikko +; command list to set SIO chip back to normal state +miotbl: db 3 ;reg. 3 + db sioo3 + db 5 ;reg. 5 + db sioo5 + db 4 ;reg. 4 + db sioo4 + db 0 ;reselect reg. 0 +miolen equ $-miotbl ;MikroMikko SIO table length (original values) + +; command list to set up SIO chip for operation with Kermit +mintbl: db 3 ;reg. 3 + db sion3 + db 5 ;reg. 5 + db sion5 + db 4 ;reg. 4 + db sion4 + db 0 ;reselect reg. 0 +minlen equ $-mintbl ;MikroMikko SIO table length (KERMIT values) +ENDIF;mikko + + +IF bbc ;[22] +modstr: db 16h,03h,'$' ; String to put screen into MODE 3 +ENDIF + +IF px8 ; [29] +rsget: mvi b, 50h + jmp rsiox +rsinst: mvi b, 30h + jmp rsiox +rsput: mvi b, 60h + jmp rsiox +rsoutst:mvi b, 40h + jmp rsiox +rserst: mvi b, 90h + jmp rsiox +rsopen: lxi h, px8blk ; copy px8blk to px8prm + lxi d, px8prm + lxi b, 9 + call mover + mvi b, 10h ; open code + jmp rsiox +rsclose:mvi b, 20h ; close code +rsiox: lxi h, px8prm + lxi d, 51h ; offset into BIOS jump table + push h + lhld 1 ; start of BIOS + dad d + xthl ; entry point on stack, px8prm addr in hl + ret ; jump indirect + +px8prm: dw 0, 0 + db 0, 0, 0, 0, 0 ; the param area is overwritten in rsopen +px8blk: dw ovlend+8192 ; buffer address + dw 0 ; buffer size - overwritten + db 0 ; baud rate - overwritten + db 3 ; 8 bits/char + db 0 ; no parity, it is done internally + db 1 ; 1 stop bit + db 0cfh ; special bits - activate xon/xoff +; The documentation suggests that the xon/xoff bit is bit 4, i.e the pattern +; should be 0efh, but the top bit is omitted from the diagram. I will try +; clearing both bit 4 and bit 5. +ENDIF ; px8 [29] + +IF hp125 ;[MF] + lxi b,73ffh ;Prepare Data Comm 1 to + call bdos ;Transfer eight-bit data + lxi d,jbuf ;Point to bios jump-table vector + lxi b,7effh ;Set up special subfunction code to + call bdos ;Get rdr routine address + lhld jbuf+3 ;Remember this address + shld readin+1 ;for our eight-bit rdr routine + mvi a,1 ;We want to write into the bios jump table + sta jbuf+1 ;... + lxi h,readin ;Point to our rdr routine (all 8 bits) + shld jbuf+3 ;as new RDR routine + lxi d,jbuf ;Point to jump vector argument block + lxi b,7effh ;Set subfunction code to + call bdos ;Substitute our rdr routine in dispatch table + lxi h,mapon1 ;Make Data Comm 1 the default port + shld port ;at program-start + xchg ;Put in DE + call prtstr ;Print escape sequences to connect + ;DAta Comm 1 to rdr/punch +ENDIF ;hp125 [MF] + + ret ; end of sysxin + +; +; system-dependent termination processing +; If we've changed anything, this is our last chance to put it back. +sysexit: + +IF dmII +; Edited by OBSchou for Charles Lasner. His bug fix now in Kermit-80: +; +; IBM mode restore program +; +; This routine must be run after using CP4DMF (and KERMIT-80) to restore +; the normal handling of XON/XOFF; the user may also elect to cold-boot +; the DECMATE instead. +; +; acknowledgments and limitations. +; +; This program is based on DECMATE specific implementation details +; provided by Walt Lamia of DEC. It is of course, specific to DECMATE +; implementations of CP/M-80 for DECMATE II, III, III-plus, etc. +; +; usage consists of merely: +; +; CP4DMF run xon/xoff disable program +; KERMIT80 then run kermit +; <KERMIT-80 commands used normally here, including SET IBM ON> +; CP4DMU run this program to restore normal XON +; +; unless CP4DMU is run following KERMIT-80, the normal handling of +; XON/XOFF provided by KERMIT-80 will not work (cold boot is another +; alternative). +; +; CP4DMF.ASM +; +; last edit: 12-jun-87 20:00:00 Charles J. Lasner (CJL) +; +coxon equ 000h ; enable comm. output XON +;oboff equ 3fh ; offset of outbyt routine for 6120 +;prtctl equ 02h ; port control + + + lxi b,(coxon * 100h) + prtctl ; c/prtctl, b/with out. xon + call outbyt ;[OBS] declared elswhere + ret ; and return + +ENDIF ;dmII + +IF mikko + lxi d,miotbl ;Load the adress of original reg values + mvi c,miolen ;Length of table + lxi h,sioac ;Send data to ch A SIO registers + call movmik + mvi a,07FH ;Set ch A mask to use just 7 bits + sta chmask +ENDIF;mikko + +IF teletek +;Note - This code was handwritten onto the lising I was sent, with the +; comment that David had just thought of the code, so it was +; not on the listing. If you have problems I suggest you +; comment out these few lines. +;Bertil Schou. +; + di + mvi a,47h ; reset baud rate to 9600 + out baudrt + mvi a,08h + out baudrt + ei +ENDIF ;teletek + +IF cpt85xx + mvi a,80h ; Reset (force idle) the 8251 UART via bit 7 + out baudrt ; of the baud rate generater port + mvi a,00h ; and turn off the baud rate generater + out baudrt +ENDIF;cpt85xx + +IF bbc ;[22] + mvi a,0 ; Turn off terminal mode + call term +ENDIF;[22] bbc + +IF px8 ;[29] + call rsclose +ENDIF ;px8 [29] + +IF hp125 ;[MF] + lxi b,74ffh ;Set subfunction code to + call bdos ;Reset Data Comm 1 for 7-bit data + lhld readin+1 ;Get original rdr routine address + shld jbuf+3 ;and store in jump vector + lxi d,jbuf ;Point to jump vector + lxi b,7effh ;Set subfunction code to + call bdos ;Put original rdr routine back in bios + ;dispatch table + lxi d,mapoff ;Point to escape sequences to + call prtstr ;Turn off Data Comm 1/2 mappings +ENDIF ;hp125 [MF] + + ret + +; +; system-dependent processing for start of CONNECT command +; +syscon: +IF robin OR trs80 OR cpt85xx ;For Robin/TRS80/CPT-85xx, add some more info + lxi d,conmsg ; about obscure key combinations + call prtstr +ENDIF;robin OR trs80 OR cpt85xx + +IF osbrn1 ;*** This is Software dependent *** + lhld 1 ;Modify back-arrow code to DELETE + mvi l,0 ;Get BIOS-start address + lxi d,85H ;Adress for key-code = XX85H + dad d + mov e,m ;Get it in DE + inx h + mov d,m + xchg ;Memory pointer to HL + mvi m,del ;modify the code +ENDIF;osbrn1 + ret + +conmsg: ; Messages printed when entering transparent (CONNECT) mode: +IF robin ; for Robin, control-S key is hidden + db ' (Type Left Arrow to send CTRL-S)',cr,lf,'$' +ENDIF;robin +IF trs80 ; for TRS-80, the preferred escape key is hidden + db ' (Control-_ is the Down-Arrow key on the TRS-80 keyboard)' + db cr,lf,'$' +ENDIF;trs80 +IF cpt85xx ; for CPT-85xx, some graphics map "funny" to keyboard in CP/M + db ' (Use CODE + SHIFT + 1/2 key to generate a Control-\)' + db cr,lf,'$' +ENDIF;cpt85xx +; +; syscls - system-dependent close routine +; called when exiting transparent session. +; +syscls: +IF osbrn1 + lhld 1 ;Modify back-arrow code to BACKSPACE + mvi l,0 ;Get BIOS address + lxi d,85H ;Address for key-code =XX85H + dad d + mov e,m ;Get it in DE + inx h + mov d,m + xchg ;Address to HL + mvi m,bs ;Modify code +ENDIF;osbrn1 + ret +; +; sysinh - help for system-dependent special functions. +; called in response to <escape>?, after listing all the +; system-independent escape sequences. +; +sysinh: +IF robin OR dmII OR cpt85xx OR lobo + lxi d,inhlps ; we got options... + call prtstr ; print them. +ENDIF;robin OR dmII OR cpt85xx OR lobo + +IF bbc OR rm380z ; some more + lxi d,inhlps ; we got options... + call prtstr ; print them. +ENDIF;[22] bbc OR rm380z + +IF px8 OR access OR mmate OR disc ;and more... + lxi d,inhlps ; we got options... + call prtstr ; print them. +ENDIF ;px8 OR access OR mmate OR disc + + ret + + +;additional, system-dependent help for transparent mode +; (two-character escape sequences) +inhlps: + +IF robin OR dmII OR cpt85xx OR lobo + db cr,lf,'B Transmit a BREAK' +ENDIF;robin OR dmII OR cpt85xx OR lobo + +IF bbc OR rm380z + db cr,lf,'B Transmit a BREAK' +ENDIF;bbc OR rm380z + +IF px8 OR access OR mmate + db cr,lf,'B Transmit a BREAK' +ENDIF ;px8 OR access OR mmate + +IF disc ;[29] [32] + db cr,lf,'B Transmit a 300ms BREAK' + db cr,lf,'L Transmit a 5 second BREAK' +ENDIF;disc [29] + +IF lobo + db cr,lf,'D Drop the line' +ENDIF;lobo + + db '$' ;[hh] table terminator + +; +; sysint - system dependent special functions +; called when transparent escape character has been typed; +; the second character of the sequence is in A (and in B). +; returns: +; non-skip: sequence has been processed +; skip: sequence was not recognized + +sysint: ani 137O ; convert lower case to upper, for testing... + +IF robin OR dmII OR cpt85xx OR lobo + cpi 'B' ; send break? + jz sendbr ; yes, go do it. return nonskip when through. +ENDIF;robin OR dmII OR cpt85xx OR lobo + +IF bbc OR rm380z ; [22] [25] ... some more + cpi 'B' ; send break? + jz sendbr ; yes, go do it. return nonskip when through. +ENDIF; bbc OR rm380z + +IF px8 OR access OR mmate ;[28] [29] and anothers + cpi 'B' ; send break? + jz sendbr ; yes, go do it. return nonskip when through. +ENDIF ; px8 OR access OR mmate [28] [29] + +IF lobo ;[hh] + cpi 'D' ;[hh] disconnect? + jz discon ;[hh] yes, go do it. nonskip return when done. +ENDIF ;lobo + +IF disc ;[29] + cpi 'B' ;Send short break? + jz sendbr + cpi 'L' ;Send long break? + jz sendlbr +ENDIF;disc [29] + + jmp rskp ; take skip return - command not recognized. + + +; +IF robin ;Definitions & code to send a BREAK (ungenerically, no other way). + +comctl equ 59h ;VT180 communications port +crtctl equ 41h ;VT180 crt port + +;VT180 serial port command bits + +txe equ 1 ;transmit enable +dtr equ 2 ;dtr on +rxe equ 4 ;rx enable +sndbrk equ 8 +rerr equ 10h ;reset error +rts equ 20h ;RTS on +reset equ 40h ;port reset + +;Send a break to the communications port. +; + +sendbr: lxi h,38500 ;250 ms(?) + lda prtadr ;Get address of selected port + mov c,a ;Into C + mvi a,sndbrk+dtr +; OUT C,A ;Want to send to port addressed by C + db 0EDH,079H ;Op code for above instruction +sndbr1: dcx h ;timing loop... + mov a,l + ora h + jnz sndbr1 ;...until over + lda prtadr ;Get the address for the port + mov c,a ;Into C + mvi a,txe+dtr+rxe+rerr+rts ;enable tr/rc, dtr, reset error +; out c,a ;Z-80 only instruction + db 0EDH,079H ;Op code for above instruction + out contst ;reset ports + ret +ENDIF;robin +; +IF dmII ;[jd] this added to send break on DECmate + +; DECmate command codes for 6120 I/O processor +oboff equ 3fh ; offset of outbyt routine for 6120 +prtctl equ 02h ; port control +brdat equ 06h ; data to tell 6120 to send a break +brdur equ 30 ; duration, 30 = 300 ms. + +sendbr: lxi b,(brdat * 100h) + prtctl ; c/prtctl, b/brdat + call outbyt + lxi b,brdur*100h ; b/duration, c/0 +; fall through into outbyt + +outbyt: lhld 1 ; get warm boot address + lxi d,oboff ; offset of outbyt routine + dad d ; compute address + pchl ; branch there (a callret) + +ENDIF;dmII +; +IF access OR mmate ;[cjc] send break on Kaypro [29] +; 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. + +sendbr: +; 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 hundredths of a second + mvi a,30 ; delay count + call delay +; +; 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;access OR mmate [29] + +IF lobo ;[hh] This routine sends a break tone or disconnects a modem +; (those that respond to it) by setting the DTR line low +; for 300 ms. +; +sendbr: mvi a,05H ;[hh] write register 5 + call outctl ;[hh] send it to control port + mvi a,0FAH ;[hh] value to send break tone + jmp sndbr1 ;[hh] +; +discon: mvi a,05H ;[hh] write register 5 + call outctl ;[hh] send it to the control port + mvi a,06AH ;[hh] DTR off and break tone on +sndbr1: call outctl ;[hh] send to control port + mvi a,30 ;[hh] delay count for 300 ms. + call delay ;[hh] wait a while... + mvi a,05H ;[hh] write register 5 + call outctl ;[hh] get it's attention + mvi a,0EAH ;[hh] normal 8 bits, DTR on, RTS on, etc. + call outctl ;[hh] restore SIO + ret +; +outctl: sta mnprts ;[hh] + ret +ENDIF ;lobo +; +IF cpt85xx OR rm380z ;[lmj] [22] [25] +sendbr: +; +; Ensure that the transmitter has finished sending buffered chars +sndbr1: in mnprts ; get UART status + ani TxEmpty ; everything sent? + jz sndbr1 ; no, wait a bit more +; +; Begin sending a break by setting bit in UART command register + mvi a,3Fh ; Set TxEna, DTR, RxEna, SBreak, ErrRst, RTS + out mnprts +; +; Wait for 250 milliseconds (using hundredths second delay routine) + mvi a,25 + call delay +; +; Resume normal operation by clearing the SendBreak command bit + mvi a,37h ;Set TxEna, DTR, RxEna, ErrRst, RTS + out mnprts +; + ret ;done +ENDIF;cpt85xx OR rm380z + +IF px8 ; [29] +sendbr: mvi a, 3fh ; set break bit + out mnprts + mvi a, 25 + call delay ; wait 250 msec + mvi a, 37h ; clear break bit + out mnprts + ret +ENDIF ; px8 [29] + +; +IF bbc ;[22] +sendbr: +; +; Ensure that the transmitter has finished sending buffered chars +sndbr1: mvi a,96h ; get ACIA status + mvi l,8 + call osbyte ; *FX150,8 + mov a,h + ani 2 ; everything sent? + jz sndbr1 ; no, wait a bit more +; +; Disable centisecond clock (system VIA) which interferes with break + lxi h,0FE4Eh ; system VIA interrupt enable register + mvi a,40H ; disable timer 1 + call wrtiom ; write to I/O processor memory +; +; Begin sending a break by setting bit in ACIA control register + mvi a,9Ch + lxi h,9F60h ; Set Rxint, Txint, Break, RTS + call osbyte ; *FX 156,96,159 +; +; Wait for 250 milliseconds (using hundredths second delay routine) + mvi a,25 + call delay +; +; Resume normal operation by returning old control byte + mvi a,9Ch + mvi h,0 ;Set TxEna, DTR, RxEna, ErrRst, RTS + call osbyte ; *FX 156,oldvalue,0 +; +; Enable centisecond clock (system VIA) + lxi h,0FE4Eh ; system VIA interrupt enable register + mvi a,0C0H ; enable timer 1 + call wrtiom ; write to I/O processor memory +; + ret ;done +; +; Routine to write byte in A to I/O processor memory address +; given by HL +wrtiom: + shld parblk ; store address to parameter block + sta parblk+4 ; store data + lxi h,parblk ; load hl with address of param block + mvi a,6 ; write I/O processor memory + call osword ; go do it + ret +; +parblk: DS 5 ; reserve space for parameter block +ENDIF;bbc [22] +; +IF disc ;[29] +; 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 [29] + + +; +; sysflt - system-dependent filter +; called with character in E. +; if this character should not be printed, return with A = zero. +; preserves bc, de, hl. +; note: <xon>,<xoff>,<del>, and <nul> are always discarded. +sysflt: + mov a,e ; get character for testing +IF mikko + cpi 'O'-100O ;Control-O's lock keyboard + rnz ; if not control-O, it's ok. + xra a ; don't allow control-O out. +ENDIF;mikko + + ret + +; mdmflt - modem filter [30] +; called with character to be sent to printer in E +; with parity set as appropriate. +; return with accumulator = 0 do do nothing, +; <> 0 to send char in E. +mdmflt: + mov a,e ;[30] get character to test + ret + + + +; prtflt - printer filter [30] +; called with character to be sent to printer in E +; returns with a = 0 to do nothing +; a <> 0 to print it. +; +; this routine for those printer that automatically insert +; a lf on cr, or cr for lf. Should this be shifted to +; the system indep. stuff, in say 4.06? +prtflt: + mov a,e ; [30] get character to test + ret + + +; +; system-dependent processing for BYE command. +; for lobo, hang up the phone. +sysbye: +IF lobo ;[hh] + call discon ;[hh] force modem to hang up +ENDIF;lobo + ret + +IF lasm + LINK CPXSY2.ASM ; If m80 then this ignored +ENDIF ; lasm diff --git a/cpxtm4.asm b/cpxtm4.asm new file mode 100644 index 0000000..bb933ee --- /dev/null +++ b/cpxtm4.asm @@ -0,0 +1,490 @@ +;CPXTM4.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 file contains the system-dependent code and data for various +; Tandy Model 4 running under Montezuma Micro CPM +; +; This has the Family name of CPXTM4.ASM. +; +; revision history (last edit first) +; +; edit 5, 8-Feb-1991 by Lance Tagliapietra of the University of Wisconsin- +; Platteville. Corrected error in the VT52 translation table for +; clearing from the cursor to the end of the line. +; +; edit 4, 27 October, 1987 by OBSchou. Massaged into format suitable +; for overlay version 4.09 +; +; Edit 3: Sept 5 1987 GDS Transformed code from Genie III to Tandy Model 4 +; +; Edit 2: Aug 27 1987 GDS Put in code for BREAK and fillited out +; a lot of unnecessary IF's +; +;Edit 1: Nov. 28, 1986 Geof Smith Clinical Research centre Harrow UK. + + +.printx * Assembling for Tandy Model 4* +; +drtime EQU 05H ;Default receive time out interval. +; +; the basics... +; +mnport EQU 0EBH +mnprts EQU 0EAH +output EQU 40H +input EQU 80H +lctrl EQU 0E8H +baudpt EQU 0E9H +z80 EQU TRUE +brkval EQU 0H +inout EQU TRUE + +defesc EQU 'X'-100O ;The default escape character. + + +;Select initial setting for VT-52 emulation flag. + +; default to VT52-EMULATION ON. +; +vtval EQU 1 +; +; + + + + + + + + + +; Family is the string used in VERSION to say which of several +; smaller overlay files are used. These are (will be) derived from +; the huge CP4SYS.ASM file, in which case we will never get here. +; Just a Dollar, but put a sting in for a family of machines. +; +family: db 'CPXTM4.ASM (5) 8-Feb-91$' ; Used for family versions.... + + +; +; System-dependent initialization +; Called once at program start. +sysxin: +; + ;Set up 9600 bd, 8bit words, no parity 1stop bit + + mvi a,0EEH ;Get byte for desired baud (9600 = CC) and + out baudpt ;and put it out of baud port + out lctrl ;latch control port with anything + lda pstore ;get parity etc and put it out of + out mnprts ;port + ret ; return from system-dependent routine + +; + + + + + + + + + +; +; system-dependent termination processing +; If we've changed anything, this is our last chance to put it back. +sysexit: + ret +; +; system-dependent processing for start of CONNECT command +; +syscon: + ret + +conmsg: ; Messages printed when entering transparent (CONNECT) mode: +;------------------------------------------------------------------------------- +; -- +; +; syscls - system-dependent close routine +; called when exiting transparent session. +; +syscls: + ret +;------------------------------------------------------------------------------- +; --- +; +; sysinh - help for system-dependent special functions. +; called in response to <escape>?, after listing all the +; system-independent escape sequences. +; +sysinh: + lxi d,inhlps ; we got options... + call prtstr ; print them. + ret + + +;additional, system-dependent help for transparent mode +; (two-character escape sequences) +inhlps: + + db cr,lf,'B Transmit a BREAK' + + db '$' ;[hh] table terminator + +; +; sysint - system dependent special functions +; called when transparent escape character has been typed; +; the second character of the sequence is in A (and in B). +; returns: +; non-skip: sequence has been processed +; skip: sequence was not recognized +sysint: ani 137O ; convert lower case to upper, for testing... + cpi 'B' ; send break? + jz sendbr ; yes, go do it. return nonskip when through. + + jmp rskp ; take skip return - command not recognized. + + +;------------------------------------------------------------------------------- +sendbr: +; +; Ensure that the transmitter has finished sending buffered chars +sndbr1: in mnprts ; get UART status + ani output ; everything sent? + jz sndbr1 ; no, wait a bit more +; +; Begin sending a break by setting bit in UART command register + mvi a,brkval ; SBreak, + out lctrl + out mnprts +; + +; Wait for 250 milliseconds (using hundredths second delay routine) + mvi a,25 + call delay +; +; Resume normal operation by clearing the SendBreak command bit + lda pstore ;get parity etc value + out lctrl ;latch control port + out mnprts ;and set values +; + ret ;done + +; +; + + + + + + + + + +; +; sysflt - system-dependent filter +; called with character in E. +; if this character should not be printed, return with A = zero. +; preserves bc, de, hl. +; note: <xon>,<xoff>,<del>, and <nul> are always discarded. +sysflt: + mov a,e ; get character for testing + ret + +; mdmflt - modem filter [30] +; called with character to be sent to modem in E +; with parity set as appropriate. +; return with accumulator = 0 do do nothing, +; <> 0 to send char in E. +mdmflt: mov a,e + ret + + + +; prtflt - printer filter [30] +; called with character to be sent to printer in E +; returns with a = 0 to do nothing +; a <> 0 to print it. +; +; this routine for those printer that automatically insert +; a lf on cr, or cr for lf. Should this be shifted to +; the system indep. stuff, in say 4.06? +prtflt: + mov a,e ; [30] get character to test + ret + + +; + + + + + + + + + + +; +; system-dependent processing for BYE command. +; for apmmdm, heath, and lobo, hang up the phone. +sysbye: + ret +; + + + + + + + + + + +; This is the system-dependent command to change the baud rate. +; DE contains the two-byte value from the baud rate table; this +; value is also stored in 'speed'. +sysspd: + ;Set up baud rate 8bit words, no parity 1stop bit + + mov a,e ;get get speed into a + out baudpt ;output it as well + lda pstore ;get parity etc + out lctrl ;do it resetting DLAB at same time + out mnprts + ret + +pstore: db 6CH ;Default value for parity word length and stop bits + +spdtbl: db 10h ;17 entries + db 03h,'110$', 22H,22H + db 04h,'1200$', 77H,77H + db 05h,'134.5$', 33H,33H + db 03h,'150$', 44H,44H + db 04h,'1800$', 88H,88H + db 05h,'19200$', 0FFH,0FFH + db 04h,'2000$', 99H,99H + db 04h,'2400$', 0AAH,0AAH + db 03h,'300$', 55H,55H + db 04h,'3600$', 0BBH,0BBH + db 04h,'4800$', 0CCH,0CCH + db 02h,'50$', 00H,00H + db 03h,'600$', 66H,66H + db 04h,'7200$', 0DDH,0DDH + db 02h,'75$', 11H,11H + 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 $' + +; This is the system-dependent SET PORT command. +; HL contains the argument from the command table. +sysprt: + ret +; +prttbl equ 0 ; SET PORT not supported +prhtbl equ 0 + +; + + + + + + + + + +; +; selmdm - select modem port +; selcon - select console port +; selmdm is called before using inpmdm or outmdm; +; selcon is called before using inpcon or outcon. +; For iobyt systems, diddle the I/O byte to select console or comm port; +; For Decision I, switches Multi I/O board to console or modem serial +; port. [Toad Hall] +; For the rest, does nothing. +; preserves bc, de, hl. +selmdm: + ret + +selcon: + ret +; + + + + + + + + + +; Get character from console, or return zero. +; result is returned in A. destroys bc, de, hl. +; +inpcon: + mvi c,dconio ;Direct console I/O BDOS call. + mvi e,0FFH ;Input. + call BDOS + + ret +; +; Output character in E to the console. +; destroys bc, de, hl +; +outcon: + + mvi c,dconio ;Console output bdos call. + call bdos ;Output the char to the console. + + ret +; +; +; outmdm - output a char from E to the modem. +; the parity bit has been set as necessary. +; returns nonskip; bc, de, hl preserved. +outmdm: + + in mnprts ;Get the output done flag. + ani output ;Is it set? + jz outmdm ;If not, loop until it is. + mov a,e + out mnport ;Output it. + ret + +;-------------------------------------------------------------------------- +; +; get character from modem; return zero if none available. +; for IOBYT systems, the modem port has already been selected. +; destroys bc, de, hl. +inpmdm: +;Note: modem port should already be selected for mdI. [Toad Hall] + in mnprts ;Get the port status into A. + ani input ;See if the input ready bit is on. + rz ;If not then return. + in mnport ;If so, get the char. + ret ; return with character in A + + +; +; flsmdm - flush comm line. +; Modem is selected. +; Currently, just gets characters until none are available. + +flsmdm: call inpmdm ; Try to get a character + ora a ; Got one? + jnz flsmdm ; If so, try for another + ret ; Receiver is drained. Return. +;----------------------------------------------------------------------------- +; +; lptstat - get the printer status. Return a=0 if ok, or 0ffh if not. +lptstat: + xra a ; assume it is ok.. this may not be necessary + ret + +; +; outlpt - output character in E to printer +; console is selected. +; preserves de. +outlpt: + push d ; save DE in either case + call prtflt ; go through printer filter [30] + ana a ; if A = 0 do nothing, + jz outlp1 ; [30] if a=0 do nothing + + mvi c,lstout + call bdos ;Char to printer +outlp1: pop d ; restore saved register pair + ret +;------------------------------------------------------------------------------ +; +; Screen manipulation routines +; csrpos - move to row B, column C +; +; csrpos for terminals that use a leadin sequence followed +; by (row + 31.) and (column + 31.) +; +csrpos: push b ; save coordinates + lxi d,curldn ; get cursor leadin sequence + call prtstr ; print it + pop h ; restore coordinates + mov a,h ; get row + adi (' '-1) ; space is row one + mov e,a + push h + call outcon ; output row + pop h + mov a,l ; get column + adi (' '-1) ; space is column one + mov e,a + jmp outcon ; output it and return + +; +; delchr - make delete look like a backspace. Unless delete is a printing +; character, we just need to print a backspace. (we'll output clrspc +; afterwards) +; For Kaypro and Vector General, delete puts a blotch on the screen. +; For Apple and Osborne 1, delete moves but doesn't print. +delchr: + + mvi e,bs ;get a backspace + jmp outcon + +; erase the character at the current cursor position +clrspc: mvi e,' ' + call outcon + mvi e,bs ;get a backspace + jmp outcon + +; erase the current line +clrlin: lxi d,eralin + jmp prtstr + +; erase the whole screen, and go home. preserves b (but not c) +clrtop: lxi d,erascr + jmp prtstr + +;[2] I see no real saving in having all screens in separate file and +;therefore have included screen definition here and commented out +;the link to VDU file +; +; +;Specific definitions for the Model IV screen +; +sysver: db 'Tandy Model IV$' +outlin: db 1aH,cr,lf,' $' +erascr: db 1AH,'$' +eralin: db cr,15H,'$' +curldn: db esc,'=$' +ttab: +ta: db 0BH,'$',0,0 ;Cursor up +tb: db 0AH,'$',0,0 ;Cursor down +tc: db 0CH,'$',0,0 ;Cursor right +td: db 08H,'$',0,0 ;Cursor left +te: db 1AH,'$',0,0 ;Clear display +tf: db 0FH,'$',0,0 ;Reverse on +tg: db 0EH,'$',0,0 ;Reverse off +th: db 1EH,'$',0,0 ;Cursor home +ti: db 0BH,'$',0,0 ;Reverse linefeed +tj: db 19H,'$',0,0 ;Clear to end of screen +tk: db 15H,'$',0,0 ;Clear to end of line + +ovlend equ $ ;End of overlay + + END diff --git a/cpxtor.asm b/cpxtor.asm new file mode 100644 index 0000000..51b653a --- /dev/null +++ b/cpxtor.asm @@ -0,0 +1,1229 @@ +IF NOT lasm +.printx * CPXTOR.ASM * +ENDIF ;NOT lasm +; 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 file contains the system dependent part for Torch, Superbrains, +; PCI2651 (Loughborough 8" Standard CP/M system) and Cifer computers. +; +; This is the first attempt to break the huge CPXSYS.ASM file +; into smaller system dependent files. To start with I will bunch +; several micros to one class. +; +; Please name system dependent files in the form CPXxxx.ASM where +; xxx is a three letter abbrev. for the system you are adding. +; +; revision history: +; +;edit 5, 10-Jan-1991 by MF. Removed references to assembly switch ker09. +; edit 4, 21 July, 1987 by OBSchou. Removed routines no in CPXCOM.ASM +; +; edit 3, 8 April, 1987 by OBSchou. Moved the VDU declarations for the +; Torch, superbrain and Cifer from CPXVDU.ASM. Also added code to +; see if the MCP/CCCP ROM versions on the Torch is less or grater than +; 1. Less than 1 => poor screen control. Finally adjusted the +; positioning of the filename to cope with a user number and drive +; in the filename field +; +; +; edit 2, 20 March, 1987 by C.J.MILES@UK.AC.UMRCC. Added support for +; NCR Decision Mate V (2651 USART) +; +; edit 1, 22 April, 1986, OBSchou. Start on splitting off individual +; systems from this huge file. It is done using the LINK facility +; LASM. We link to a collection of systems under CPXxxx.ASM. +; I have started with the systems I know, the Torch, Cifer and +; pci2651. These will all be held under CPXTOR.ASM +; +; +; Keep module name, edit number, and last revision date in memory. +family: db 'CPXTOR.ASM (5) 10-Jan-1991 $' +; +; Assembly time message to let me know I'm building the right version. +; LASM generates an 'S' error along with the message, which is messy, but +; better than trying to put everything inside a IF m80 OR mac80 conditional, +; because LASM doesn't like nested IF's, either. + +IF ncrdmv +.printx * Assembling KERMIT-80 for the N.C.R. Decision Mate V * +ENDIF + +IF brain +.printx * Assembling KERMIT-80 for the Intertec Superbrain * +ENDIF + +IF brainm +.printx * With main port selected +ENDIF +IF braina +.printx * With Aux port +ENDIF + +IF pci2651 ; +.printx * assembling Kermit-80 for 2651 PCI as comms device * +ENDIF + +IF torch +.printx * Assembling Kermit-80 for Torch Unicorn 5 * +ENDIF +; *******This should be in the original CPXSYS.ASM file +; +;========================================================================= +; I/O Byte assignments (2-bit fields for 4 devices at loc 3) +; +;bits 6+7 LIST field +; 0 LIST is Teletype device (TTY:) +; 1 LIST is CRT device (CRT:) +; 2 LIST is Lineprinter (LPT:) +; 3 LIST is user defined (UL1:) +; +;bits 4+5 PUNCH field +; 0 PUNCH is Teletype device (TTY:) +; 1 PUNCH is high speed punch (PUN:) +; 2 PUNCH is user defined #1 (UP1:) +; 3 PUNCH is user defined #2 (UP2:) +; +;bits 2+3 READER field +; 0 READER is Teletype device (TTY:) +; 1 READER is high speed reader (RDR:) +; 2 READER is user defined #1 (UR1:) +; 3 READER is user defined #2 (UR2:) +; +;bits 0+1 CONSOLE field +; 0 CONSOLE is console printer (TTY:) +; 1 CONSOLE is CRT device (CRT:) +; 2 CONSOLE is in Batch-mode (BAT:);READER = Input, +; LIST = Output +; 3 CONSOLE is user defined (UC1:) +; +;========================================================================= + +iobyte EQU 03H ;Location of I/O byte + + +; [13] modifed to use either main or aux port. Should really +; be selected by set port, but this is urgent, so no frills +IF brain +baudst EQU 60H ; +baudrt EQU 0EF00H ;Memory location where baud rates are stored. +output EQU 01H ;Transmitter ready +input EQU 02H ;Input data available +TxEmpty EQU 04h ;Transmitter empty +z80 SET TRUE ;I don't know... +ENDIF;brain +IF brainm ; Superbrain and main ports +mnport EQU 58H ;Modem data port +mnprts EQU 59H ;Modem status port +ENDIF ;brainm +IF braina ; Superbrain and aux port +mnport EQU 40H ;Modem data port +mnprts EQU 41H ;Modem status port +ENDIF ;braina [13] + +IF ncrdmv +iobase equ 70h ; base address of PCI device +modrx equ 70h ; Rx data port +mnprts equ 71h ; status port +mnmodr equ 72h ; mode register read +mncmdr equ 73h ; command register read +modtx equ 74h ; Tx data port +mnmodw equ 76h ; mode register write +mncmdw equ 77h ; command register write +txrdy equ 1 +output equ txrdy +rxrdy equ 2 +input equ rxrdy +baudini equ 0ah ; initial baud to 2400 +z80 SET true +cpuspd SET 40 +ENDIF + +IF pci2651 ;[28] +iobase equ 04h ; base address of PCI device +mnport equ iobase ; rx and tx data ports +mnprts equ iobase+1 ; status port +mnmode equ iobase+2 ; mode port +mncmd equ iobase+3 ; PCI command port + +txrdy equ 1 ; tx ready bit set if free +output equ txrdy +rxrdy equ 2 ; RX ready bit +input equ rxrdy +baudini equ 7 ; 7 => 1200 baud by default +z80 SET true ; For Ithica intersystems it is +cpuspd SET 40 ; and running at four megs +ENDIF ;[28] + +IF torch ;[13] +z80 SET TRUE +; [32] baudini removed as now read current baud rate +; settings from base processor. + +;baudini equ 707h ; Initial Baud rate = 1200 baud + ; Entry to be of form x0xh where x is + ; the value x in the FX 7,x and FX 8,x + ; funtion calls. 4= 1200 baud, 7 = 9600 + ; 2 = 300 baud. +ENDIF + +IF brain OR torch +defesc EQU ']'-100O ;The default escape character. +ENDIF;brain OR torch + +; If none of the above, default to VT52-EMULATION ON. +IF NOT crt +vtval EQU 1 +ENDIF;NOT crt + + +sysxin: + +IF brainm ;[25] + lda baudrt ; fetch current baud rate + ani 0F0H ; extract left nibble + rrc ; shift right 4 places + rrc + rrc + rrc + sta speed ; store as comm port speed + sta speed+1 ; (16 bits, to match speed table entries) +ENDIF;brainm + +IF braina ;[25] + lda baudrt ; fetch current baud rate + ani 00FH ; extract right nibble + sta speed ; store as comm port speed + sta speed+1 ; (16 bits, to match speed table entries) +ENDIF;braina + +IF torch ; [13] [32] + push h + mvi a,0f2h ; nick code from BBC initialisation + lxi h,0ff00h + call osbyte ; Read current speed setting + mov a,l + ani 7 + xri 7 ; Store as two's complement + inr a + sta speed + sta speed+1 + mov e,a + call sysspd ; Make sure they are both the same! + mvi a,15 ; Flush all internal buffers [32] + mvi l,0 +; call osbyte + mvi a,3 + lxi h,0100h ; *FX 3,0,1 Enable RS423 + call osbyte + mvi a,2 ; Select keyboard, Enable RS423 input + mvi l,2 + call osbyte + mvi a,5 ; Select serial printer [32] + mvi l,2 + call osbyte ; [30] + mvi a,6 ; Must be able to send LF [30] + mvi l,0 + call osbyte ; [30] + mvi a,202 ; FX 202,255 set lower case on + mvi l,255 + call osbyte + pop h + +; Now see what version of MCP CCP roms. Assume >1, else copy a few of the +; older Torch VDU declares over the new ones. +; +; lda 0ffffh ; Address 0ffffh has single byte Version no. +; push psw ; save for a rainy day +; ani 0F0h ; get ms digit of MCP version +; rra ; move right 4 places +; rra +; rra +; rra +; ani 0fh +; adi 30h ; make it a number +; sta mcpver +; pop psw ; its raining... +; push psw ; ... its pouring... +; ani 0fh ; get ls digit +; adi 30h ; make it ascii number +; sta mcpver+2 +; pop psw ; restore psw +; cpi 10h ; Version 1.00 or less? +; jp init2 ; yes, so skip next bit +; lxi h,ooutli ; from old string table +; lxi d,ttab ; to new ttab +; lxi b,60 ; 60 bytes to move +; call mover +init2: + +IF ncrdmv + mvi a,00 ; clear out command register + out mncmdw + mvi a,4eh ; 1 stop bit, 8 data bits, / by 16 counter + out mnmodw + mvi a,70h+baudini ; baud rate and select internal rate gen. + out mnmodw + mvi a,27h ; enable tx and rx, RTS and DTR low + out mncmdw +ENDIF ; ncrdmv + +IF pci2651 ;[28] + in mncmd ; clearw command reg counter + mvi a,4eh ; 1 stop bit, 8 data bits, / by 16 counter + out mnmode + mvi a,30h+baudini ; baud rate and select internal rate gen. + out mnmode + mvi a,27h ; enable tx and rx, RTS and DTR low + out mncmd +ENDIF ; pci2651 [28] + + ret ; return from system-dependent routine + +; +; +; system-dependent termination processing +; If we've changed anything, this is our last chance to put it back. +sysexit: + ret + +; +; system-dependent processing for start of CONNECT command +; +syscon: + ret + +conmsg: ; Messages printed when entering transparent (CONNECT) mode: +; +; +; syscls - system-dependent close routine +; called when exiting transparent session. +; +syscls: + ret +; +; +; sysinh - help for system-dependent special functions. +; called in response to <escape>?, after listing all the +; system-independent escape sequences. +; +sysinh: +IF torch OR brain OR pci2651 OR ncrdmv + lxi d,inhlps ; we got options... + call prtstr ; print them. +ENDIF;torch OR brain OR pci2651 OR ncrdmv + + ret + + +;additional, system-dependent help for transparent mode +; (two-character escape sequences) +inhlps: + +; [16] [18] have added super brain and Torch to the list of Breaking machines. + +IF pci2651 OR brain OR torch OR ncrdmv + db cr,lf,'B Transmit a BREAK' +ENDIF ;pci2651 OR brain OR torch OR ncrdmv + +IF torch ; added this simply to debug the escape cokebottle D for the apple + db cr,lf,'D Disconnect the modem (Test purposes only)' +ENDIF;Torch + + db '$' ;[hh] table terminator + +; +; sysint - system dependent special functions +; called when transparent escape character has been typed; +; the second character of the sequence is in A (and in B). +; returns: +; non-skip: sequence has been processed +; skip: sequence was not recognized +sysint: ani 137O ; convert lower case to upper, for testing... + +; [19] have added superbrain and torch to the list + +IF brain OR pci2651 OR torch OR ncrdmv + cpi 'B' ; send break? + jz sendbr ; yes, go do it. return nonskip when through. +ENDIF ;brain OR pci2651 OR torch OR ncrdmv + +IF Torch; added bit for doing a D... + cpi 'D' ;drop the line... + jz dropln +ENDIF ;torch + + jmp rskp ; take skip return - command not recognized. + + +IF torch +dropln: lxi d,dropm ; tell user line is dropped.. + call prtstr + xra a ; destroy A + ret +dropm: db bell,cr,lf,'Testing line dropped ',cr,lf,bell + db '$' +ENDIF ;torch and dropping them there lines.. + +; + +IF brain +sendbr: +; +; Ensure that the transmitter has finished sending buffered chars +sndbr1: in mnprts ; get UART status + ani TxEmpty ; everything sent? + jz sndbr1 ; no, wait a bit more +; +; Begin sending a break by setting bit in UART command register + mvi a,3Fh ; Set TxEna, DTR, RxEna, SBreak, ErrRst, RTS + out mnprts +; +; Wait for 250 milliseconds (using hundredths second delay routine) + mvi a,25 + call delay +; +; Resume normal operation by clearing the SendBreak command bit + mvi a,37h ;Set TxEna, DTR, RxEna, ErrRst, RTS + out mnprts +; + ret ;done +ENDIF;brain + +IF torch ; [18] [27] [30] [32] +; Send a break. +; +; [30] Dumping of 6502 code not yet used, but may be for later versions of +; the Torch CCCP Rom in the BBC. This works, so I leave it for now. + +sendbr: + push h ;save for a monsoon + mvi a,0e8h + lxi h,0 ; turn interrupts off + call osbyte + push h +; + mvi a,9ch ; OSBYTE call 9c is read/write 6850 cntl prt + lxi h,0077h ; H = 6502 Y reg, L = 6502 X reg + call osbyte ; returned new val. = (old value AND Y)XOR X + push h ; save it for return +; + mvi a,30 + call delay ; do a delay +; +; now clear rx register +; + mvi a,96h ; do a read sheila address 08h + mvi l,8 + mvi h,0 + call osbyte ; read sheila 08h = 6850 rx reg +; +; restore 6850 regs... +; + pop h ; restore previous cntl reg + ; old x reg in l, so leave it there +; mov l,h + mvi h,0 + mvi a,9ch ; write previous value to 6850 + call osbyte +; +; and Beebs interrupt mask +; + pop h ; get interrupt mask + ; Once again, old X in L so leave it alone +; mov l,h + mvi h,0 + mvi a,0e8h + call osbyte ; restore interrupts mask +; + pop h + ret ; its raining again, so exit +ENDIF ; torch [18] [32] + +IF ncrdmv +sendbr: in mnprts ; get status + ani 04h ; make sure shift register is empty + jz sendbr + + mvi a,2fh ; force a break + out mncmdw + mvi a,100 ; set delay period + call delay + mvi a,27h ; restore command register + out mncmdw + ret +ENDIF ; ncrdmv + +IF pci2651 ;[28] +sendbr: in mnprts + ani 04h ; make sure shift reg is clear + jz sendbr + + mvi a,2fh ; set foe a break + out mncmd + mvi a,100 ; wait a bit + call delay + mvi a,27h ; restore mode + out mncmd + ret +ENDIF ;pci2651 [28] + +; +; sysflt - system-dependent filter +; called with character in E. +; if this character should not be printed, return with A = zero. +; preserves bc, de, hl. +; note: <xon>,<xoff>,<del>, and <nul> are always discarded. +sysflt: + mov a,e ; get character for testing + ret + +; mdmflt - modem filter [30] +; called with character to be sent to printer in E +; with parity set as appropriate. +; return with accumulator = 0 do do nothing, +; <> 0 to send char in E. +mdmflt: + mov a,e ;[30] get character to test +IF torch ;[30] map del to bs,space,bs + ani 7fh ; strip parity + cpi 7fh ; is it the delete character + rnz ; no, then a <> 0 so print it + mvi e,bs ; else load a backspace + call outmdm ; little recursion... + mvi e,' ' ; then a space + call outmdm ; backspace, space, now another... + mvi e,bs ; backspace + call outmdm ; + xra a ; clear a => on return do nowt. +ENDIF ;torch [30] + ret + + + +; prtflt - printer filter [30] +; called with character to be sent to printer in E +; returns with a = 0 to do nothing +; a <> 0 to print it. +; +; this routine for those printer that automatically insert +; a lf on cr, or cr for lf. Should this be shifted to +; the system indep. stuff, in say 4.06? +prtflt: + mov a,e ; [30] get character to test +IF torch ; strip out lf from printer stream + ani 7fh ; make sure it is parity less + cpi lf ; is it a line feed? + rnz ; no, print it +; xra a ; yes, don't. + +ENDIF ;torch [30] + ret + + +; +; +; system-dependent processing for BYE command. +; for apmmdm, heath, and lobo, hang up the phone. +sysbye: + ret +; +; This is the system-dependent command to change the baud rate. +; DE contains the two-byte value from the baud rate table; this +; value is also stored in 'speed'. +sysspd: + +; Set the speed for the Brain (Main Port) +IF brainm ;[25] + lda baudrt ;Get the present baud rates. + ani 0fH ;turn off the left + mov d,a ;Set it aside. + mov a,e ;Get the new baud rate. + rlc ;Shift left 4 places. + rlc + rlc + rlc + ora d ; combine with the old baud rate + sta baudrt ;Store the new baud rates. + out baudst ;Set the baud rates. + ret +ENDIF;brainm + +; Set the speed for the Brain (Aux Port) +IF braina ;[25] + lda baudrt ;Get the present baud rates. + ani 0f0H ;turn off the right + ora e ; combine with the new baud rate + sta baudrt ;Store the new baud rates. + out baudst ;Set the baud rates. + ret +ENDIF;braina + +If torch ; Set speed for Torch [14] [32] + mvi a,7 ; Osbyte call to set rx rate + mov l,e + call osbyte ; + mvi a,8 ; set up for tx rate to be set + mov l,e + call osbyte + ret ; and now, all rates should be different + +ENDIF ;torch [14] [32] + +IF ncrdmv ; Set baud rate for NCR Decision Mate V + mvi a,00 ; clear command register + out mncmdw + mvi a,4eh ; set for 1 stop, 8 data bits + out mnmodw ; save in mode 1 port + mvi a,70h ; set bits for rate etc.. + add e ; add baud rate (bits 0 - 3) + out mnmodw ; set mode port 2 + mvi a,27h ; set tx/rx ready, RTS CTS active + out mncmdw + ret +ENDIF ; ncrdmv + + +IF pci2651 ; Set baud for PCI [28] + in mncmd ; Clear register counter + mvi a,4eh ; set for 1 stop, 8 data bits + out mnmode ; save in mode 1 port + mvi a,30h ; set bits for rate etc.. + add e ; add baud rate (bits 0 - 3) + out mnmode ; set mode port 2 + mvi a,27h ; set tx/rx ready, RTS CTS active + out mncmd + ret +ENDIF ;pci2651 [28] + +; +; Speed tables +; (Note that speed tables MUST be in alphabetical order for later +; lookup procedures, and must begin with a value showing the total +; number of entries. The speed help tables are just for us poor +; humans. + +; db string length,string,divisor (2 identical bytes or 1 word) +; [Toad Hall] + +IF brain OR pci2651 OR ncrdmv +spdtbl: db 10h ;16 entries + db 03h,'110$', 02h,02h + db 04h,'1200$', 07h,07h + db 05h,'134.5$', 03h,03h + db 03h,'150$', 04h,04h + db 04h,'1800$', 08h,08h + db 05h,'19200$', 0fh,0fh + db 04h,'2000$', 09h,09h + db 04h,'2400$', 0ah,0ah + db 03h,'300$', 05h,05h + db 04h,'3600$', 0bh,0bh + db 04h,'4800$', 0ch,0ch + db 02h,'50$', 00h,00h + db 03h,'600$', 06h,06h + db 04h,'7200$', 0dh,0dh + db 02h,'75$', 01h,01h + db 04h,'9600$', 0eh,0eh + +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;brain OR pci2651 OR ncrdmv + +IF torch ;[17] +spdtbl: db 8 ; 8 entries + db 4,'1200$', 4,4 + db 3,'150$', 2,2 + db 5,'19200$', 8,8 + db 4,'2400$', 5,5 + db 3,'300$', 3,3 + db 4,'4800$', 6,6 + db 2,'75$', 1,1 + db 4,'9600$', 7,7 + +sphtbl: db cr,lf,' 75 150 300 1200 2400 4800 9600 19200$' +ENDIF;torch [17] + + +; The following conditionals were once a huge if not statement. There +; wasn't enough room to add the lobo to the list, so it had to be broken +; into 2, which you can't do with an if not. I redid it as two ifs and +; applied them to those that wouldn't set baud. [Hal Hostetler] +; +; This is the system-dependent SET PORT command. +; HL contains the argument from the command table. +sysprt: +IF iobyt + mov a,m ;Get the I/O byte + sta prtiob ;Save the desired IO byte for this port + inx h ;Point at next entry + mov a,m ;Get the output function + sta prtfun ;Save it +ENDIF;iobyt + + ret +; +; +; +; Port tables for GENERIC CPM 2.2 +IF gener +; help text +prhtbl: db cr,lf,'CRT device' + db cr,lf,'PTR device' + db cr,lf,'TTY device' + db cr,lf,'UC1 device' + db cr,lf,'UR1 device' + db cr,lf,'UR2 device$' + +; command table +prttbl: db 06H ;Six devices to choose from + db 03H,'CRT$' + dw crtptb + db 03H,'PTR$' + dw ptrptb + db 03H,'TTY$' + dw ttyptb + db 03H,'UC1$' + dw uc1ptb + db 03H,'UR1$' + dw ur1ptb + db 03H,'UR2$' + dw ur2ptb + +; port entry table +; table entries are: +; db iobyte-value, BDOS output function, reserved +crtptb: db crtio,conout,0 +ptrptb: db ptrio,punout,0 +ttyptb: db ttyio,conout,0 +uc1ptb: db uc1io,conout,0 +ur1ptb: db ur1io,punout,0 +ur2ptb: db ur2io,punout,0 +ENDIF;gener + +; +; +IF iobyt +prtfun: db punout ;Function to use for output to comm port +prtiob: db batio ;I/O byte to use for communicating +coniob: db defio ;I/O byte to use for console +ENDIF;iobyt + +IF NOT iobyt +prttbl equ 0 ; SET PORT is not supported +prhtbl equ 0 +ENDIF;NOT iobyt +; +; +; selmdm - select modem port +; selcon - select console port +; selmdm is called before using inpmdm or outmdm; +; selcon is called before using inpcon or outcon. +; For iobyt systems, diddle the I/O byte to select console or comm port; +; For Decision I, switches Multi I/O board to console or modem serial +; port. [Toad Hall] +; For the rest, does nothing. +; preserves bc, de, hl. +selmdm: +IF iobyt + lda prtiob ;Set up for output to go to the comm port + sta iobyte ;Switch byte directly +ENDIF;iobyt + ret + +selcon: +IF iobyt + lda coniob ;Set up for output to go to the console port + sta iobyte ;Switch directly +ENDIF;iobyt + + ret +; +; Get character from console, or return zero. +; result is returned in A. destroys bc, de, hl. +; +inpcon: +IF NOT iobyt + mvi c,dconio ;Direct console I/O BDOS call. + mvi e,0FFH ;Input. + call BDOS +ENDIF;NOT iobyt + +IF iobyt + call bconst ;Get the status + ora a ;Anything there? + rz ;No, forget it + call bconin ;Yes, get the character +ENDIF;iobyt + ret +; +; +; Output character in E to the console. +; destroys bc, de, hl +; +outcon: + +IF NOT iobyt + mvi c,dconio ;Console output bdos call. + call bdos ;Output the char to the console. +ENDIF;NOT iobyt + +IF iobyt + mov c,e ;Character + call bcnout ;to Console +ENDIF;iobyt + ret +; +; +; outmdm - output a char from E to the modem. +; the parity bit has been set as necessary. +; returns nonskip; bc, de, hl preserved. +outmdm: +IF inout AND NOT ncrdmv + in mnprts ;Get the output done flag. + ani output ;Is it set? + jz outmdm ;If not, loop until it is. + mov a,e + out mnport ;Output it. + ret +ENDIF;inout AND NOT ncrdmv + +IF inout AND ncrdmv + in mnprts ;Get the output done flag + ani output ;Set ? + jz outmdm ;Loop until it is + mov a,e + out modtx ;output char + ret +ENDIF;inout AND ncrdmv + +IF iobyt +;**** Note that we enter from outpkt with the I/O byte already set up for +; output to go to the comm port + push h + push b + lda prtfun ;Get the output function + mov c,a ;Into C + call bdos ;And output the character + pop b + pop h + ret +ENDIF;iobyt + + +IF torch ; [32] [13] Torch stuff. Requires some bit bashing + ; via the BBC host computer (io computer) + ; see also decription of osbyte later on +outdat: + lda prinuse ; get the printer in use flag + ana a ; if set, then must use traditional osbyte, + jnz outda2 ; else... + push b + push h ; Preserve registers [32] + call tx + db 1 ; MCP send to printer command + mov c,e ; Byte to send is in E [32] + call txbyte + pop h + pop b + ret + +outda2: ; Preserve registers [32] + push h + mvi a,138 ; Osbyte insert byte into buffer + mvi l,2 + mov h,e ; get the byte to be sent s-l-o-w-l-y + call osbyte + pop h ; Restore registers and exit + ret + +ENDIF ;[13] + +; +; +; get character from modem; return zero if none available. +; for IOBYT systems, the modem port has already been selected. +; destroys bc, de, hl. +inpmdm: +IF iobyt + call bconst ;Is Char at COMM-Port? + ora a ;something there? + rz ; return if nothing there + call bconin ; data present. read data. +ENDIF;iobyt + +IF inout AND NOT ncrdmv +;Note: modem port should already be selected for mdI. [Toad Hall] + in mnprts ;Get the port status into A. + ani input ;See if the input ready bit is on. + rz ;If not then return. + in mnport ;If so, get the char. +ENDIF;inout AND NOT ncrdmv + +IF inout AND ncrdmv + in mnprts ;Get input port status + ani input ;Mask input RDY bit + rz ;return if no char + in modrx ;get the char +ENDIF;inout AND ncrdmv +IF torch ; [32] [13] torch input +indat: + push h + mvi a,128 + lxi h,0fffeh ; Read buffer status + call osbyte + mov a,h ; HL has number of characters + ora l ; in the buffer + jz indatq ; None, so skip fetch + mvi a,145 ; Get character from input buffer [32] + lxi h,1 + call osbyte ; Result returned in 'Y', rather H + mov a,h +indatq: + pop h + ani 7fh + ret ; rx data in A +ENDIF ;torch [13] [32] + +ret ; return with character in A + + +; +; flsmdm - flush comm line. +; Modem is selected. +; Currently, just gets characters until none are available. + +flsmdm: call inpmdm ; Try to get a character + ora a ; Got one? + jnz flsmdm ; If so, try for another + ret ; Receiver is drained. Return. + + +; +; +; lptstat - get the printer status. Return a=0 if ok, or 0ffh if not. +lptstat: +IF torch + mvi a,80h ; read chars remaining in printer buffer + mvi l,252 ; do osbyte 80H, X=252 (printer buffer) + mvi h,0ffh + call osbyte + mov a,h + cpi 10 ; 10 characters left? + mvi a,0 ; if pos, yes r better + rp + mvi a,0ffh + ret +ENDIF ;torch + +IF torch + mvi a,5 ; got to select the real printer (par. port) + mvi l,1 ; ie FX 5,1 + call osbyte +ENDIF ;torch + +IF iobyte ;[33] + call bprtst ; get status +ENDIF ;iobyte[33] + +IF torch + push psw + mvi a,5 ; restore serial line = printer + mvi l,2 ; ie FX 5,2 + call osbyte + pop psw ; return with code in a +ENDIF ;torch + + +IF NOT iobyte ;[33] + xra a ; assume it is ok.. this may not be necessary +ENDIF ;iobyte [33] + ret +; +; +; outlpt - output character in E to printer +; console is selected. +; preserves de. +outlpt: + push d ; save DE in either case + call prtflt ; go through printer filter [30] + ana a ; if A = 0 do nothing, + jz outlp1 ; [30] if a=0 do nothing + +IF torch ;[30] Must set printer routed to par port + mvi a,5 ; fx 5,1 (parallel port selected for printer) + mvi l,1 ; Modified for new osbyte form [32] + call osbyte +ENDIF ;torch [30] + +IF NOT iobyt + mvi c,lstout + call bdos ;Char to printer +ENDIF;NOT iobyt +IF iobyt + mov c,e + call blsout +ENDIF;iobyt +IF torch ; re-route printer to serial port => faster tx bytes to line [30] + mvi a,5 ; Modified for new Osbyte form [32] + mvi l,2 ;fx 5,2 + call osbyte + mvi a,6 + mvi l,0 ;fx 6,0 + call osbyte +ENDIF ;torch [30] + +outlp1: pop d ; restore saved register pair + ret +; +; +; Screen manipulation routines +; csrpos - move to row B, column C +; +; csrpos for terminals that use a leadin sequence followed +; by (row + 31.) and (column + 31.) +; +IF brain +csrpos: push b ; save coordinates + lxi d,curldn ; get cursor leadin sequence + call prtstr ; print it + pop h ; restore coordinates + mov a,h ; get row + adi (' '-1) ; space is row one + mov e,a + push h + call outcon ; output row + pop h + mov a,l ; get column + adi (' '-1) ; space is column one + mov e,a + jmp outcon ; output it and return +ENDIF;brain +; +; +IF torch +csrpos: push b ; save coordinates + lxi d,curldn ; get cursor leadin sequence + call prtstr ; print it + pop h ; restore coordinates + mov a,l ; [obs] get column + adi 0ffh ; NULL is column one + mov e,a + push h + call outcon ; output row + pop h + mov a,h ; [obs] get row + adi 0ffh ; NULL (ie decrement) is row one + mov e,a + jmp outcon ; output it and return +ENDIF;torch +; +; +; delchr - make delete look like a backspace. Unless delete is a printing +; character, we just need to print a backspace. (we'll output clrspc +; afterwards) +; For Kaypro and Vector General, delete puts a blotch on the screen. +; For Apple and Osborne 1, delete moves but doesn't print. +delchr: + + +IF NOT torch ;[22] + mvi e,bs ;get a backspace + jmp outcon +ENDIF;NOT torch + +; erase the character at the current cursor position +clrspc: mvi e,' ' + call outcon + mvi e,bs ;get a backspace + jmp outcon + +; erase the current line +clrlin: lxi d,eralin + jmp prtstr + +; erase the whole screen, and go home. preserves b (but not c) +clrtop: lxi d,erascr + jmp prtstr + + +IF torch ;[13] +; +; OSBYTE call from Torch to BBC Base Processor. +; +; A register has osbyte type +; H register has equivalent Y register of 6502 +; L register has equivalent X register of 6502 +; +; Results (X and Y) are returned in HL respectively +; +; + +usrimm equ 0ffc0h ; MCP user function [32] +tx equ 0ffc3h ; tx routine to talk to base board proc. +rx equ 0ffc6h ; rx ditto +txbyte equ 0ffc9h ; send C to base processor [32] + +osbyte: ; Osbyte rewritten [32] + push b ; Keep these + mov b,a ; Local copy - use in a moment + call usrimm ; MCP osbyte function + db 15 + mov c,b ; Osbyte function + call txbyte + mov c,l ; 6502 X register + call txbyte + mov c,h ; 6502 Y register + call txbyte + call rx ; fetch results + mov l,a ; X returned + sta xx ; save just in case... + call rx + mov h,a ; Y returned + sta yy + mov a,b ; return A as called + pop b + ret + +xx: db 0 +yy: db 0 ; temporary space + +prinuse:db 0 ; 0=> fast tx, <>0 => slow tx to serial pt. [30] + +ENDIF ;torch [13] + +IF pci2651 ; whatever version +sysver: db 'Ithaca Intersystems S100$' +ENDIF ;pci2651 + +IF ncrdmv ; whatever version +sysver: db 'NCR DecisionMate V$' +ENDIF ;ncrdmv + +IF torch ; whatever version +ttytyp: +sysver: db 'Torch Unicorn 5 ' + db '$' ; stop here for now, otherwise say.. + db ' MCP version ' + db '1.00 $' ; or whatever... +ENDIF ;torch + +; Assume MCP - CCCP ROMS greater than 1 +;mcpver: db 'x.x $' +;outlin: db esc,'*',cr,lf,tab,'$' +;eralin: db cr,esc,'&$' ;Clear to end of line. +;erascr: db esc,'*$' ;Clear screen and go home. +;curldn: db esc,'=$' ;Cursor lead-in +;ttab: ;Table start location. +;ta: + db esc,'!$',0 ;Cursor up. +;tb: db 0ah,'$',0,0 ;Cursor down. +;tc: db esc,'+$',0 ;Cursor right. +;td: db 08h,'$',0,0 ;Cursor left. +;te: db esc,'*$',0 ;Clear screen and home cursor +;tf: db '$',0,0,0 ;(can't) Enter Graphics mode +;tg: db '$',0,0,0 ;(can't) Exit Graphics mode +;th: db esc,'>$',0 ;Cursor home. +;ti: db '$',0,0,0 ;(Can't) reverse linefeed +;tj: db esc,'%$',0 ; Clear to end of screen +;tk: db esc,'&$',0 ; Clear to end of line. + + +;Older message for MCP - CCCP verstion less than 1 +;ooutli: db 0ch,cr,lf,tab,tab,'$'; +;oerali: db '$',0,0,0 ;Clear to end of line. +;oerasc: db 0ch,'$',0 ;Clear screen and go home. +;ocurld: db 1fh,'$',0 ;Cursor lead-in +;ottab: ;Table start location. +; db 0bh,'$',0,0 ;Cursor up. +; db 0ah,'$',0,0 ;Cursor down. +; db 09h,'$',0,0 ;Cursor right. +; db 08h,'$',0,0 ;Cursor left. +; db 0ch,'$',0,0 ;Clear screen and home cursor +; db '$',0,0,0 ;(can't) Enter Graphics mode +; db '$',0,0,0 ;(can't) Exit Graphics mode +; db 1eh,'$',0,0 ;Cursor home. +; db 0bh,'$',0,0 ;reverse linfeed +; db '$',0,0,0 ;(Can't) Clear to end of screen +; db '$',0,0,0 ;(Can't) Clear to end of line. +; +;Specials +;spac15: db ' ' +; db bs,bs,bs,bs,bs,bs,bs,bs,bs,bs,bs,bs,bs,bs,bs,'$'; +;spac80: db cr +; db ' ' +; db ' ' +; db bs,cr,'$' ;80 spaces, bs and then back to line start +; + +IF torch ; Should be IF ker08 AND torch... + db '$' ; to terminate the ID string +outlin: db 0ch,cr,lf,tab,tab,'$' +eralin: db '$',0,0,0 ;Clear to end of line. +erascr: db 0ch,'$',0 ;Clear screen and go home. +curldn: db 1fh,'$',0 ;Cursor lead-in +ttab: ;Table start location. +ta: db 0bh,'$',0,0 ;Cursor up. +tb: db 0ah,'$',0,0 ;Cursor down. +tc: db 09h,'$',0,0 ;Cursor right. +td: db 08h,'$',0,0 ;Cursor left. +te: db 0ch,'$',0,0 ;Clear screen and home cursor +tf: db '$',0,0,0 ;(can't) Enter Graphics mode +tg: db '$',0,0,0 ;(can't) Exit Graphics mode +th: db 1eh,'$',0,0 ;Cursor home. +ti: db 0bh,'$',0,0 ;reverse linfeed +tj: db '$',0,0,0 ;(Can't) Clear to end of screen +tk: db '$',0,0,0 ;(Can't) Clear to end of line. + +;Specials +spac15: db ' ' + db bs,bs,bs,bs,bs,bs,bs,bs,bs,bs,bs,bs,bs,bs,bs,'$'; +spac80: db cr + db ' ' + db ' ' + db bs,cr,'$' ;80 spaces, bs and then back to line start + +ENDIF;ker08 AND torch [13] + +IF brain +sysver: db 'Intertec SuperBrain$' +outlin: db ('A'-100O),esc,'~k',cr,lf,tab,tab,'$' +erascr: db ('A'-100O),esc,'~k$' ;Clear screen and go home. +eralin: db cr,esc,'~K$' ;Clear line. +curldn: db esc,'Y$' ; leadin for cursor positioning +ttab: ;Table start location. +ta: db ('K'-100O),'$',0,0 ;Cursor up. +tb: db 12O,'$',0,0 ;Cursor down. +tc: db ('F'-100O),'$',0,0 ;Cursor right. +td: db '$',0,0,0 ;(can't) Cursor left +te: db '$',0,0,0 ;(can't) Clear display +tf: db '$',0,0,0 ;(can't) Enter graphics mode +tg: db '$',0,0,0 ;(can't) Exit graphics mode +th: db ('A'-100O),'$',0,0 ;Cursor home. +ti: db ('K'-100O),'$',0,0 ;Reverse linefeed. +tj: db esc,'~k$',0 ;Clear to end of screen. +tk: db esc,'~K$',0 ;Clear to end of line. +ENDIF;brain + +IF lasm and not termin ; we dont want CPXVDU +ovlend equ $ ;Overlay end - start buffer + end +ENDIF ;lasm and not termin + +IF lasm; we want a terminal +LINK CPXVDU.ASM +ENDIF ;lasm + diff --git a/cpxtyp.asm b/cpxtyp.asm new file mode 100644 index 0000000..28b65b3 --- /dev/null +++ b/cpxtyp.asm @@ -0,0 +1,722 @@ +; 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, rjl@monu1.cc.monash.edu.au +; 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 diff --git a/cpxvdu.asm b/cpxvdu.asm new file mode 100644 index 0000000..332fd8f --- /dev/null +++ b/cpxvdu.asm @@ -0,0 +1,462 @@ +IF NOT lasm +.printx * CPXVDU.ASM * +ENDIF ;NOT lasm +; 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 +; 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. +; +;edit 6, 12-Oct-1990 by MF. Added a semicolon to the comment "If we +; need cursor ..." so it isn't seen as an undefined symbol +; edit 5, 20 July by OBSchou. Put in the cursor positioning code for +; all the terminal supported, and moved the vtval EQUs and defesc EQUs +; here if the system requires andn external terminal. If the system +; has a 'built in' terminal (ie own scrteen driver) you will not come +; to this file, so you must declare these three lables etc in your +; own code. +; This will allow only those systems requiring a terminal to require +; CPXVDU.ASM during assembly. +; +; edit 4, 16 July, 1987 by OBSchou for will Rose. +; Added code for Ampro 230 terminal +; +; edit 3, 15 July, 1987 by OBSchou for David Moore. Added adm22 terminal +; codes. +; +; edit 2 21 May, 1987 by OBSchou. Added in definitions for Hazeltine 1500 +; submitted by Colin Burns of the Institute of Neurological Sciences +; in Glasgow. +; edit 1 ??? date. Split the terminal codes off from the CPXSYS.ASM file +; +vduver: db 'CPXVDU.ASM (6) 12-Oct-1990 $' ;file, edit version,, date. + + +; First, print out what terminal (if any) we are assembling for + +IF crt +.printx * generic CRT selected * +ENDIF + +IF adm3a +.printx * ADM3A selected * +ENDIF + +IF adm22 +.printx * ADM22 selected * +ENDIF + +IF smrtvd ;[7] +.printx * Netronics Smartvid-80 selected * +ENDIF ;[7] + +IF tvi912 +.printx * TVI912/920 selected * +ENDIF + +IF tvi925 +.printx * TVI925 selected * +ENDIF + +IF vt52 +.printx * VT52 selected * +ENDIF + +IF vt100 +.printx * VT100 selected * +ENDIF + +IF am230 +.printx * Ampro 230 terminal selected * +ENDIF + +IF wyse +.printx * Wyse 100 terminal selected * +ENDIF +; + +; +; If we need cursor positioning, here is the code to do it +; +; Screen manipulation routines +; csrpos - move to row B, column C +; +; csrpos for terminals that use a leadin sequence followed +; by (row + 31.) and (column + 31.) +; +IF NOT (vt100 OR crt OR h1500) +csrpos: push b ; save coordinates + lxi d,curldn ; get cursor leadin sequence + call prtstr ; print it + pop h ; restore coordinates + mov a,h ; get row + adi (' '-1) ; space is row one + mov e,a + push h + call outcon ; output row + pop h + mov a,l ; get column + adi (' '-1) ; space is column one + mov e,a + jmp outcon ; output it and return +ENDIF;NOT (vt100 OR crt OR h1500) +; +; +; +; +; csrpos for ANSI terminals +; +IF vt100 +csrpos: push b ; save coordinates + lxi d,curldn ; get cursor leadin sequence + call prtstr ; print it + pop h ; peek at coordinates + push h ; then save away again + mov l,h ; l = row + mvi h,0 ; hl = row + call nout ; output in decimal + mvi e,';' ; follow with semicolon + call outcon ; print it + pop h ; restore column + mvi h,0 ; hl = column + call nout + mvi e,'H' ; terminate with 'move cursor' command + jmp outcon ; output it and return +ENDIF;vt100 + +;Definition for Hazeltine 1500 does things a little strange. +; +IF h1500 +csrpos: push b ; save coordinates + lxi d,curldn ; get cursor leadin sequence + call prtstr ; print it + pop h ; restore coordinates + mov a,l ; get col + nop + nop +; adi (' '-1) ; space is row one + mov e,a + push h + call outcon ; output row + pop h + mov a,h ; get row + adi (' '-1) ; space is column one + mov e,a + jmp outcon ; output it and return +ENDIF; h1500 + + +IF crt ; systems without cursor positioning +csrpos: ret ; dummy routine referenced by linkage section +ENDIF;crt +; +; +; +; Now for the rest of CPXVDU.ASM +; +; +; +IF crt ;Set flags etc for systems with CRT selected +defesc EQU '\'-100O ;Still Control-\ (just ran out of room...) +vtval EQU 0FFH ; we can't support VT52 emulation +ttytyp: db 'Generic (Dumb) CRT Terminal type selected $' +ENDIF;crt + +; + +IF vt52 ; DEC VT52 +ttytyp: db 'VT52$' +ENDIF;vt52 + +IF vt52 +vtval EQU 0 ; we don't need VT52 emulation +defesc EQU '\'-100O ;Still Control-\ (just ran out of room...) +outlin: db esc,'H',esc,'J',cr,lf,tab,tab,'$' +erascr: db esc,'H',esc,'J$' ;Clear screen and go home. +eralin: db cr,esc,'K$' ;Clear line. +curldn: db esc,'Y$' ;cursor leadin +ttab: ;Table start location. +ta: db esc,'A$',0 ;Cursor up. +tb: db esc,'B$',0 ;Cursor down. +tc: db esc,'C$',0 ;Cursor right. +td: db esc,'D$',0 ;Cursor left +te: db esc,'E$',0 ;Clear display +tf: db esc,'F$',0 ;Enter Graphics Mode +tg: db esc,'G$',0 ;Exit Graphics mode +th: db esc,'H$',0 ;Cursor home. +ti: db esc,'I$',0 ;Reverse linefeed. +tj: db esc,'J$',0 ;Clear to end of screen. +tk: db esc,'K$',0 ;Clear to end of line. +ENDIF;vt52 +; + +IF adm22 +vtval EQU 1 ; we can do VT52 emulation +defesc EQU '\'-100O ;Still Control-\ (just ran out of room...) +ttytyp: db 'ADM22$' +outlin: db 1ah,cr,lf,tab,tab,'$' +erascr: db 1ah,'$' ;Clear screen and go home. +eralin: db esc,'>$' ;Clear line. +curldn: db esc,'=$' ;Cursor lead-in +ttab: ;Table start location. +ta: db 0BH,'$',0,0 ;Cursor up. +tb: db lf,'$',0,0 ;Cursor down. +tc: db 0CH,'$',0,0 ;Cursor right. +td: db bs,'$',0,0 ;Cursor left +te: db 1ah,':$',0 ;Clear display +tf: db '$',0,0,0 ;(can't) Enter Graphics Mode +tg: db '$',0,0,0 ;(can't) Exit Graphics mode +th: db 1EH,'$',0,0 ;Cursor home. +ti: db 0BH,'$',0,0 ;Reverse linefeed. +tj: db esc,'Y$',0 ;Clear to end of screen. +tk: db esc,'T$',0 ;Clear to end of line. +ENDIF;adm22 +; + +IF am230 +; Select initial setting for VT-52 emulation flag. +vtval EQU 1 +defesc EQU '\'-100O ;The default is Control-\ -- it's easier +ttytyp: db 'Am230$' +outlin: db 'Z'-64,0,0,cr,lf,'$' +erascr: db 'Z'-64,0,0,'$' ;Clear screen and home +eralin: db esc,'R$',0 ;Erase line +curldn: db cr,esc,'=$' ;Cursor lead-in +ttab: ;Table start location ;(MUST be 4 bytes each) +ta: db 'K'-64,'$',0,0 ;Cursor up, stop at top +tb: db 'V'-64,'$',0,0 ;Cursor down, stop at bottom +tc: db 'L'-64,'$',0,0 ;Cursor right, stop at right +td: db 'H'-64,'$',0,0 ;Cursor left, stop at left +te: db 'Z'-64,0,0,'$' ;Clear display (2 pad nulls) +tf: db '$',0,0,0 ;(can't) Enter Graphics mode +tg: db '$',0,0,0 ;(can't) Exit Graphics mode +th: db 1EH,'$',0,0 ;Cursor home +ti: db esc,'j$',0 ;Reverse linefeed, scroll +tj: db esc,'Y$',0 ;Clear to end of sreen +tk: db esc,'T$',0 ;Clear to end of line +ENDIF +; +; + + +IF vt100 +ttytyp: db 'VT100$' +ENDIF;vt100 + + +IF vt100 +; Note that we cannot support Graphics Mode or the H19 erase-screen command +; (<esc>E), because the sequences are more than three bytes. +defesc EQU '\'-100O ;Still Control-\ (just ran out of room...) +vtval EQU 0 ; we probably don't want VT52 emulation +outlin: db esc,3CH,esc,'[H',esc,'[J',cr,lf,tab,tab,'$' +erascr: db esc,'[H',esc,'[J$' ;Clear screen and go home. +eralin: db cr,esc,'[K$' ;Clear line. +curldn: db esc,'[$' ; Cursor leadin +ttab: +ta: db esc,'[A$' ; Cursor up. +tb: db esc,'[B$' ; Cursor down. +tc: db esc,'[C$' ; Cursor right. +td: db esc,'[D$' ; Cursor left +te: db '$',0,0,0 ; (can't) Clear display +tf: db '$',0,0,0 ; (don't) Enter Graphics Mode +tg: db '$',0,0,0 ; (don't) Exit Graphics mode +th: db esc,'[H$' ; Cursor home. +ti: db esc,'M$',0 ; Reverse linefeed. +tj: db esc,'[J$' ; Clear to end of screen. +tk: db esc,'[K$' ; Clear to end of line. +ENDIF;vt100 +; + +IF gener or cpm3 +sysver: db 'Generic CP/M-80$' +ENDIF;gener or cpm3 + + +IF soroq ;[29] Should this not be with terminals..... +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;soroq + +IF crt +outlin: db cr,lf,'Starting ...$' +erascr equ crlf ;"Home & clear" (best we can do). +eralin: db '^U',cr,lf,'$' ;Clear line. +prpack: db cr,lf,'RPack: $' +pspack: db cr,lf,'SPack: $' +ttab equ 0 ; no VT52 table +ENDIF;crt +; + +IF tvi912 +vtval EQU 1 ; we do emulation +defesc EQU '\'-100O ;Still Control-\ (just ran out of room...) +ttytyp: db 'TVI912/920$' +outlin: db 'Z'-64,0,0,cr,lf,'$' +erascr: db 'Z'-64,0,0,'$' ;Clear screen and home +eralin: db esc,'Y$',0 ;Clear to end of sreen +curldn: db cr,esc,'=$' ;Cursor lead-in +ttab: ;Table start location ;(MUST be 4 bytes each) +ta: db 'K'-64,'$',0,0 ;Cursor up, stop at top +tb: db 'J'-64,'$',0,0 ;Cursor down, stop at bottom +tc: db 'L'-64,'$',0,0 ;Cursor right, stop at right +td: db 'H'-64,'$',0,0 ;Cursor left, stop at left +te: db 'Z'-64,0,0,'$' ;Clear display (2 pad nulls) +tf: db '$',0,0,0 ;(can't) Enter Graphics mode +tg: db '$',0,0,0 ;(can't) Exit Graphics mode +th: db 1EH,'$',0,0 ;Cursor home +ti: db esc,'j$',0 ;Reverse linefeed, scroll +tj: db esc,'Y$',0 ;Clear to end of sreen +tk: db esc,'T$',0 ;Clear to end of line +ENDIF;tvi912 +; +; + +IF tvi925 +;(incidentally, works fine for Freedom 100 also [Toad Hall]) +;adm3a entry and tvi925 entry separated to remove warning message. +vtval EQU 1 ; we VT52 emulation +defesc EQU '\'-100O ;Still Control-\ (just ran out of room...) +ttytyp: db 'TVI925$' +outlin: db 'Z'-64,0,0,cr,lf,'$' +erascr: db 'Z'-64,0,0,'$' ;Clear screen and home +eralin: db esc,'Y$',0 ;Clear to end of sreen +curldn: db cr,esc,'=$' ;Cursor lead-in +ttab: ;Table start location ;(MUST be 4 bytes each) +ta: db 'K'-64,'$',0,0 ;Cursor up, stop at top +tb: db 'V'-64,'$',0,0 ;Cursor down, stop at bottom +tc: db 'L'-64,'$',0,0 ;Cursor right, stop at right +td: db 'H'-64,'$',0,0 ;Cursor left, stop at left +te: db 'Z'-64,0,0,'$' ;Clear display (2 pad nulls) +tf: db '$',0,0,0 ;(can't) Enter Graphics mode +tg: db '$',0,0,0 ;(can't) Exit Graphics mode +th: db 1EH,'$',0,0 ;Cursor home +ti: db esc,'j$',0 ;Reverse linefeed, scroll +tj: db esc,'Y$',0 ;Clear to end of sreen +tk: db esc,'T$',0 ;Clear to end of line +ENDIF;tvi925 +; +; + +IF adm3a +defesc EQU '\'-100O ;Still Control-\ (just ran out of room...) +ttytyp: db 'ADM3A$' +outlin: db 'Z'-64,0,0,cr,lf,'$' +erascr: db 'Z'-64,0,0,'$' ;Clear screen and home +eralin: db esc,'Y$',0 ;Clear to end of sreen +curldn: db cr,esc,'=$' ;Cursor lead-in +ttab: ;Table start location ;(MUST be 4 bytes each) +ta: db 'K'-64,'$',0,0 ;Cursor up, stop at top +tb: db 'J'-64,'$',0,0 ;Cursor down CTRL-J +tc: db 'L'-64,'$',0,0 ;Cursor right, stop at right +td: db 'H'-64,'$',0,0 ;Cursor left, stop at left +te: db 'Z'-64,0,0,'$' ;Clear display (2 pad nulls) +tf: db '$',0,0,0 ;(can't) Enter Graphics mode +tg: db '$',0,0,0 ;(can't) Exit Graphics mode +th: db 1EH,'$',0,0 ;Cursor home +ti: db 'K'-64,'$',0,0 ;Reverse linefeed +tj: db '$',0,0,0 ;(can't) Clear to end of screen +tk: db '$',0,0,0 ;(can't) Clear to end of line +ENDIF;adm3a + + +IF smrtvd ; [7] new terminal +vtval EQU 1 ; we do VT52 emulation +defesc EQU '\'-100O ; escpae character, ok? +ttytyp: db 'Smartvid-80$' +outlin: db esc,'+',cr,lf,tab,tab,'$' +eralin: db cr,esc,'T$' ;Clear to end of line. +erascr: db esc,'+$' ;Clear screen and go home. +curldn: db esc,'=$' ;Cursor lead-in +ttab: ;Table start location. +ta: db ('K'-100O),'$',0,0 ;Cursor up. +tb: db 12O,'$',0,0 ;Cursor down. +tc: db ('A'-100O),'$',0,0 ;Cursor right. +td: db ('H'-100O),'$',0,0 ;Cursor left. +te: db ('L'-100O),'$',0,0 ;Clear screen and home cursor +tf: db '$',0,0,0 ;(can't) Enter Graphics mode +tg: db '$',0,0,0 ;(can't) Exit Graphics mode +th: db ('Z'-100O),'$',0,0 ;Cursor home. +ti: db ('K'-100O),'$',0,0 ;Reverse linefeed. +tj: db esc,'Y$',0 ;Clear to end of screen. +tk: db esc,'T$',0 ;Clear to end of line. +ENDIF;smrtvd + +IF h1500 +vtval EQU 1 ; we can do VT52 emulation +defesc EQU '\'-100O ;Still Control-\ (just ran out of room...) +ttytyp: db 'Hazeltine$' +outlin: db 7eh,1ch,7eh,12h,'$' +erascr: db 7eh,1ch,7eh,12h,'$' ;Clear screen and home +eralin: db 7eh,13h,'$',0 ;Clear to end of sreen +curldn: db 7eh,11h,'$',0 ;Cursor lead-in +ttab: ;Table start location ;(MUST be 4 bytes each) +ta: db 7eh,0ch,'$',0 ;Cursor up, stop at top +tb: db 7eh,0bh,'$',0 ;Cursor down CTRL-J +tc: db 10h,'$',0,0 ;Cursor right, stop at right +td: db 8h,'$',0,0 ;Cursor left, stop at left +te: db 7eh,1ch,'$',0 ;Clear display (2 pad nulls) +tf: db '$',0,0,0 ;(can't) Enter Graphics mode +tg: db '$',0,0,0 ;(can't) Exit Graphics mode +th: db 7eh,0ch,'$',0 ;Cursor home +ti: db 7eh,0ch,'$',0 ;Reverse linefeed +tj: db '$',0,0,0 ;(can't) Clear to end of screen +tk: db 7eh,0fh,'$',0 ;Clear to end of line +ENDIF;h1500 + +IF wyse ;[gv] +vtval equ 1 ; we can do VT52 emulation +defesc EQU '\' ;Still Control-\ (just ran out of room...) +ttytyp: db ' [Wyse 100]',cr,lf,'$' +outlin: db esc,'+$',0 ;Clear screen and home +erascr: db esc,'+$',0 ;Clear screen and home +eralin: db esc,'Y$',0 ;Clear to end of sreen +curldn: db cr,esc,'=$' ;Cursor lead-in +ttab: ;Table start location ;(MUST be 4 bytes each) +ta: db 03h,'$',0,0 ;Cursor up, stop at top +tb: db lf,'$',0,0 ;Cursor down, stop at bottom +tc: db ff,'$',0,0 ;Cursor right, stop at right +td: db bs,'$',0,0 ;Cursor left, stop at left +te: db sub,0,0,'$' ;Clear display (2 pad nulls) +tf: db '$',0,0,0 ;Enter Graphics mode NONE +tg: db '$',0,0,0 ;Exit Graphics mode NONE +th: db 1eh,'$',0,0 ;Cursor home +ti: db esc,'v$',0 ;Reverse linefeed, scroll ??? +tj: db esc,'Y$',0 ;Clear to end of sreen +tk: db esc,'T$',0 ;Clear to end of line +ENDIF;wyse + + + +ovlend equ $ ; End of overlay + +IF lasm ;Not really needed, as M80 ignores END in include files + END +ENDIF ;lasm diff --git a/cpxz80.asm b/cpxz80.asm new file mode 100644 index 0000000..9e80e8b --- /dev/null +++ b/cpxz80.asm @@ -0,0 +1,350 @@ +IF NOT LASM +.printx * CPXZ80.ASM * +ENDIF ;NOT lasm +; 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 file contains the system-dependent code and data for +; Kermit-80 emulated on an IBM PC or clone running Z80MU. +; +; revision history (last edit first) +; +; edit 1, 2 December, 1987. Built code for Z80MU emulation. Uses BIOS +; calls to 0FF12-15 to read/write from/to the PC COM1 port. +; + +.printx * Assembling for Z80MU system * + +; +; Family is the string used in VERSION to say which of several +; smaller overlay files are used. These are (will be) derived from +; the juge CP4SYS.ASM file, in which case we will never get here. +; Just a Dollar, but put a sting in for a family of machines. +; +family: db 'CPXZ80.ASM (1) 2-Dec-87$' ; Used for family versions.... + + + +sysxin: ; continuation of system dependent initialisation code + ret ; return from system-dependent routine +; +; +; system-dependent termination processing +; If we've changed anything, this is our last chance to put it back. +sysexit: + ret + +; +; system-dependent processing for start of CONNECT command +; +syscon: + ret + +conmsg: ; Messages printed when entering transparent (CONNECT) mode: +; +; +; syscls - system-dependent close routine +; called when exiting transparent session. +; +syscls: + ret +; +; sysinh - help for system-dependent special functions. +; called in response to <escape>?, after listing all the +; system-independent escape sequences. +; +sysinh: + ret + +; +; sysint - system dependent special functions +; called when transparent escape character has been typed; +; the second character of the sequence is in A (and in B). +; returns: +; non-skip: sequence has been processed +; skip: sequence was not recognized +sysint: ani 137O ; convert lower case to upper, for testing... + jmp rskp ; take skip return - command not recognized. + + +; +; +; sysflt - system-dependent filter +; called with character in E. +; if this character should not be printed, return with A = zero. +; preserves bc, de, hl. +; note: <xon>,<xoff>,<del>, and <nul> are always discarded. +sysflt: + mov a,e ; get character for testing + ret + +; mdmflt - modem filter [30] +; called with character to be sent to printer in E +; with parity set as appropriate. +; return with accumulator = 0 do do nothing, +; <> 0 to send char in E. +mdmflt: + mov a,e ;[30] get character to test + ret + + + +; prtflt - printer filter [30] +; called with character to be sent to printer in E +; returns with a = 0 to do nothing +; a <> 0 to print it. +; +; this routine for those printer that automatically insert +; a lf on cr, or cr for lf. Should this be shifted to +; the system indep. stuff, in say 4.06? +prtflt: + mov a,e ; [30] get character to test + ret + + +; +; system-dependent processing for BYE command. +; for apmmdm, heath, and lobo, hang up the phone. +sysbye: + ret +; +; +; This is the system-dependent command to change the baud rate. +; DE contains the two-byte value from the baud rate table; this +; value is also stored in 'speed'. +sysspd: + ret +; +; +; The following conditionals were once a huge if not statement. There +; wasn't enough room to add the lobo to the list, so it had to be broken +; into 2, which you can't do with an if not. I redid it as two ifs and +; applied them to those that wouldn't set baud. [Hal Hostetler] +spdtbl EQU 0 ;[hh] SET BAUD not supported. +sphtbl EQU 0 ;[hh] ran out of room above... +; +; +; This is the system-dependent SET PORT command. +; HL contains the argument from the command table. +sysprt: + ret + +prttbl equ 0 ; SET PORT not supported +prhtbl equ 0 +; + +; +; selmdm - select modem port +; selcon - select console port +; selmdm is called before using inpmdm or outmdm; +; selcon is called before using inpcon or outcon. +; For iobyt systems, diddle the I/O byte to select console or comm port; +; For Decision I, switches Multi I/O board to console or modem serial +; port. [Toad Hall] +; For the rest, does nothing. +; preserves bc, de, hl. +selmdm: +selcon: + ret +; + +; Get character from console, or return zero. +; result is returned in A. destroys bc, de, hl. +; +inpcon: + mvi c,dconio ;Direct console I/O BDOS call. + mvi e,0FFH ;Input. + call BDOS + ret +; + +; +; Output character in E to the console. +; destroys bc, de, hl +; +outcon: + mov c,e ;Console output via BIOS + jmp bcnout +; + +; +; outmdm - output a char from E to the modem. +; the parity bit has been set as necessary. +; returns nonskip; bc, de, hl preserved. +outmdm: + mov c,e ; get char to c + call 0ff12h ; send to com1 via PC BIOS + ret +; +; +; get character from modem; return zero if none available. +; for IOBYT systems, the modem port has already been selected. +; destroys bc, de, hl. +inpmdm: +;Note: modem port should already be selected for mdI. [Toad Hall] + call 0ff15h ;Get the port status into A. + ana a ;See if the is non-null. + ret ; return with character or NULL in A. + + +; +; flsmdm - flush comm line. +; Modem is selected. +; Currently, just gets characters until none are available. + +flsmdm: call inpmdm ; Try to get a character + ora a ; Got one? + jnz flsmdm ; If so, try for another + ret ; Receiver is drained. Return. +; + +; +; lptstat - get the printer status. Return a=0ffh if ok, or 0 if not. +lptstat: + xra a ; assume it is ok.. this may not be necessary + ret + +; +; outlpt - output character in E to printer +; console is selected. +; preserves de. +outlpt: + push d ; save DE in either case + call prtflt ; go through printer filter [30] + ana a ; if A = 0 do nothing, + jz outlp1 ; [30] if a=0 do nothing + mvi c,lstout + call bdos ;Char to printer +outlp1: pop d ; restore saved register pair + ret + +; +; delchr - make delete look like a backspace. Unless delete is a printing +; character, we just need to print a backspace. (we'll output clrspc +; afterwards) +; For Kaypro and Vector General, delete puts a blotch on the screen. +; For Apple and Osborne 1, delete moves but doesn't print. +delchr: + mvi e,bs ;get a backspace + jmp outcon + +; erase the character at the current cursor position +clrspc: mvi e,' ' + call outcon + mvi e,bs ;get a backspace + jmp outcon + +; erase the current line +clrlin: lxi d,eralin + jmp prtstr + +; erase the whole screen, and go home. preserves b (but not c) +clrtop: lxi d,erascr + jmp prtstr + + +sysver: db 'Z80MU on IBM PC $' +IF lasm +LINK CPXVDU.ASM +ENDIF ;lasm - m80 will INCLUDE CPXVDU.ASM + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cpzspa.txt b/cpzspa.txt new file mode 100644 index 0000000..0dcdb69 --- /dev/null +++ b/cpzspa.txt @@ -0,0 +1,92 @@ +.pl66 + Tabspace utility for + CP/M-80 Kermit (Kermit-80) support. + +I have written this utilty simply to help me. No other excuses. + +I am forever getting updates or new systems to add to the CP/M-80 +version of Kermit (Kermit-80) from folk who send me these updates +via Electronic Mail. I am thankful that it is already in a +machine readable form. + +However, our Mutton-head mainframe substitutes a single space +character for every tab character it receives, so a lot of the +submissions need considerable massaging before I can actually +merge these additions to the rest of Kermit-80. + +Therefore, I issued Kermit-80 with all tabs replaced by spaces, +in the hope that any further doantions have spaces instead of +tabs. Unfortunately, this does not work in practice, and +everyone is complaining about the size of the source files (often +as much as 30% larger as a single tab character is now up to +eight space characters!) + +So I wrote this program in the hope that people submitting stuff +to me run their sources through this de-tabber to make my life +easier. + +As a bonus, TABSAPACE will do the reverse, and replace spaces +with tabs. With a couple of exceptions... (See below) + +To run the program, type TABSPACE and wait for the sign-on +message ("Tabspace loaded, Version 1 22-Jan-87" for the time +being). Tabspace will ask for the filename to be "massaged", and +whether you want to expand or compress files (ie substitute +spaces for tabs, or tabs for spaces respectively). + +Once started, it will plough through the file specified (if it +exists) and apply the tabs/spaces replacement as required. It +will also strip out any parity bits. + +Tabspace actually opens two files when it works: one input file +of the type <filename>.<extention> as specified by you. The +second is the same <filename> but with a $$$ extention. + +Once the file has been massaged, the original file will be +deleted, and the .$$$ file renamed to your original file. This +should be relatively safe, as you will not get to the stage of +delete and rename if you have disk space or file closing +problem. However, I suggest you try applying Tabspace to COPIES +of your software! + +Couple of other points: +Tabspace uses memory to buffer several logical 128 byte +"sectors", both on read and writing. An equate for MAXRAM sets +the maximum amount of memory available to Tabspace after CP/M and +Tabspace itself have nabbed their memory, and is initally set to +16 Kbytes. (I reasoned that if you are going to run Kermit-80 +version 4.08 or later you should have at least this amount of +free memory!) If you have more memory, you can adjust this to +some larger value, say 52 for a 62k system (ie 62K - 8k (CP/M) - +2k (Tabspace) = 52k) + +I used the Public Domain assembler LASM to assemble Tabspace; I +have no idea if any other assembles will work. Anyway, LASM is +the ONLY assembler now used for Kermit-80 assembly. + +Tabspace will expand tabs after a semicolon in a comment field, +but will not replace tabs for multiple spaces after a semicolon. +I ran into som real problems early on, and decided that spaces in +comment fields would be ok, so I left it in. + +Any comments or contributions for Tabspace and/or Kermit-80 +please send them to me (with tabs expanded!) as: + + +OBSchou @ UK.AC.LOUGHBOROUGH.MULTICS or + +Kermit @ UK.AC.LOUGHBOROUGH.MULTICS or + +Bertil Schou, +The Computer Centre, +Loughborough Universirty of Technology, +Loughborough, +Leics. LE11 3TU or + ++ 509 -222313 (Direct Dial) + + + +Many thanks for your co-operation, + +Bertil Schou. diff --git a/lasm.hex b/lasm.hex new file mode 100644 index 0000000..5115dee --- /dev/null +++ b/lasm.hex @@ -0,0 +1,353 @@ +:10010000314D17C39A024C494E4B41534D20415338 +:10011000204F4620372F30362F38310D0000000099 +:1001200000205245534541524348202020202020A2 +:10013000534944585245463144303020243100025E +:10014000C5C51130010E09CD0500C12107007E3D56 +:1001500090571E00D521000278B1CA65010B7E12AE +:100160001300004D3400000000004D34000000007A +:100170000007C27A01E37E23E36F7D176FD283010C +:100180001A000000000001D12E00E90000004153D8 +:100190004D00671BC93E0CD3013E08D301DB0107AC +:1001A00007071FDAA900009D08DB03E67FC921507D +:1001B000524E00712A821D444DCDA1070E3ACD86C4 +:1001C000070E20CD860700001D32841D3A601D21D8 +:1001D00048455800F40821DE1C3A841DBED2ED08C3 +:1001E0002A841D260001DF0000100000000021818C +:1001F00001BEC8775F0E0ECD0500C9237EFE20CA62 +:100200000502DE41C93A8101C97ECD4A047E23FE42 +:100210000DC209023E0ACD4A04C9115C0006091A42 +:10022000FE3FCA210377231305C21F02C9D5060862 +:10023000131ACD4A0405C230023E0DCD4A043E0ACF +:10024000CD4A04D10E0FCD0500FEFFC0211F06CD03 +:100250000902C300000E10CD0500FEFFC0218F066D +:10026000CD0902C300000E13C305000E16CD050014 +:10027000FEFFC0213606CD0902C300003A8201CD3F +:10028000EE01C93A8301FE19C8FE17C93A8301CDB0 +:10029000EE01C93A8401CDEE01C9210601CD090262 +:1002A0003A6C0032A2163A5D00FE20CA21030E19F4 +:1002B000CD0500328101216400CDFB01328201CDE8 +:1002C000FB01328401CDFB01328301218501CD1A6E +:1002D0000221A601CD1A02CD8302CAEC02CD8C0206 +:1002E00011A601CD660211A601CD6B023A8401FE72 +:1002F00019CAA21021C701E5E5CD1A02CD9302D19A +:10030000CD6602D1CD6B02C3A21021001022E801FC +:10031000AF32910132A501CD7C02118501CD2D02B4 +:10032000C9214906CD0902C300007ABCC07BBDC902 +:10033000C5D5E52AE801110010CD2A03C27F03CDFF +:100340007C0221000022E8010620214D17C5E50EA0 +:1003500014118501CD0500E1C1B70E80C2730311F0 +:1003600080000E801A7713230DC2640305C24D036B +:10037000C37F03FE03D29603361A230DC2780311FE +:100380004D172AE801E52322E801E1197EFE0ACC97 +:100390009115E1D1C1C9216006CD0902C30000C594 +:1003A000473A8301FE19CABD03FE1778C2B603CDD2 +:1003B0004A04C3BD03C5D5E5CDBF03E1D1C1C92AF8 +:1003C000EA01EB214D271977EB2322EA01EB21000B +:1003D00004CD2A03C0CD8C0221000022EA01214D68 +:1003E0002711A60106087EFE1AC8C5D50E80118009 +:1003F000007E1223130DC2F103D1D5E50E15CD05F4 +:1004000000E1D1C1B7C20D0405C8C3E603217706D8 +:10041000CD0902C3E304C5D5E5CD2004E1D1C1C9AE +:100420002AEC01EB214D2B1977EB2322EC01EB2178 +:100430000008CD2A03C0CD930221000022EC012147 +:100440004D2B11C7010610C3E603C5D5E50E025FAB +:10045000CD0500E1D1C1C94FCD9F033AA316FE20BF +:10046000C83A8301FE17C879CD4A04C93A1C012154 +:10047000A316B7CA8104477ECD570423783DC372C3 +:1004800004321C013E0DCD57043E0ACD570421A372 +:10049000163E783620233DC29304C94721A3167E19 +:1004A000FE20C070C9CD8302CABB042AEA017DB414 +:1004B000CABB043E1ACD9F03C3AB043A8401FE19A4 +:1004C000CAE3043A7001B7C41E072A6601226E010E +:1004D000CD1E072AEC017DB4CAE3043E1ACD1604F2 +:1004E000C3D304CD8302CAF204CD8C0211A601CD80 +:1004F00055023A8401FE19CA0305CD930211C701C2 +:10050000CD55023AA216B7CA16063D32830121AF75 +:1005100001110E060603CD1F02AF32B20132C60131 +:10052000CD8C0211A601D5CD6602D1CD6B02210082 +:100530000022EA01210E06CD0902CD4305CD9C051E +:10054000C316060641110C06CD57050478FE5BC2A2 +:100550004805AF121312C9214F34CD6705D8CC79A5 +:1005600005CD8D05C35A053A6301953A64019CD8BF +:100570007EE60F4F237E90B7C97AB3CA85052B7DDF +:1005800012137C1223E5CD9305545DE1C9CD93058B +:100590002323C97806000947232323C92A0C067C94 +:1005A000B5CADE057EE60F5F160023E519234E234C +:1005B0007ECDF80579CDF805CDD905E11C7ECDB508 +:1005C00003231DC2BD053E0DCDB5033E0ACDB503C7 +:1005D00023237E23666FC39F053E20C3B5032AEA0B +:1005E000017DB4CAEE053E1ACD9F03C3DE05CD8C56 +:1005F0000211A601CD5502C9F51F1F1F1FCD01060F +:10060000F1E60FC69027CE4027C3B503000053592B +:100610004D424F4C530D21A206CD0902C300004E9E +:100620006F20736F757263652066696C65207072E8 +:100630006573656E740D4E6F206469726563746FC7 +:1006400072792073706163650D536F7572636520F5 +:1006500066696C65206E616D65206572726F720DE2 +:10066000536F757263652066696C6520726561649D +:10067000206572726F720D4F7574707574206669A3 +:100680006C65207772697465206572726F720D43B4 +:10069000616E6E6F7420636C6F73652066696C6544 +:1006A000730D456E64206F6620617373656D626CB7 +:1006B000790DC5473A8401FE1978CAFE06D5F521A1 +:1006C00070017EB7CAEA06FE10DAD206CD1E07C355 +:1006D000EA062A6601EB2A6E014F0600097BBDC2BD +:1006E000E7067ABCCAF006CD1E072A6601226E0113 +:1006F0002170015E34160021710119F177D1C1C951 +:10070000F50F0F0F0FE60FCD1507F1F5E60FCD151D +:1007100007F18257C9C69027CE4027C316043E3A38 +:10072000CD16042170015EAF57772A6E017BCD0094 +:10073000077CCD00077DCD0007AFCD00077BB7CA92 +:100740004E072171017E23CD00071DC24507AF92E0 +:10075000CD00073E0DCD16043E0ACD1604C900009B +:1007600000CD3003F5FE0DCA8507FE0ACA85073A9B +:100770001C01FE78D285075F16003C321C0121A3C4 +:100780001619F177C9F1C9CD9E07325F07321C01F6 +:100790003E0A325E07CD6C043E10321C01C9AF32F6 +:1007A0002001326007C92120017EFE40DAB40736FD +:1007B00000CD7A095E16003423193A5F0777C97EA7 +:1007C000FE24C0AF77C93A5F07D630FE0A17E601AC +:1007D000C9CDC607C03A5F07D641FE0617E601C974 +:1007E0003A5F07D641FE1A17E601C9CDE007C0CD32 +:1007F000C607C93A5F07FE61D8FE7BD0E65F325F6D +:1008000007C9CD6107325F07F53A1D01FE03C4F346 +:1008100007F1C9FE0DC8FE1AC8FE21C9AF321D017D +:10082000CD9E073A5F07FE09CA5008FE3BCA3D0845 +:10083000FE2AC249083A5E07FE0AC24908CD0208EC +:10084000CD1308CA5608C33D08F620FE20C256083C +:10085000CD0208C32308CDE007CA61083E01C39555 +:1008600008CDC607CA6C083E02C395083A5F07FE6A +:1008700027C27D08AF325F073E03C39508FE0AC258 +:1008800093083A6501B7C46C0421A31636203E10C4 +:10089000321C013E04321D013A5F07325E07B7C4C5 +:1008A000A607CD02083A1D01FE04C8FE03C4F307E3 +:1008B000215F073A1D01FE01C2C808CDBF07CA98D3 +:1008C00008CDEB07C8C39808FE02C25E09CDBF077A +:1008D000CA9808CDD107C298083A5F07FE4FCAE60A +:1008E00008FE51C2EB083E08C3F208FE48C2FC08ED +:1008F0003E10326007AF325F07C317093A5E07FE4A +:1009000042C209093E02C31009FE443E0AC214094C +:1009100021200135326007210000221E0121200123 +:100920004E237E23FE41D22E09D630C33009D6375E +:10093000E5C54F216007BED4740906007E2A1E015A +:10094000EB210000B7CA53091FD24D0919EB29EB5F +:10095000C3440909221E01C1E10DC22209C93A5F3F +:1009600007FE0DCA7A09FE27C29808CD0208FE27A5 +:10097000C0C39808F53E56C38009F53E4FC38009B1 +:10098000C5E5CD9B04E1C1F1C900214D330680AF1F +:100990007723772305C29009210000226C01C92129 +:1009A000200146AF238605C2A409E67F328909C922 +:1009B000472A6C0123237EE6F0B077C92A6C012315 +:1009C000237EE60F3CC92A6C017DB4C9CD9F092165 +:1009D00020017EFE11DADA0936102189095E16003F +:1009E000214D3319195E23666B226C01CDC609C8EF +:1009F000CDBC09212001BEC20F0A4723EB2A6C019E +:100A00002323231ABEC20F0A132305C2030AC92ACD +:100A10006C015E2356EBC3E9092120015E16002A12 +:100A20006301226C011911050019EB2A06007B9560 +:100A30007A9CEBD26F0A2263012A6C01EB218909AF +:100A40004E0600214D3309094E2346722B73EB717C +:100A500023701120011AFE11DA5D0A3E10473D2372 +:100A60007723131A7705C2610AAF23772377C92149 +:100A7000780ACD0902C3A50453796D626F6C2074A6 +:100A800061626C65206F766572666C6F770D171703 +:100A90001717E6F0472A6C0123237EE60FB077C9CB +:100AA0002A6C0123237E1F1F1F1FE60FC9CDBC091F +:100AB0002A6C015F160019232323C9E5CDAD0AD1A5 +:100AC000732372C9CDAD0A5E2356EBC9E70AF70A54 +:100AD000090BA50BD10BE00B1009340B03E00B0045 +:100AE0000C120C7A0C900C0D28292A2B2C2D2F413E +:100AF00042434445484C4D4442444944534457457D +:100B0000494946494E4F525350414349414443415C +:100B10004444414449414E41414E44414E49434D74 +:100B200041434D43434D5043504944414144414466 +:100B3000444352444358454E44455155484C54490A +:100B40004E52494E584A4D504C44414C58494D4FD5 +:100B5000444D4F564D56494E4F504E4F544F5241B3 +:100B60004F52474F52494F5554504F505053575280 +:100B7000414C524152524554524C435252435253AB +:100B80005453424253424953455453484C5348529C +:100B9000535441535443535542535549584F525857 +:100BA000524158524943414C4C4C4441584C484C9A +:100BB000444C494E4B5043484C5055534853484C75 +:100BC000445350484C53544158584348475854484C +:100BD0004C454E4449464D4143524F5449544C456F +:100BE0000F0A0C140D1E005005460E0A0646015051 +:100BF0001007100010011002100310041005100659 +:100C0000110113F31102110313FB110821DB0A2850 +:100C100010061ACE1D881D801AC61DA009321AE6BC +:100C2000132F133F1DB81AFE132715091E051F0B9E +:100C30001104110713761E041F0317C31C3A140175 +:100C40000250184019061300083C1DB0110A1AF68C +:100C500021D316C110061317131F13C91307130F3F +:100C600020C71D981ADE110B035004501C32133795 +:100C70001D901AD60B281DA81AEE17CD1B0A1C2A88 +:100C8000110613E916C51C2213F91B0213EB13E31B +:100C900011051109110C4E5A5A204E434320504F52 +:100CA000504550204D201EFF040E00AF78811FBB21 +:100CB000CAE70C5FE5D5C5E54248160021000019DA +:100CC00005C2BF0CD1191121011ABE1323C2D90CC0 +:100CD0000DC2C90CC1D1E17BC9C1D1E1DAE30C4B32 +:100CE000C3AB0C43C3AB0CAF3CC93A21010117C2E3 +:100CF000FE4AC806C4FE43C80113C0FE52C93A20CA +:100D000001FE04D2300DFE03CA150DFE02C2300DE5 +:100D1000212301362001080011960C2122011ABE60 +:100D200013C2280D1A23BEC813040DC21B0D0CC913 +:100D3000AF3CC93A20014F3D5F1600D5FE05D27D7C +:100D40000D21D80A194621CC0A19195623666A5171 +:100D5000CDA60CC2680DD121DD0A19195E23566F8C +:100D6000260029197E2346C9D1CDEA0CC0C5CDFE87 +:100D70000C78C1C0B7171717B04779BFC9D1AF3CBE +:100D8000C900BEC9EB2AB3177D937C9AEBC9CD8409 +:100D90000BD022B317C93A4E17FE01D0E52100004F +:100DA000CD840BE1C9CD0000EB21A70D7EFE10DA4A +:100DB000B70DCD9A1036007E34344F060021960DC3 +:100DC00009732372C9F521A60D7EFE0ADAD40D3609 +:100DD00000CD9A105E160034F121820D1977218C16 +:100DE0000D1970C921A70D7EB7C2F30DCD9A102140 +:100DF0000000C935354E060021960D094E2366695F +:100E0000C9CDE40DEBCDE40DC96F26002911160EF6 +:100E1000195E23666BE99E0EA70EAE0EB40EC00ED1 +:100E2000D40EDB0EE50EEE0EF50E010F0D0F9A102F +:100E3000CD010E7AB7C23C0E7BFE11D8CD9A103E82 +:100E400010C9AF956F3E009C67C9CD010EEB2280A3 +:100E50000E21820E3611010000C5AF7B175F7A1795 +:100E60005735E1C83E00CE002944852A800E954FB3 +:100E7000789C47C5D2790E09E321820E3FC35B0EF1 +:100E80000E1000444D210000AF781F47791F4FDA44 +:100E9000970EB0C8C3980E19EB29EBC3880ECD018D +:100EA0000ECD830EC3A80DCD4A0EEBC3A80DCD4ABF +:100EB0000EC3A80DCD300EB7CAA80D293DC3B70E7D +:100EC000CD300EB7CAA80DF5AF7C1F677D1F6FF13F +:100ED0003DC3C30ECD010E19C3A80DCD010EEBCD40 +:100EE000420EC3D70ECDE40DCD420EC3A80DCDE406 +:100EF0000D23C3E80ECD010E7AA4677BA56FC3A8AE +:100F00000DCD010E7AB4677BB56FC3A80DCD010E70 +:100F10007AAC677BAD6FC3A80D3A1D01FE04C03AE1 +:100F20002101FE0DC8FE3BC8FE2CC8FE21C9AF3210 +:100F3000A60D32A70D3D32810D210000226101CDA9 +:100F4000190FC2720F21A60D7EB7CA5D0F355F1D46 +:100F5000160021820D197ECD090EC3450F3AA70D4B +:100F6000FE02C49A103AA316FE20C02A960D2261F2 +:100F700001C93AA316FE20C294103A1D01FE03C215 +:100F80009E0F3A2001B7CC9A10FE03D49A10160097 +:100F90002121015E233DCA9A0F56EBC38610FE0243 +:100FA000C2A90F2A1E01C38610CD330DC24610FE02 +:100FB00010D23B10FE0C4F3A810DC2CA0FB7CC9A2B +:100FC000103EFF32810D79C31810B7C22310C53A05 +:100FD000A60DB7CAF30F5F1D1600218C0D197EB840 +:100FE000DAF30F21A60D7321820D197ECD090EC1F2 +:100FF000C3CE0FC179FE0DC2181021A60D7EB7CA4F +:1010000011103D775F160021820D197EFE0CCA1467 +:1010100010CD9A10AFC31D10CDC50D3EFF32810D0E +:10102000C3941079FE05CA9410FE06C233103C4FDB +:10103000C3CE0FFE08C49A10C3CE0FFE11CC9A1077 +:10104000682600C386103A1D01FE04C265103A21CD +:1010500001FE24CA5F10CD9A10210000C386102A19 +:101060006801C38610CDCC09CDC609C279103E50A7 +:10107000CD9B04CD190AC38310CDA00AE6073E55C7 +:10108000CC9B04CDC40A3A810DB7CC9A10AF328103 +:101090000DCDA80DCD1C08C33F0FE53E45CD9B04EB +:1010A000E1C9AF326501CD8A09CD8707218501CD20 +:1010B0001A02CD0A03AF327001210000229D1622D0 +:1010C0006601226801229F16CD1C083A1D01FE020E +:1010D000CAC810FE04C2E9103A2101FE2AC2AA14AD +:1010E000CDB215C2F514C3CB14FE01C2F514CD3335 +:1010F0000DCA3C11CDCC09CDC609C20A11CD190AC1 +:101100003A6501B7C48916C31811CDA00AFE06C2FC +:101110001811CD9516C3CB142A9D167DB4C48F1615 +:101120002A6C01229D16CD1C083A1D01FE04C2CB7B +:10113000103A2101FE3AC2CB10C3C810FE11C250B2 +:10114000135816001B214F1119195E23666BE967AE +:1011500011B511CC11EA11211224129712B9120003 +:1011600013061320134713CDBC15CD1C083A1D01DF +:10117000FE03C298113A20013DCA98114704042188 +:10118000210105CA9211C54623E5CDFA15E1C1C377 +:101190008211CD1C08C3A711CD2E0F2A61017CB787 +:1011A000C4831645CDFA15CDAB15CD3314FE2CCA2C +:1011B0006A11C3AA14CDBC15CD5816CD4A14EB2A1A +:1011C000680119226801226601C3AA14CDBC15CD9D +:1011D0004A14E545CDFA15E144CDFA15CDAB15CD50 +:1011E0003314FE2CCACF11C3AA14CDBC15CD58168A +:1011F0003AA316FE20C2AA14CD4A143AA316FE2022 +:10120000C20612229F163E2032A316CD1C083A1D9C +:1012100001FE04C2F5143A2101FE0AC2F514C3040A +:1012200015C34A13CD1C082186011121013A200162 +:10123000B7CA7112473E09B8DA7112904F1A771384 +:101240002305C23D120DCA4F12362023C34512CDCD +:101250001C083A5F07FE1ACA7112FE0AC24F12CD6D +:101260000A03CD1C08C3C81070230DC23D12C34F22 +:1012700012217D12CD0902CD6C04C300002B2B4539 +:1012800052524F5220494E204C494E4B204F504510 +:1012900052414E442B2B0DCDB215CAF5142A6801CC +:1012A000E5CD4A14226801CDBC15CD5B1621A916E7 +:1012B000363DE1226801C3AA14CDBC15CD4A143ACB +:1012C000A316FE20C2AA147D1FDAAA14CD1C083A68 +:1012D0001D01FE04C2E7123A2101FE1A3E42CC9BD8 +:1012E00004CA0415C3CC12FE01C2CC12CD330DC208 +:1012F000CC12FE11C2CC1278FE05C2CC12C34A1326 +:10130000CD9516C3AA14CD4A143AA316FE20C2AA3C +:1013100014226801226601CDBC15CD5816C3AA144B +:10132000CDB215CAF514CDA00AFE05C48F163E0530 +:10133000CD8E0ACD4A14E5CDB215E1CDBB0A210010 +:1013400000229D16C3AA14CD9516CD1C08C3AA145D +:10135000D613FE21D2F5145F160021641319195E0D +:1013600023666BE982138B1397139D13B113BA1382 +:10137000C913D913E213F113FA1301140814171443 +:101380001E14CDFA15CD1C08C32A14CD7514CD90AA +:1013900014CD8A14C32A14CD7514C32A14CD6B142A +:1013A000FE38CAAA13E608C46F1679E630B0C32720 +:1013B00014CDFA15CD8A14C32A14CD6B14B047CDC1 +:1013C0009014CD6014B0C32714CD6B14B0CDF915B3 +:1013D000CD9014CD8414C32A14CDFA15CD8414C332 +:1013E0002A14CD6B14E628C46F1679E610B0C32713 +:1013F00014CDFA15CD8A14C32A14CD6014B0C327B6 +:1014000014CD6B14B0C32714CD6B14E608C46F164B +:1014100079E630B0C32714CD6B14B0C32714CDFACE +:1014200015CD8414C32A14CDF915CDBC15CDAB153B +:10143000C3AA143A1D01FE04C483163A2101FE2CEE +:10144000C8FE3BC8FE0DC48316C9C5CD1C08CD2EF1 +:101450000F2A6101C1C9CD4A147CB7C479167DC970 +:10146000CD5614FE08D47916E607C9CD60141717B7 +:1014700017E6384FC9CD6B14E608C46F1679E6300D +:10148000B0C3F915CD5614C3F915CD4A14C32616A9 +:10149000F5C53A1D01FE04C2A2143A2101FE2CCA70 +:1014A000A7143E43CD9B04C1F1C9CDBC153A1D0123 +:1014B000FE04C2F5143A2101FE0DC2C314CD1C086E +:1014C000C3C810FE3BC2EB14CDBC15CD1C083A1DA1 +:1014D00001FE04C2CB143A2101FE0ACAC810FE1A4A +:1014E000CA0415FE21CAC810C3CB14FE21CAC810F5 +:1014F000FE1ACA04153E53CD9B04C3CB147B956FD3 +:101500007A9C67C92165017E34B7CAA910CD1C0831 +:10151000CD581621A816360D21A416CD09022A632E +:1015200001EB2A6A01CDFD14E52A0600EB2A6A01C7 +:10153000CDFD145C1600E1CD4D0EEBCD5B1621A860 +:1015400016114F151AB7CA5D15772313C3441548F2 +:101550002075736520666163746F720D0021A51696 +:10156000CD09022A9F16226601217815237EFE20CE +:10157000CA6C15CD0902C3A50420202020202020FC +:10158000696E707574206C696E6573207265616434 +:101590000D3A6501B73E0AC8217E157EF6303C77CC +:1015A000FE3A3E0AD836302BC39B152A66012268C4 +:1015B00001C92A9D16226C01CDC609C9CDB215C834 +:1015C000210000229D163A6501B7C2E315CDA00A9D +:1015D000F5E607C48F16F1F601CD8E0A2A6801CD13 +:1015E000BB0AC9CDA00AE607CC8916CDC40AEB2AEE +:1015F0006801CD2A03C48916C9473A6501B778CA7C +:101600001E16C5CDB2063AA416FE202A6801CC5B90 +:10161000163AA116FE10C1D21E1678CD48162A66BB +:101620000123226601C9E545CDFA15E144C3FA1547 +:10163000C630FE3AD8C607C9CD301621A1165E16AF +:10164000003421A3161977C9F51F1F1F1FE60FCD00 +:101650003816F1E60FC338162A6801EB21A116E50A +:1016600036017AD5CD4816D17BCD4816E134C9F57F +:10167000C53E52CD9B04C1F1C9F5E53E56CD9B0454 +:10168000E1F1C9F53E44C39816F53E50C39816F5EE +:101690003E4CC39816F53E4ECD9B04F1C9000000A8 +:1016A000000000000000000000000000000000003A +:1016B000000000000000000000000000000000002A +:1016C000000000000000000000000000000000001A +:1016D000000000000000000000000000000000000A +:1016E00000000000000000000000000000000000FA +:1016F00000000000000000000000000000000000EA +:00010001FE diff --git a/lasm.txt b/lasm.txt new file mode 100644 index 0000000..178d840 --- /dev/null +++ b/lasm.txt @@ -0,0 +1,149 @@ +***************************************************************** +* * +* 10/01/81 * +* * +* LASM is an update of LINKASM, with the minor change that * +* it prints the name of each linked file before it is opened. * +* This helps track progress, and helps find misspelled names. * +* * +* -Ward Christensen * +* * +***************************************************************** + +LINKASM.COM +01/07/80 by Ward Christensen + +OVERVIEW: + LINKASM is based on CP/M assembler 1.0, and is +compatible with 1.0, 1.3, and 1.4 assemblers. (2.0? Dunno.) + ---------------- +LINKASM is a rewrite of CP/M 1.0 ASM.COM, incorporating: + +* A new pseudo-op code, LINK. +* Smaller .COM file size (6K vs 8K). +* Faster execution via larger ASM, HEX, and PRN buffers +* Corrections to properly handle lower case DB values. +* Prints the number of source lines read +* Produces a symbol table for use under SID + + The LINK pseudo-op allows a file to "chain" to the +next .ASM file, thereby allowing very large source files to +be processed without having to PIP them together. + +RESTRICTIONS: + All the linked .ASM files must be on the same disk. + Nested IFs are not handled (ASM.COM didn't either) +Note that you can use IF to conditionally link to the next +module: + + IF CLOCK + LINK CLOCKRTN + ENDIF +; + IF NOT CLOCK + LINK OTHERRTN + ENDIF + + For example, if CLOCK is true, then LINK CLOCKRTN +(i.e. CLOCKRTN.ASM) will take place, and the assembler +will never see the ENDIF. This is not a problem as the +next encountered IF will be handled properly. + ---------------- +USAGE: + LINKASM is totally compatible with ASM.COM, and +you may therefore replace ASM. Its performance will be +slightly better than ASM.COM, and it takes less space on +disk (6K vs 8K). + Execute it just like ASM.COM, i.e. + + LINKASM name.p1p2p3 + +where: p1 is the .ASM file disk (A, B, ...) + p2 is the .HEX file disk (A, B, ... or Z for none) + p3 is the .PRN file disk (A, B, ... or Z for none, + or X for the console) + + The default is the logged in disk for all 3. + + If you wish to write a symbol table file, follow +the command line with the disk to be written to (A, B, ...) +then a colon. For example, to assemble FOO from the A: +disk, put the .HEX on the A: disk, send the .SYM file to +B:, and the listing to the console: + + LINKASM FOO.AAX B: + + To assemble it doing everything on the A: disk +(assuming A: is the logged in disk): + + LINKASM FOO A: + + The ":" must be specified after the .SYM disk. The +.SYM file is "partially" sorted, i.e. all Axxxx then all Bxxxx +etc. SID fully scans the symbol table anyway, so sorting +it is not necessary, so I did this quick sort hack just to +make it eaiser for YOU to find a symbol. + ---------------- + The LINK pseudo ops take a single operand: the name +of an .ASM file to be processed next. For example: +---------------- +A:TEST1.ASM: + + ORG 100H + LXI H,MSG + MVI C,9 + CALL BDOS + RET + LINK TEST2 +---------------- +A:TEST2.ASM: + +MSG DB 'Linked' +BDOS EQU 5 +---------------- + Then assemble it: + +A>LINKASM TEST1.AZX +LINKASM AS OF 7/13/79 + + + 0100 ORG 100H + 0100 210901 LXI H,MSG + 0103 0E09 MVI C,9 + 0105 CD0500 CALL BDOS + 0108 C9 RET + LINK TEST2 + 0109 4C696E6B65MSG DB 'Linked' + 0005 = BDOS EQU 5 +010F +000H use factor +8 input lines read +End of assembly + + ---------------- + I will make one apology for LINKASM - I neglected +to put in an error message saying the name of the missing +file, if you should accidentally LINK to a non-existant file. +It just says the source file is not present. + If necessary, you can find the name which was +being searched for. It's in memory at 186H. If you have +a PROM monitor, you can examine it. If not, do the following +BEFORE executing any more COM programs following the LINKASM: + + SAVE 1 BADNAME.COM Save 100-1ff to disk + DDT BADNAME.COM Bring in under DDT (or SID) + D186,190 Dump the name + ^C Reboot (some people use G0) + ERA BADNAME.COM ERA the temporary file. + +Sorry for that hack, but I thought it better to put LINKASM +in the CP/M UG with that problem, rather than holding it +back "trying to make it perfect". + ---------------- +I have not encountered any problems using LINKASM as my +main assembler for about the last 6 months. Among other +things, I use it to assemble CBBS.ASM which, with its 14 +or so LINKed files, is over 6000 lines. It takes about 5 1/2 +minutes, as I recall (HEX and SYM, no PRN). + + Ward Christensen diff --git a/m80unv.mac b/m80unv.mac Binary files differnew file mode 100644 index 0000000..a0e3b25 --- /dev/null +++ b/m80unv.mac diff --git a/m80v6.doc b/m80v6.doc Binary files differnew file mode 100644 index 0000000..296da91 --- /dev/null +++ b/m80v6.doc diff --git a/m80v7.doc b/m80v7.doc Binary files differnew file mode 100644 index 0000000..c22a5fc --- /dev/null +++ b/m80v7.doc diff --git a/m80v7.msg b/m80v7.msg Binary files differnew file mode 100644 index 0000000..351d98c --- /dev/null +++ b/m80v7.msg diff --git a/mac80.cmd b/mac80.cmd Binary files differnew file mode 100644 index 0000000..fbfc672 --- /dev/null +++ b/mac80.cmd diff --git a/mac80.doc b/mac80.doc Binary files differnew file mode 100644 index 0000000..dc29615 --- /dev/null +++ b/mac80.doc diff --git a/mac80.mac b/mac80.mac new file mode 100644 index 0000000..6b11f05 --- /dev/null +++ b/mac80.mac @@ -0,0 +1,412 @@ +;MAC80 - An 8085 cross assembler for the DECsystem-10 + +; Copyright 1976,1977,1978,1983 +; Bruce Tanner / Cerritos College +; 11110 Alondra Blvd. +; Norwalk, CA 90650 + + + SEARCH M80UNV,JOBDAT,MACTEN + TITLE. (M80,MAC80,8085 Cross Assembler) + M80TTL + M80137 + + SUBTTL COMMAND SCANNER + + TWOSEG + RELOC 400000 + +MAC80: TDZA F,F ;CLEAR FLAGS + MOVSI F,FL.CCL ;CCL ENTRY + SETZM SVJBFF ;ZERO AT START +START:: RESET ;RESET ALL I/O + MOVE P,PDP ;SET UP PDL + SKIPE T1,SVJBFF ;1ST TIME THRU? + JRST .+4 ;NO--RESET .JBFF + MOVE T1,.JBFF ;YES--GET .JBFF + MOVEM T1,SVJBFF ;AND SAVE IT + JRST .+4 ;AND SKIP THE CORE CONTRACTION + MOVEM T1,.JBFF ;RESET FIRST FREE + CORE T1, ;SHRINK CORE BACK DOWN + JRST CORERR ;IMPROBABLE + SETZB P2,LOOKIT ;TEMP (P2) & 1ST LOC OF TEMP STORAGE + MOVE T1,[FILNAM,,FILNAM+1] ;REST OF TEMP STORAGE + BLT T1,ENDLOW ;BBLLLIIIITTTTT! + SETZM SYMTAB## ;START OF STORAGE + MOVE T1,[SYMTAB,,SYMTAB+1] + BLT T1,ENDHGH## ;BLIT + MOVE P1,[POINT 6,P2] ;TEMP POINTER + TLNE F,FL.CCL ;CCL INPUT? + JRST CCLIN ;YES +STAR: OUTSTR ASTER ;HERE IF TTY INPUT + PUSHJ P,INCH ;GET CHAR + CAIL I,40 ;SPECIAL CHAR? + JRST LOOP1 ;NO--PROCESS + CAIN I,"Z"-100 ;TTY EOF? + EXIT 1, ;YES + CLRBFI ;CLEAR BUFFER + JRST STAR ;& TRY AGAIN +INITMP: SETZ P2, ;CLEAR P2 + MOVE P1,[POINT 6,P2] ;RESTORE BYTE POINTER + +LOOP: PUSHJ P,INCH ;GET CHARACTER FROM WHEREVER + JUMPE I,XIT ;NULL--END OF THE LINE. +LOOP1: CAIN I,40 ;SPACE? + JRST LOOP ;YES, IGNORE + CAIN I,":" + JRST LOADEV ;IF COLON-LOAD THE DEVICE + CAIE I,"=" + CAIN I,"_" + JRST BACK ;IF _ OR = STORE REL OR LIST FILE NAME + CAIN I,"," + JRST LODRL1 ;IF , STORE REL FILE NAME + CAIN I,"!" + JRST RUNAME ;IF ! RUN THE PROGRAM + CAIN I,"." + JRST LODFIL ;IF . LOAD THE FILE NAME + CAIN I,"[" + JRST LODPPN ;IF [ STORE EXT & PROCESS PPN + CAIE I,")" + CAIN I,"]" + JRST LOOP ;IGNORE ] + CAIGE I,40 + JRST DONE ;IF BREAK, WE'RE DONE + CAIE I,"(" + CAIN I,"/" + JRST SWITCH ;IF A SWITCH, SAVE IT + SUBI I,40 ;CONVERT TO SIXBIT + TLNE P1,770000 ;> 6 CHAR? + IDPB I,P1 ;NO STUFF + JRST LOOP ;LOOP + +LOADEV: SKIPE DEVICE ;IF DEVICE ALREADY FULL + JRST TWODEV ;HOLLER + MOVEM P2,DEVICE ;STORE DEVICE + JRST INITMP ;INIT TEMP & LOOP + +LODFIL: SKIPE FILNAM ;FILE NAME ALREADY THERE? + JRST TWOFIL ;YES + MOVEM P2,FILNAM ;STORE FILE NAME + JRST INITMP ;& LOOP + +SWITCH: PUSHJ P,INCH ;GET THE SWITCH + CAILE I,140 ;LC? + SUBI I,40 ;FORCE UPPER CASE SWITCH + CAIN I,"C" ;CREF? + JRST [SETOM CREFSW ;YES + TRO F,FR.LST ;CREF IMPLIES LIST + JRST LOOP] + CAIN I,"S" ;SYMBOLS? + SETOM SYMBSW ;YES + JRST LOOP + +BACK: TRNN F,FR.LST ;IF LISTING, + JRST LODRL1+1 ;LOAD REL FILE + SKIPN T1,FILNAM ;SKIP & LOAD IF FILE NAME THERE + MOVE T1,P2 ;ELSE LOAD TEMP + MOVEM T1,LSTNAM ;LOAD LIST FILE NAME + SETZM FILNAM ;CLEAR OLD FILE NAME + CAME P2,LSTNAM ;DID WE LOAD TEMP ALREADY? + MOVEM P2,LSTEXT ;NO-TEMP CONTAINS LST EXT. + MOVE T1,DEVICE ;LOAD THE DEVICE + MOVEM T1,LSTDEV ;TRANSFER + SETZM DEVICE ;AND CLEAR DEVICE + JRST INITMP ;LOOP + +LODRL1: TRO F,FR.LST ;COMMA INPLIES LIST FILE + SKIPN T1,FILNAM ;SKIP & LOAD IF FILE NAME THERE + MOVE T1,P2 ;ELSE LOAD TEMP + MOVEM T1,RELNAM ;LOAD RELFILE NAME + SETZM FILNAM ;CLEAR FILE NAME + CAME P2,RELNAM ;DID WE LOAD TEMP? + MOVEM P2,RELEXT ;NO-LOAD RELFILE EXT. + SKIPN T1,DEVICE + MOVE T1,[SIXBIT/DSK/] + MOVEM T1,OBJDEV + SETZM DEVICE + JRST INITMP ;LOOP + +LODPPN: SETZ T1, + SKIPE PPN + JRST TWOPPN + PUSHJ P,GETOCT + CAIE I,"," + JRST ILLDEL + HRLZM T1,PPN + SETZ T1, + PUSHJ P,GETOCT + HRRM T1,PPN + JRST LOOP1 + +DONE: PUSHJ P,INCH + CAIN I,CR + PUSHJ P,INCH + SKIPN T1,DEVICE ;IF DEVICE IS OMITTED... + HRLZI T1,'DSK' ;... "DSK" IS ASSUMED + MOVEM T1,DEVICE ;STORE THE DEVICE + SKIPE FILNAM ;IF THERE IS A FILE NAME + JRST TSTEXT ;SEE IF THERE IS AN EXTENSION + SKIPN T1,P2 ;IS THERE SOMETHING IN TEMP? + JRST START ;NO - BAD SYNTAX + MOVEM T1,FILNAM ;MOVE WHATEVER + JRST DO.IO ;AND START DOING THE I/O +TSTEXT: SKIPN FILEXT ;ALREADY FILE EXTENSION? + HLLZM P2,FILEXT ;NO--STORE TEMP +DO.IO: MOVEI T1,0 ;ASCII + SETZ T4, + MOVE T2,DEVICE ;INPUT DEVICE + HRRZI T3,IBUF + OPEN SRC,T1 + JRST NODEV + MOVEI T1,0 ;ASCII + SETZ T4, + MOVE T2,DEVICE ;INPUT DEVICE + HRRZI T3,MBUF + OPEN LIB,T1 + JRST NODEV +RELOOK: MOVE T1,FILNAM + MOVE T2,FILEXT + SETZ T3, + MOVE T4,PPN + LOOKUP SRC,T1 + JRST NOFILE + TRNN F,FR.LST ;NEED A LIST FILE? + JRST NOLST ;NO + SETZ T1, + SKIPN T2,LSTDEV + MOVSI T2,'DSK' + HRLZI T3,LBUF + OPEN LST,T1 + JRST NODEV + SKIPN T1,LSTNAM + MOVE T1,FILNAM + SKIPN T2,LSTEXT + MOVSI T2,'LST' + SETZB T3,T4 + ENTER LST,T1 ;MAKE THE LISTFILE + JRST ENTERR +NOLST: SKIPN SYMBSW ;IF NO SYMBOL FILE + JRST NOSYM ;SKIP THIS + SETZ T1, + SKIPN T2,SYMDEV + MOVSI T2,'DSK' + HRLZI T3,SBUF + OPEN SYM,T1 + JRST NODEV + SKIPN T1,SYMNAM + MOVE T1,FILNAM + SKIPN T2,SYMEXT + MOVSI T2,'SYM' + SETZB T3,T4 + ENTER SYM,T1 ;MAKE THE SYMBOL FILE + JRST ENTERR +NOSYM: TLNN F,FL.CCL + JRST MAC80A## + OUTSTR [ASCIZ/MAC80: /] + MOVE T1,FILNAM ;GET THE FILENAME + PUSHJ P,TYPE ;TYPE IT + OUTSTR [ASCIZ/ +/] + SETZ P2, + MOVEM P3,TMPPTR ;SAVE TMPCOR BUFFER POINTER + JRST MAC80A + +GETOCT: PUSHJ P,INCH + CAIN I,40 + JRST GETOCT + CAIG I,"7" + CAIGE I,"0" + POPJ P, + IMULI T1,10 + ADDI T1,-60(I) + JRST GETOCT +OPNOBJ::PUSH P,T2 + PUSH P,T3 + PUSH P,T4 + SETZ T4, + SKIPN T2,OBJDEV ;DEVICE + MOVSI T2,'DSK' + MOVSI T3,OBUF + OPEN OBJ,T1 + JRST NODEV + SKIPN T1,RELNAM + MOVE T1,FILNAM + SKIPN T2,RELEXT + MOVSI T2,'HEX' + SETZB T3,T4 + ENTER OBJ,T1 + JRST ENTERR + POP P,T4 + POP P,T3 + POP P,T2 + POPJ P, + +RUNAME: PUSHJ P,INCH + CAIN I,15 + PUSHJ P,INCH + MOVEI T1,T2 + HRLI T1,1 + SKIPN T2,DEVICE + MOVSI T2,'SYS' + MOVE T3,P2 + SETZB T4,T4+1 + SETZB T4+2,T4+3 + RUN T1, + HALT + +INCH: TLNN F,FL.CCL ;CCL INPUT? + JRST .+3 ;NO, SKIP + ILDB I,P3 ;GET TMPCOR CHAR + JRST .+2 ;JUST IN CASE... + INCHWL I ;GET TTY CHAR. + CAIL I,140 ;IF LOWER CASE, + SUBI I,40 ;CONVERT TO UPPER CASE + POPJ P, ;RETURN + +TYPE: MOVE T2,[POINT 6,T1] + TLNN T2,770000 + POPJ P, + ILDB T3,T2 + JUMPE T3,.-2 + ADDI T3,40 + OUTCHR T3 + JRST TYPE+1 + +NODEV: MOVE T1,T2 + OUTSTR [ASCIZ/Cannot OPEN device /] + PUSHJ P,TYPE + OUTSTR [BYTE (7) 15,12,0,0,0] + JRST START + +ENTERR: OUTSTR [ASCIZ/ENTER error for file /] + PUSH P,T2 + PUSHJ P,TYPE + POP P,T2 + HLRZ T1,T2 + JUMPE T1,.+3 + OUTCHR ["."] + PUSHJ P,TYPE + OUTSTR [BYTE (7) 15,12,0] + JRST START + +NOFILE::SKIPE FILEXT + JRST .+4 + MOVSI T1,'M80' + MOVEM T1,FILEXT + JRST RELOOK + MOVE T1,FILNAM + OUTSTR [ASCIZ/No such file /] + PUSHJ P,TYPE + MOVE T1,FILEXT + JUMPE T1,.+3 + OUTCHR ["."] + PUSHJ P,TYPE + OUTSTR [BYTE (7) 15,12,0,0,0] + JRST START +TWODEV: OUTSTR [ASCIZ/Two devices +/] + JRST CSTART + +TWOFIL: OUTSTR [ASCIZ/Two file names +/] + JRST CSTART + +TWOPPN: OUTSTR [ASCIZ/Two PPNs +/] + JRST CSTART + +ILLDEL: OUTSTR [ASCIZ/Illegal delimiter in PPN +/] + +CSTART: TLNN F,FL.CCL ;CCL INPUT? + CLRBFI ;SHOULDN'T BE + JRST START ;RESTART SCAN + +CORERR: OUTSTR [ASCIZ/?Cannot shrink core +/] + JRST CSTART + +ASTER: ASCIZ / +*/ + +XIT: EXIT 1, ;EXIT GRACEFULLY + EXIT ;NO SO GRACEFULLY +CCLIN: SKIPE P3,TMPPTR ;WAS THERE A TMPCOR BUFFER POINTER? + JRST INITMP ;YES--LOADED & GONE + MOVE T1,[2,,TMPBLK] ;NO, GET TMPCOR FILE (1 IS READ) + TMPCOR T1, + PUSHJ P,NOTEMP + MOVE P3,[POINT 7,TBUF] + JRST INITMP + +NOTEMP: MOVEI T1,17 ;NO TMPCOR--TRY DISK + MOVSI T2,'DSK' + SETZB T3,T4 + OPEN TMPC,T1 ;OPEN DISK + JRST NODEV + PJOB T1, ;GET JOB NUMBER + SETZ T3, + IDIVI T1,12 ;AND CONVERT + TRO T2,20 ;TO TMPDISK FILE NAME + LSHC T2,-6 ;BY THE TRIED & TRUE METHOD + TLNN T3,77 + JRST .-4 + MOVE T1,T3 + HRRI T1,'MAC' + MOVSI T2,'TMP' ;NNNMAC.TMP + SETZB T3,T4 + LOOKUP TMPC,T1 ;LOOKUP + JRST MAC80 ;NO CCL FILE, ASSUME TTY INPUT + INPUT TMPC,TMPBLK+1 ;PUT INTO TMPCOR BUFFER + SETZ T1, + RENAME TMPC,T1 ;DELETE TMPDSK FILE + OUTSTR NOREN ;FAILURE + RELEAS TMPC, + POPJ P, ;BACK + + +NOREN: ASCIZ/Cannot delete temp disk file +/ + +PDP: IOWD 100,PDL + +TMPBLK: SIXBIT /MAC/ + IOWD 30,TBUF + 0 + + XLIST + LIT + LIST + RELOC 0 + +TBUF: BLOCK 30 ;DONT CLEAR TMPCOR BUFFER +TMPPTR: BLOCK 1 ;HOLDS TMPCOR BYTE POINTER +SVJBFF: BLOCK 1 ;SAVE .JBFF + ;CLEAR REST OF TABLE SPACE +LOOKIT: +FILNAM::BLOCK 1 +FILEXT::BLOCK 1 + BLOCK 1 +PPN:: BLOCK 1 +OBJDEV::BLOCK 1 +RELNAM: BLOCK 1 +RELEXT: BLOCK 1 +LSTNAM: BLOCK 1 +LSTEXT: BLOCK 1 +SYMNAM: BLOCK 1 +SYMEXT: BLOCK 1 +DEVICE: BLOCK 1 +LSTDEV: BLOCK 1 +SYMDEV: BLOCK 1 +PDL: BLOCK 40 ;PDL STORAGE +IBUF:: BLOCK 3 +OBUF:: BLOCK 3 ;BUFFER HEADERS +LBUF:: BLOCK 3 ;LISTING FILE +SBUF:: BLOCK 3 ;SYMBOL FILE +MBUF:: BLOCK 3 ;MACLIB +CREFSW::BLOCK 1 ;NON-ZERO IF CROSS REFERENCE LISTING REQUESTED +SYMBSW::BLOCK 1 ;NON-ZERO IF SYMBOL TABLE DUMP REQUESTED +ENDLOW: BLOCK 1 ;TOP OF STORAGE + + END MAC80 + diff --git a/mac80a.mac b/mac80a.mac new file mode 100644 index 0000000..da2e1f0 --- /dev/null +++ b/mac80a.mac @@ -0,0 +1,2731 @@ +;MAC80 - An 8085 cross assembler for the DECsystem-10 + +; Copyright 1976,1977,1978,1983 +; Bruce Tanner / Cerritos College +; 11110 Alondra Blvd. +; Norwalk, CA 90650 + + SEARCH M80UNV,MACTEN + + TITLE. (M80,MAC80A,8085 Cross Assembler) + M80TTL + M80PTX + + TWOSEG + RELOC 400000 + + EXTERN IBUF,OBUF,LBUF,SBUF,MBUF,NOFILE,FILNAM,FILEXT,PPN,OPNOBJ + EXTERN CREFSW,SYMBSW + +MAC80A::MOVE T1,[PUSHJ P,UUO] + MOVEM T1,.JB41## + MOVE T1,[IOWD 20,MACSTK] + MOVEM T1,MACPDL + MOVE T1,[IOWD 20,ARGSTK] + MOVEM T1,ARGPDL + MOVEI T1,-1 + MOVEM T1,INVECT + MOVE T1,[POINT 7,MACARG] + MOVEM T1,ARGPTR + MOVEI T1,1 + MOVEM T1,PAGENO + SETZM LOCSYM + MOVEI T1,PAGEMX + MOVEM T1,PAGESZ + SETOM STARTA + SETZB E,LBTP + SETZ BC, + SETZM ORGXR + TDO F,[FL.LNR,,FR.PS1!FR.HEX] +RESTAR: TRNE F,FR.PS1 ;PASS1? + JRST PASS1 ;YES + OUTSTR [ASCIZ/Pass 2 +/] + SETZM PC + SETZM LINENO + SETZM LOCSYM + MOVEI T1,PAGEMX + MOVEM T1,PAGESZ + PUSHJ P,GTDATE + PUSHJ P,DOHEAD ;OUTPUT THE HEADINGS +; JRST MAIN. ;JUMP TO THE MAIN LINE +MAIN.: TRZ F,FR.LOP ;CLEAR LIST OP FLAG + TRZE F,FR.END ;IF END + JRST ENDIT ;FINI + PUSHJ P,INCH ;SNEAK A LOOK FOR FF + TRNN F,FR.LIB ;IF NOT IN MACLIB + PUSHJ P,DOLINO ;PRINT LINE # + PUSHJ P,TOKEN1 ;GET TOKEN WITH 1ST CHAR IN I + JRST MAIN1 + +DUNTAG: TRZE F,FR.END ;DONE? + JRST ENDIT ;YES + PUSHJ P,TOKEN ;GET A TOKEN +MAIN1: PUSHJ P,IFPOP ;AN "IF" TYPE PSEUDO OP? + JRST NOTEST ;YES + TRNE F,FR.OFF ;ASSEMBLING? + JRST FLUSHX ;NO +NOTEST: JUMPN TOK,.+4 ;SKIP IF SOMETHING + CAIE I,CR ;EOL? + CAIN I,SEMICO ;COMMENT? + JRST FLUSHX ;YES + CAIN I,COLON ;TAG? + JRST DOTAG ;YES + PUSHJ P,SRCHOP ;SEARCH OPCODE + JRST [PUSHJ P,SETMAC + JRST MAIN.] + MOVE OP,OPCTAB(X) ;STORE THE OPCODE + MOVE P1,TYPLSH(X) ;GET TYPE,,SHIFT + TLNE P1,T.POP ;PSEUDO OP? + JRST [PUSHJ P,PSEUDO ;YUP + JRST MAIN.] + TLNE P1,T.1BYT ;JUST OPCODE? + JRST ONEOP ;1 BYTE INSTRUCTION + TLNE P1,T.NREG ;USES REGISTER? + JRST BYTE3 ;NO REGISTER +DOREG: PUSHJ P,TOKEN ;GET THE NEXT TOKEN + PUSHJ P,EVAL ;EVALUATE THE TOKEN + CAIL T1,10 ;LEGAL REGISTER? + WARN W.REG ;NO. + ANDI T1,7 ;MAKE LEGAL + TRNE P1,4 ;REGISTER PAIR? + LSH T1,-1 ;YES, MAKE 2 BITS WIDE + LSH T1,(P1) ;SHIFT ACCORDING TO LSH(X) + OR OP,T1 ;MERGE + TLZE P1,T.MOV ;A MOVE? + JRST [TRZ P1,-1 ;YES - CLEAR LSH + JRST DOREG] ;AND MERGE OTHER REG + TLNE P1,T.2BYT!T.3BYT ;2 OR 3 BYTE INSTR? + JRST BYTE3 ;GO ON AND DO DATA BYTES +ONEOP: PUSHJ P,OUTOP ;OUTPUT THE ONE BYTE + PUSHJ P,SPACE4 + PUSHJ P,SPACE4 +FLUSHX: PUSHJ P,FLUSH ;FLUSH THE REST OF THE LINE + JRST MAIN. +BYTE3: PUSHJ P,LSTPC ;OUTPUT THE OPCODE + MOVE T1,OP + PUSHJ P,LSTOP + PUSHJ P,TOKEN ;GET THE DATA BYTE(S) + JUMPN TOK,NOTMT ;NOT EMPTY + CAIE I,15 ;BREAK ON EOL? + CAIN I,SEMICO + WARN W.MT ;DEFENSIVE CODE +NOTMT: PUSHJ P,DODATA ;COMP. EFFECTIVE ADDR + MOVE T1,OP + PUSHJ P,LSTOP ;OUTPUT THE LOWER 8 BITS + LSH OP,-10 ;SHIFT DOWN + TLNE P1,T.2BYT ;JUST 1 DATA BYTE? + JRST NOP1 + MOVE T1,OP + PUSHJ P,LSTOP ;OUTPUT UPPER 8 BITS +NOP1: +IFN FTREL,< + SETZ T1, ;CLEAR FOR TEST + TRZE F,FR.REL ;RELOCATABLE? + MOVEI T1,"'" ;FLAG AS + TRZE F,FR.EXT ;EXTERNAL? + MOVEI T1,"*" ;INDICATOR + SKIPE T1 ;ANYTHING THERE? + PUSHJ P,LOUCH ;YES, PRINT IT +> ;END IFN FTREL + TLNE P1,T.2BYT ;NEED SPACES? + PUSHJ P,SPACE4 ;YES + JRST FLUSHX ;LOOP + +SPACE4: TRNE F,FR.HEX + POPJ P, + MOVEI T1,SPACE + REPEAT 4,< + PUSHJ P,LOUCH> + POPJ P, +;EVAL TOKEN IN TOK (AND REST OF EXPR IF ANY) RETURN VALUE IN OP + +DODATA: TRZ F,FR.UND ;CLEAR STATUS + SETZM EXPLVL ;INIT EXPR LEVEL + MOVE T4,[IOWD 20,OPSTK] + PUSH T4,[DOLLAR] ;FLAG TOP OF STACK + SETZ T2, ;CLEAR FLAG + PUSH P,T2 + JRST DODT12 ;JUMP IN + +DODAT1: CAIE I,COMMA + CAIN I,SEMICO ;KNOWN TERMINATORS? + JRST DODAT4 ;YES + CAIE I,")" ;END OF EXPR + CAIN I,CR ;OR EOL? + JRST DODAT4 ;YES + CAIE I,"<" ;SPECIAL CASE TEST FOR <=,>=,<> + CAIN I,">" + PUSHJ P,OP2CH ;CHECK FOR 2 CHAR OPCODE + PUSH T4,I ;SAVE ON OP STACK + CAIE I,SPACE + CAIN I,TAB ;IF SPACE OR TAB + CAIA ;KEEP LOOKING FOR OP + JRST DODT10 ;HAVE OP ON STACK, GET 2ND ARG + POP T4,(T4) ;OP IS JUST SPACE OR TAB + PUSHJ P,TOKEN ;GET OP TOKEN + JUMPE TOK,DODAT1 ;OP IS BREAK, DODAT1 WILL DO IT + PUSH T4,TOK ;SAVE OP AS 6BIT TOKEN + ;AT THIS POINT I MAY CONTAIN UNARY OP. + CAIE I,SPACE + CAIN I,TAB ;BETTER CONTAIN SPACE + JRST DODT10 + CAIN I,MINUS ;UNARY MINUS? + JRST [PUSH P,T2 + JRST DODT21] ;YES + CAIE I,"(" ;THIS IS THE ONLY NON BLANK THING ALLOWED + ERROR F.ILEX +DODT10: PUSH P,T2 + CAIE I,"(" ;DON'T LET TOKEN BUST INTO EXPR + PUSHJ P,TOKEN ;GET NEXT TOKEN +DODT12: SKIPE TOK ;IF NO TOKEN + JRST DODT20 + CAIN I,MINUS ;THEN THIS IS A UNARY MINUS +DODT21: MOVEI I,"@" ;SPECIAL SYMBOL FOR UNARY MINUS +DODT20: CAME TOK,[SIXBIT/NOT/] ;THE OTHER UNARY OPERATOR? + CAMN TOK,[SIXBIT/HIGH/] + JRST DODT23 ;YES + CAME TOK,[SIXBIT/LOW/] + CAMN TOK,[SIXBIT/LO/] + JRST DODT23 + CAME TOK,[SIXBIT/NUL/] + CAMN TOK,[SIXBIT/NULL/] + JRST DODT23 + JRST DODT22 ;NO, SKIP + +DODT23: POP P,T2 ;RESTORE T2 + PUSH T4,TOK ;SAVE OP + SETZB T1,TOK ;CLEAR TOK IN CASE NOT(EXPR) + SETZ TOK+1, + PUSH P,T1 ;SAVE DUMMY ARG (DUMMY NOT FOO) + JRST DODT10 ;NOW GET A TOKEN +DODT22: PUSHJ P,EVALD ;EVAL TOKEN (OR EXPR) + POP P,T2 +DODT13: PUSH P,I ;SAVE I + MOVE I,(T4) ;GET LAST OP + CAIN I,DOLLAR ;NO LAST OP? + JRST DODT14 ;SKIP + PUSHJ P,DINDEX ;GET INDEX IN T3 + MOVE OP,PRIOR(T3) ;GET PRIORITY OF LAST OP IN T3 (1 IS HIGEST) + MOVE I,-1(T4) ;GET OP PREVIOUS TO LAST OP + CAIN I,DOLLAR ;NOT THERE? + JRST DODT14 ;SKIP + PUSHJ P,DINDEX ;GET INDEX OF THIS ONE + CAML OP,PRIOR(T3) ;CAN WE EVAL YET? + JRST DODT15 ;YES +;NOTE: THIS IMPLIES LEFT-TO-RIGHT SCAN OF EQUAL PRI. UNARY OPS MAY NOT BE PUT TOGETHER. +DODT14: POP P,I ;DONE WITH I + PUSH P,T1 ;SAVE VALUE ON STACK + TRNN F,FR.REL!FR.EXT ;ABS? + TRO T2,1 ;FLAG ABS + TRNE F,FR.REL ;RELOC? + TRC T2,2 ;ABS & REL = REL; REL & REL = ABS + TRNE F,FR.EXT ;EXTERNAL? + ADDI T2,10 + JRST DODAT1 ;KEEP GOING + +DODT15: POP P,I ;DONE WITH I (DODT13) + MOVEM T1,SAVREG ;SAVE T1 + POP T4,SAVREG+1 ;& LAST OPERATOR + POP P,T1 + POP P,OP + MOVEM I,SAVREG+2 + POP T4,I ;GET CURRENT OP + PUSHJ P,DINDEX + XCT EXPXCT(T3) ;DOIT TOIT + PUSH P,OP ;SAVE NEW VALUE BACK ON STACK + MOVE I,SAVREG+2 ;RESTORE I + PUSH T4,SAVREG+1 ;PUT BACK LAST OP + MOVE T1,SAVREG ;RESTORE LAST ARG + JRST DODT13 ;SEE IF WE CAN COMPRESS MORE +DODAT4: CAIE I,")" ;IF EOE + JRST .+4 + SOSGE EXPLVL ;IF WE WERE AT TOP LEVEL.. + ERROR F.PARN + JRST .+3 + SKIPE EXPLVL ;THE REST BETTER BE AT TOP LEVEL + ERROR F.PARN + POP P,OP ;GET VALUE + MOVEM I,SAVREG+3 ;SAVE I +DODAT5: POP T4,I ;GET OP + CAIN I,DOLLAR ;ALL DONE? + JRST DODATX ;YES + MOVE T1,OP + POP P,OP ;GET 2ND ARG + PUSHJ P,DINDEX ;GET INDEX IN T3 + XCT EXPXCT(T3) ;DO IT + JRST DODAT5 ;LOOP + +DODATX: MOVE I,SAVREG+3 ;RESTORE I + ANDI OP,177777 ;JUST 16 BITS + MOVE T1,OP ;GET NUMBER + CAIN T2,10 ;ONE EXTERN? + JRST DODAT3 ;YES + CAILE T2,3 ;1 (ABS) OR 2 OR 3 (REL) ? + ERROR F.EXT ;NO POLISH FIXUPS IN THIS ASSEMBLER +DODAT3: TRZ F,FR.REL!FR.EXT ;CLEAR STATUS OF LAST TOKEN +IFN FTREL,< + TRNE T2,2 ;IF REL + TRO F,FR.REL ;FLAG + CAIN T2,10 ;IF EXTERN + TRO F,FR.EXT ;FLAG + TRNN F,FR.PS1 ;IF PASS1 + SKIPN T2 ;OR NON-RELOCATABLE + POPJ P, ;RETURN + TRNE F,FR.HEX ;IF OCTAL FORMAT + TRNE F,FR.EXT ;OR EXTERN + POPJ P, ;EXIT + CAIE T2,1 ;IF FLAGED AS ABS, + TRNE F,FR.ORG ;OR NOT RELOCATING + POPJ P, + EXCH T1,RELPTR + MOVE T2,PC + MOVEM T2,RELTAB(T1) ;SAVE PC FOR NEXT LINK + AOJ T1, ;BUMP POINTER + EXCH T1,RELPTR +> ;END IFN FTREL + POPJ P, ;RETURN + +OP2CH: PUSH P,T1 + PUSH P,T2 + MOVE T1,I ;SAVE I + MOVE T2,I + SUBI T2,40 ;SIXBIT + LSH T2,^D30 ;SHIFT TO 1ST BYTE + PUSHJ P,SNEAK ;LOOK AT THE NEXT CHARACTER + SKIPE TOK ;NON-BREAK? + JRST OLDI ;YES, NOT A 2 CHAR OPCODE + MOVE I,SNEAKI ;GET THE BREAK CHAR + SUBI I,40 ;SIXBIT + DPB I,[POINT 6,T2,11] + CAIE I,'>' + CAIN I,'=' ;GOOD 2ND CHAR? + PUSHJ P,INCH ;YES, USE IT +NEWI: SKIPA I,T2 +OLDI: MOVE I,T1 ;RESTORE I + POP P,T2 + POP P,T1 + POPJ P, + + DEFINE OPRMAC,< +E "+",<ADD OP,T1>,4 +E "-",<SUB OP,T1>,4 +E "@",<MOVN OP,T1>,2 +E "*",<IMUL OP,T1>,3 +E "/",<PUSHJ P,EXDIV>,3 +E "\",<PUSHJ P,EXMOD>,3 +E "&",<AND OP,T1>,6 +E "!",<OR OP,T1>,5 +E "_",<LSH OP,(T1)>,6 +E "#",<SETCM OP,T1>,2 +E 'AND ',<AND OP,T1>,6 +E 'OR ',<OR OP,T1>,7 +E 'MOD ',<PUSHJ P,EXMOD>,1 +E 'XOR ',<XOR OP,T1>,7 +E 'SHR ',<PUSHJ P,EXSHR>,3 +E 'SHL ',<LSH OP,(T1)>,3 +E 'NOT ',<SETCM OP,T1>,2 +E 'HIGH ',<LDB OP,[POINT 8,T1,27]>,10 +E 'LOW ',<LDB OP,[POINT 8,T1,35]>,10 +E 'LO ',<LDB OP,[POINT 8,T1,35]>,10 +E 'EQ ',<PUSHJ P,RELEQ>,5 +E "=",<PUSHJ P,RELEQ>,5 +E 'NE ',<PUSHJ P,RELNE>,5 +E '<> ',<PUSHJ P,RELNE>,5 +E 'LT ',<PUSHJ P,RELLT>,5 +E "<",<PUSHJ P,RELLT>,5 +E 'GT ',<PUSHJ P,RELGT>,5 +E ">",<PUSHJ P,RELGT>,5 +E 'GE ',<PUSHJ P,RELGE>,5 +E <BYTE (6) 36,35>,<PUSHJ P,RELGE>,5 +E 'LE ',<PUSHJ P,RELLE>,5 +E <BYTE (6) 34,35>,<PUSHJ P,RELLE>,5 +E 'NUL ',<PUSHJ P,DONULL>,1 +E 'NULL ',<PUSHJ P,DONULL>,1 +> + + DEFINE E(CHAR,INSTR,PRI),< + CHAR> + +OPRTAB: XLIST + OPRMAC + LIST +OPRTBL==.-OPRTAB + DEFINE E(CHAR,INSTR,PRI),< + INSTR> + +EXPXCT: XLIST + OPRMAC + LIST + ERROR F.ILEX ;EXECUTED IF OP IS NOT IN OPRMAC + + DEFINE E(CHAR,INSTR,PRI),< + EXP PRI> + +PRIOR: XLIST + OPRMAC + LIST +EXDIV: PUSH P,OP+1 + IDIV OP,T1 + POP P,OP+1 + POPJ P, + +EXMOD: PUSH P,OP+1 + IDIV OP,T1 + MOVE OP,OP+1 + POP P,OP+1 + POPJ P, + +EXSHR: MOVNS T1 + LSH OP,(T1) + POPJ P, + +RELEQ: CAME OP,T1 +FALSE: TDZA OP,OP ;0 = FALSE +TRUE: SETO OP, ;-1 = TRUE + POPJ P, + +RELNE: CAMN OP,T1 + JRST FALSE + JRST TRUE + +RELLT: CAML OP,T1 + JRST FALSE + JRST TRUE + +RELLE: CAMLE OP,T1 + JRST FALSE + JRST TRUE + +RELGT: CAMG OP,T1 + JRST FALSE + JRST TRUE + +RELGE: CAMGE OP,T1 + JRST FALSE + JRST TRUE + +;NULL = LOCAL SYMBOL GENERATED FOR MISSING ARG, WHICH IS UNDEFINED + +DONULL: TLNN T1,S.UNDF ;IS THIS SYMBOL UNDEFINED? + JRST FALSE ;NO + SETZ E, ;YES, IT'S NULL; IGNORE THE 'UNDEFINED' ERROR + JRST TRUE + +EVALD: CAIE I,"(" ;A WHOLE EXPR? + JRST EVAL ;NO, JUST EVAL + AOS EXPLVL ;FLAG WHICH LEVEL WE'RE IN + SETZ I, ;GET RID IF PAREN FOR TEST @ DODT10+1 + PUSH T4,[DOLLAR] ;DON'T PLOW THROUGH UPPER LEVEL STUFF + PUSHJ P,DODT10 ;MUNCH ON (EXPR) + CAIE I,CR + CAIN I,SEMICO ;IF ERROR ON EOL, DODAT4 ALREADY HOLLERED + POPJ P, ;RETAIN THIS BREAK FOR ANY OTHER LEVELS + CAIE I,")" ;SHOULD END ON ) + ERROR F.ILEX + JRST INCH ;GET THE BREAK CHAR + +DINDEX: MOVSI T3,-OPRTBL + CAME I,OPRTAB(T3) + AOBJN T3,.-1 + SKIPL T3 + ERROR F.ILEX ;NOT IN TABLE + POPJ P, +TOKEN: CAIE I,CR + PUSHJ P,INCH +TOKEN1: CAIE I,SPACE ;FLUSH LEADING SPACES & TABS + CAIN I,TAB + JRST TOKEN + SETZB TOK,TOK+1 + MOVE T1,[POINT 6,TOK] + CAIN I,DOLLAR ;SPECIAL TEST FOR $ + POPJ P, ;LEADING DOLLAR SIGN IS ASSEMBLER PC + CAIA +TOKENL: PUSHJ P,INCH + PUSHJ P,BREAK ;BREAK CHARACTER? + POPJ P, + ;REMOVE THE NEXT 2 LINES FOR $ TO BE A SIGNIFICANT LABEL CHARACTER + CAIN I,DOLLAR ;IS IT A DOLLAR? + JRST TOKENL ;YES, THEY ARE NOISE CHARACTERS + CAIL I,"A"+40 ;IF LOWER CASE + SUBI I,40 ;MAKE UPPER CASE + SUBI I,40 ;CONVERT TO SIXBIT + CAMN T1,[600,,TOK+1] ;TOK,TOK+1 FULL? + JRST TOKENW ;YES, THROW OUT READ OF TOKEN + IDPB I,T1 ;PUT IN TOK + JRST TOKENL + +TOKENW: PUSHJ P,INCH ;WASTE REST OF TOKEN + PUSHJ P,BREAK + CAIA + JRST TOKENW + TRNN F,FR.SNK ;DON'T GET UPSET ABOUT OVERFLOW OF '...' + WARN W.TOK + POPJ P, + +BREAK: CAIG I,"Z" + CAIGE I,"A" ;A-Z? + CAIA + JRST SCPOPJ + CAIG I,"9" + CAIGE I,"0" ;0-9? + CAIA + JRST SCPOPJ ;YES + CAIG I,"Z"+40 ;LC? + CAIGE I,"A"+40 + CAIA + JRST SCPOPJ + CAIE I,"@" ;@ + CAIN I,"?" ;AND ? ARE LEGAL + JRST SCPOPJ + CAIN I,DOLLAR ;$ IS NOW A LEGAL SYMBOL CHARACTER + JRST SCPOPJ + POPJ P, + +FLUSHL: CAIN I,LF ;IF ALREADY FLUSHED.. + JRST LCRLF ;NEW LINE +FLUSH: CAIN I,LF + POPJ P, + PUSHJ P,INCH ;GET NEXT CHARACTER + JRST FLUSH ;LOOP +;BINARY SEARCH OPNTAB +SRCHOP: SETO T1, ;RANGE START + MOVEI T2,OPTABL ;RANGE END +SRCH1: MOVE T3,T2 ;GET END + SUB T3,T1 ;GET LENGTH OF RANGE + IDIVI T3,2 ;GET 1/2 RANGE + JUMPE T3,SRCH10 ;NOT THERE + ADD T3,T1 ;GET OFFSET INTO RANGE + MOVE X,T3 ;GET IN X + CAMN TOK,OPNTAB(X) ;MATCH? (ALL TOKENS IN OPNTAB ARE LE 6 CHAR) + JRST SCPOPJ ;YES, SKIP RET + CAML TOK,OPNTAB(X) + MOVE T1,T3 ;SET NEW RANGE + CAMG TOK,OPNTAB(X) + MOVE T2,T3 + JRST SRCH1 ;NO, LOOP + +SRCH10: MOVEI X,OPTABL ;POINT TO NULL ENTRY + TRZE F,FR.EVL ;FROM EVAL? + POPJ P, ;YES, QUIT NOW. + DMOVE T2,TOK ;SAVE TOKEN + PUSHJ P,SNEAK ;SEE IF MACRO DEFINITION + CAMN TOK,[SIXBIT/MACRO/] ;IS IT? + JRST SRCHOK + CAME TOK,[SIXBIT/EQU/] + CAMN TOK,[SIXBIT/SET/] + JRST SRCHOK + JRST TSTMAC ;NO, SEE IF IT IS A MACRO ITSELF + +SRCHOK: PUSHJ P,TOKEN ;GET NEXT TOKEN + CAME TOK,[SIXBIT/EQU/] ;NOTE: EQU & SET ARE IDENTICAL + CAMN TOK,[SIXBIT/SET/] ;GOOD GUYS? + JRST EQUAL ;YES + CAMN TOK,[SIXBIT/MACRO/] + JRST DOMAC +TSTMAC: DMOVE TOK,T2 ;PUT BACK TOKEN + PUSHJ P,SRCSYM ;CHECK FOR MACRO + JRST SRCERR ;NO MACRO + TLNE T1,S.MAC ;MACRO? + POPJ P, ;YES, SET UP MACRO +SRCERR: ERROR F.ILOP ;NO. UNKNOWN OPCODE + PUSHJ P,FLUSH ;WASTE REST + JRST SCPOPJ +PSEUDO: MOVSI X,-PTABL ;TABLE LENGTH + CAME TOK,PTAB(X) ;MATCH? + AOBJN X,.-1 ;LOOP + JRST @PDISP(X) ;DISPATCH + + DEFINE PMAC,< + PX ORG + PX DS + PX DB,DC + PX DZ,DC + PX DW,DC + PX OPT,OPTION + PX PHASE + PX IFE,DOIFE + PX IFN,DOIFN + PX IF,DOIFN + PX ELSE + PX ENDIF + PX PRINTX + PX TITLE,DOTITL + PX SUBTTL,DOSUBT + PX PAGE,DOPAGE + PX MACLIB + PX REPT + PX EXITM +IFN FTREL,< + PX INT,DOINT + PX EXT,DOEXT +> + PX END,DOEND +> + + DEFINE PX(NAME,ADDR),< + SIXBIT/NAME/> + +PTAB: XLIST + PMAC + LIST + PTABL==.-PTAB + + DEFINE PX(NAME,ADDR),< + IFB <ADDR>,<JRST NAME> + IFNB <ADDR>,<JRST ADDR>> + +PDISP: XLIST + PMAC + JRST CPOPJ ;IN CASE UNDEF OPCODE + LIST + +IFPOP: CAME TOK,[SIXBIT/IFE/] + CAMN TOK,[SIXBIT/IFN/] + POPJ P, + CAME TOK,[SIXBIT/ENDIF/] + CAMN TOK,[SIXBIT/END/] + POPJ P, + CAME TOK,[SIXBIT/IF/] + CAMN TOK,[SIXBIT/ELSE/] + POPJ P, + AOS (P) + POPJ P, +ORG: TRO F,FR.ORG ;FLAG NO RELOCATION + PUSHJ P,TOKEN ;GET ORG ARG + PUSHJ P,DODATA ;GET THE NUMBER + MOVEM OP,PC ;RESET PC + TRNN F,FR.PS1 ;SKIP IF PASS1 + JRST FLUSH ;NOPE, DONE + MOVE T1,ORGXR ;GET INDEX + MOVEM BC,ORGBLK(T1) ;STORE BYTE COUNT + SKIPE BC ;IF BLOCK WAS VALID, + ADDI T1,2 ;BUMP ORIGIN INDEX + MOVEM OP,ORGBLK+1(T1) ;SAVE NEW START ADDRESS + MOVEM T1,ORGXR ;SAVE INDEX + SETZ BC, ;NO BYTES IN NEW BLOCK + JRST FLUSH ;FLUSH + +DOEND: TRO F,FR.END ;SAY WE'RE DONE + CAIN I,CR ;JUST "END" & NO START ADDRESS? + JRST FLUSH ;YES, FLUSH LINE. + PUSHJ P,TOKEN ;GET END ADDRESS + PUSHJ P,DODATA ;GET VALUE IF ANY + MOVEM OP,STARTA + PUSHJ P,NOPC ;LIST START ADDRESS +IFN FTREL,< + MOVEI T1,"'" + TRZE F,FR.REL ;RELOC? + PUSHJ P,LOUCH ;YES + TRZN F,FR.EXT ;EXTERNAL? + JRST FLUSH ;NO, DONE + SETOM STARTA ;YES. THIS IS ILLEGAL + WARN W.EXSA +> ;END IFN FTREL + JRST FLUSH + +DS: PUSHJ P,TOKEN ;GET BLOCK ARG + PUSHJ P,DODATA + PUSHJ P,LSTPC + TRO F,FR.LOP + MOVEI T1,TAB + TRNN F,FR.HEX + PUSHJ P,LOUCH + MOVE T1,PC ;SAVE OLD PC + ADDM T1,OP ;NEW PC + JRST ORG+3 ;DS MEANS NEW BLOCK + +PHASE: PUSHJ P,TOKEN + PUSHJ P,DODATA + MOVEM OP,PC + TRO F,FR.ORG ;NO RELOCATION + JRST FLUSH + +PRINTX: TRNE F,FR.PS1 ;IF ON PASS1 + JRST FLUSH ;SKIP IT +PX1: PUSHJ P,INCH + OUTCHR I + CAIE I,LF + JRST PX1 + POPJ P, +DC: MOVE T4,[POINT 10,STRING] ;SET UP OPCODE OUTPUT + MOVE T2,T4 ;AND INPUT + PUSH P,T2 ;SAVE IT +DC0: PUSHJ P,TOKEN ;GET ARG(S) + CAIE I,"'" + CAIN I,QUOTE + JRST [MOVEM I,DELIM ;SAVE QUOTE + PUSHJ P,SNEAK ;SEE IF SINGLE CHAR + TLNE TOK,7777 + JRST DC4 ;NO, DO QUOTED STRING + MOVE I,SNEAKI + CAME I,DELIM ;AND MUST END ON SAME QUOTE + JRST DC4 + SETZB TOK,TOK+1 + JRST .+1] ;DO EXPR + PUSH P,T4 ;DODATA DESTROYS T4 + PUSHJ P,DODATA + POP P,T4 + MOVE T2,OP ;SAVE IT + ANDI OP,377 ;LOWER 8 BITS + IDPB OP,T4 ;SAVE OP + MOVE OP,T2 ;GET BACK ALL OF OP + AOS BYTCNT ;COUNT TOTAL BYTES IN + AOS PC ;FIX PC FOR EVAL + AOS XTRAPC ;FOR FIXUP + TLNN P1,T.DW ;WHOLE WORD? + JRST DC1 ;NO + LSH OP,-10 + ANDI OP,377 ;JUST DATA BITS + TRZE F,FR.REL ;IF RELOC + TRO OP,400 ;FLAG + TRZE F,FR.EXT ;IF EXT + TRO OP,1000 ;FLAG + IDPB OP,T4 + AOS BYTCNT + AOS PC + AOS XTRAPC +DC1: CAIN I,COMMA ;CONTINUE? + JRST DC0 ;YES + CAIE I,TAB ;LEADING SPACE? + CAIN I,SPACE + JRST [PUSHJ P,INCH + JRST DC1] ;YES, EAT IT + POP P,OP ;GET START BYTE POINTER + SETZ TOK, ;RESET COUNTER + SKIPN BYTCNT ;ANY BYTES IN THERE? + JRST DCX0 ;NO + SOSGE XTRAPC + JRST DC2 + SOS PC + JRST .-3 +DC2: SETZM XTRAPC + PUSHJ P,LSTPC ;LIST PC + MOVEI TOK,3 ;TOKEN NOT INUSE NOW + TLNE P1,T.DW ;WORDS? + MOVEI TOK,2 ;YES +DC3: ILDB T1,OP + PUSH P,T1 ;SAVE IT + PUSHJ P,LSTOP ;OUTPUT OP WITHOUT UPDATING PC + POP P,T1 + SOSG BYTCNT ;ONE LESS BYTE IN STRING + JRST DCX ;ALL GONE + SOJG TOK,DC3 ;LOOP FOR 2 OR 3 BYTES +IFN FTREL,< + TRNE T1,400 ;IF RELOCATABLE + JRST [MOVEI T1,"'" ;FLAG + PUSHJ P,LOUCH + JRST .+1] + TRNE T1,1000 ;IF EXTERNAL + JRST [MOVEI T1,"*" + PUSHJ P,LOUCH + JRST .+1] +> + PUSHJ P,FLUSHL ;PRINT <TAB> LINE OF SOURCE (OR NEW LINE) + JRST DC2 ;DO ANOTHER LINE + +DCX: SOJ TOK, ;COUNT BYTE PRINTED +IFN FTREL,< + MOVE T3,T1 ;GET FLAGS + SETZ T1, + TRNE T3,400 ;RELOC WORD? + MOVEI T1,"'" + TRNE T3,1000 ;EXTERN? + MOVEI T1,"*" + CAIE T1,"'" + CAIN T1,"*" + PUSHJ P,LOUCH ;OUTPUT IF ' OR * +> ;END IFN FTREL +DCX0: TLNN P1,T.DZ ;NEED A LAST ZERO? + JRST DCX2 ;NO + JUMPN TOK,DCX1 ;JUMP IF PC ALREADY PRINTED + CAIN I,LF + PUSHJ P,LCRLF + CAIN I,CR ;ON A CR? + PUSHJ P,INCH ;FLUSH LINE + PUSHJ P,LSTPC ;LIST PC + MOVEI TOK,3 + TLNE P1,T.DW ;WORDS? + MOVEI TOK,2 +DCX1: SETZ T1, + PUSHJ P,LSTOP ;LIST ZERO + SOJ TOK, ;COUNT DOWN +DCX2: JUMPE TOK,FLUSHL ;DONE + PUSHJ P,SPACE4 ;SPACE OUT + SOJG TOK,.-1 ;LOOP + JRST FLUSHL ;DONE +DC4: PUSHJ P,INCH ;GET LIT + CAMN I,DELIM ;END QUOTE? + JRST [PUSHJ P,INCH + JRST DC1] + IDPB I,T4 ;SAVE CHAR + AOS BYTCNT + CAIE I,CR ;EOL? + CAIN I,LF + CAIA ;YES + JRST DC4 ;NO +DC6: MOVE TOK,BYTCNT ;GET COUNT OF BYTES READY TO GO + CAIGE TOK,3 ;ENOUGH FOR A LINE? + JRST DC4 ;NO + MOVEI TOK,3 ;SET UP BYTES/LINE + PUSHJ P,LSTPC ;DO PC + POP P,OP ;GET BYTE POINTER +DC7: ILDB T1,OP ;GET BYTE + SOS BYTCNT ;COUNT DOWN + PUSH P,T1 + PUSHJ P,LSTOP ;LIST IT + POP P,T1 + SOJG TOK,DC7 + PUSH P,OP ;SAVE IT + CAIN I,CR ;GOT HERE VIA CR? + JRST DC4 ;YES, CAUSE LINE TO BE PRINTED + JRST DC6 ;JUST BYTES FOR A WHILE + +IFN FTREL,< +DOINT: SKIPA T2,[XWD S.INT,0] +DOEXT: MOVSI T2,S.EXT + PUSHJ P,TOKEN ;GET TOKEN + PUSHJ P,SRCSYM ;FIND IT (OR EMPTY LOC) + DMOVEM TOK,(S) ;NOT THERE, STUFF IT + IORM T2,2(S) ;FLAG SYMBOL + TLNE T2,S.EXT ;EXTERNAL? + HLLOS 2(S) ;YES, MAKE RH -1 (FOR END OF CHAIN) + CAIN I,COMMA ;MORE TO COME? + JRST DOEXT+1 ;YES + JRST FLUSH ;NO +> +DOMAC: DMOVE TOK,T2 ;GET MACRO NAME +DOMAC0: POP P,(P) ;CAME VIA JRST FROM SUBROUTINE + TRO F,FR.NRF ;WE WANT TO KNOW IF MACRO WAS NEVER REFERENCED + PUSHJ P,SRCSYM ;FIND IN SYMBOL TABLE + DMOVEM TOK,(S) ;SAVE IT + PUSHJ P,SYMDEF ;LINE DEFINED ON + MOVSI T1,S.MAC ;FLAG AS A MACRO REFERENCE + IORM T1,2(S) ;PUT IN SYMBOL TABLE + MOVE T2,[MACDUM,,MACDUM+1] + SETZM MACDUM + BLT T2,MACDND ;CLEAR MACRO ARG TABLE + MOVEI T1,2 ;INDICATE NOT A REPT + MOVEM T1,EOMFLG + SETZ T2, ;MACDUM INDEX + PUSH P,S +DOMAC4: PUSHJ P,TOKEN + DMOVEM TOK,MACDUM(T2) ;SAVE DUMMY ARG NAME + JUMPE TOK,DOMC4A ;SINCE NULL ENTRY MEANS END, IGNORE REST + CAIE I,COMMA ;MORE? + JRST DOMC4A ;NO, SKIP + AOJ T2, + AOJA T2,DOMAC4 ;LOOP UNTIL NO MORE ARGS +DOMC4A: POP P,S +DOMC4B: PUSHJ P,FLUSH ;WASTE REST OF THE LINE + MOVE T1,.JBFF## ;GET JOBFF + HRRM T1,2(S) ;SAVE HOME OF MACRO + MOVE T2,T1 + HRLI T2,(POINT 7,0) ;POINTER TO MACRO BODY +DOMAC1: PUSHJ P,INCH +DOMAC3: HRRZI T1,1(T2) ;GET ADDRESS PART OF POINTER (+1) + PUSHJ P,MEMXPN ;SEE IF MEMORY NEEDS TO BE EXPANDED + CAIE I,SEMICO ;";"? + JRST DOM10 ;NO + LDB I,T2 ;GET LAST CHAR + CAIE I,SEMICO ;DOUBLE ;;? + JRST DOM11 ;NO + SOJ T2, ;BACKUP BTP +DOM9: ILDB I,T2 + CAIN I,SEMICO + JRST DOM12 ;FOUND IT + CAIE I,TAB ;TRY TO ELIMINATE TRAILING TABS + CAIN SPACE ;OR SPACES + JRST DOM9 + MOVEM T2,SAVREG ;SAVE FOR A WHILE + JRST DOM9 + +MEMXPN: CAMG T1,.JBREL## ;WILL T1 FIT IN CORE? + POPJ P, ;YES, EXIT + PUSH P,T1 ;SAVE T1 + CORE T1, + ERROR F.NCOR + POP P,T1 ;RESTORE T1 + POPJ P, +DOM12: PUSHJ P,FLUSH ;WASTE COMMENT + MOVE T2,SAVREG ;GET POINTER + MOVEI I,CR + IDPB I,T2 ;STUFF CR + SKIPA I,[LF] ;SET UP LF +DOM11: MOVEI I,SEMICO ;PUT BACK ; +DOM10: SKIPG MACLEV ;PASS THRU CONCAT INSIDE MACRO DEF + CAIE I,"'" ;CONCATENATE? + IDPB I,T2 ;STUFF IT + CAIE I,LF ;END OF LINE + JRST DOMAC6 + TRZ F,FR.MCM ;FLAG END OF ANY POSSIBLE COMMENT + JRST DOMC2A ;CHECK FOR ENDM, ETC. + +DOMAC6: PUSHJ P,BREAK ;IS IT WORTHWHILE TO LOOK FOR NEXT TOKEN? + JRST DOMAC2 ;YES + JRST DOMAC1 ;NO + +DOMAC5: SOSL MACLEV ;IN A NESTED MACRO? + JRST DOMAC1 ;YES + SETZM MACLEV ;DON'T LEAVE IT NEG. + LDB I,T2 ;GET LAST CHAR OF MACRO + CAIN I,12 ;END WITH LF? + JRST DOMC5A ;YES, SKIP + MOVEI I,15 + IDPB I,T2 + MOVEI I,12 ;END MACRO TEXT WITH CRLF + IDPB I,T2 +DOMC5A: MOVEI I,177 + IDPB I,T2 + MOVE I,EOMFLG ;177,2 IS END OF MACRO + IDPB I,T2 + SETZ I, + IDPB I,T2 ;END WITH NULL + AOJ T2, ;POINT TO 1ST FREE WORD + HRRM T2,.JBFF## ;UPDATE JOBFF + MOVE T1,EOMFLG ;ARE WE FROM REPT? + CAIN T1,3 + POPJ P, ;YES, GO BACK TO REPT CODE + TRNE F,FR.PS1 ;PASS1? + JRST FPASS1 ;FLUSH REST OF LINE, RETURN TO NORMAL INPUT + JRST FLUSHX ;FOR PASS2 + +DOMAC2: CAIN I,SEMICO + TRO F,FR.MCM ;FLAG IGNORE REST OF LINE + CAIN I,QUOTE + TRC F,FR.MQT ;TOGGLE QUOTE IN MACRO + TRNE F,FR.MCM ;IN COMMENT? + JRST DOMAC1 ;YES +DOMC2A: PUSHJ P,DOMC13 ;GET NEXT TOKEN +DOMAC7: JUMPE TOK,DOMAC1 ;NOTHING THERE + CAMN TOK,[SIXBIT/ENDM/];END OF MACRO? + JRST DOMAC5 ;YES + CAME TOK,[SIXBIT/REPT/] + CAMN TOK,[SIXBIT/MACRO/] ;NESTING A MACRO? + JRST [TRNN F,FR.MCM!FR.MQT ;IN COMMENT OR QUOTE? + AOS MACLEV ;NO, COUNT LEVEL OF NEST + JRST DOMAC1] + CAMN TOK,[SIXBIT/LOCAL/] ;LOCAL SYMBOL? + JRST DOMAC9 ;YES + MOVSI T3,-MACDML +DOMC7A: SKIPN MACDUM(T3) + JRST DOMAC1 + CAMN TOK,MACDUM(T3) + CAME TOK+1,MACDUM+1(T3) ;WHAT? NO DOUBLE WORD COMPARE? + CAIA + JRST DOMAC8 + AOBJN T3,.+1 + AOBJN T3,DOMC7A + JUMPGE T3,DOMAC1 +DOMAC8: PUSHJ P,TOKEN + PUSH P,I + MOVEI I,177 + IDPB I,T2 + HRRZS T3 + LSH T3,-1 ;ACCOUNT FOR DOUBLE SIZE TOKENS + MOVEI I,100(T3) + IDPB I,T2 + POP P,I + JRST DOMAC3 + +DOMAC9: SKIPG MACLEV ;IN A MACRO? + TRNE F,FR.MCM!FR.MQT ;IN COMMENT OR QUOTE? + JRST DOMAC1 ;YES, IGNORE IT + PUSHJ P,TOKEN ;EAT "LOCAL" + MOVSI T3,-MACDML +DOMC9A: SKIPN MACDUM(T3) ;FIND FIRST FREE MACDUM ENTRY + JRST DOMC9B + AOBJN T3,.+1 + AOBJN T3,DOMC9A + ERROR F.TMMA ;TOO MANY MACRO ARGS (MAKE MACDUM BIGGER) + +DOMC9B: PUSHJ P,TOKEN + DMOVEM TOK,MACDUM(T3) ;SAVE LOCAL SYMBOL + CAIN I,"," ;MORE LOCALS? + JRST DOMC9A ;YES + CAIN I,CR ;THROW OUT REST OF LINE + JRST DOMAC3 + PUSHJ P,INCH + JRST .-3 + +DOMC13: HRRZ T1,INVECT ;GET INVECT POINTER + CAIG T1,BAKPTR + CAIGE T1,BAKBUF ;POINTS TO BAKBUF?? (IF SO, DON'T SNEAK) + PJRST SNEAK ;LOOK AT NEXT TOKEN + PUSH P,INVECT ;SAVE POINTER + ILDB I,INVECT + POP P,INVECT + CAIE I,177 ;END OF BAKBUF? + JRST [POP P,(P) ;WASTE RETURN ADDR + JRST DOMAC1] ;JUST PROCESS CHARACTER + MOVE T1,MACPDL + POP T1,INVECT ;RESTORE OLD POINTER + MOVEM T1,MACPDL + JRST SNEAK ;AND GET A NEW TOKEN + +EQUAL: DMOVE TOK,T2 ;RESET TOKEN + TLO P1,T.EQU ;SINCE EQU IS NOT IN OPNTAB + TRO F,FR.NRF ;DEFINITION IS NOT REFERENCE + PUSHJ P,SRCSYM + DMOVEM TOK,(S) ;LOAD SYMBOL IF NOT THERE + PUSH P,S ;SAVE S + PUSHJ P,TOKEN ;GET ARG + PUSHJ P,DODATA ;GET VALUE + POP P,S ;RESTORE S + HRRM OP,2(S) ;SET SYMBOL TABLE VALUE + PUSHJ P,SYMDEF ;FLAG LINE DEFINED ON + TRNN F,FR.UND ;IS EXPR UNDEFINED? + JRST EQU1 ;NO, SKIP + MOVE T1,2(S) ;GET FLAGS + TLO T1,S.UNDF ;FLAG UNDEFINED + HLLZM T1,2(S) ;PUT BACK, CLEAR VALUE OF EQU + SETZ OP, ;A LITTLE HINT THAT ALL IS NOT OK + JRST EQU2 ;SKIP + +EQU1: MOVE T1,2(S) ;GET FLAGS &C + TLZ T1,S.UNDF!S.MAC ;MAKE SURE THAT THIS SYMBOL IS NOT UNDEFINED + MOVEM T1,2(S) ;FOR CIRCULAR EQU MESS +EQU2: POP P,(P) ;CAME VIA PUSHJ,.. + TRNN F,FR.LIB ;SKIP OUTPUT IF IN MACLIB + PUSHJ P,NOPC + TRNE F,FR.PS1 ;PASS1? + JRST FPASS1 ;YES + JRST FLUSHX ;NO + +OPTION: PUSHJ P,TOKEN + CAMN TOK,[SIXBIT/HEX/] + TRO F,FR.HEX + CAMN TOK,[SIXBIT/OCT/] + TRZ F,FR.HEX + CAMN TOK,[SIXBIT/SMAC/] + TLO F,FL.SUP + CAMN TOK,[SIXBIT/LMAC/] + TLZ F,FL.SUP + CAIN I,COMMA + JRST OPTION + JRST FLUSH + +MACLIB: PUSHJ P,TOKEN ;GET LIBRARY NAME + SKIPN T1,TOK ;FILE NAME + JRST FLUSH ;IF NO NAME, FLUSH + MOVSI T2,'LIB' ;EXT IS .LIB + SETZB T3,T4 ;IN DEFAULT PATH + LOOKUP LIB,T1 ;LOOKUP FILE + JRST [OUTSTR [ASCIZ/MACLIB file not found +/] + JRST FLUSH] + PUSHJ P,FLUSH ;THROW OUT REST OF MACLIB LINE + MOVE T1,MACPDL + PUSH T1,INVECT ;SAVE INPUT VECTOR + MOVEM T1,MACPDL + MOVEI T1,-2 ;SIGNAL MACLIB INPUT + MOVEM T1,INVECT + TRO F,FR.LIB ;FLAG IN MACLIB + POPJ P, ;RETURN + +DOPAGE: PUSHJ P,TOKEN + PUSHJ P,DODATA + SKIPE OP ;IF ARG GIVEN FOR PAGE + MOVEM OP,PAGESZ ;SAVE IT AS THE NEW PAGE SIZE + HLLOS LINCTR ;FORCE A PAGE BREAK + JRST FLUSH + +EXITM: HRRZ T1,INVECT ;FIRST CHECK TO SEE IF WE'RE IN A MACRO + CAIE T1,-1 ;SOURCE? + CAIN T1,-2 ;MACLIB? + JRST EXITX ;YES, ERROR + CAIG T1,BAKPTR + CAIGE T1,BAKBUF ;POINTS TO BAKBUF? + JRST EXITM1 ;NO, MUST POINT TO MACRO + PUSHJ P,EXITM1 ;YES, GET RID OF IT + JRST EXITM ;AND CHECK AGAIN TO SEE IT THIS IS A MACRO + +EXITM1: PUSHJ P,FLUSH ;MAKE EVERYTHING LOOK NICE + MOVE T1,MACPDL ;GET THE INVECT STACK + POP T1,INVECT ;BAIL OUT OF THE MACRO + MOVEM T1,MACPDL + POPJ P, ;ALL DONE + +EXITX: WARN W.EXM ;WARN THAT WE'RE NOT IN A MACRO + JRST FLUSH + +REPT: PUSHJ P,TOKEN + PUSHJ P,DODATA ;GET THE REPT VALUE + MOVEM OP,REPCNT ;SAVE IT + MOVE T2,[MACDUM,,MACDUM+1] + SETZM MACDUM + BLT T2,MACDND ;CLEAR MACRO ARG TABLE + MOVEI T1,3 ;INDICATE REPT AND NOT MACRO + MOVEM T1,EOMFLG + MOVEI S,REPADR-2 ;FAKE UP SYMTAB POINTER + PUSHJ P,DOMC4B ;MAKE IT A MACRO IN REPBUF + SKIPN REPCNT ;IF REPT 0 + POPJ P, ;FORGET IT + PUSHJ P,SETARG ;SET UP MACARG IN CASE LOCALS USED + MOVEI I,177 + IDPB I,T1 + MOVEI I,1 + IDPB I,T1 + SETZ I, + IDPB I,T1 ;END WITH NULL + PUSHJ P,FLUSH + MOVE T1,MACPDL + PUSH T1,INVECT ;SAVE INPUT VECTOR ON SPECIAL STACK + MOVE T2,REPADR ;POINT TO REPT + HRLI T2,(POINT 7,0) + MOVEM T2,INVECT + MOVEM T1,MACPDL + POPJ P, + + + +DOIFN: PUSHJ P,TOKEN + PUSHJ P,DODATA + AOS IFLEVL ;ONE MORE IF + TRNE F,FR.OFF ;ALREADY OFF? + JRST FLUSH + SKIPE OP ;GOING OFF? + JRST FLUSH ;NO +TRNOFF: MOVE T1,IFLEVL + MOVEM T1,OFFLVL ;YES, SAVE LEVEL OF OFF + TRO F,FR.OFF ;SHUT OFF + JRST FLUSH ;RETURN +DOIFE: PUSHJ P,TOKEN + PUSHJ P,DODATA + AOS IFLEVL + TRNE F,FR.OFF + JRST FLUSH + SKIPN OP + JRST FLUSH + JRST TRNOFF ;TURN OFF + +ELSE: TRNN F,FR.OFF ;ARE WE OFF? + JRST TRNOFF ;NO, TURN OFF + MOVE T1,OFFLVL ;GET OFF LEVEL + CAMN T1,IFLEVL ;TURNED OFF AT THIS LEVEL? + TRZ F,FR.OFF ;YES, TURN BACK ON + JRST FLUSH ;FLUSH & RETURN + +ENDIF: TRNN F,FR.OFF ;OFF ALREADY? + JRST ENDI2 ;NO, JUST DECR. & LEAVE + MOVE T1,OFFLVL ;GET OFF LEVEL + CAMN T1,IFLEVL ;WAS TURNED OFF AT THIS LEVEL? + TRZ F,FR.OFF ;YES, TURN BACK ON +ENDI2: SOSGE IFLEVL ;COUNT DOWN IF LEVELS + WARN W.IF1 ;THERE WERE NO LEVELS! + SKIPGE IFLEVL ;IF MESSED UP, + SETZM IFLEVL ;FIX + JRST FLUSH + +DOTITL: MOVE T1,[POINT 7,TITL] + MOVEI T2,^D66 + PUSHJ P,INCH + CAIN I,15 + JRST FLUSH + IDPB I,T1 + SOJG T2,.-4 + JRST FLUSH + +DOSUBT: CAIA ;TRY BREAK CHARACTER FIRST + PUSHJ P,INCH ;GET DELIMITER + CAIE I,TAB + CAIN I,SPACE + JRST .-3 ;FORGET SPACES + MOVE T2,I + MOVE T3,[POINT 7,SUBTTL] + MOVEI T4,SUBTLN +SUB2: PUSHJ P,INCH + CAMN I,T2 ;END OF STRING? + JRST FLUSH ;YES + SOSLE T4 + IDPB I,T3 ;STUFF + JRST SUB2 +EVAL: TRZ F,FR.REL!FR.EXT ;INIT + SETZ T1, ;CLEAR OUTPUT + JUMPN TOK,DOSYM ;JUMP IF TOK NOT ZERO + CAIE I,"'" ;INTEL QUOTE + CAIN I,QUOTE + JRST DOQUOT ;LITERAL CHARACTER + CAIE I,DOLLAR + CAIN I,PERIOD + CAIA + POPJ P, ;MUST BE ZERO + MOVE T1,PC ;DOLLAR IS PC + TRO F,FR.REL ;DOLLAR IS ALSO RELOCATABLE + PUSH P,T2 + TLNE P1,T.DB!T.DW!T.EQU ;FROM DB,DW OR EQU? + CAIA ;NO, SKIP OVER SOJ + SOJ T1, ;INDICATE THE PC OF THE INSTRUCTION + POP P,T2 + JRST INCH ;EAT DOLLAR + +DOSYM: PUSHJ P,GETNUM ;EVALUATE NUMERICALLY + POPJ P, ;RETURN WITH NUMBER IN T1 + PUSHJ P,SRCSYM ;NOT NUMBER,SEARCH SYMBOL TABLE + JRST .+3 ;NOT THERE + HRRZS T1 + POPJ P, ;RETURN WITH VALUE IN T1 + + PUSH P,T2 + PUSH P,T3 + PUSH P,T4 + TRO F,FR.EVL ;TELL SRCHOP NOT TO FLAG ERROR + PUSHJ P,SRCHOP ;CHECK FOR OPCODE + JRST DOSYM3 ;NO OP + TRZ F,FR.EVL ;CLEAR FLAG + MOVE T2,OPCTAB(X) ;GET OPCODE + MOVE T3,TYPLSH(X) ;GET TYPE + TLNE T3,T.POP ;PSEUDO OP? + JRST DOSYM3 ;YES, DONE + TLNE T3,T.NREG ;USES REGISTER? + JRST DOSYM1 ;NO + ;CONT. +DOSYM2: CAIN I,")" ;END OF EXPR? + JRST DOSYM1 ;YES + PUSH P,T2 + PUSH P,T3 + PUSHJ P,TOKEN + PUSHJ P,EVAL + CAILE T1,7 + WARN W.REG + ANDI T1,7 + POP P,T3 + POP P,T2 + TRNE T3,4 + LSH T1,-1 + LSH T1,(T3) + OR T2,T1 + TLZE T3,T.MOV ;A MOVE? + JRST [TRZ T3,-1 + JRST DOSYM2] +DOSYM1: +REPEAT 0,< ;DON'T GET FUSSY ABOUT OPCODES AS DATA + CAIN I,")" ;EOE? + JRST DOSYM4 ;YES + WARN W.ILO1 ;ONLY GENERATE 1 BYTE OF DATA +>; END REPEAT 0 +DOSYM4: MOVE T1,T2 + POP P,T4 + POP P,T3 + POP P,T2 + POPJ P, + +DOSYM3: POP P,T4 + POP P,T3 + POP P,T2 + SKIPE (S) ;NO SYMBOL? + JRST FLUNDF ;SYMBOL ALREADY UNDEFINED + DMOVEM TOK,(S) ;SAVE SYMBOL + MOVSI T1,S.UNDF ;FLAG UNDEFINED + MOVEM T1,2(S) +FLUNDF: PUSHJ P,SRCSYM ;REFERENCE SYMBOL + JFCL ;NOT FOUND? + TRO F,FR.UND ;FLAG UNDEFINED SYMBOL + TRNN F,FR.PS1 ;SKIP IF PASS1 + ERROR F.UNDF ;REALLY IS UNDEFINED + POPJ P, ;BURP UP + +DOQUOT: PUSHJ P,INCH ;GET THE NEXT CHARACTER + MOVE T1,I ;JUST SAVE IT + PUSHJ P,INCH ;EAT TRAILING QUOTE + CAIE I,"'" + CAIN I,QUOTE + JRST .+4 ;OK THEN + LSH T1,10 ;SHIFT OVER + ADD T1,I ;MERGE + JRST .-6 + PUSH P,T1 ;SAVE T1 + PUSHJ P,TOKEN ;LOAD UP LIKE TOKEN + POP P,T1 ;RESTORE T1 + POPJ P, ;RETURN +;SEARCH SYMBOL TABLE FOR ENTRY IN TOK. +;NON-SKIP RETURN: SYMBOL UNDEFINED. S CONTAINS 1ST FREE ENTRY +;SKIP RETURN: T1 CONTAINS VALUE OF SYMBOL. S POINTS TO ENTRY IN SYMTAB +;SYMTAB ENTRY: SIXBIT/NAME/ +; SIXBIT/MORE NAME/ +; FLAGS,,VALUE ;SEE M80UNV FOR FLAGS (S.????) +; LINE#,,LINK TO NEXT LINE# ;1B0 SET IF DEFINED ON LINE# +; 0,,LINK TO OVERFLOW ; 0 IF NO MORE ENTRIES + +SRCSYM: TRZ F,FR.REL!FR.EXT + MOVSI S,-PRELEN ;GET LENGTH OF PRE DEFINED TABLE + HRRI S,PRETAB ;ADDRESS OF PERMANENT SYMBOLS +SRCS1: CAMN TOK,(S) ;MATCH? + JRST PREMAT + AOBJN S,.+1 + AOBJN S,SRCS1 ;NO, LOOP + ;LOOK IN REGULAR SYMBOL TABLE + PUSH P,T2 ;DON'T DESTROY T2 + MOVE T2,[POINT 6,TOK];THIS ASSUMES SYMSIZ IS FAIRLY CLOSE TO 64 + SETZ T1, + TLNN T2,770000 ;ONLY HASH ON 1ST WORD OF SYMBOL + JRST .+4 + ILDB S,T2 + ADD T1,S + JRST .-4 + IDIVI T1,SYMSIZ ;GET TOKEN MODULO TABLE LENGTH + MOVE T1,T2 + POP P,T2 + IMULI T1,5 ;5 WORDS/ENTRY + MOVEI S,SYMTAB(T1) ;GET HASHED TABLE LOCATION +SRCL: CAMN TOK,(S) + CAME TOK+1,1(S) + CAIA + JRST SRCF + SKIPN (S) ;EMPTY? + POPJ P, ;YES, RETURN WITH S SET UP + SKIPN 4(S) ;LINK THERE? + JRST MAKLNK ;NO. MAKE NEW ENTRY & RETURN + HRRZ S,4(S) ;NEW LINK + JRST SRCL ;LOOP + +PREMAT: MOVE T1,1(S) ;GET FLAGS,VALUE + JRST SCPOPJ ;SKIP RETURN + +MAKLNK: MOVE T1,.JBFF## ;GET JOBFF + HRRM T1,4(S) ;MAKE NEW LINK + HRRM T1,S + ADDI T1,5 ;MAKE NEW JOBFF + PUSHJ P,MEMXPN ;EXPAND CORE IF NECESSARY + MOVEM T1,.JBFF## ;STUFF IT + POPJ P, ;DONE +SRCF: MOVE T1,2(S) ;GET FLAGS,VALUE + PUSH P,T2 ;SAVE T2 + MOVE T2,T1 ;IN T2 + TLNE T2,S.EXT ;EXTERNAL? + HRR T2,PC ;YES, SAVE CURRENT PC FOR NEXT SYMBOL + TRZN F,FR.NRF ;A REFERENCEABLE SYMBOL? + TLO T2,S.REF ;YES, REFERENCE SYMBOL + MOVEM T2,2(S) ;SAVE FLAGS,VALUE + TRNE F,FR.PS1 ;PASS1? + JRST SRCX ;YES, NO REF ON PASS1 + TRNN F,FR.LST ;LISTING REFERENCES? + JRST SRCX ;NO USE GATHERING THEM THEN + SKIPE 3(S) ;NO REFERENCE? + JRST NXTREF ;NO + HRLZ T2,LINENO ;GET CURRENT LINENO + MOVEM T2,3(S) ;SAVE IN LH + JRST SRCX ;DONE + +NXTREF: PUSH P,T1 ;SAVE T1 + PUSH P,T3 ;AND T3 + MOVEI T1,3(S) ;GET ADDRESS + MOVE T2,3(S) ;GET LINE,,LINK +SRCLNK: HLRZ T3,T2 ;GET LINE NUMBER IN CHAIN + ANDI T3,377777 ;JUST LINE NUMBER + CAMN T3,LINENO ;IS LINENO ALREADY IN CHAIN? + JRST SRCX0 ;YES, QUIT NOW + TRNN T2,-1 ;ANY LINK? + JRST SRCI ;NO, END OF CHAIN + HRRZ T1,T2 ;SAVE LINK + MOVE T2,(T1) ;FOLLOW LINK + JRST SRCLNK ;LOOP TO END OF CHAIN +SRCI: HRR T2,.JBFF## ;GET FIRST FREE AS LINK + MOVEM T2,(T1) ;SAVE WITH NEW LINK + HRRZ T1,T2 ;LINK ADDRESS IN T1 + MOVE T2,LINENO ;GET LINE NUMBER + HRLZM T2,(T1) ;STORE IT + AOJ T1, ;NEW JOBFF + PUSHJ P,MEMXPN ;EXPAND CORE + MOVEM T1,.JBFF## +SRCX0: POP P,T3 ;RESTORE T3 + POP P,T1 ;RESTORE T1 +SRCX: POP P,T2 + TLNE T1,S.UNDF ;UNDEFINED SYMBOL? + POPJ P, ;YES, TIME TO LEAVE + TLZE T1,S.REL ;RELOCATABLE? + TRO F,FR.REL ;YES, FLAG IT + TLZE T1,S.EXT ;EXTERNAL? + TRO F,FR.EXT ;YES +SCPOPJ: AOS (P) ;CAUSE SKIP RETURN +CPOPJ: POPJ P, ;RETURN + +;SNEAK ROUTINE. WHILE FR.SNK IS ON INCH WILL COPY ALL INPUT VIA BAKPTR +;WHEN DONE, SNEAK WILL TELL INCH THAT THE PREVIOUS INPUT IS NOW A MACRO +;IN EFFECT, NO INPUT WAS DONE (EXCEPT THAT TOK CONTAINS THE NEXT TOKEN) + +SNEAK: TRO F,FR.SNK ;SAY WE'RE SNEAKING AROUND + PUSH P,I + PUSH P,T1 + PUSH P,T2 + MOVE T2,[POINT 7,BAKBUF] ;SET UP POINTER FOR INCH + MOVEM T2,BAKPTR ;SAVE IT + PUSHJ P,TOKEN ;GET TOKEN + MOVEM I,SNEAKI ;SAVE THE BREAK CHARACTER + MOVEI T1,177 + IDPB T1,BAKPTR ;STORE "END OF BAKBUF" + MOVEI T1,1 + IDPB T1,BAKPTR + MOVE T1,MACPDL ;GET MACPDL + HRRZ T2,INVECT ;GET INVECT POINTER + CAIG T2,BAKPTR + CAIGE T2,BAKBUF ;POINTS TO BAKBUF?? (IF SO, DON'T SAVE) + PUSH T1,INVECT ;SAVE OLD POINTER + MOVE T2,[POINT 7,BAKBUF] ;POINT TO BACKUP BUFFER + MOVEM T2,BAKPTR ;HELP OUT THE OTHER FOLKS WHO USE BAKPTR + MOVEM T2,INVECT ;SOURCE IS NOW IN BAKBUF + MOVEM T1,MACPDL ;PUT PDL BACK IN STORAGE + TRZ F,FR.SNK ;DONE SNEAKING + POP P,T2 + POP P,T1 + POP P,I + POPJ P, ;DONE +GETNUM: MOVE T3,[POINT 6,TOK] + SETZ T1, ;CLEAR TOTAL + ILDB T2,T3 ;GET THE 1ST CHARACTER + CAIG T2,'9' + CAIGE T2,'0' ;NUMERIC? + JRST SCPOPJ ;NO - SHOULDN'T BE HERE + PUSH P,T4 ;SAVE T4 + PUSH P,I ;AND I +GETN1: JUMPE T2,GETN2 ;END OF TOKEN + MOVE T4,T3 ;SAVE POINTER TO LAST CHAR + ILDB T2,T3 ;GET NEXT CHAR + JRST GETN1 ;LOOP + +GETN2: MOVE T3,T4 ;GET BACK POINTER + LDB T4,T3 ;GET LAST CHARACTER + MOVEI I,^D10 ;ASSUME DECIMAL + CAIE T4,'O' + CAIN T4,'Q' ;OCTAL + MOVEI I,10 + CAIN T4,'H' ;HEX + MOVEI I,20 + CAIN T4,'B' ;BINARY + MOVEI I,2 + CAIE T4,'D' ;GET RID OF THE LAST CHARACTER + CAIN T4,'H' ;IF IT IS A RADIX CHARACTER + DPB T1,T3 + CAIE T4,'Q' + CAIN T4,'O' + DPB T1,T3 + CAIN T4,'B' + DPB T1,T3 + MOVE T3,[POINT 6,TOK] +GETNL: CAMN T3,[600,,TOK+1] + JRST GETNX + ILDB T2,T3 ;GET A CHARACTER + JUMPE T2,GETNX ;DONE. NORMAL RETURN + CAIN T2,'$' ;DUMMY DOLLAR? + JRST GETNL ;YES, IGNORE IT + IMUL T1,I ;SHIFT TOTAL BY RADIX + CAILE T2,'9' ;IF GREATER THAN DECIMAL + SUBI T2,'A'-'9'-1 ;THROW OUT OFFSET + ADDI T1,-20(T2) + JRST GETNL + +GETNX: POP P,I + POP P,T4 + POPJ P, + + +SETARG: MOVE T2,ARGPDL + PUSH T2,ARGPTR ;SAVE CURRENT MACRO'S ARGS + MOVEM T2,ARGPDL + MOVE T1,ARGPTR + ILDB T2,T1 ;SEARCH FOR END OF CURRENT MACRO'S ARGS + SKIPE T2 + JRST .-2 + MOVEM T1,ARGPTR ;SAVE START OF THIS MACRO'S ARGS + POPJ P, + +SETMAC: PUSHJ P,SETARG +SETM00: CAIE I,TAB + CAIN I,SPACE + JRST [PUSHJ P,INCH + JRST SETM00] + CAIA +SETM0: PUSHJ P,INCH + PUSHJ P,BREAK + JRST SETM1 + IDPB I,T1 + JRST SETM0 +SETM1: CAIE I,QUOTE + CAIN I,"'" + JRST SETM3 ;DO QUOTED STRING + CAIN I,"<" ;START EXPR? + JRST SETM4 ;YES +STM1.5: PUSH P,I + MOVEI I,177 + IDPB I,T1 + MOVEI I,1 + IDPB I,T1 + POP P,I + CAIN I,"," ;ANOTHER ARG? + JRST SETM0 ;YES +SETM2: SETZ I, + IDPB I,T1 ;END WITH NULL + PUSHJ P,FLUSH + MOVE T1,MACPDL + PUSH T1,INVECT ;SAVE INPUT VECTOR ON SPECIAL STACK + MOVE T2,2(S) ;GET POINTER TO MACRO + HRLI T2,(POINT 7,0) + MOVEM T2,INVECT + MOVEM T1,MACPDL + POPJ P, + +SETM3: MOVEM I,DELIM + IDPB I,T1 + PUSHJ P,INCH + CAIE I,CR + CAIN I,LF + JRST SETM1 + CAME I,DELIM + JRST SETM3 + IDPB I,T1 + JRST STM1.5 + +SETM4: PUSHJ P,INCH + TRNE F,FR.END ;END IS ONLY ABNORMAL EXIT + JRST STM1.5 + CAIN I,">" + JRST [PUSHJ P,INCH + JRST STM1.5] + IDPB I,T1 + JRST SETM4 +INCH: PUSH P,T1 ;SAVE T1 +INCH1: MOVE T1,INVECT ;GET VECTOR + CAIN T1,-1 ;DEFAULT TO SOURCE? + JRST INCHS ;YES + CAIN T1,-2 ;DEFAULT TO LIBRARY? + JRST INCHL ;YES +INCHM0: ILDB I,INVECT ;GET CHARACTER FROM MACRO BODY + SKIPN I ;IS THERE A MACRO ARG? + PUSHJ P,DOLSYM ;NEEDS LOCAL SYMBOL HERE + CAIN I,177 + JRST INCHM3 + TRNE F,FR.LIB ;IN MACLIB? + JRST TPOPJ ;YES, FINISHED + HRRZ T1,INVECT ;GET INVECT POINTER + CAIG T1,BAKPTR + CAIGE T1,BAKBUF ;IN MACRO? + TLNN F,FL.SUP ;YES, IS FL.SUP ON? + JRST INCHX ;NO + IDPB I,BAKPTR ;YES, SAVE CHAR HERE +TPOPJ: POP P,T1 + POPJ P, ;SUPPRESS ALL THIS FOOLISHNESS + +INCHM3: ILDB I,INVECT ;GET CODE + CAIE I,1 + CAIN I,2 ;END OF MACRO? + JRST INCHM1 ;YES + CAIN I,3 ;END OF REPT? + JRST INCHM5 ;YES + MOVE T1,MACPDL + PUSH T1,INVECT ;SAVE OLD INVECT + MOVEM T1,MACPDL + MOVE T1,ARGPTR ;INPUT IS FROM MACRO ARGS + MOVEM T1,INVECT + MOVE T1,I ;PUT ARG POSITION IN T1 + ANDI T1,77 + JUMPN T1,INCHM4 ;SKIP SPECIAL TEST IF NOT 1ST ARG + PUSH P,INVECT ;SAVE INPUT VECTOR + ILDB T1,INVECT + CAIN T1,177 ;LOOKING FOR 1ST ARG AND NONE THERE? + PUSHJ P,DOLSYM ;MAKE A LOCAL SYMBOL FOR THE NULL ARG + POP P,INVECT ;RESTORE VECTOR + JRST INCHM0 ;GO DOIT + +INCHM2: JUMPE T1,INCHM0 ;INVECT NOW POINTS TO RIGHT SPOT +INCHM4: ILDB I,INVECT + SKIPN I ;END OF ARGS? + PUSHJ P,DOLSYM ;NEEDS LOCAL SYMBOL HERE + CAIE I,177 ;END OF ARG? + JRST INCHM4 ;NO, LOOP + ILDB I,INVECT ;GET ^A + SOJA T1,INCHM2 ;SEE IF WE'RE AT THE RIGHT SPOT + +INCHM1: MOVE T1,MACPDL + POP T1,INVECT ;RESTORE OLD POINTER + MOVEM T1,MACPDL + CAIE I,2 ;END OF MACRO? + CAIN I,3 + JRST [MOVE T1,ARGPDL ;RESTORE MACRO ARG CONTEXT + POP T1,ARGPTR + MOVEM T1,ARGPDL + JRST INCH1] + JRST INCH1 + +DOLSYM: PUSH P,INVECT ;SAVE THE INPUT VECTOR + MOVEI I,"?" ;START THE SYMBOL WITH "??" + DPB I,INVECT + IDPB I,INVECT + PUSH P,T1 ;SAVE T1 + PUSH P,T2 + MOVE T1,LOCSYM ;GET THE VALUE OF THE LOCAL SYMBOL + PUSHJ P,DOSNUM ;PUT THE NUMBER IN INVECT + AOS LOCSYM ;MAKE NEW SYMBOL VALUE + MOVEI I,177 + IDPB I,INVECT + MOVEI I,1 ;CAP OFF SYMBOL + IDPB I,INVECT + SETZ I, + IDPB I,INVECT + POP P,T2 + POP P,T1 + POP P,INVECT + LDB I,INVECT ;GET FIRST BYTE IN I + POPJ P, + +DOSNUM: IDIVI T1,^D10 ;OUTPUT T1 AS DECIMAL NUMBER + JUMPE T1,.+4 + PUSH P,T2 + PUSHJ P,DOSNUM + POP P,T2 + ADDI T2,60 + IDPB T2,INVECT + POPJ P, + +INCHM5: SOSG REPCNT ;KNOCK DOWN REPT COUNT + JRST INCHM1 + MOVE T2,ARGPTR ;POINT TO ARGS + MOVEI T1,177 ;START NEW REPT WITH A CLEAN START + IDPB T1,T2 + MOVEI T1,1 + IDPB T1,T2 + SETZ T1, + IDPB T1,T2 + MOVE T2,REPADR ;POINT TO REPT + HRLI T2,(POINT 7,0) + MOVEM T2,INVECT + JRST INCHM0 ;DOIT OVER AGAIN + +INCHL: POP P,T1 +INCHL1: SOSGE MBUF+2 + JRST INCHL2 + ILDB I,MBUF+1 + JUMPE I,INCHL1 + TRNE F,FR.SNK ;IF SNEAKING, + IDPB I,BAKPTR ;SAVE CHARACTER + POPJ P, ;JUST RETURN WITHOUT LISTING + +INCHL2: IN LIB, + JRST INCHL1 + CLOSE LIB, + TRZ F,FR.LIB ;FLAG END OF MACLIB + PUSH P,T1 + MOVE T1,MACPDL + POP T1,INVECT ;RESTORE ORIGINAL INVECT BEFORE MACLIB + POP P,T1 + JRST INCH ;AND GET ANOTHER CHARACTER + +INCHS: SOSGE IBUF+2 + JRST .+3 + ILDB I,IBUF+1 + JRST INCHX + IN SRC, + JRST INCHS +ENDIT: TRZN F,FR.PS1 ;PASS1? + JRST WRAPUP ;NO + TRZ F,FR.END ;TURN OFF END FROM PASS1 (SHOULD ALREADY BE OFF BUT ...) + SETZ E, ;FORGET ALL PASS1 ERRORS + TRZE F,FR.OFF ;ARE WE ASSEMBLING? + WARN W.IF2 ;NO + SETZM IFLEVL + SETZM OFFLVL + MOVE T1,ORGXR ;GET INDEX + MOVEM BC,ORGBLK(T1) ;STORE COUNT + SETZ T1, ;YES + PUSHJ P,OPNOBJ ;OPEN OBJECT DEVICE + SETZM ORGXR ;RESET FOR OUTPUT + MOVE T2,[POINT 7,TITL] + PUSHJ P,NOALT3 + MOVE T2,[POINT 7,SUBTTL] + PUSHJ P,NOALT3 + +NOALT1: PUSHJ P,HEXHED ;DO HEDDER + MOVE T1,FILNAM## + MOVE T2,FILEXT## + SETZ T3, + MOVE T4,PPN## + LOOKUP SRC,T1 + JRST NOFILE## + JRST RESTAR + +NOALT3: ILDB T1,T2 + JUMPN T1,[PUSHJ P,HEXOX + JRST NOALT3] +BCRLF: MOVEI T1,15 + PUSHJ P,HEXOX + MOVEI T1,12 + JRST HEXOX +HEXHED: PUSHJ P,BCRLF +IFN FTREL,< + MOVE T1,RELPTR ;GET SIZE OF RELTAB + CAIGE T1,^D15 ;ENOUGH TO DO A LINE? + JRST HEXH2 ;NO + MOVEI T2,^D15 ;YES, DO 15 + PUSHJ P,TYPE04 ;DO RELOCATABLE TYPE +HEXH2:> ;END IFN FTREL + MOVE T4,ORGXR ;GET INDEX + MOVE T1,ORGBLK(T4) ;GET BYTE COUNT LEFT IN BLOCK + SUBI T1,^D30 ;SUBTRACT WHAT WE'RE GOING TO USE + JUMPLE T1,.+4 ;<= 30 + MOVEM T1,ORGBLK(T4) ;SAVE REST + MOVEI T1,^D30 ;30 BYTES + JRST .+3 + MOVE T1,ORGBLK(T4) ;GET WHAT'S LEFT + SETZM ORGBLK(T4) ;FLAG BLOCK EMPTY + MOVEM T1,CHECK + MOVE BC,T1 ;SAVE BYTES TO OUTPUT + JUMPE BC,EOFBYT ;JUMP IF TIME TO DO EOF STUFF + MOVEI T1,":" ;DO TYPE00 HEADER + PUSHJ P,HEXOX + MOVE T1,BC ;GET BYTE COUNT + PUSHJ P,HEXBYT ;OUTPUT BYTE COUNT + MOVE T1,ORGBLK+1(T4) ;GET START ADDRESS OF BLOCK + LSH T1,-10 ;GET HIGH BYTE + ADDM T1,CHECK + PUSHJ P,HEXBYT ;OUTPUT HIGH ADDRESS + MOVE T1,ORGBLK+1(T4) + ADDM T1,CHECK + PUSHJ P,HEXBYT ;OUTPUT LOW BYTE + MOVE T1,ORGBLK+1(T4) + ADD T1,BC ;LAST S.A. + BYTE COUNT + MOVEM T1,ORGBLK+1(T4) ;= NEW S.A. + SETZ T1, ;DATA (TYPE 00) + SKIPN BC ;IF DATA, SKIP + MOVEI T1,1 ;IF EOF, (TYPE 01) + JRST HEXBYT ;OUTPUT RECORD TYPE +IFN FTREL,< +TYPE04: TRNE F,FR.ORG ;RELOCATING? + POPJ P, ;NO + MOVEI T1,DOLLAR ;FLAG NON-INTEL RECORD + PUSHJ P,HEXOX + MOVE T1,T2 ;GET WORD COUNT + IMULI T1,2 ;MAKE BYTE COUNT + MOVEM T1,CHECK ;CHECKSUM + PUSHJ P,HEXBYT ;OUTPUT + SETZ T1, ;NO START ADDRESS + PUSHJ P,HEXBYT + PUSHJ P,HEXBYT + MOVEI T1,4 ;TYPE 04 (RELOCATABLE) + ADDM T1,CHECK + PUSHJ P,HEXBYT + SETZ T3, ;ZERO XR +T04.1: MOVE T1,RELTAB(T3) ;GET ADDRESS + LSH T1,-10 + ADDM T1,CHECK + PUSHJ P,HEXBYT + MOVE T1,RELTAB(T3) ;GET LO ADDRESS + ANDI T1,377 + ADDM T1,CHECK + PUSHJ P,HEXBYT + AOJ T3, + SOJG T2,T04.1 ;LOOP + MOVE T1,CHECK + ANDI T1,377 + MOVNS T1 + PUSHJ P,HEXBYT ;OUTPUT CHECKSUM + PUSHJ P,BCRLF ;CRLF + + ;SHUFFLE CONTENTS OF RELTAB BACK TO BOTTOM + SETZ T2, + SKIPN T1,RELTAB(T3) + JRST T04.2 + MOVEM T1,RELTAB(T2) + AOJ T2, + AOJA T3,.-4 + +T04.2: MOVEM T2,RELPTR ;RESET POINTER + MOVSI T3,RELTAB(T2) + HRRI T3,RELTAB+1(T2) + SETZM RELTAB(T2) + BLT T3,RELEND + POPJ P, +> ;END IFN FTREL +EOFBYT: +IFN FTREL,< + TRNN F,FR.ORG ;RELOCATING? + SKIPN RELPTR ;RELTAB EMPTY? + JRST DOSYMT ;DO SYMBOL TYPE + MOVE T2,RELPTR ;GET COUNT + CAIL T2,^D15 + MOVEI T2,^D15 ;MAX 15 AT A TIME + PUSHJ P,TYPE04 ;DO A LINE OF TYPE 04 + JRST EOFBYT ;LOOP + +DOSYMT: MOVEI S,SYMTAB ;XR +EOFL: CAIL S,SYMEND ;END ON SYMTAB? + JRST TYPE01 ;YES + SKIPN (S) ;EMPTY? + JRST EOFX ;YES, SKIP + PUSH P,S ;SAVE POINTER + MOVE T3,2(S) + TLNE T3,S.INT!S.EXT ;GOOD STUFF? + PUSHJ P,TYPE02 ;YES + SKIPE S,4(S) + JRST .-4 + POP P,S +EOFX: ADDI S,5 + JRST EOFL ;LOOP + +TYPE02: MOVEI T1,DOLLAR ;TYPE 2 OR 3 LEADER + PUSHJ P,HEXOX + SETZM CHECK + PUSH P,T3 + DMOVE T2,(S) ;GET NAME + MOVE T4,[POINT 6,T2] +T02.1: ILDB T1,T4 ;GET BYTE + ADDI T1,40 ;TO ASCII + ADDM T1,CHECK + PUSHJ P,HEXOX + CAME T4,[600,,T3] ;ALL 12? + JRST T02.1 ;NO + POP P,T3 + TLNE T3,S.INT ;INTERNAL + MOVEI T1,2 ;IS TYPE 02 + TLNE T3,S.EXT ;EXTERNAL + MOVEI T1,3 ;IS TYPE 03 + PUSHJ P,HEXBYT ;OUTPUT SYMBOL TYPE + ADDM T1,CHECK + HRRZ T1,T3 ;GET VALUE + LSH T1,-10 ;GET HIGH PART + ADDM T1,CHECK + PUSHJ P,HEXBYT + HRRZ T1,T3 + ANDI T1,377 + ADDM T1,CHECK + PUSHJ P,HEXBYT + MOVE T1,CHECK + ANDI T1,377 + MOVNS T1 + PUSHJ P,HEXBYT + PUSHJ P,BCRLF + POPJ P, +> ;END IFN FTREL +TYPE01: MOVEI T1,":" ;OUTPUT HEADER + PUSHJ P,HEXOX + SETZ T1, ;LENGTH 0 + PUSHJ P,HEXBYT + MOVE T1,STARTA ;GET START ADDRESS + LSH T1,-10 + PUSHJ P,HEXBYT + MOVE T1,STARTA + ANDI T1,377 + PUSHJ P,HEXBYT + MOVEI T1,1 ;TYPE 01 + PUSHJ P,HEXBYT + JRST BCRLF ;CRLF + +INCHX: POP P,T1 + JUMPE I,INCH ;CAST OFF NULLS + TRNE F,FR.SNK ;IF SNEAKING, + JRST [IDPB I,BAKPTR ;SAVE CHARACTER + POPJ P,] ;DON'T PRINT TWICE + TRNE F,FR.PS1 + JRST PAS1IX ;SKIP ALL PROCESSING OF CHARACTER IF PASS1 + SKIPN LBTP + MOVE LBTP,[POINT 7,LINBLK] + CAIE I,FF ;DON'T GO PUTTING FF IN LINBLK! + IDPB I,LBTP + CAIE I,LF ;IF LF, + CAIN I,FF ;OR FF, + CAIA ;SKIP INTO EOL ROUTINE + POPJ P, ;ELSE WE'RE DONE + PUSH P,T1 + PUSH P,T2 + CAIN I,FF + JRST DOFFX ;IF FF, SKIP SOME STUFF + MOVEI T1,TAB + TRNE F,FR.LOP ;IF CODE GENERATED + JRST INCHX1 ;JUST ONE TAB + PUSHJ P,DOLINO ;PRINT LINE # AS A LAST RESORT + TRNE F,FR.HEX + JRST INCHX0 + PUSHJ P,LOUCH + PUSHJ P,LOUCH +INCHX0: PUSHJ P,LOUCH +INCHX1: PUSHJ P,LOUCH + TRZ F,FR.LIN ;CLEAR LINE # PRINTED FLAG FOR NEXT LINE + MOVE LBTP,[POINT 7,LINBLK] + ILDB T1,LBTP + JUMPE T1,CHKERR + PUSHJ P,LOUCH + SKIPE E + OUTCHR T1 + JRST .-5 +CHKERR: JUMPE E,NOERR + HLRZ T1,E + OUTCHR T1 + PUSHJ P,LOUCH + MOVE T2,ERRTAB-1(E) + MOVE LBTP,[POINT 7,(T2)] + ILDB T1,LBTP + JUMPE T1,.+4 + PUSHJ P,LOUCH + OUTCHR T1 + JRST .-4 + PUSHJ P,LCRLF + OUTSTR CRLF + SETZ E, +NOERR: SETZM LINBLK + MOVE T1,[LINBLK,,LINBLK+1] + BLT T1,LINEND + SETZ LBTP, + MOVE T1,LINCTR + CAMG T1,PAGESZ ;ON NEW PAGE? + JRST NOFF ;NO + JRST DOFF ;YES, WRITE HEADER + +DOFFX: AOS PAGENO + SETZM SUBPAG ;REAL PAGES HAVE NO SUB PAGE MARK +DOFF: PUSHJ P,DOHDFF ;GO DO THE HEADING +NOFF: POP P,T2 + POP P,T1 +PAS1IX: CAIN I,FF ;IF FF, + JRST INCH ;EAT IT + POPJ P, + +LOUCH: TRNE F,FR.LST ;IF NOT LISTING + TRNE F,FR.PS1 ;OR ON PASS 1 + POPJ P, ;FORGET IT + SOSGE LBUF+2 + JRST LOUCH1 + IDPB T1,LBUF+1 + CAIN T1,LF + AOS LINCTR + + CAIN T1,LF ;LF DOESN'T CHANGE BOL + POPJ P, + TRZ F,FR.BOL ;ASSUME REGULAR CHAR + CAIN T1,CR ;IF CR + TRO F,FR.BOL ;FLAG BOL + POPJ P, + +LOUCH1: OUTPUT LST, + JRST LOUCH + +OUTOP: PUSHJ P,LSTPC + MOVE T1,OP + PUSHJ P,LSTOP + POPJ P, ;RETURN + +NOPC: MOVEI T1,TAB + PUSHJ P,LOUCH + TRNN F,FR.HEX + PUSHJ P,LOUCH + MOVE T1,OP + SKIPGE T1 ;IF NEGATIVE + SETZ T1, ;MAKE ZERO + MOVEI T3,6 + TRO F,FR.LOP + PUSHJ P,LSTNUM + TRNE F,FR.HEX + POPJ P, + MOVEI T1,TAB + JRST LOUCH + +HEXOX: SOSL OBUF+2 + JRST [IDPB T1,OBUF+1 + POPJ P,] + OUTPUT OBJ, + JRST HEXOX + +HEXOUT: ADDM T1,CHECK + PUSHJ P,HEXBYT + SOJG BC,CPOPJ + PUSH P,T1 + PUSH P,T2 + PUSH P,T3 + PUSH P,T4 + MOVE T1,CHECK + ANDI T1,377 + MOVNS T1 + PUSHJ P,HEXBYT + MOVE T4,ORGXR ;GET INDEX + SKIPN ORGBLK(T4) ;STILL GOOD BYTE COUNT? + ADDI T4,2 ;NEXT BLOCK + MOVEM T4,ORGXR ;SAVE INDEX + PUSHJ P,HEXHED ;DO HEADER + POP P,T4 + POP P,T3 + POP P,T2 + POP P,T1 + POPJ P, + +HEXBYT: PUSH P,T1 + LSH T1,-4 + PUSHJ P,NYBBLE ;OUTPUT HIGH NYBBLE + POP P,T1 + PUSH P,T1 + PUSHJ P,NYBBLE + POP P,T1 + POPJ P, + +NYBBLE: ANDI T1,17 + CAILE T1,^D9 + JRST .+3 + ADDI T1,60 + JRST HEXOX + ADDI T1,"A"-^D10 + JRST HEXOX + +WRAPUP: +IFN FTCREF,< + PUSHJ P,PRTSYM ;PRINT SYMBOL TABLE +> + RELEAS SYM, + RELEAS LST, + RELEAS OBJ, +IFN FTSTAT,< + TLNE F,FL.LNR ;LIST NON-REF SYMBOLS? + PUSHJ P,REFLOP ;YES +> + AND F,[XWD FL.CCL,0];CLEAR ALL FLAGS BUT FL.CCL + JRST START## +IFN FTSTAT,< + +;PRINT ALL DEFINED BUT NOT REFERENCED SYMBOLS + +REFLOP: MOVEI S,SYMTAB +RLOOP4: CAIN S,SYMEND ;END OF TABLE? + POPJ P, ;DONE + SKIPN (S) ;IF EMPTY + JRST RLOOP5 ;GET NEXT + PUSH P,S ;SAVE IT + PUSHJ P,RLINK ;RUN OUT THIS BRANCH + POP P,S ;DONE +RLOOP5: ADDI S,5 ;GET NEXT + JRST RLOOP4 ;LOOP + +RLINK: MOVE T2,2(S) + TLNN T2,S.REF!S.MAC ;IS SYMBOL REFERENCED OR A MACRO? + JRST RLOOP0 ;NO +RLOOP: SKIPN S,4(S) ;IS THERE A LINK? + POPJ P, ;NO + JRST RLINK + +RLOOP0: SKIPN (S) + JRST RLOOP + TRON F,FL.HED + OUTSTR [ASCIZ/Unreferenced labels: +/] + MOVE T4,[POINT 6,(S)] +RLOOP1: ILDB T2,T4 + JUMPE T2,RLOOP2 + ADDI T2,40 + OUTCHR T2 + CAME T4,[600+S,,1] + JRST RLOOP1 +RLOOP2: OUTSTR [ASCIZ/ +/] + JRST RLOOP +> ;END IFN FTSTAT +IFN FTCREF,< +PRTSYM: SKIPN CREFSW ;CREF? + SKIPE SYMBSW ;OR SYMBOL FILE? + CAIA ;YES, SKIP + POPJ P, ;DON'T BE SILLY THEN + SETZB BC,E ;CLEAR COUNTER + SETOM PAGENO ;FLAG SYMBOL TABLE PAGE + MOVEI T1,1 ;SYMBOL TABLE ALWAYS STARTS WITH SUBPAGE + MOVEM T1,SUBPAG ;NUMBER 1 + SKIPE CREFSW ;CREF? + PUSHJ P,DOHDFX ;PRINT NEW HEADER +PRTS: HRLOI T1,377777 ;+INFINITY + SETZ P1, + MOVEI S,SYMTAB +PRT0: SKIPN (S) ;EMPTY? + AOJA P1,PRT1 ;YES + PUSH P,S ;SAVE S + PUSHJ P,PRT10 ;CHECK OUT THIS BRANCH + POP P,S +PRT1: ADDI S,5 ;NEXT LINK + CAIE S,SYMEND ;ALL DONE? + JRST PRT0 ;NO, LOOP + SKIPE T1 ;QUIT IF WE GOT TO BLANK SYMBOLS + CAMN T1,[377777,,-1] ;NO SYMBOLS SMALLER THAN +INFINITY? + JRST PRTX ;DONE + AOJ BC, ;COUNT IT + MOVE S,T2 + SKIPN CREFSW ;IF NOT CREF + JRST PRT1B ;DON'T PRINT STUFF + DMOVE T2,(S) ;GET SMALLEST SYMBOL + PUSHJ P,PUTSIX ;FOR LISTING + MOVEI T1,TAB + PUSHJ P,LOUCH + MOVE T1,2(S) ;GET FLAGS,VALUE + TLNE T1,S.UNDF ;UNDEFINED? + JRST [MOVEI T2,[ASCIZ/Undf/] + PUSHJ P,PUTSTR + JRST PRT4] + TLNE T1,S.MAC + JRST [MOVEI T2,[ASCIZ/Macro/] + PUSHJ P,PUTSTR + JRST PRT4] + HRRZ T1,2(S) ;JUST VALUE + MOVEI T3,6 + PUSHJ P,LSTNUM ;PRINT IT +PRT1B: SKIPN SYMBSW ;DOING SYMBOL FILE? + JRST PRT4 ;NO + MOVE T1,SYMTYP ;GET 10 OR 20 + JUMPE T1,PRT1A ;NEITHER, START OF FILE + ADD T1,SYMCNT + ANDI T1,7770 ;CUT TO TAB STOP + MOVEM T1,SYMCNT + CAIL T1,MAXSYM ;GOT TO END OF LINE? + JRST [PUSHJ P,SCRLF + SETZM SYMCNT + JRST PRT1A] + MOVEI T1,TAB ;END WITH A TAB + PUSHJ P,SOUCH + MOVEI T1,TAB + MOVE T2,SYMTYP ;GET TYPE + CAIN T2,20 ;NEED 2 TABS? + PUSHJ P,SOUCH ;YES +PRT1A: HRRZ T1,2(S) ;GET FLAGS,VALUE + PUSHJ P,SYMNUM + MOVEI T1,SPACE + PUSHJ P,SOUCH + MOVEI T1,5 ;COUNT 4 DIGITS AND A SPACE + ADDM T1,SYMCNT + DMOVE T2,(S) ;GET SMALLEST SYMBOL + PUSHJ P,PUTSSX ;FOR SYMBOL FILE + MOVEI T1,10 ;ACCOUNT FOR TAB + MOVE T2,(S) ;CHECK FOR SHORT SYMBOLS + TLNN T2,77 ;1 OR 2 CHAR SYMBOL? + MOVEI T1,20 ;YES + MOVE T2,1(S) ;CHECK FOR LONG SYMBOLS + TRNE T2,77 ;12 CHAR SYMBOL? + MOVEI T1,20 ;YES + MOVEM T1,SYMTYP ;SAVE 'TYPE' 10 (NORMAL) OR 20 (SHORT OR LONG) +IFN FTREL,< + SETZ T1, + MOVE T2,2(S) ;GET FLAGS + TLNE T2,S.REL + MOVEI T1,"'" ;FLAG RELOC + TLNE T2,S.EXT!S.INT + MOVEI T1,"*" + SKIPE T1 + PUSHJ P,LOUCH +> ;END IFN FTREL +PRT4: SKIPN CREFSW ;IF NOT CREF + JRST PRT9A ;JUST FLAG SYMBOL AND LOOP + MOVE T2,3(S) ;GET LINE,,LINK +PRT3: MOVEI T4,^D13 ;MAX ENTRIES/LINE +PRT2: PUSH P,T2 + MOVEI T1,TAB + PUSHJ P,LOUCH + HLRZS T2 + TRZ T2,(1B0) ;CLEAR FLAG + MOVEI T1,SPACE + CAIG T2,^D999 + PUSHJ P,LOUCH + CAIG T2,^D99 + PUSHJ P,LOUCH + CAIG T2,^D9 + PUSHJ P,LOUCH + MOVE T1,T2 + PUSHJ P,PUTDEC + POP P,T2 + TLNN T2,(1B0) ;FLAG? + JRST .+3 ;NO + MOVEI T1,"#" + PUSHJ P,LOUCH + HRRZS T2 ;GET LINK + JUMPE T2,PRT9 ;DONE WITH CHAIN + MOVE T2,(T2) ;GET LINE,,LINK + SOJG T4,PRT2 ;LOOP FOR LINE + PUSHJ P,LCRLF ;END THE LINE + MOVE T1,LINCTR + CAMLE T1,PAGESZ ;IF ON NEW PAGE, + PUSHJ P,DOHDFF ;DO HEADER + MOVEI T1,TAB + PUSHJ P,LOUCH + PUSHJ P,LOUCH + JRST PRT3 + +PRT9: PUSHJ P,LCRLF + MOVE T1,LINCTR + CAMLE T1,PAGESZ ;IF ON NEW PAGE, + PUSHJ P,DOHDFF ;DO HEADER +PRT9A: MOVE T3,2(S) ;GET FLAGS + TLO T3,S.PRT ;FLAG SYMBOL PRINTED + MOVEM T3,2(S) + JRST PRTS +PRTX: + SKIPE SYMBSW ;IF SYMBOLS + PUSHJ P,SCRLF ;DO CRLF + SKIPN CREFSW ;IF NOT CREF + POPJ P, ;EXIT +IFN FTSTAT,< + PUSHJ P,LCRLF ;NEW LINE + MOVE T1,BC ;GET COUNT OF SYMBOLS USED + PUSHJ P,PUTDEC + MOVEI T2,[ASCIZ/ symbols used +/] + PUSHJ P,PUTSTR + MOVE T1,P1 + PUSHJ P,PUTDEC + MOVEI T2,[ASCIZ/ empty slots in SYMTAB +/] + PUSHJ P,PUTSTR + CAIG E,1 + POPJ P, + MOVE T1,E + PUSHJ P,PUTDEC + MOVEI T2,[ASCIZ/ links in longest symbol search/] + PUSHJ P,PUTSTR +> ;END IFN FTSTAT + JRST LCRLF ;CRLF + +PRT10: SETZ T4, ;COUNT OF LINKS IN THIS BRANCH + MOVE T3,2(S) ;GET FLAGS + TLNE T3,S.PRT ;WAS ALREADY USED? + JRST PRT11 ;YES + CAMG T1,(S) ;GET SYMBOL THAT IS SMALLER + JRST PRT11 ;(YES, WE ARE ONLY SORTING ON THE FIRST 6 CHARACTERS) + MOVE T2,S ;SAVE INDEX OF LEAST ALPHABETICAL SYMBOL + MOVE T1,(S) ;NEW MATCH SYMBOL +PRT11: AOJ T4, + SKIPE S,4(S) ;GET NEXT LINK + JRST PRT10+1 ;GO ON + CAMLE T4,E ;GT MAX? + MOVE E,T4 ;NEW MAX + POPJ P, ;NO LINK +> ;END IFN FTCREF +LSTNUM: TRNE F,FR.HEX ;HEX OUTPUT? + JRST LSTHEX ;YES + IDIVI T1,10 ;NO + SOJLE T3,.+4 + PUSH P,T2 + PUSHJ P,LSTNUM + POP P,T2 + MOVEI T1,60(T2) +LSTN1: PUSHJ P,LOUCH + POPJ P, + + +LSTHEX: IMULI T3,2 ;MULT BY 2/3 + PUSH P,T4 + IDIVI T3,3 + POP P,T4 +LSTH1: IDIVI T1,20 + SOJLE T3,LSTH2 + PUSH P,T2 + PUSHJ P,LSTH1 + POP P,T2 +LSTH2: CAILE T2,11 + JRST LSTH3 + MOVEI T1,60(T2) + JRST LSTN1 + +LSTH3: MOVEI T1,"A"-^D10(T2) + JRST LSTN1 + +SYMNUM: MOVEI T3,4 +SYMH1: IDIVI T1,20 + SOJLE T3,SYMH2 + PUSH P,T2 + PUSHJ P,SYMH1 + POP P,T2 +SYMH2: CAILE T2,11 + JRST SYMH3 + MOVEI T1,60(T2) + CAIA +SYMH3: MOVEI T1,"A"-^D10(T2) +SOUCH: SOSGE SBUF+2 + JRST SOUCH1 + IDPB T1,SBUF+1 + POPJ P, +SOUCH1: OUTPUT SYM, + JRST SOUCH + +SCRLF: MOVEI T1,CR + PUSHJ P,SOUCH + MOVEI T1,LF + JRST SOUCH +;LSTPC LIST THE PC AND A TAB + +LSTPC: TRNE F,FR.PS1 ;PASS1? + POPJ P, ;YES + PUSHJ P,DOLINO ;IN CASE AT DC? + TRZ F,FR.LIN ;LISTING PC CLEARS FR.LIN + MOVEI T3,6 + MOVE T1,PC + PUSHJ P,LSTNUM + TRNE F,FR.HEX ;HEX? + JRST LSTPC1 ;YES + MOVEI T1,"=" + PUSHJ P,LOUCH + MOVEI T3,3 ;3 FIGURES + MOVE T1,PC ;GET PC + LSH T1,-10 + PUSHJ P,LSTNUM ;OUTPUT THE PC + MOVEI T1,"/" + PUSHJ P,LOUCH + MOVE T1,PC + ANDI T1,377 + MOVEI T3,3 + PUSHJ P,LSTNUM +LSTPC1: +IFN FTREL,< + TRNE F,FR.ORG ;RELOCATING? + JRST LSTPC2 ;NO + MOVEI T1,"'" + PUSHJ P,LOUCH +> ;END IFN FTREL +LSTPC2: MOVEI T1,TAB + PUSHJ P,LOUCH ;OUTPUT ANOTHER TAB + POPJ P, + +LCRLF: TRNE F,FR.PS1 + POPJ P, + MOVEI T1,CR + PUSHJ P,LOUCH + MOVEI T1,LF + JRST LOUCH +;LSTOP ENTER THE BYTE IN T1 IN THE OBJ FILE +; PRINT THE BYTE [AND A SPACE IF OCT] + +LSTOP: TRNE F,FR.PS1 + JRST LSTOP1 + TRO F,FR.LOP + MOVEI T3,3 + PUSH P,T2 + ANDI T1,377 + PUSHJ P,HEXOUT + PUSHJ P,LSTNUM ;OUTPUT BYTE + MOVEI T1,SPACE + TRNN F,FR.HEX + PUSHJ P,LOUCH + POP P,T2 +LSTOP1: AOS PC + TRNE F,FR.PS1 + AOJ BC, + POPJ P, + +DOTAG: TRO F,FR.NRF ;DEFINITION IS NOT REFERENCE + PUSHJ P,EVAL + PUSHJ P,SYMDEF ;FLAG DEFINITION + HRRZS T1 ;CLEAR FLAGS + CAME T1,PC + ERROR F.MULT + JRST DUNTAG + +SYMDEF: TRNE F,FR.PS1 ;PASS1? + POPJ P, ;YES + TRNN F,FR.LST ;LISTING? + POPJ P, ;NO + CAIGE S,SYMTAB ;POINTS TO SYMTAB? + POPJ P, ;NO. PROB POINTS TO PRETAB + PUSH P,T1 + PUSH P,T2 + MOVE T1,3(S) ;GET LINE,,LINK + MOVEI T2,3(S) ;GET 1ST POINTER +DEFS0: TRNN T1,-1 ;END OF CHAIN? + JRST DEFS1 ;YES + MOVE T2,T1 + MOVE T1,(T2) ;LINK + JRST DEFS0 ;LOOP + +DEFS1: TLO T1,(1B0) ;FLAG DEFINITION + MOVEM T1,(T2) ;PUT BACK + POP P,T2 + POP P,T1 + POPJ P, + +DOHDFF: SKIPN PAGESZ ;IF PAGE = 0 + POPJ P, ;DON'T DO ANY HEADERS +DOHDFX: MOVEI T1,FF + PUSHJ P,LOUCH ;FORCE NEW PAGE +DOHEAD: PUSH P,T1 ;SAVE ACS + PUSH P,T2 + PUSH P,T3 + MOVEI T1,1 + MOVEM T1,LINCTR ;SET LINE COUNT TO 1 + MOVE T2,[POINT 7,TITL] + MOVEI T3,^D66 + ILDB T1,T2 + JUMPE T1,.+3 + PUSHJ P,LOUCH + SOJG T3,.-3 + MOVEI T1,11 ;LOAD A <TAB> + SKIPE TITL ;NOT IF NO TITLE + PUSHJ P,LOUCH ;OUTPUT IT + MOVEI T2,HEAD0 + PUSHJ P,PUTSTR + MOVEI T2,M80VER + PUSHJ P,PUTOCT + MOVEI T1,M80MIN + JUMPE T1,.+3 + MOVEI T1,"@"(T1) + PUSHJ P,LOUCH + MOVEI T1,"(" + PUSHJ P,LOUCH + MOVEI T2,M80EDT + PUSHJ P,PUTOCT + MOVEI T2,[ASCIZ/) /] + PUSHJ P,PUTSTR + SKIPL PAGENO + MOVEI T2,HEAD1 + SKIPG PAGENO + MOVEI T2,HEAD3 + PUSHJ P,PUTSTR + MOVEI T2,DATE ;SO WHAT IF WE STARTED AT 11:59 DEC 31 + PUSHJ P,PUTSTR ;WE STILL USE THE DATE OF THE START OF THE RUN + MOVEI T2,HEAD2 + PUSHJ P,PUTSTR + SKIPL T1,PAGENO + PUSHJ P,PUTDEC + SKIPL PAGENO + JRST .+3 + MOVEI T1,"S" ;INDICATE SYMBOL TABLE PAGE + PUSHJ P,LOUCH + SKIPN SUBPAG + JRST NOSUB + MOVEI T1,"-" + PUSHJ P,LOUCH + MOVE T1,SUBPAG + PUSHJ P,PUTDEC +NOSUB: AOS SUBPAG ;BUMP SUBPAGE COUNTER HERE + PUSHJ P,LCRLF + MOVE T2,[POINT 6,FILNAM] ;LOAD THE SOURCE FILE NAME +DOH1: ILDB T1,T2 + JUMPE T1,.+5 + ADDI T1,40 + PUSHJ P,LOUCH + TLNE T2,770K + JRST DOH1 + MOVEI T1,"." ;LOAD A "." + PUSHJ P,LOUCH ;AND OUTPUT IT + HLLZ T2,FILEXT ;LOAD THE SOURCE FILE EXT. + SETZ T3, + PUSHJ P,PUTSIX ;PRINT IT + PUSHJ P,LCRLF + PUSHJ P,LCRLF + POP P,T3 + POP P,T2 + POP P,T1 + POPJ P, + +PUTSTR: HRLI T2,(POINT 7,0) ;MAKE A BTP + ILDB T1,T2 ;LOAD THE BYTE + JUMPE T1,CPOPJ ;IF LAST BYTE, RETURN + PUSHJ P,LOUCH ;OUTPUT IT + JRST .-3 ;AND LOOP + +PUTOCT: MOVE T3,[POINT 3,T2] ;LOAD THE BTP + ILDB T1,T3 ;LOAD THE BYTE + JUMPE T1,.-1 ;IGNORE LEADING ZEROS + CAIA + ILDB T1,T3 + ADDI T1,60 ;MAKE IT ASCII + PUSHJ P,LOUCH ;OUTPUT IT + TLNE T3,770K ;LAST BYTE? + JRST .-4 ;NO, THEN LOOP + POPJ P, ;YES, RETURN + +PUTDEC: IDIVI T1,^D10 ;DIVIDE BY RADIX + JUMPE T1,.+4 ;IF NULL, DO RETURN LOOP + PUSH P,T2 ;SAVE T2 + PUSHJ P,PUTDEC ;RECURSIVE CALL + POP P,T2 ;RESTORE T2 + MOVEI T1,60(T2) ;MAKE ASCII + JRST LOUCH ;OUTPUT AND LOOP RETURN + +CRLF: ASCIZ/ +/ +HEAD0: ASCIZ \MAC80 \ +HEAD1: ASCIZ \8085 Cross Assembler \ +HEAD2: ASCIZ \ Page \ +HEAD3: ASCIZ \Symbol Table \ +GTDATE: MOVE T3,[POINT 7,DATE] + PUSH P,I ;SAVE I + MOVE T1,[60,,11] ;LOAD THE DAY + GETTAB T1, ;NOW + JRST IPOPJ ;PA1050 DIES ON THIS GETTAB + PUSHJ P,GETDEC ;MAKE DECIMAL ASCII + MOVEI T1,"-" + IDPB T1,T3 ;DEPOSIT A HYPHEN + MOVE I,[57,,11] ;LOAD THE MONTH + GETTAB I, + JFCL + MOVE T2,[POINT 7,MONTAB-1(I)] ;SET BTP + ILDB T1,T2 ;LOAD THE BYTE + JUMPE T1,.+3 + IDPB T1,T3 ;DEPOSIT THE BYTE + JRST .-3 ;AND LOOP + MOVEI T1,"-" + IDPB T1,T3 ;DEPOSIT ANOTHER BYTE + MOVE T1,[56,,11] ;LOAD THE YEAR + GETTAB T1, + JFCL + SUBI T1,^D1900 ;LAST TWO ONLY + PUSHJ P,GETDEC ;DEPOSIT IT + MOVEI T1,SPACE ;LOAD AND OUTPUT A SPACE + IDPB T1,T3 + IDPB T1,T3 ;2 SPACES + MOVE T1,[61,,11] ;LOAD THE HOUR + GETTAB T1, + JFCL + PUSHJ P,GETDEC ;AND DEPOSIT IT + MOVEI T1,":" ;LOAD AND OUTPUT A COLON + IDPB T1,T3 + MOVE T1,[62,,11] ;LOAD MINUTES + GETTAB T1, + JFCL + CAIL T1,^D10 ;TWO DIGITS? + JRST .+5 ;YES, THEN DO IT + PUSH P,T1 ;SAVE T1 + MOVEI T1,"0" ;LOAD AND OUTPUT A ZERO + IDPB T1,T3 + POP P,T1 ;RESTORE T1 + PUSHJ P,GETDEC ;AND OUTPUT IT +IPOPJ: POP P,I ;RESTORE I + POPJ P, ;RETURN + +GETDEC: IDIVI T1,^D10 ;DIVIDE BY RADIX + JUMPE T1,.+4 ;IF DONE, JUMP OUT OF LOOP + PUSH P,T2 ;SAVE T2 + PUSHJ P,GETDEC ;AND LOOP + POP P,T2 ;RESTORE T2 + MOVEI T1,60(T2) ;MAKE ASCII + IDPB T1,T3 ;DEPOSIT IT + POPJ P, ;LOOP RETURN +PUTSIX: MOVE T4,[POINT 6,T2] + ILDB T1,T4 + ADDI T1,40 + PUSHJ P,LOUCH + CAME T4,[600,,T3] + JRST .-4 + POPJ P, + +PUTSSX: MOVE T4,[POINT 6,T2] + ILDB T1,T4 + JUMPE T1,CPOPJ + ADDI T1,40 + PUSHJ P,SOUCH + AOS SYMCNT + CAME T4,[600,,T3] + JRST PUTSSX+1 + POPJ P, + +DOLINO: TROE F,FR.LIN ;ALREADY PRINTED? + POPJ P, ;YES, DONE + PUSH P,T1 + PUSH P,T2 + TRNN F,FR.BOL ;AT START OF LINE? + PUSHJ P,LCRLF ;FIXUP BUG IN DC LOGIC (HORRORS) + MOVE T1,LINCTR ;GET LINE COUNT + CAMLE T1,PAGESZ ;TEST IN CASE IN DC? CODE + PUSHJ P,DOHDFF ;IF EXPANSION OF DB OVERFLOWS PAGE + AOS T1,LINENO ;GET LINE # + MOVEI T2,SPACE + EXCH T1,T2 + CAIG T2,^D999 + PUSHJ P,LOUCH + CAIG T2,^D99 + PUSHJ P,LOUCH + CAIG T2,^D9 + PUSHJ P,LOUCH + EXCH T1,T2 + PUSHJ P,PUTDEC ;PRINT IT + MOVE T2,MACPDL + PUSH T2,INVECT +DOLIN2: HRRZ T1,(T2) ;IS THIS A SOURCE LINE? + CAIN T1,-1 ;.. + JRST DOLIN1 ;YES, SKIP + CAIG T1,BAKPTR + CAIGE T1,BAKBUF ;CAME FROM BAKBUF? + JRST [MOVEI T1,"M" ;NO, FLAG AS A MACRO EXPANSION LINE + PUSHJ P,LOUCH + JRST DOLIN1] + SOJA T2,DOLIN2 + +DOLIN1: MOVEI T1,TAB + PUSHJ P,LOUCH ;& A TAB + POP P,T2 + POP P,T1 + POPJ P, + +MONTAB: ASCIZ /Jan/ + ASCIZ /Feb/ + ASCIZ /Mar/ + ASCIZ /Apr/ + ASCIZ /May/ + ASCIZ /Jun/ + ASCIZ /Jul/ + ASCIZ /Aug/ + ASCIZ /Sep/ + ASCIZ /Oct/ + ASCIZ /Nov/ + ASCIZ /Dec/ + ;ADD NEW MONTHS HERE +PASS1: TRZE F,FR.END ;DONE? + JRST ENDIT ;YES + PUSHJ P,TOKEN + PUSHJ P,IFPOP ;IF OR FRIENDS? + JRST NOP1T ;YES + TRNE F,FR.OFF + JRST FPASS1 +NOP1T: JUMPN TOK,.+4 + CAIE I,CR + CAIN I,SEMICO ;END OF LINE? + JRST FPASS1 ;YES, DONE + CAIN I,COLON ;BEFORE A COLON? + JRST LOASYM ;YES, ITS A LABEL + PUSHJ P,SRCHOP ;GET INDEX TO OPCODE + JRST [PUSHJ P,SETMAC;SETUP MACRO + JRST PASS1] + MOVE P1,TYPLSH(X) + TLNE P1,T.POP ;PSEUDO OP? + JRST [PUSHJ P,PSEUDO ;DOIT + JRST PASS1] ;LOOP BACK + AOS PC ;ONE BYTE + AOJ BC, + TLNN P1,T.2BYT!T.3BYT + JRST .+3 + AOS PC ;TWO BYTES + AOJ BC, + TLNN P1,T.3BYTE + JRST .+3 + AOS PC ;THREE BYTES + AOJ BC, +FPASS1: PUSHJ P,FLUSH + JRST PASS1 + +LOASYM: PUSHJ P,SRCSYM + DMOVEM TOK,(S) + HRR T1,PC ;FLAGS,PC + TRNN F,FR.ORG ;IF RELOCATING, + TLO T1,S.REL ;FLAG AS RELOCATABLE + TLZ T1,S.UNDF ;CLEAR UNDEFINED FLAG + CAIL S,SYMTAB ;SKIP IF ILLEGAL + MOVEM T1,2(S) + JRST PASS1 + +UUO: LDB E,[POINT 9,.JBUUO##,8] + JRST @UUOTAB-1(E) + +UUOTAB: EUUO + WUUO + +WUUO: MOVSI E,"%" + JRST EUUO+1 + +EUUO: MOVSI E,"?" + HRR E,.JBUUO + POPJ P, + +DEFINE X(A,B,C,D),< + SIXBIT /A/ + > + + +OPNTAB: XLIST + OPTYPE + LIST + + OPTABL==.-OPNTAB + +DEFINE X(A,B,C,D),< + EXP B + > + +OPCTAB: XLIST + OPTYPE + LIST + +DEFINE X(A,B,C,D),< + XWD C,D + > + +TYPLSH: XLIST + OPTYPE + T.POP,,0 ;SO THAT UNDEF OPCODES DON'T BUMP PC + LIST + +DEFINE W(A,B),< + [ASCIZ \B\]> + +ERRTAB: XLIST + EFLAGS + + LIT + LIST + RELOC 0 + +PRETAB: SIXBIT /A/ + EXP 7 + SIXBIT /B/ + EXP 0 + SIXBIT /C/ + EXP 1 + SIXBIT /D/ + EXP 2 + SIXBIT /E/ + EXP 3 + SIXBIT /H/ + EXP 4 + SIXBIT /L/ + EXP 5 + SIXBIT /M/ + EXP 6 + SIXBIT /SP/ + EXP 6 + SIXBIT /PSW/ + EXP 6 +PRELEN==.-PRETAB + +SYMTAB::BLOCK 5*SYMSIZ +SYMEND==. +LINBLK: BLOCK ^D40 ;HOLDS MAX OF 200 CHARACTER LINE +LINEND==.-1 +STRING: BLOCK 200 ;ROOM FOR 384 BYTES - 2 FULL PAGES OF GENERATED OUTPUT +MACDUM: BLOCK ^D40 ;HOLDS 20 DUMMY MACRO ARGS +MACDML==.-MACDUM +MACDND==.-1 +MACARG: BLOCK ^D100 ;500 CHARACTERS OF MACRO ARGS +MACAND==.-1 +ARGPTR: 0 ;POINTER TO MACARG +ARGSTK: BLOCK 20 ;POINTER TO ARGS OF NESTED MACROS +ARGPDL: 0 ;POINTER TO ARGSTK +REPCNT: 0 ;COUNT OF CURRENT REPT +REPADR: 0 ;ADDRESS OF REPT STRING +EOMFLG: 0 ;FLAG TO TELL THE DIFF BETWEED MACRO AND REPT +PC: 0 +BYTCNT: 0 +XTRAPC: 0 +ORGXR: 0 ;INDEX INTO ORGBLK +ORGBLK: BLOCK 100 ;BYTE COUNT OF BLOCK + ;START ADDRESS OF BLOCK +MACSTK: BLOCK 20 ;INVECT GETS PUSHED ON THIS WHEN A MACRO IS CALLED +MACPDL: 0 ;POINTER TO MACSTK +MACLEV: 0 ;LEVEL OF NESTING IN MACRO +LOCSYM: 0 ;VALUE OF LOCAL SYMBOL +OPSTK: BLOCK 20 ;PDL FOR POLISH STACK (ENOUGH?) +INVECT: 0 ;POINTS TO THE MACRO FROM WHICH INCH WILL GET ITS SOURCE +BAKBUF: BLOCK ^D100 ;HOLDS NEXT 100 WORDS IN BUFFER WHILE DOING SNEAK +BAKPTR: 0 ;POINTER TO BAKBUF +SNEAKI: 0 ;CONTENTS OF REG I WHEN DONE SNEAKING TOKEN +SAVREG: BLOCK 5 ;MISC. STORAGE WHEN STACK IS BUSY +IFLEVL: 0 ;LEVEL OF CURRENT NESTED IF +EXPLVL: 0 ;LEVEL OF CURRENT PAREN IN EXPRESSION +OFFLVL: 0 ;IFLEVL THAT ASSEMBLY WAS TURNED OFF +CHECK: 0 ;CHECKSUM +STARTA: 0 ;START ADDRESS +TITL: BLOCK 20 ;TITLE BUFFER +SUBTTL: BLOCK 40 +SUBTLN==<.-SUBTTL>*5 +IFN FTREL,< +RELPTR: 0 +RELTAB: BLOCK ^D50 ;50 RELOC ADDRESSES (DUMPED WHEN GT 15) +RELEND==.-1 +> +LINENO: 0 +LINCTR: 0 +DELIM: 0 ;USED TO TELL " FROM ' IN DC & SETMAC CODE +PAGENO: 0 +SUBPAG: 0 +SYMCNT: 0 ;NUMBER OF CHARACTERS PER LINE IN SYMBOL FILE +SYMTYP: 0 ;'TYPE' OF LAST SYMBOL IN SYMBOL FILE +PAGESZ: 0 ;SIZE OF PAGE - SET BY 'PAGE' +DATE: 0 + 0 + 0 +ENDHGH::0 + + END + diff --git a/mload.asm b/mload.asm new file mode 100644 index 0000000..668796a --- /dev/null +++ b/mload.asm @@ -0,0 +1,1493 @@ + title 'MLOAD MULTI-FILE HEX LOAD UTILITY' +; +; ********************************* +; * MLOAD.ASM * +; * Multi-file Hex Load Utility * +; * for CP/M * +; ********************************* +; +; +; Replacement for the cp/m "LOAD" program: this program +; fixes many of the problems associated with the "CP/M" +; load program, and adds many new features. +; +; ---------------- +; +; Rev 2.5 +; 03/10/88 +; Property of NightOwl Software, Inc. Fort Atkinson, WI 53538 +; Written by Ron Fowler, Nightowl Software, Inc. +; +; ---------------- +; Notice: this program is NOT public domain; copyright is retained by +; NightOwl Software, Inc. of Fort Atkinson, WI ... All Rights Reserved. +; +; License is granted for free use and re-distribution this program, as +; long as such use and re-distribution is done without profit. +; +; ---------------- +; +; modification history: +; +; 2.5 (WOD) This version corrects a bug that overlayed the first six +; bytes of the CCP. The error did not show up unless a +; jump to the CCP was done without a warm boot since MLOAD +; used. This source file has been modified here with +; concurrence of the author of MLOAD, Ron Fowler. +; +; 2.4 (RGF) We apologize for this relatively insubstantial update, +; but someone has caused what we consider to be a problem, +; by making changes to the program, and re-releasing under +; the same version number. The changes in this case were +; conversion of the opcode fields (but not the comments, +; can you believe that??) of every line to upper case! That +; totally invalidated the CRC of the source file, since there +; are now two different MLOAD 2.3's running around. +; +; We DO NOT want these stupid mixed upper/lower case changes. +; Someone somewhere has decided that this is the way assembly +; language source should be, and we most VEHEMENTLY disagree. +; It's a pain in the neck to make changes to and we don't +; care to run our programs through conversion programs every +; time we make changes. +; +; So ... leave the case of this file AS IS. Any changes made +; to this program and not co-ordinated through us may very +; well endanger availability of source code when we make +; future updates. 'nuff said --NightOwl Software +; +; 2.3 (RGF) Trivial cosmetic changes +; 2.2 (RGF) Modified copyright notice to show new owner of the +; program. +; 2.1 (RGF) Fixed problem on disk-full when writing output file +; (mload previously didn't error out on a full disk) +; 2.0 (RGF) Added the ability to pre-load a non-hex file, allowing +; mload to be used to load hex file patches (obviating any +; need to use DDT). The normal mload syntax is preserved. +; the first (and only the first) filespec (after the "=", +; if used) may be non-hex; the filetype must be specified. +; Examples: +; +; 1) mload ws.com,wspatch +; 2) mload MEXTEST=MEX112.COM,MXO-US13 +; 3) mload ws.ovr,ovrpatch +; +; The first example loads WS.COM, overlays it with +; wspatch.hex, and writes the output to WS.COM. The +; second example loads MEX112.COM, overlays it with +; MXO-US13.HEX, and writes the output file to MEXTEST.COM. +; (note that the second example is the recommended technique, +; since it preserves the original file). The third example +; loads WS.OVR and patches it with the file "OVRPATCH.HEX". +; +; Also added this rev: ZCPR2-style du specs are now fully +; supported, for both input and output files. Thus, the +; following command lines are permissable: +; +; b3>mload a4:myfile.com=0:bigfil,b6:patch1,c9:patch2 +; a6>mload b5:=c3:mdm717.com,mdmpatch +; +; After loading, an additional information line is now printed +; in the statistics report, which displays the true size of the +; saved image (the previous report was technically correct, but +; could result in confusion for certain kinds of files with +; imbedded "DS" and "ORG" statements in the original source code). +; +; 1.0 - 1.4 (RGF) change log removed to conserve space +; +; originally written by ron fowler, fort atkinson, wisconsin +; +; +; +; For assembly with asm.com or mac (delete above title line if +; assembling with asm.com). +; +; This program is a replacement for the cp/m "LOAD" program. +; Why replace "LOAD"? well... LOAD.COM has a few deficiencies. +; For example, if your hex file's origin is above 100h, LOAD.COM +; prepends blank space to the output file to insure it will work +; as a CP/M transient. It cares not if the file is not intended +; as a CP/M transient. it also doesn't like hex records with mixed +; load addresses (for example, one that loads below a previous record -- +; which is a perfectly legitimate happenstance). Also, LOAD.COM +; can load only one program at a time, and has no provision for +; a load bias in the command specification. Finally, there is no +; provision for user specification of the output file name. +; +; +; Hence, this program.... +; +;------------------------------------------------------------ +; +; Syntax is as follows: +; +; mload [<outnam=] <filename>[,<filename>...] [bias] +; +; where <outnam> is the (optional!;) output file name (only the drive +; spec and primary filename may be specified; the output filetype is +; derived exclusively from the 3-byte string at 103h within MLOAD), +; <filename> specifies files to load and <bias> is the offset within +; the saved image to apply when loading the file. +; +; MLOAD with no arguments prints a small help message -- this message +; is also printed whenever a command line syntax error occurs. +; +; Filenames may contain drive/user specs, and must not contain wildcards. +; Input filenames must be separated by commas, and a space is required +; between the last filename and the optional bias. +; +; A load information summary is printed at the successful conclusion +; of the load. Any errors in loading will generally include the name +; of the file in question. +; +; If no output filename is specified, it will be derived from the first +; input filename, with filetype of 'COM', if not otherwise specified +; (this default filetype may be patched directly into mload via DDT +; (or with MLOAD itself, using a patch file) -- its location is at 103H +; in MLOAD.COM). Note that a command line of the form "C:=<FILENAME>" +; will place the output file on the "C" drive with the same primary +; filename as the input file. +; +; In its simplest form, MLOAD's syntax is identical to LOAD.COM; thus +; there should be no problem in learning to use the new program. The +; only significant difference here is that, under LOAD.COM, all files +; are output starting at 100h, even if they originate elsewhere. MLOAD +; outputs starting at the hex file origin (actually, the first hex rec- +; ord specifies the output load address). The bias option may be used +; to override this. +; +; An example should clarify this. Suppose you have a file that loads +; at 1000h. LOAD.COM would save an output file that begins at 100h and +; loads past 1000h (to wherever the program ends). MLOAD will save an +; output file starting from 1000h only. If, for some reason you need the +; file to start at 100h in spite of its 1000h origin (i can think of sev- +; eral circumstances where this would be necessary), you'd have to specify +; a bias to mload. thus, using this example, "MLOAD MYFILE 0F00" would do. +; +; Note that this program re-initializes itself each time it is run. +; Thus, if your system supports a direct branch to the tpa (via a zero-length +; .COM file, or the ZCPR "GO" command), you may safely re-execute MLOAD. +; +; Please report any bugs, bug fixes, or enhancements to +; +; "FORT FONE FILE FOLDER" rcpm/cbbs +; Fort Atkinson, Wisconsin +; (414) 563-9932 (no ring back) +; +; --Ron Fowler +; 03/08/84 updated 1/31/85 +; +;------------------------------------------------------------ +; +; CP/M equates +; +warmbt equ 0 ;warm boot +system equ 5 ;system entry (also top of mem pntr) +dfcb equ 5ch ;default file control block +ft equ 9 ;fcb offset to filetype +tbuf equ 80h ;default buffer +tpa equ 100h ;transient program area +eof equ 1ah ;cp/m end-of-file mark +fcbsiz equ 33 ;size of file control block +; +; CP/M system calls +; +pcharf equ 2 ;print char +seldf equ 14 ;select disk drive +openf equ 15 ;open file +closef equ 16 ;close file +fsrchf equ 17 ;search for first +fsrchn equ 18 ;search for next +erasef equ 19 ;delete file +readf equ 20 ;read record +writef equ 21 ;write record +creatf equ 22 ;create file +getdrf equ 25 ;return dflt drive # +sdmaf equ 26 ;set dma address +gsuser equ 32 ;get/set user # +rrand equ 33 ;read random +wrand equ 34 ;write random +filszf equ 35 ;compute file size +srand equ 36 ;set random +; +; ASCII character constants +; +cr equ 13 +lf equ 10 +bel equ 7 +tab equ 9 +; +; without further ado... +; + org tpa +; + jmp begin ;jump over default output filetype +; +; the default output filetype is located at 103h for easy patching +; +outtyp: db 'COM' +; +begin: lxi h,0 ;save system stackpointer + dad sp + shld spsave + lxi sp,stack ;load local stack + call ilprnt ;sign on + db 'MLOAD ver. 2.5 Copyright (C) 1983, 1984, 1985' + db cr,lf + db 'by NightOwl Software, Inc.' + db cr,lf,0 + call setup ;initialize +main: call nxtfil ;parse and read next input file + jc done ;no more... + call lodfil ;yep, load it + call closfl ;close it (in case MP/M or TurboDOS) + jmp main ;maybe more +done: call wrtfil ;write the output file +; +; exit to cp/m +; +exit: lxi d,tbuf ;restore dma address + mvi c,sdmaf + call bdos + lda system+2 ;get top of memory pointer + sui 9 ;allow for ccp+slop + lxi h,hiload+1 ;highest load address + sub m ;above ccp? + jc warmbt ;then warm-boot + lhld spsave ;nope, ccp still in memory + sphl ;restore its stack + ret ;return to ccp +; +; load program initialization +; +setup: lxi h,varset ;initialize variables + lxi d,vars + mvi b,varlen ;by moving in default values + call move + lhld cmdptr ;get first free mem pointer + xchg ;in de + lxi h,tbuf ;point to command tail bufr + mov a,m ;get its length + inx h + ora a ;does it have any length? + jz help ;nope, go give usage help + mov b,a ;yep, get length to b + call move ;move cmd tail to buffer + xchg ;end of dest to hl + mvi m,0 ;stuff a terminator + inx h ;point to first free memory + shld filbuf ;set up file buffer + xchg ;file bufr adrs to de + lhld system+1 ;get top of memory pointer + xra a ;round system to page boundary + sub e + mov c,a ;with result in bc + mov a,h + sui 9 ;allow for ccp + sbb d + mov b,a + xchg ;buffer pointer to hl +nitmem: mvi m,0 ;clear buffer + inx h + dcx b + mov a,b + ora c + jnz nitmem +; +; look for a bias specification in command line +; + lhld cmdptr ;point to command buffer-1 + dcx h + call scanbk ;scan past blanks + ora a ;no non-blank chars? + jz help ;then go print help text +fndspc: inx h ;point to next + mov a,m ;fetch it + ora a ;test it + rz ;line ended, return + cpi ' ' ;nope, test for blank + jnz fndspc ;not blank, continue + call scanbk ;skip blanks + ora a ;end-of-line? + rz ;return if so +; +; hl points to bias in command line +; + lxi d,0 ;init bias + call hexdig ;insure a hex digit + jc synerr ;bad... +hexlp: mov a,m ;no. get next char + inx h ;skip over it + call hexdig ;test for hex digit + jnc digok ;jump if good hex digit + ora a ;must end on null terminator + jnz synerr + xchg ;good end, get bias to hl + shld bias ;stuff it + ret ;done +digok: xchg ;bias to hl + dad h ;skift left 4 to make room + dad h ; for new hex digit + dad h + dad h + xchg ;back to de + add e ;add in new digit + mov e,a + jnc hexlp ;jump if no 8-bit ovfl + inr d ;carry + jmp hexlp +; +; parse next input name, and open resultant file +; +nxtfil: lhld cmdptr ;get command line pointer +next2: lxi d,dfcb ;destination fcb + call fparse ;parse a filename + cpi '=' ;stopped on output specifier? + jnz noteq + lda outnam+2 ;insure no name yet specified + cpi ' ' + jnz synerr ;syntax error if already named + lda outflg ;already been here? + ora a + jnz synerr ;can't be here twice + inr a ;flag that we've been here + sta outflg + inr b ;insure no ambiguous output name + dcr b + jnz afnerr + inx h ;skip over '=' + push h ;save cmd line pointer + lxi h,dfcb-1 ;move the name to output name hold + lxi d,outnam + mvi b,13 ;drive spec too + call move + pop h ;restore command line pointer + jmp next2 ;go parse another +noteq: cpi ',' ;stopped on comma? + jz gcomma ;jump if so + mvi m,0 ;nope, insure end of input + jmp nxt2 ;don't advance over fake end +gcomma: inx h ;skip over comma +nxt2: shld cmdptr ;save new command line pntr + mov a,b ;get ambig char count + ora a ;test it + jnz afnerr ;allow no ambig characters + sta bufptr ;force a disk read + lxi d,dfcb+1 ;look at parsed filename + ldax d + cpi ' ' ;blank? (input ended?) + stc ;get carry ready in case so + rz ;return cy if input gone + dcx d ;nope, point de to start of fcb +open2: push d ;try to open the file + mvi c,openf + call bdos + pop d + inr a ;return=0ffh? + jnz openok ;jump if not +; +; file not found: if filetype blank, set to 'hex' and try again +; + lxi h,dfcb+ft ;point to file type + mov a,m ;anything there? + cpi ' ' + jnz fnferr ;yes, so file not found + mvi m,'H' ;nope, fill in 'hex' + inx h + mvi m,'E' + inx h + mvi m,'X' + jmp open2 ;go try again +; +; here after a good file open +; +openok: call hexchk ;is this a hex file? + rz ;if so, all done + lxi h,comflg ;no, get pointer to flag + mov a,m ;loading first file? + ora a + rnz ;if not, ignore type, consider hex + inr m ;else, set the flag + ret +; +; load current file +; +lodfil: lxi h,comflg ;loading a com file? + mov a,m ;get flag + ani 1 + jnz lodcom ;jump if so + lhld bias ;else get bias on top of stack + push h +; +; load a hex record +; +loadlp: call gnb ;get next file byte + sbi ':' ;look for start-record mark + jnz loadlp ;scan until found + sta cksum ;got it, init checksum to zero + mov d,a ;upper byte of rec cnt=0 + pop b ;retrieve bias adrs + push b ;save it again + call ghbcks ;get hex byte w/checksum + mov e,a ;de now has record length + ora a ;test it + jnz notend ;jump if len<>0 (not eof rec) + pop h ;all done + ret +notend: call ghbcks ;hi byte of rec ld adrs + mov h,a ;accumulate in hl + call ghbcks ;get lo byte + mov l,a ;put lo in l + lda lodflg ;test load flag + ora a + cz lodnit ;not first record, initialize + push h ;save load address + dad d ;add in record length + dcx h ;make highest, not next + lda hipc ;a new high? + sub l + lda hipc+1 + sbb h + jnc notgt ;jump if not + shld hipc ;yep, update hipc + push d ;save reclen + xchg ;load adrs to de + lhld offset ;get offset to form true memory adrs + dad d ;add in offset + dad b ;and bias + shld hiload ;mark highest true memory load adrs + lda system+2 ;validate against top-mem pointer + cmp h + jc memful ;jump if out of memory + pop d ;restore reclen +notgt: pop h ;restore load address + dad b ;add bias to load adrs + push d ;save record length + push h + lhld bytcnt ;add record length to byte count + dad d + shld bytcnt + pop h + xchg + lhld offset ;calculate true memory adrs + dad d ;hl=true loading adrs + pop d ;restore record length + call ghbcks ;skip unused byte of intel format +; +; move the record into memory +; +reclp: call ghbcks ;get hex byte + mov m,a ;store it in buffer + inx h ;point to next + dcr e ;count down + jnz reclp ;until record all read + call ghbcks ;get checksum byte + jnz cserr ;final add cksum should sum 0 + jmp loadlp ;good load, go do nxt record +; +; get next hex byte from input, and +; accumulate a checksum +; +ghbcks: push b ;save em all + push h + push d + call hexin ;get hex byte + mov b,a ;save in b + lxi h,cksum ;add to checksum + mov a,m + add b + mov m,a + mov a,b ;get byte back + pop d ;restore checksum + pop h ;restore other regs + pop b + ret +; +; routine to get next byte from input...forms +; byte from two ascii hex characters +; +hexin: call gnb ;get next input file byte + call hexval ;convert to binary w/validation + rlc ;move into ms nybble + rlc + rlc + rlc + ani 0f0h ;kill possible garbage + push psw ;save it + call gnb ;get next byte + call hexval ;convert it, w/validation + pop b ;get back first + ora b ;or in second + ret ;good byte in a +; +; gnb - utility subroutine to get next +; byte from disk file +gnb: push h ;save all regs + push d + push b + lda bufptr ;get input bufr pointer + ani 7fh ;wound back to 0? + jz diskrd ;go read sector if so +gnb1: mvi d,0 ;else form 16 bit offset + mov e,a + lxi h,tbuf ;from tbuf + dad d ;add in offset + mov a,m ;get next byte + cpi eof ;end of file? + jz eoferr ;error if so + lxi h,bufptr ;else bump buf ptr + inr m + ora a ;return carry clear + pop b ;restore and return + pop d + pop h + ret +; +; read next sector from disk +; +diskrd: mvi c,readf ;bdos "READ SEC" function + lxi d,dfcb + call bdos ;read sector + ora a + jnz eoferr ;error if phys end of file + sta bufptr ;store 0 as new buf ptr + jmp gnb1 ;go re-join gnb code +; +; load a com file +; +lodcom: inr m ;bump the comfile flag + lxi h,tpa ;set origin + call lodnit ;and initialize + xchg ;load address in de + lhld bias ;add in bias + dad d + xchg + lhld offset ;and offset + dad d + xchg ;de has absolute mem adrs of load +; +comlp: lxi h,128 ;calculate next dma + dad d + lda system+2 ;check for space + cmp h + jc memful ;jump if none + push h ;else save next dma + push d ;and this dma + mvi c,sdmaf ;set this dma + call bdos + lxi d,dfcb ;read next record + mvi c,readf + call bdos + pop h ;recall this dma + pop d ;de=next dma + ora a ;end of read? + jnz lodend ;jump if so + lhld comsiz ;no, advance com byte count + lxi b,128 + dad b + shld comsiz + jmp comlp ;continue +; +lodend: dcx h ;one less byte is highest + shld hiload ;set a new high + lhld comsiz ;hi pc=bytecount+100h + lxi d,tpa + dad d + xchg ;to de + lhld bias ;add in bias + dad d + shld hipc + lxi d,tbuf ;reset dma for hex files + mvi c,sdmaf + call bdos + ret +; +; write output file +; +wrtfil: lxi d,dfcb ;point to fcb + push d ;save 2 copies of pointer + push d + call nitfcb ;initialize output fcb + lxi h,outnam ;move output name in + dcx d ;point to user # (prior to fcb) + mvi b,10 ;move user, drive, primary name + call move + mov a,m ;output type blank? + cpi ' ' + jnz wrtnb ;jump if not + lxi h,outtyp ;yes, move dflt output filetype in +wrtnb: mvi b,3 + call move + pop d ;restore fcb pointer + mvi c,erasef ;erase any existing file + call bdos + pop d ;restore fcb pointer + mvi c,creatf ;create a new file + call bdos + inr a ;good create? + jz dirful ;goto directory full error if not + lhld hiload ;yep, get top of bufr pntr + xchg ;in de + lhld filbuf ;get start of bufr adrs + mov a,e ;calculate output file size + sub l + mov c,a ;with result in bc + mov a,d + sbb h + mov b,a + mov a,b ;test length + ora c + jz loderr ;nothing to write??? + lxi d,dfcb ;get fcb pointer +wrlp: push b ;save count + push d ;and fcb pointer + xchg ;get memory pointer to de + lxi h,128 ;add in sector length for next pass + dad d + xthl ;save next dma + push h ;above fcb + mvi c,sdmaf ;set transfer address + call bdos + pop d ;fetch fcb pointer + push d ;save it again + mvi c,writef ;write a sector + call bdos + ora a ;test result + jnz dskful ;disk full error... + lhld reccnt ;no,increment count of records + inx h + shld reccnt + pop d ;restore fcb pointer + pop h ;and memory write pointer + pop b ;and count + mov a,c ;subtract 128 (sec size) from count + sui 128 + mov c,a + jnc wrlp ;jump if some left + mov a,b ;hi-order borrow + sui 1 ;do it (can't "DCR B", doesn't affect cy) + mov b,a ;restore + jnc wrlp ;jump if more left + call closfl ;close output file +; +; report statistics to console +; + call ilprnt + db 'Loaded ',0 + lhld bytcnt ;print # bytes + call decout + call ilprnt + db ' bytes (',0 + call hexout + call ilprnt + db 'H)',0 + call ilprnt + db ' to file %',0 + lda comflg ;did we load a comfile too? + ora a + jz notcom ;jump if not + call ilprnt + db cr,lf,'Over a ',0 + lhld comsiz + call decout + call ilprnt + db ' byte binary file',0 +notcom: call ilprnt + db cr,lf,'Start address: ',0 + lhld lodadr ;print loading address + call hexout + call ilprnt + db 'H Ending address: ',0 + lhld hipc ;print ending load address + call hexout + call ilprnt + db 'H Bias: ',0 + lhld bias + call hexout + call ilprnt + db 'H',cr,lf,0 + call ilprnt + db 'Saved image size: ',0 + lhld reccnt ;get count of image records + push h ;save it + mvi b,7 ;convert to bytes +xlp: dad h + dcr b + jnz xlp + call decout ;print it + call ilprnt + db ' bytes (',0 + call hexout ;now in hex + call ilprnt + db 'H, - ',0 + pop h ;recall record count + call decout ;print it + call ilprnt + db ' records)',cr,lf,0 + lhld lodadr ;fetch loading address + mov a,l ;test if =tpa + ora a + jnz nottpa ;tpa always on page boundary + mov a,h ;lo ok, test hi + cpi (tpa shr 8) and 0ffh + rz ;return if tpa +nottpa: call ilprnt ;not, so print warning msg + db cr,lf,bel + db '++ Warning: program origin NOT at 100H ++' + db cr,lf,0 + ret ;done +; +; *********************** +; * utility subroutines * +; *********************** +; +; +; routine to close any open file +; +closfl: lxi d,dfcb + mvi c,closef + call bdos + inr a ;test close result + jz clserr ;jump if error + ret +; +; print message in-line with code +; +ilprnt: xthl ;message pntr to hl + call prathl ;print it + xthl ;restore and return + ret +; +; print msg pointed to by hl until null. expand +; '%' char to current filename. +; +prathl: mov a,m ;fetch char + inx h ;point to next + ora a ;terminator? + rz ;then done + cpi '%' ;want filename? + jz prtfn ;go do it if so + call type ;nope, just print char + jmp prathl ;continue +; +prtfn: push h ;save pointer + push b + lda dfcb ;fetch dr field of dfcb + ora a ;default drive? + jnz prndf ;jump if not + call getdsk ;get logged-in drive # + inr a ;make it one-relative (as in fcb) +prndf: adi 'A'-1 ;make drive name printable + call type ;print it + lda dfcb-1 ;get user # + cpi 0ffh ;null? + cz getusr ;iff so, get current user + mov l,a ;to hl + mvi h,0 + call decout ;print it + mvi a,':' ;drive names followed by colon + call type + lxi h,dfcb+1 ;setup for name + mvi b,8 ;print up to 8 + call prtnam + mvi a,'.' ;print dot + call type + mvi b,3 ;print filetype field + call prtnam + pop b + pop h ;restore and continue + jmp prathl +; +; print file name .HL max length in b. don't print spaces +; +prtnam: mov a,m ;fetch a char + cpi ' ' ;blank? + jz pwind ;go wind if so + inx h ;nope, move to next + call type ;print it + dcr b ;count down + jnz prtnam ;continue + ret +pwind: inx h ;skip remainder of blank name + dcr b + jnz pwind + ret +; +; print HL in decimal on console +; +decout: push h ;save everybody + push d + push b + lxi b,-10 ;conversion radix + lxi d,-1 +declp: dad b + inx d + jc declp + lxi b,10 + dad b + xchg + mov a,h + ora l + cnz decout ;this is recursive + mov a,e + adi '0' + call type + pop b + pop d + pop h + ret +; +; newline on console +; +crlf: mvi a,cr + call type + mvi a,lf + jmp type +; +; print hl on console in hex +; +hexout: mov a,h ;get hi + call hexbyt ;print it + mov a,l ;get lo, fall into hexbyt +; +; type accumulator on console in hex +; +hexbyt: push psw ;save byte + rar ;get ms nybble.. + rar ;..into lo 4 bits + rar + rar + call nybble + pop psw ;get back byte +nybble: ani 0fh ;mask ms nybble + adi 90h ;add offset + daa ;decimal adjust a-reg + aci 40h ;add offset + daa ;fall into type +; +; type char in a on console +; +type: push h ;save all + push d + push b + mov e,a ;cp/m outputs from e + mvi c,pcharf + call bdos + pop b + pop d + pop h + ret +; +; move: from @hl to @de, count in b +; +move: inr b ;up one +movlp: dcr b ;count down + rz ;return if done + mov a,m ;not done, continue + stax d + inx h ;pointers=pointers+1 + inx d + jmp movlp +; +; scan to first non-blank char in string @hl +; +scanbk: inx h ;next + mov a,m ;fetch it + cpi ' ' + jz scanbk + ret +; +; get hex digit and validate +; +hexval: call hexdig ;get hex digit + jc formerr ;jump if bad + ret +; +; get hex digit, return cy=1 if bad digit +; +hexdig: cpi '0' ;lo boundary test + rc ;bad already? + cpi '9'+1 ;no, test hi + jc hexcvt ;jump if numeric + cpi 'A' ;test alpha + rc ;bad? + cpi 'F'+1 ;no, upper alpha bound + cmc ;pervert carry + rc ;bad? + sui 7 ;no, adjust to 0-f +hexcvt: ani 0fh ;make it binary + ret +; +; ****************** +; * error handlers * +; ****************** +; +synerr: call crlf + call ilprnt + db ' Command line syntax error',cr,lf,cr,lf,0 + jmp help ;give help msg too +; +afnerr: call errxit ;exit with message + db 'Ambiguous file name: % not allowed.',0 +; +fnferr: call errxit + db 'File % not found.',0 +; +dskful: call errxit + db 'Disk full.',0 +; +dirful: call errxit + db 'Directory full.',0 +; +eoferr: call errxit + db 'Premature end-of-file in %',0 +; +cserr: call errxit + db 'Checksum error in %',0 +; +clserr: call errxit + db 'Can''t close %',0 +; +memful: call errxit + db 'Memory full while loading %',0 +; +formerr:call errxit + db 'Format error in file %',0 +; +loderr: call errxit + db 'Writing %, nothing loaded',0 +; +help: call errxit ;print help text + db 'MLOAD syntax:',cr,lf,cr,lf + db 'MLOAD [<OUTFIL>=] <FILE1>[,<FILE2>...] [<BIAS>]',cr,lf + db tab,' (brackets denote optional items)',cr,lf,cr,lf + db tab,'<OUTFIL> is the optional output filename',cr,lf + db tab,'<FILEn> are input file(s)',cr,lf + db tab,'<BIAS> is a hex load offset within the output file' + db cr,lf,cr,lf + db tab,'<FILE1> may be an optional non-HEX file to be patched',cr,lf + db tab,'by subsequently named HEX files (specifying',cr,lf + db tab,'The filetype enables this function).' + db cr,lf,cr,lf + db 'Note that ZCPR2-style drive/user notation may be used in all' + db cr,lf + db 'file specifications (e.g., "B3:MYFILE.COM, "A14:MDM7.HEX").' + db cr,lf,0 +; +; general error handler +; +errxit: call crlf ;new line + pop h ;fetch error msg pointer + call prathl ;print it + call crlf + jmp exit ;done +; +; initialize load parameters +; +lodnit: mvi a,1 ;first record, set load flag + sta lodflg + shld lodadr ;save load address + shld hipc ;and hi load + push d ;save record length + xchg ;de=load address + lhld filbuf ;get address of file buffer + mov a,l ;subtract load adrs from file buffer + sub e + mov l,a + mov a,h + sbb d + mov h,a + shld offset ;save as load offset + push d ;save load address on stack + push b ;save bias + lxi d,outnam+2 ;check output filename + ldax d ;(first char) + cpi ' ' + jnz namskp ;jump if so + lxi h,dfcb+1 ;get first name pointer + mvi b,8 ;(don't include drive spec) + call move +; +; check for outflg=1 (presence of an "="). note that the +; filename may well be blank, and yet outflg <>0, for example +; in the case of "A:=<FILENAME>" or "C4:=<FILENAME>". in +; this case, we want to remember the drive/user specified, but +; use the first input file to form the output name. otherwise, +; we use the current drive/user. +; + lda outflg ;was there an "="? + ora a + jnz namskp ;jump if so + lxi h,outnam ;get destination pointer + call getusr ;get current user # + mov m,a + inx h ;point to drive + call getdsk ;get it + inr a ;fcb's drive is 1-relative + mov m,a +namskp: mvi a,1 ;insure "=" cannot occur anymore + sta outflg + pop b ;restore bias + pop h ;load address to hl + pop d ;restore record length + ret +; +; ********************************* +; * file name parsing subroutines * +; ********************************* +; +; credit where credit's due: +; -------------------------- +; these routines were lifted from bob van valzah's +; "FAST" program. +; +; +; +; ********************************* +; * file name parsing subroutines * +; ********************************* +; +; +; getfn gets a file name from text pointed to by reg hl into +; an fcb pointed to by reg de. leading delimeters are +; ignored. allows drive spec of the form <du:> (drive/user). +; this routine formats all 33 bytes of the fcb (but not ran rec). +; +; entry de first byte of fcb +; exit b=# of '?' in name +; fcb-1= user # parsed (if specified) or 255 +; +; +fparse: call nitfcb ;init 1st half of fcb + call gstart ;scan to first character of name + call getdrv ;get drive/user spec. if present + mov a,b ;get user # or 255 + cpi 0ffh ;255? + jz fpars1 ;jump if so + dcx d ;back up to byte preceeding fcb + dcx d + stax d ;stuff user # + inx d ;onward + inx d +fpars1: call getps ;get primary and secondary name + ret +; +; nitfcb fills the fcb with dflt info - 0 in drive field +; all-blank in name field, and 0 in ex,s1,s2,rc, disk +; allocation map, and random record # fields +; +nitfcb: push h + push d + call getusr ;init user field + pop d + pop h + push d ;save fcb loc + dcx d + stax d ;init user # to currnt user # + inx d + xchg ;move it to hl + mvi m,0 ;drive=default + inx h ;bump to name field + mvi b,11 ;zap all of name fld +nitlp: mvi m,' ' + inx h + dcr b + jnz nitlp + mvi b,33-11 ;zero others, up to nr field +zlp: mvi m,0 + inx h + dcr b + jnz zlp + xchg ;restore hl + pop d ;restore fcb pointer + ret +; +; gstart advances the text pointer (reg hl) to the first +; non delimiter character (i.e. ignores blanks). returns a +; flag if end of line (00h or ';') is found while scaning. +; exit hl pointing to first non delimiter +; a clobbered +; zero set if end of line was found +; +gstart: call getch ;see if pointing to delim? + rnz ;nope - return + ora a ;physical end? + rz ;yes - return w/flag + inx h ;nope - move over it + jmp gstart ;and try next char +; +; getdrv checks for the presence of a du: spec at the text +; pointer, and if present formats drive into fcb and returns +; user # in b. +; +; entry hl text pointer +; de pointer to first byte of fcb +; exit hl possibly updated text pointer +; de pointer to second (primary name) byte of fcb +; b user # if specified or 0ffh +; +getdrv: mvi b,0ffh ;default no user # + push h ;save text pointer +dscan: call getch ;get next char + inx h ;skip pointer over it + jnz dscan ;scan until delimiter + cpi ':' ;delimiter a colon? + inx d ;skip dr field in fcb in case not + pop h ;and restore text pointer + rnz ;return if no du: spec + mov a,m ;got one, get first char + call cvtuc ;may be drive name, cvt to upper case + cpi 'A' ;alpha? + jc isnum ;jump to get user # if not + sui 'A'-1 ;yes, convert from ascii to # + dcx d ;back up fcb pointer to dr field + stax d ;store drive # into fcb + inx d ;pass pointer over drv + inx h ;skip drive spec in text +isnum: mov a,m ;fetch next + inx h + cpi ':' ;du delimiter? + rz ;done then + dcx h ;nope, back up text pointer + mvi b,0 ;got a digit, init user value +uloop: mov a,b ;get accumulated user # + add a ;* 10 for new digit + add a + add b + add a + mov b,a ;back to b + mov a,m ;get text char + sui '0' ;make binary + add b ;add to user # + mov b,a ;updated user # + inx h ;skip over it + mov a,m ;get next + cpi ':' ;end of spec? + jnz uloop ;jump if not + inx h ;yep, return txt pointer past du: + ret +; +; getps gets the primary and secondary names into the fcb. +; entry hl text pointer +; exit hl character following secondary name (if present) +; +getps: mvi c,8 ;max length of primary name + mvi b,0 ;init count of '?' + call getnam ;pack primary name into fcb + mov a,m ;see if terminated by a period + cpi '.' + rnz ;nope - secondary name not given + ;return default (blanks) + inx h ;yup - move text pointer over period +ftpoint:mov a,c ;yup - update fcb pointer to secondary + ora a + jz getft + inx d + dcr c + jmp ftpoint +getft: mvi c,3 ;max length of secondary name + call getnam ;pack secondary name into fcb + ret +; +; getnam copies a name from the text pointer into the fcb for +; a given maximum length or until a delimiter is found, which +; ever occurs first. if more than the maximum number of +; characters is present, character are ignored until a +; a delimiter is found. +; entry hl first character of name to be scanned +; de pointer into fcb name field +; c maximum length +; exit hl pointing to terminating delimiter +; de next empty byte in fcb name field +; c max length - number of characters transfered +; +getnam: call getch ;are we pointing to a delimiter yet? + rz ;if so, name is transfered + inx h ;if not, move over character + cpi '*' ;ambigious file reference? + jz ambig ;if so, fill the rest of field with '?' + cpi '?' ;afn reference? + jnz notqm ;skip if not + inr b ;else bump afn count +notqm: call cvtuc ;if not, convert to upper case + stax d ;and copy into name field + inx d ;increment name field pointer + dcr c ;if name field full? + jnz getnam ;nope - keep filling + jmp getdel ;yup - ignore until delimiter +ambig: mvi a,'?' ;fill character for wild card match +fillq: stax d ;fill until field is full + inx d + inr b ;increment count of '?' + dcr c + jnz fillq ;fall thru to ingore rest of name +getdel: call getch ;pointing to a delimiter? + rz ;yup - all done + inx h ;nope - ignore antoher one + jmp getdel +; +; getch gets the character pointed to by the text pointer +; and sets the zero flag if it is a delimiter. +; entry hl text pointer +; exit hl preserved +; a character at text pointer +; z set if a delimiter +; +getch: mov a,m ;get the character, test for delim +; +; global entry: test char in a for filename delimiter +; +fndelm: cpi '/' + rz + cpi '.' + rz + cpi ',' + rz + cpi ' ' + rz + cpi ':' + rz + cpi '=' + rz + ora a ;set zero flag on end of text + ret +; +; bdos entry: preserves bc, de. if system call is a file +; function, this routine logs into the drive/ +; user area specified, then logs back after +; the call. +; +bdos: call filfck ;check for a file function + jnz bdos1 ;jump if not a file function + call getdu ;get drive/user + shld savedu + ldax d ;get fcb's drive + sta fcbdrv ;save it + dcr a ;make 0-relative + jm bdos0 ;if not default drive, jump + mov h,a ;copy to h +bdos0: xra a ;set fcb to default + stax d + dcx d ;get fcb's user # + ldax d + mov l,a + inx d ;restore de + call setdu ;set fcb's user +; +; note that unspecified user # (value=0ffh) becomes +; a getusr call, preventing ambiguity. +; + call bdos1 ;do user's system call + push psw ;save result + push h + lda fcbdrv ;restore fcb's drive + stax d + lhld savedu ;restore prior drive/user + call setdu + pop h ;restore bdos result registers + pop psw + ret +; +; local variables for bdos replacement routine +; +savedu: dw 0 ;saved drive,user +fcbdrv: db 0 ;fcb's drive +dmadr: dw 80h ;current dma adrs +; +bdos1: push d + push b + mov a,c ;doing setdma? + cpi sdmaf + jnz bdos1a ;jump if not + xchg ;yep, keep a record of dma addresses + shld dmadr + xchg +bdos1a: call system + pop b + pop d + ret +; +; get drive, user: h=drv, l=user +; +getdu: push b ;don't modify bc + push d + mvi c,gsuser ;get user # + mvi e,0ffh + call bdos1 + push psw ;save it + mvi c,getdrf ;get drive + call bdos1 + mov h,a ;drive returned in h + pop psw + mov l,a ;user in l + pop d + pop b ;restore caller's bc + ret +; +; set drive, user: h=drv, l=user +; +setdu: push b ;don't modify bc + push d + push h ;save info + mov e,h ;drive to e + mvi c,seldf ;set it + call bdos1 + pop h ;recall info + push h + mov e,l ;user # to e + mvi c,gsuser + call bdos1 ;set it + pop h + pop d + pop b + ret +; +; check for file-function: open, close, read random, write +; random, read sequential, write sequential. +; +filfck: mov a,c ;get function # + cpi openf + rz + rc ;ignore lower function #'s + cpi closef ;(they're not file-related) + rz + cpi readf + rz + cpi writef + rz + cpi rrand + rz + cpi wrand + rz + cpi fsrchf + rz + cpi fsrchn + rz + cpi erasef + rz + cpi creatf + rz + cpi filszf + rz + cpi srand + ret +; +; convert char to upper case +; +cvtuc: cpi 'a' ;check lo bound + rc + cpi 'z'+1 ;check hi + rnc + sui 20h ;convert + ret +; +; check for hex filetype in fcb name +; +hexchk: push h + push d + push b + mvi b,3 ;type is 3 chars + lxi d,dfcb+9 ;point de to type field + lxi h,hextyp ;point hl to "COM" +hexlop: ldax d + ani 7fh ;ignore attributes + cmp m + inx h + inx d + jnz hexit ;jump if not com + dcr b + jnz hexlop +hexit: pop b ;z reg has result + pop d + pop h + ret +; +hextyp: db 'HEX' +; +; routine to return user # without disturbing registers +; +getusr: push h + push d + push b + mvi c,gsuser + mvi e,0ffh + call bdos + pop b + pop d + pop h + ret +; +; routine to return drive # without disturbing registers +; +getdsk: push h + push d + push b + mvi c,getdrf + call bdos + pop b + pop d + pop h + ret +; +; these are the initial values of the variables, and +; are moved into the variables area by the setup routine. +; if you add variables, be sure to add their intial value +; into this table in the order corresponding to their +; occurance in the variables section. +; +varset: dw 0 ;bias + dw 0 ;hiload + dw 0 ;hipc + db 0 ;cksum + dw cmdbuf ;cmdptr + db 0 ;bufptr + db 0 ;lodflg + dw cmdbuf ;filbuf + dw 0 ;offset + dw 0 ;lodadr + db 0,0,' ' ;outnam + dw 0 ;reccnt + dw 0 ;bytcnt + db 0 ;comflg + dw 0 ;comsiz + db 0 ;outflg +; +varlen equ $-varset ;define length of init table +; +; working variables +; +vars equ $ ;define variables area start +; +bias: ds 2 ;load offset +hiload: ds 2 ;highest true load address +hipc: ds 2 ;highest pc +cksum: ds 1 ;record checksum +cmdptr: ds 2 ;command line pointer +bufptr: ds 1 ;input buffer pointer +lodflg: ds 1 ;something-loaded flag +filbuf: ds 2 ;file buffer location +offset: ds 2 ;load offset into buffer +lodadr: ds 2 ;load address +outnam: ds 13 ;output drive+name +reccnt: ds 2 ;output file record count +bytcnt: ds 2 ;output file bytes loaded count +comflg: ds 1 ;flags com file encountered +comsiz: ds 2 ;size of a loaded com file +outflg: ds 1 ;flags an "=" present in cmd line +; +; end of working variables +; +; +; +; stack stuff +; +spsave: ds 2 ;system stack pntr save +; +; + ds 100 ;50-level stack +; +stack equ $ +cmdbuf equ $ ;command buffer location +; +; + end diff --git a/mload.hex b/mload.hex new file mode 100644 index 0000000..49ef993 --- /dev/null +++ b/mload.hex @@ -0,0 +1,173 @@ +:10010000C30601434F4D2100003922E30B31490C56 +:10011000CD87054D4C4F4144207665722E20322EFE +:1001200035202020436F70797269676874202843F6 +:100130002920313938332C20313938342C203139C9 +:1001400038350D0A6279204E696768744F776C20E4 +:10015000536F6674776172652C20496E632E0D0AA9 +:1001600000CD8F01CD0A02DA7301CD8B02CD7A0565 +:10017000C36401CDBF031180000E1ACDBD0A3A073A +:1001800000D60921C00B96DA00002AE30BF9C92139 +:10019000970B11BD0B0626CD3C062AC40BEB218024 +:1001A000007E23B7CA8F0747CD3C06EB36002322DB +:1001B000C80BEB2A0600AF934F7CD6099A47EB3663 +:1001C00000230B78B1C2BF012AC40B2BCD4606B762 +:1001D000CA8F07237EB7C8FE20C2D301CD4606B71B +:1001E000C8110000CD5506DA69067E23CD5506D22A +:1001F000FB01B7C26906EB22BD0BC9EB29292929EE +:10020000EB835FD2EA0114C3EA012AC40B115C003C +:10021000CDDF09FE3DC241023AD00BFE20C2690685 +:100220003AE20BB7C269063C32E20B0405C29606FD +:1002300023E5215B0011CE0B060DCD3C06E1C30D7D +:1002400002FE2CCA4B023600C34C022322C40B7898 +:10025000B7C2960632C60B115D001AFE2037C81BC6 +:10026000D50E0FCDBD0AD13CC27F022165007EFEB6 +:1002700020C2BD063648233645233658C36002CD1A +:100280005E0BC821DF0B7EB7C034C921DF0B7EE6D1 +:1002900001C264032ABD0BE5CD3103DE3AC29802E8 +:1002A00032C30B57C1C5CD09035FB7C2B002E1C964 +:1002B000CD090367CD09036F3AC70BB7CC9609E5A3 +:1002C000192B3AC10B953AC20B9CD2E20222C10B08 +:1002D000D5EB2ACA0B190922BF0B3A0700BCDA3941 +:1002E00007D1E109D5E52ADD0B1922DD0BE1EB2A67 +:1002F000CA0B19D1CD0903CD090377231DC2F7021B +:10030000CD0903C21107C39802C5E5D5CD1B03472C +:1003100021C30B7E807778D1E1C1C9CD3103CD4EA9 +:100320000607070707E6F0F5CD3103CD4E06C1B04D +:10033000C9E5D5C53AC60BE67FCA520316005F2150 +:100340008000197EFE1ACAF30621C60B34B7C1D14C +:10035000E1C90E14115C00CDBD0AB7C2F30632C666 +:100360000BC33C0334210001CD9609EB2ABD0B19C8 +:10037000EB2ACA0B19EB218000193A0700BCDA39C5 +:1003800007E5D50E1ACDBD0A115C000E14CDBD0ACD +:10039000E1D1B7C2A3032AE00B0180000922E00BE0 +:1003A000C376032B22BF0B2AE00B11000119EB2AA5 +:1003B000BD0B1922C10B1180000E1ACDBD0AC91147 +:1003C0005C00D5D5CDF70921CE0B1B060ACD3C0626 +:1003D0007EFE20C2D9032103010603CD3C06D10EC7 +:1003E00013CDBD0AD10E16CDBD0A3CCAE0062ABF08 +:1003F0000BEB2AC80B7B954F7A9C4778B1CA7207E2 +:10040000115C00C5D5EB21800019E3E50E1ACDBDC6 +:100410000AD1D50E15CDBD0AB7C2D2062ADB0B23F1 +:1004200022DB0BD1E1C179D6804FD2030478D6010B +:1004300047D20304CD7A05CD87054C6F61646564AE +:1004400020002ADD0BCDED05CD870520627974658E +:1004500073202800CD1906CD8705482900CD8705D2 +:1004600020746F2066696C652025003ADF0BB7CADF +:100470009A04CD87050D0A4F766572206120002A07 +:10048000E00BCDED05CD87052062797465206269AA +:100490006E6172792066696C6500CD87050D0A531F +:1004A0007461727420616464726573733A20002A07 +:1004B000CC0BCD1906CD8705482020456E64696EAA +:1004C0006720616464726573733A20002AC10BCDA2 +:1004D0001906CD8705482020426961733A20002A19 +:1004E000BD0BCD1906CD8705480D0A00CD870553F4 +:1004F0006176656420696D6167652073697A653A24 +:1005000020002ADB0BE506072905C20805CDED050D +:10051000CD8705206279746573202800CD1906CD3A +:100520008705482C202D2000E1CDED05CD87052045 +:100530007265636F726473290D0A002ACC0B7DB754 +:10054000C247057CFE01C8CD87050D0A072B2B206D +:100550005761726E696E673A2070726F6772616D73 +:10056000206F726967696E204E4F5420617420318C +:10057000303048202B2B0D0A00C9115C000E10CD25 +:10058000BD0A3CCA2807C9E3CD8D05E3C97E23B760 +:10059000C8FE25CA9C05CD2F06C38D05E5C53A5C6E +:1005A00000B7C2A905CD8B0B3CC640CD2F063A5BE8 +:1005B00000FEFFCC7D0B6F2600CDED053E3ACD2F22 +:1005C00006215D000608CDD8053E2ECD2F06060378 +:1005D000CDD805C1E1C38D057EFE20CAE70523CD38 +:1005E0002F0605C2D805C92305C2E705C9E5D5C54B +:1005F00001F6FF11FFFF0913DAF605010A0009EB06 +:100600007CB5C4ED057BC630CD2F06C1D1E1C93E16 +:100610000DCD2F063E0AC32F067CCD1E067DF51F8D +:100620001F1F1FCD2706F1E60FC69027CE4027E5F6 +:10063000D5C55F0E02CDBD0AC1D1E1C90405C87E92 +:10064000122313C33D06237EFE20CA4606C9CD559C +:1006500006DA5807C9FE30D8FE3ADA6606FE41D8F7 +:10066000FE473FD8D607E60FC9CD0F06CD87052038 +:100670002020202020436F6D6D616E64206C696EB8 +:10068000652073796E746178206572726F720D0ADD +:100690000D0A00C38F07CD8909416D626967756FC7 +:1006A00075732066696C65206E616D653A20252042 +:1006B0006E6F7420616C6C6F7765642E00CD890954 +:1006C00046696C652025206E6F7420666F756E64B8 +:1006D0002E00CD89094469736B2066756C6C2E0001 +:1006E000CD89094469726563746F72792066756C8F +:1006F0006C2E00CD89095072656D6174757265202C +:10070000656E642D6F662D66696C6520696E2025A7 +:1007100000CD8909436865636B73756D20657272DE +:100720006F7220696E202500CD890943616E2774A0 +:1007300020636C6F7365202500CD89094D656D6F51 +:1007400072792066756C6C207768696C65206C6FB7 +:100750006164696E67202500CD8909466F726D61FD +:1007600074206572726F7220696E2066696C6520F4 +:100770002500CD890957726974696E6720252C2080 +:100780006E6F7468696E67206C6F6164656400CD1C +:1007900089094D4C4F41442073796E7461783A0D4C +:1007A0000A0D0A4D4C4F4144205B3C4F555446497D +:1007B0004C3E3D5D203C46494C45313E5B2C3C4621 +:1007C000494C45323E2E2E2E5D205B3C4249415322 +:1007D0003E5D0D0A092020202028627261636B654E +:1007E00074732064656E6F7465206F7074696F6ECA +:1007F000616C206974656D73290D0A0D0A093C4FFF +:10080000555446494C3E20697320746865206F70CA +:1008100074696F6E616C206F757470757420666991 +:100820006C656E616D650D0A093C46494C456E3E2E +:10083000202061726520696E7075742066696C6530 +:100840002873290D0A093C424941533E2020206962 +:1008500073206120686578206C6F6164206F666624 +:100860007365742077697468696E20746865206F99 +:1008700075747075742066696C650D0A0D0A093C03 +:1008800046494C45313E206D617920626520616E9C +:10089000206F7074696F6E616C206E6F6E2D4845AD +:1008A000582066696C6520746F20626520706174E1 +:1008B000636865640D0A09627920737562736571F6 +:1008C00075656E746C79206E616D6564204845585D +:1008D0002066696C65732028737065636966796941 +:1008E0006E670D0A095468652066696C65747970D5 +:1008F0006520656E61626C6573207468697320663B +:10090000756E6374696F6E292E0D0A0D0A4E6F7431 +:10091000652074686174205A435052322D73747983 +:100920006C652064726976652F75736572206E6FD1 +:10093000746174696F6E206D6179206265207573D2 +:10094000656420696E20616C6C0D0A66696C6520B7 +:1009500073706563696669636174696F6E7320287B +:10096000652E672E2C202242333A4D5946494C457C +:100970002E434F4D2C20224131343A4D444D372ED9 +:1009800048455822292E0D0A00CD0F06E1CD8D05D0 +:10099000CD0F06C376013E0132C70B22CC0B22C11C +:1009A0000BD5EB2AC80B7D936F7C9A6722CA0BD5B7 +:1009B000C511D00B1AFE20C2D609215D000608CD54 +:1009C0003C063AE20BB7C2D60921CE0BCD7D0B77A0 +:1009D00023CD8B0B3C773E0132E20BC1E1D1C9CD77 +:1009E000F709CD1B0ACD250A78FEFFCAF3091B1BA8 +:1009F000121313CD5F0AC9E5D5CD7D0BD1E1D51B0F +:100A00001213EB360023060B36202305C2080A0614 +:100A10001636002305C2110AEBD1C9CDA80AC0B70A +:100A2000C823C31B0A06FFE5CDA80A23C2280AFE75 +:100A30003A13E1C07ECD550BFE41DA430AD6401B86 +:100A40001213237E23FE3AC82B06007887878087FF +:100A5000477ED6308047237EFE3AC24B0A23C90E1A +:100A6000080600CD7B0A7EFE2EC02379B7CA750A20 +:100A7000130DC36B0A0E03CD7B0AC9CDA80AC82388 +:100A8000FE2ACA970AFE3FC28B0A04CD550B1213E9 +:100A90000DC27B0AC3A00A3E3F1213040DC2990A7D +:100AA000CDA80AC823C3A00A7EFE2FC8FE2EC8FE0A +:100AB0002CC8FE20C8FE3AC8FE3DC8B7C9CD2F0BD2 +:100AC000C2F20ACD050B22ED0A1A32EF0A3DFAD224 +:100AD0000A67AF121B1A6F13CD1A0BCDF20AF5E598 +:100AE0003AEF0A122AED0ACD1A0BE1F1C900000013 +:100AF0008000D5C579FE1AC2FF0AEB22F00AEBCDC1 +:100B00000500C1D1C9C5D50E201EFFCDF20AF50ED4 +:100B100019CDF20A67F16FD1C1C9C5D5E55C0E0EDA +:100B2000CDF20AE1E55D0E20CDF20AE1D1C1C9792D +:100B3000FE0FC8D8FE10C8FE14C8FE15C8FE21C896 +:100B4000FE22C8FE11C8FE12C8FE13C8FE16C8FE5B +:100B500023C8FE24C9FE61D8FE7BD0D620C9E5D5C6 +:100B6000C50603116500217A0B1AE67FBE2313C266 +:100B7000760B05C2690BC1D1E1C9484558E5D5C519 +:100B80000E201EFFCDBD0AC1D1E1C9E5D5C50E19A4 +:100B9000CDBD0AC1D1E1C900000000000000490C30 +:100BA0000000490C00000000000020202020202030 +:0D0BB0002020202020000000000000000098 +:0000000000 diff --git a/mload.txt b/mload.txt new file mode 100644 index 0000000..879e9b8 --- /dev/null +++ b/mload.txt @@ -0,0 +1,138 @@ + MLOAD + +Description: + + MLOAD is a transient command used to convert a "HEX" file (the +output of an assembler) into an executable "COM" file. + + In its simplest form, MLOAD takes a program that is in valid Intel +hexadecimal format machine code and converts it into a command file that +can be executed. The file becomes filename.COM (the hexadecimal file is +filename.HEX). This form may be used as a replacement to the Digital +Research "LOAD" command. + + The program may also be used to overlay portions of a "COM" file +with patches assembled to a new "HEX" file. + +Syntax: + + mload [<outnam=>][<file1.type>,]<file2>[,<file3...>] [bias] + + <outnam> is the optional output file name. + + <file1.type> is an optional non-HEX file to be patched by + subsequently named HEX files. Specifying the filetype enables this + function. + + <file2> specifies the file to be loaded, unless a file1.type has + been specified. In that case, it specifies a HEX file to load. + + <file3> specifies HEX file(s) to load. + + <bias> is the offset within the saved image to apply when loading + the file. + + MLOAD with no arguments prints a small help message. This + message is also printed whenever a command line syntax error + occurs. + + ZCPR-style du specifications are fully supported, for both + input and output files. The following command lines are + permissible: + + b3>mload a4:myfile.com=0:bigfil,b6:patch1,c9:patch2 + a6>mload b5:=c3:mdm717.com,mdmpatch + + Only the optional drive and user spec and the primary filename + may be specified. The output filetype is derived exclusively from + the 3-byte string at 103h within MLOAD. + + If no output filename is specified, it will be derived from + the first input filename, with filetype of "COM", if not otherwise + specified (this default filetype may be patched directly into MLOAD + via DDT or with MLOAD itself, using a patch file - its location is + at 103H in MLOAD.COM). Note that a command line of the form + "C:=<FILENAME>" will place the output file on the "C" drive with + the same primary filename as the input file. + + This feature obviating any need to use DDT. The first (and + only the first) filespec (after the "=", if used) may be non-HEX + and the filetype must be specified. Examples: + + 1. "mload MYPROG" loads MYPROG.HEX and writes the output to + MYPROG.COM. + + 2. "mload ws.com,wspatch" loads WS.COM, overlays it with + WSPATCH.HEX, and writes the output to WS.COM. + + 3. "mload MEXTEST=MEX114.COM,MXO-US13" loads MEX114.COM, + overlays it with MXO-US13.HEX, and writes the output file to + MEXTEST.COM. Note that this is the recommended technique because + it preserves the original file! + + 4. "mload ws.ovr,ovrpatch" loads WS.OVR and patches it with + "OVRPATCH.HEX". + + Filenames may contain drive/user specs, and must not contain + wildcards. Input filenames must be separated by comas, and a + space is required between the last filename and the optional bias. + + A load information summary is printed at the successful conclusion +of the load. Any errors in loading will generally include the name of +the file in question. + + This program is a replacement for the CP/M "LOAD" program. Why +replace "LOAD"? well... LOAD.COM has a few deficiencies. For example, +if the hex file's origin is above 100h, LOAD.COM prepends blank space +to the output file to insure it will work as a CP/M transient. It +doesn't care if the file is not intended as a CP/M transient and it also +doesn't like hex records with mixed load addresses. For example, one +that loads below a previous record; which is a perfectly legitimate +happenstance. Also, LOAD.COM can load only one program at a time, and +has no provision for a load bias in the command specification. Finally, +there is no provision for user specification of the output file name. + + In its simplest form, MLOAD's syntax is identical to LOAD.COM. +There should be no problem in learning to use the new program. The only +significant difference here is that, under LOAD.COM, all files are +output starting at 100h, even if they originate elsewhere. MLOAD +outputs starting at the hex file origin (actually, the first hex record +specifies the output load address). The bias option may be used to +override this. + + An example should clarify this. Suppose you have a file that loads +at 1000h. LOAD.COM would save an output file that begins at 100h and +loads past 1000h (to wherever the program ends). MLOAD will save an +output file starting from 1000h only. If, for some reason, you need the +file to start at 100h in spite of its 1000h origin (I can think of +several circumstances where this would be necessary), you'd have to +specify a bias to MLOAD. Using this example, "MLOAD MYFILE 0F00" +would do. + + Note that this program re-initializes itself each time it is run. +If your system supports a direct branch to the TPA (via a zero-length +.COM file, or the ZCPR "GO" command), you may safely re-execute MLOAD. + +Error Messages: + + Command line syntax error + Error in command line, re-enter and try again. + Ambiguous file name: <filename.ext> not allowed. + Ambiguous files are not allowed. + File <filename.ext> not found. + Input file could not be found, check spelling and try again. + Disk full. + No room on disk for output file. + Directory full. + No room in directory for output file. + Premature end-of-file in <filename.ext> + Error in input file, correct error, and try again. + Checksum error in <filename.ext> + Error in input file, correct error, and try again. + Can't close <filename.ext> + Problem closing file, disk may be in Read/Only status. + Memory full while loading <filename.ext> + Error in input file, correct error, and try again. + Format error in file <filename.ext> + Error in input file, correct error, and try again. + Writing <filename.ext>, nothing loaded |