]> cloudbase.mooo.com Git - kermit-80.git/blobdiff - cpsker.asm
Bugfix in outmdm (output buffer flush)
[kermit-80.git] / cpsker.asm
index 254d05616b64f7328237ffd33de1cf11f7765edc..c232c11a2ff5244f755b9ecc08a0993f110d2250 100644 (file)
-; 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...
+; CPSKER.ASM\r
+;       KERMIT - (Celtic for "FREE")\r
+;\r
+;       This is the CP/M-80 implementation of the Columbia University\r
+;       KERMIT file transfer protocol.\r
+;\r
+;       Version 4.0\r
+;\r
+;       Copyright June 1981,1982,1983,1984\r
+;       Columbia University\r
+;\r
+; Originally written by Bill Catchings of the Columbia University Center for\r
+; Computing Activities, 612 W. 115th St., New York, NY 10025.\r
+;\r
+; Contributions by Frank da Cruz, Daphne Tzoar, Bernie Eiben,\r
+; Bruce Tanner, Nick Bush, Greg Small, Kimmo Laaksonen, Jeff Damens, and many\r
+; others. \r
+;\r
+;\r
+; This is the header for the system-independent portion of KERMIT, which\r
+; consists of the following files (in this order):\r
+;\r
+;       CPSKER.ASM - this file\r
+;       CPSDEF.ASM - definitions for both KERMIT and KERSYS\r
+;       CPSMIT.ASM - \initialization, main loop, miscellaneous commands \r
+;      CPSCOM.ASM - /(BYE, EXIT, LOG, SET, SHOW, and STATUS) (Part1 of 2)\r
+;       CPSPK1.ASM - \the KERMIT protocol handler (SEND, RECEIVE, LOGOUT,\r
+;       CPSPK2.ASM - / and FINISH commands) (In two parts)\r
+;      CPSREM.ASM - REMOTE commands etc\r
+;      CPSSER.ASM - SERVER commands etc (Empty as yet)\r
+;       CPSTT.ASM  - the transparent commands (TRANSMIT, CONNECT)\r
+;       CPSCPM.ASM - CP/M commands (DIR, ERA)\r
+;       CPSWLD.ASM - the wildcard handler\r
+;       CPSCMD.ASM - the command parser\r
+;       CPSUTL.ASM - utility routines\r
+;       CPSDAT.ASM - Data space and the overlay link space\r
+;\r
+; When building the system-independent part with M80 or MAC80, CPSKER\r
+; INCLUDEs the other files; when building with LASM, each file LINKs to\r
+; the next file.\r
+;\r
+; For now, the system-dependent routines are all in CPSSYS.ASM, with\r
+; the actual configuration defined in CPSTYP.ASM.\r
+;\r
+; revision history (latest first):\r
+;\r
+;      Begin CP/M Kermit-80 version 4.11.\r
+;edit 32, 1-Apr-1991 by MF. Official release of work to date as CP/M Kermit\r
+;      (Kermit-80) Version 4.11.\r
+;      Modified edit level of cpscpm.asm to reflect a bug fix for the TYPE\r
+;      command introduced with edit 13.\r
+;edit 31, 29-Mar-1991 by MF. Modified edit levels of cpsker.asm,\r
+;      cpscom.asm and cpsdat.asm to reflect rename of parameter vermin to\r
+;      revno (revision level) and change of SET COLLISION REPLACE to\r
+;      SET COLLISION OVERWRITE to conform with C-Kermit. Modified\r
+;      edit level of cpsrem.asm to reflect change from REMOTE SET FILE\r
+;      COLLISION REPLACE to REMOTE SET FILE COLLISION OVERWRITE.\r
+;      Modified edit level of cpsutl.asm to reflect code tightening and\r
+;      edit levels of cpsmit.asm and cpspk2.asm to close any open TAKE-file\r
+;      and abort take-file processing if ^C is typed from the console\r
+;      Also corrected ^Z test in cpsmit.asm in INPUT command ("inp2b")\r
+;      Implement "file not found" complaint if a TAKE command can't find\r
+;      the TAKE-file and it's not the initial TAKE (KERMIT.INI)\r
+;      Modified edit level of cpscpm.asm to reflect modification of the\r
+;      TYPE and PRINT commands to cancel file typeout/printout completely\r
+;      if ^C is entered on the console (either immediately or after a key\r
+;      has been pressed to induce a pause) and to immediately begin\r
+;      typeout/printout of the next file (if the filespec was wild-carded)\r
+;      if ^X is entered (either immediately or after a key has been pressed\r
+;      to induce a pause).\r
+;      Modified edit levels of cpsmit.asm and cpscom.asm to reflect addition\r
+;      of the STAY command as a synonym for SET NO-EXIT.\r
+;edit 30, 27-Feb-1991 by MF. Modified edit levels of cpscom.asm,\r
+;      cpsmit.asm, cpsutl.asm and cpsdat.asm to reflect provision for\r
+;      a "revision level" field (1-26=A-Z), addition of QUIT as a synonym\r
+;      for the EXIT command, recognition of C, R and S as abbreviations\r
+;      for the CONNECT, RECEIVE and SEND commands, respectively, display\r
+;      of Kermit version in the VERSION command and a fix to the TAKE-file\r
+;      input routine "r1tchr" to prevent semicolons from being interpreted\r
+;      as command separators during TAKE-file execution. This last fix\r
+;      allows such commands as REMOTE DELETE *.*;* to Kermit-32 to\r
+;      operate as expected.\r
+;edit 29, 14-Feb-1991 by MF. Updated edit levels of cpscom.asm,\r
+;      cpscpm.asm, cpsdat.asm and cpsrem.asm to reflect bug fixes,\r
+;      code tightening and simplified routine "remcli" (in cpsrem.asm)\r
+;      which gets text to be passed on to a remote Kermit in REMOTE\r
+;      Kermit commands.\r
+;edit 28, 8-Feb-1991 by MF. Changed edit level of cpscpm.asm to reflect\r
+;      a bug fix to make TAKE-files work properly with commands such as\r
+;      INPUT which check the keyboard for input.\r
+;edit 27, 30-Jan-1991 by MF. Changed edit levels of cpscpm.asm, cpsrem.asm,\r
+;      cpstt.asm and cpsutl.asm to reflect bug fixes and enhancements\r
+;edit 26, 17-Jan-1991 by MF. Changed edit level of cpscmd.asm to\r
+;      reflect fixes to allow leading spaces/tabs to be ignored when\r
+;      parsing keywords (this was the intent but the code never worked\r
+;      correctly) and to blank the entire fcb in "cmifil" to allow successive\r
+;      COPY commands to function properly. Also changed edit level of\r
+;      cpspk1.asm to reflect further work on "disk full" error reporting.\r
+;edit 25, 14-Jan-1991 by MF. Incremented edit level of cpspk1.asm to\r
+;      reflect bug fix to "disk full" error reporting code so <cr><lf>\r
+;      is not sent directly to the Remote Kermit. This per a report from\r
+;      Russell Lang of Australia's Monash University.\r
+;edit 24, 10-Jan-1991 by MF. Modified edit level of cpxtyp.asm to\r
+;      reflect addition of "terminal required" message for some.\r
+;      machines.\r
+;edit 23, 7-Jan-1991 by MF. Modified edit levels of cpxtyp.asm, cpxswt.asm,\r
+;      cpxbbi.asm to reflect addition of Ampro Little Board support.\r
+;edit 22, 3-Jan-1991 by MF. Incremented edit levels of cpspk1.asm/cpspk2.asm\r
+;      to reflect further mods to "sdata" and "inchr" routines.\r
+;edit 21, 2-Jan-1991 by MF. Incremented edit level of cpspk1.asm to reflect\r
+;      code cleanup in "sdata" routine.\r
+;edit 20, 26-Dec-1990 by MF. Modified edit level of CPSCMD.ASM to reflect\r
+;      fix to allow leading white space to be skipped in lines from\r
+;      TAKE-files as well as from the CP/M command-line tail; this per a\r
+;      phoned-in bug-report to Dr. Martin J. Carter of Nottingham\r
+;      University in the U.K. (PPZMAJOC@vax.ccc.nottingham.ac.uk)\r
+;edit 19, 14-Dec-1990 by MF.  Modified edit level of cpspk2.asm to reflect\r
+;      modification to "gofil" to allow drive specifications in 2nd\r
+;      filename of GET and RECEIVE commands; also modified edit levels of\r
+;      cpspk1.asm and cpsrem.asm to reflect addition of "<<>>" around\r
+;      "X" or "F" packets coming as a reply to a REMOTE command and\r
+;      deletion of an unnecessary instruction before label remc2d\r
+;      in cpsrem.asm.\r
+;edit 18, 9-Dec-1990 by MF. Modified edit levels for Version 4.10\r
+;      yet another time to reflect changes in CPSDAT.ASM to clarify\r
+;      "File size on DIR" status message.\r
+;edit 17, 4-Dec-1990 by MF. Adjusted edit levels of cpscom.asm/cpsdat.asm\r
+;      to reflect addition of Autoreceive status to SHOW/STATUS display.\r
+;edit 16, 30-Nov-1990 by MF. Adjusted edit levels of cpscom.asm/cpsdat.asm\r
+;      to reflect fix to SHOW/STATUS routines to show terminal display\r
+;      mode (quiet/regular). Also adjusted edit level of cpsutl.asm to reflect\r
+;      change to routine "p20ln" to use "pausit" to save code space.\r
+;      Adjusted edit level of cpsdef.asm to reflect change in "fairness"\r
+;      counter prfair from 100 to 50 to make terminal a bit more responsive\r
+;      during CONNECTs.\r
+;edit 15, 27-Nov-1990 by MF. Adjusted edit level of cpspk1.asm to reflect\r
+;      a bug fix.\r
+;edit 14, 27-Nov-1990 by MF. Again adjusted edit level of cpspk1.asm to\r
+;      reflect modifications of "disk-full"and SET INCOMPLETE-FILES behavior.\r
+;edit 13, 23 Nov-1990 by MF.  Adjusted edit level of cpspk1.asm to reflect\r
+;      code changes for "disk full" processing.\r
+;edit 12, 8-Nov-1990 by MF.\r
+;      Adjusted edit levels shown for cpscom.asm/cpspk1.asm/cpsdat.asm to\r
+;      reflect bug fixes and code revisions.\r
+;edit 11, 5-Nov-1990 by MF.\r
+;      Cosmetic changes for main help text for COPY and RENAME commands.\r
+;      Begin CP/M Kermit-80 version 4.10.\r
+;edit 10, 2-Nov-1990 by MF.  Moved Overlay address to 7000H (cpsdat.asm).\r
+;edit 9, 1-Nov-1990 by Mike Freeman (BPA).  Cosmetic changes (command-name\r
+;      changes:  SET BAUD-RATE==>SET SPEED, FCOPY==>COPY, FRENAME==>RENAME,\r
+;      STRING==>OUTPUT, REMOTE CWD==>REMOTE CD per suggestions of FDC\r
+;      to aid in uniformity of nomenclature for various Kermits.\r
+;edit 8, 30-Oct-1990 by Michael Freeman; 301 N.E. 107th Street;\r
+;      Vancouver, WA 98685 USA; Telephone (206)574-8221.\r
+;      Work:  Bonneville Power Administration\r
+;      P.O. Box 491 M/S MORF\r
+;      Vancouver, WA USA 98666\r
+;      Telephone (206)690-2307\r
+;      Implemented FRENAME command to rename a CP/M file.\r
+;      Implemented many Remote commands, variable-length packets up thru\r
+;      94 characters in length.  Fixed a bug in CPSCOM.ASM in the\r
+;      routine "getnp" and a bug in CPSCOM.ASM which caused garbage to appear\r
+;      on the screen when PRTSTR was called with QUIETD flag set.\r
+;      Modified code in module CPSCMD.ASM to skip leading spaces and tabs\r
+;      when getting Kermit commands from the CP/M command line.  This also\r
+;      obviates the necessity to type a leading semicolon to separate the\r
+;      Kermit command from the Kermit commands on the CP/M command line.\r
+;      Fixed code in CPSPK2.ASM which handles file collision detection\r
+;      and resulting file rename per my entries in CPKERM.BWR.\r
+;      and included fix by Russell Lang of Dept. of Electrical and Computer\r
+;      Engineering, Monash University, Australia, to prevent renamed\r
+;      files with SET WARNING ON from having the attributes (e.g., R/O)\r
+;      copied from original file.  Mr. Lang's E-mail address is:\r
+;      Russell Lang    Email: rjl@monu1.cc.monash.edu.au  Phone: (03) 565 3460\r
+;      Department of Electrical and Computer Systems Engineering\r
+;      Monash University, Australia\r
+;      Also fixed a bug in CPSPK2.ASM which prevented completion messages\r
+;      from being displayed if terminal was set to QUIET.\r
+;      Implemented most proposed SET FILE-COLLISION (COLLISION) commands.\r
+;      Implemented SET INCOMPLETE file disposition command.\r
+;      Implemented a few of the proposed REMOTE SET commands.\r
+;      Implemented other fixes suggested in CPKERM.BWR.\r
+;      Moved overlay address to 6C00H.\r
+;      Changed location of .printx in this file so LASM doesn't complain.\r
+;      In system-dependent modules, included HP-125 support.\r
+;      Also modified Telcon Zorba code in CPXHEA.ASM to enable setting\r
+;      of baud-rates and sending of a break.\r
+;      Included Russell Lang of Monash Univ. Australia's implementation\r
+;      for the Microbee series of computers (CPXBEE.ASM).\r
+;      Fixed COMPUPRO version of Kermit to compile correctly and to\r
+;      conform to current syntax for setting baud-rate.\r
+; edit 7, September, 1987.  Added files for SERVER and REMOTE \r
+;      modules (CPSSER/CPSREM).  SERVER is still empty, and may be \r
+;      only wishfull thinking.  I have ideas, but I dont think I \r
+;      will have the time to implement it.\r
+;\r
+; edit 6: 30 March, 1987 by OBSchou.  Start Kermit-80 V4.09 with the \r
+;      overlay address at 6000h.  Also adjusted the INCLUDEs to allow\r
+;      M80 to assmeble these files.\r
+;\r
+; edit 5: 20 June, 1986.  Have added so much code etc that the overlay had to \r
+;       be moved again.. give it to 5000h.  This starts off Kermit-80 V4.08\r
+;\r
+; edit 4 22 April 1986\r
+;       Start work on 4.06.  This should clear up a couple of bugs, add in\r
+;       a few features, and split the system dependent stuff into \r
+;       smaller units.\r
+;\r
+; edit 3a 7 March 86 OBSchou Loughborough england.  Minor additions\r
+;       to cpsker.asm, cpscmd.asm and cpspkt.asm.\r
+;\r
+; edit 3: February 10, 1985 (CJC)\r
+;       Update for v4.05; add "verno" so CPSUTL doesn't have to change\r
+;       just because some other module did.\r
+;\r
+; edit 2: September 10, 1984 (CJC)\r
+;       Update for v4.03.\r
+;\r
+; edit 1: July 27, 1984 (CJC)\r
+;       Created to allow assembly of Kermit by LASM as well as MAC80 and M80.\r
+\r
+verno  EQU     11              ; minor version number\r
+revno  EQU     0               ;[MF]Revision level\r
+                               ;[MF]0-26 yields A-Z\r
+       \r
+; Version 4.10 of Kermit consists of the following edit levels:\r
+;       cpsker.asm edit 32\r
+;       cpsdef.asm edit 9\r
+;       cpsmit.asm edit 30\r
+;       cpscom.asm edit 13\r
+;       cpspk1.asm edit 23\r
+;       cpspk2.asm edit 11\r
+;       cpsrem.asm edit 13\r
+;       cpsser.asm edit 1\r
+;       cpstt.asm  edit 12\r
+;       cpscpm.asm edit 14\r
+;       cpswld.asm edit 4\r
+;       cpscmd.asm edit 13\r
+;       cpsutl.asm edit 30\r
+;      cpsdat.asm edit 19\r
+;       cpxlnk.asm edit 8 (cpslnk.asm is not assembled with cpsker, but it\r
+;               defines the linkage area expected by cpsker, and so must\r
+;               match the description in cpsutl.asm)\r
+;      cpxswt.asm edit 10\r
+;\r
+; Version 4.10 of Kermit has been tested with the following edit levels of\r
+; the system-dependent files:\r
+;       cpxtyp.asm edit 34\r
+;       cpxsys.asm edit 40\r
+;      cpxhea.asm edit 4\r
+;      cpxtor.asm edit 4\r
+;      cpxbbi.asm edit 4 (Ampro Little Board)\r
+;\r
+; Version 4.10 of Kermit is still to be tested fully against all known systems\r
+; so far included in the system dependent overlays.\r
+;\r
+\r
+\r
+FALSE  equ     0\r
+TRUE   equ     NOT FALSE\r
+\r
+cpsker equ     TRUE    ; building system-independent part\r
+debug  equ     FALSE   ; set false for running system.  True => does some\r
+                       ; unusual or unexpected things.\r
+;\r
+; Assembler type.  Define the appropriate one TRUE, the rest FALSE.  (We can't\r
+; use ASM, because it cannot handle multiple input files)\r
+mac80  EQU     FALSE           ; For assembly via MAC80 cross-assembler.\r
+m80    EQU     TRUE            ; For assembly via Microsoft's M80.\r
+lasm   EQU     FALSE           ; For assembly via LASM, a public-domain\r
+                               ; assembler.\r
+;\r
+;       Get the other modules...\r
+\r
+IF lasm                                ; If we're linking, go on to the next file.\r
+       LINK    CPSDEF\r
+ENDIF;lasm\r
+\r
+; If we're still here, we must be using M80 or MAC80.  M80 doesn't\r
+; like ENDs inside conditionals, but the END statement has to be\r
+; in CPSUTL for LASM (otherwise, we'd need a file containing just an\r
+; END statement).  So, we leave off the IF m80 OR mac80 conditional\r
+; that ought to be around these INCLUDEs.  No problem until the next\r
+; incompatible assembler comes along...\r
+; Let's first say where we are:\r
+;\r
+.printx        * CPSKER.ASM (or nearest offer) *\r
+;\r
+.printx        * CPSDEF.ASM *\r
+       INCLUDE CPSDEF.ASM      ; definitions\r
+.printx        * CPSMIT.ASM *\r
+       INCLUDE CPSMIT.ASM      ; initialization, main loop, some commands\r
+.printx * CPSCOM.ASM *\r
+       INCLUDE CPSCOM.ASM      ; part of command/status/set etc\r
+.printx        * CPSPK1.ASM *\r
+       INCLUDE CPSPK1.ASM      ; KERMIT protocol handler (Part 1)\r
+.printx        * CPSPK2.ASM *\r
+       INCLUDE CPSPK2.ASM      ; KERMIT protocol handler (Part 2)\r
+.printx * CPSREM.ASM *\r
+       INCLUDE CPSREM.ASM      ; Kermit REMOTE code (little in it, as yet)\r
+.printx * CPSSER.ASM *\r
+       INCLUDE CPSSER.ASM      ; Kermit SERVER code (As yet, empty)\r
+.printx        * CPSTT.ASM *\r
+       INCLUDE CPSTT.ASM       ; transparent communication handler\r
+.printx        * CPSCPM.ASM *\r
+       INCLUDE CPSCPM.ASM      ; CP/M command support (DIR, ERA)\r
+.printx        * CPSWLD.ASM *\r
+       INCLUDE CPSWLD.ASM      ; wildcard handler\r
+.printx        * CPSCMD.ASM *\r
+       INCLUDE CPSCMD.ASM      ; command parser\r
+.printx        * CPSUTL.ASM *\r
+       INCLUDE CPSUTL.ASM      ; Various utilities and data, and END [ToadHall]\r
+.printx * CPSDAT.ASM *\r
+       INCLUDE CPSDAT.ASM\r
+       END                     ; MAC80 ignores END's in included files...\r