home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / enterprs / cpm / utils / a / echo3.ark / ECHO3.DOC < prev    next >
Encoding:
Text File  |  1989-09-27  |  8.3 KB  |  261 lines

  1. ECHO3.DOC            Document for ECHO3.ASM
  2. 1/12/87            Copyright 1987, Logic Associates, Chicago
  3. Roy Lipscomb              For free distribution only.
  4.  
  5.                 Usable with CP/M 2.2 and CP/M+
  6.  
  7. -----------------------------------------------------------------------------
  8.  
  9.  
  10.  
  11. A.  INTRODUCTION.
  12.  
  13.  
  14. ECHO is a utility program that enables and disables console output.  During
  15. batch jobs, this lets you bypass the display of data that holds no interest.
  16. ECHO can also displays text to the screen, even if console output has been
  17. disabled.
  18.  
  19.     []  ECHO is a transient program.  It is completely removed from memory
  20.         as soon as the system returns to the "A>" prompt. So ECHO does not
  21.         diminish the space available to run other programs.
  22.  
  23.     []  ECHO is compatible with most other software.
  24.  
  25.     []  The source file for ECHO.COM is ECHO3.ASM.  If you reassemble
  26.         ECHO3.ASM, you may rename the resulting ECHO3.COM to ECHO.COM
  27.         for consistency with the name used in this manual.
  28.  
  29.  
  30.  
  31.  
  32. B.  INSTRUCTIONS.
  33.  
  34.  
  35. Instructions for using ECHO are as follows:
  36.  
  37.  
  38.     ECHO3  Enables-disables console output.
  39.     Copyright 1987, Logic Associates, 60660
  40.           For free distribution only.
  41.     ---------------------------------------
  42.     
  43.       Disable output:    ECHO  OFF
  44.     
  45.       Enable output:     ECHO  ON
  46.     
  47.       Display "text,"
  48.       whether on-off:    ECHO  text
  49.     
  50.       Display help:      ECHO  HELP
  51.                       or ECHO  H
  52.                       or ECHO  ?
  53.     
  54.     * "/" means "Toggle upper-lower case":
  55.           Write "/ram/ disk" for "RAM disk".
  56.     * "~" means "Control-".  (E.g., "~Z".)
  57.     * "+" means "Ignore carriage return."
  58.     * Bypass above by "//", ""~~", "or ++".
  59.     
  60.     ---------------------------------------
  61.  
  62.  
  63. In more detail:
  64.  
  65.     []  Why the need to translate characters to upper/lower case?  Because
  66.         SUBMIT translates each command line entirely to upper case, and
  67.         totally ignores the case in which the command line was originally
  68.         typed.
  69.  
  70.     []  ECHO defaults to lower case at the start of each line.
  71.  
  72.     []  If the two characters "~" and "Z" are paired together in "text",
  73.         ECHO will convert them into the single character Control-Z.  The
  74.         same strategy will apply to all other control characters.  This
  75.         bypasses the problems that CP/M has digesting certain control
  76.         when they appear on the command line.
  77.  
  78.     []  If you do not want a carriage-return/line-feed pair to be output
  79.         at the end of "text", put a "+" sign at the end.
  80.  
  81.     []  The special meanings assigned to "/", "+", and "~" above can be
  82.         nullified by pairing the character in question with itself.  In
  83.         that case, a single copy of the character will be displayed.
  84.  
  85.  
  86. Examples:
  87.  
  88.        Originally typed:                           ECHOed as:
  89.     -------------------------        -------------------
  90.  
  91.     ECHO This is line one.            this is line one.
  92.     ECHO THIS is LINE two.            this is line two.
  93.     ECHO /This is line three.        THIS IS LINE THREE.
  94.     ECHO /t/his is line four.        This is line four.
  95.     ECHO //this is line five.        /this is line five.
  96.     ECHO ~~ ++ //                ~ + /
  97.     ECHO line 5a )+                line 5a )( line 5b
  98.     ECHO ( line 5b
  99.  
  100.  
  101.  
  102. C.  THEORY
  103.  
  104.     []  ECHO operates by poking a single byte in the operating system.
  105.  
  106.         For assembly-language hackers:  The location is BIOS+0ch.
  107.         The value poked into that location is either 0C3 Hex or 0C9 Hex.
  108.         These are the machine-code instructions for the opcodes "JMP" and
  109.         "RET" respectively, and represent "ON" and "OFF" respectively.
  110.  
  111.     []  The address of the "echo-switch" is normally computable from
  112.         the contents of memory locations 1 and 2.  There is only one
  113.         program I know of that changes these contents:  XSUB.  Fortunately,
  114.         XSUB saves the original contents before making its change, and
  115.         they can be retrieved from a fixed location within XSUB.
  116.  
  117.  
  118.  
  119. D.  COMPATIBILITY
  120.  
  121.  
  122. ECHO should be compatible with virtually all programs that run under CP/M 2.2
  123. or CP/M+.
  124.  
  125. There are two notable exceptions.  SUPERMIT3 modules IF.COM (v3.0) and #.COM
  126. (v3.0) will not execute while the console is disabled by ECHO.  However,
  127. compatibility can be achieved by SUBMITing the batch jobs FIXIF.SUB and
  128. FIX#.SUB, found in the ECHO3 library.
  129.  
  130. SUPERMIT3 modules IF+.COM and #+.COM have no problems with ECHO.
  131.  
  132. (SUPERMIT is an batch-language extension that brings BASIC-like capabilities
  133. to most batch processors, including SUBMIT, EX15, SUPERSUB, and others.  SUP-
  134. ERMIT can be found on many RCP/Ms, or can be ordered from Logic Associates.)
  135.  
  136.  
  137.  
  138. E.  SPEED TIPS
  139.  
  140.  
  141. ECHOing text can be a slow process.  For each line of text, the command line
  142. must be read from a disk file, and then ECHO.COM must be read from disk.  This
  143. movement of the disk head may cause a noticeable delay after each line.
  144.  
  145. Apart from getting a RAM disk, the best way to speed things up is to use
  146. a RAM-resident batch utility, like EX15.COM.  This will completely eliminate
  147. the need to access the disk when ECHOing text.
  148.  
  149. If you need to use a disk-resident batch utility (one that, like SUBMIT, uses
  150. a $$$.SUB file during execution), here are two tips that will speed up the
  151. ECHOing of multiple lines of text.  Your batch job can use either or both.
  152.  
  153.  
  154.     1.  (NOTE:  This technique can also work with most other programs, but
  155.         not all.  Test this technique with each intended program to see if
  156.         it performs as expected.)
  157.  
  158.         Re-execute the copy of the program already loaded.
  159.  
  160.         To do this,
  161.  
  162.         []  Insert the command--    SAVE 0 A:RE.COM
  163.  
  164.             near the head of your batch job.
  165.  
  166.         []  Optionally:  Insert--    ERA A:RE.COM
  167.  
  168.             near the end of your batch job.
  169.  
  170.         []  In each continous stream of ECHOed lines, change all
  171.             all references to "ECHO" (except the first) to "RE".
  172.  
  173.         For example,
  174.  
  175.             SAVE 0 A:RE
  176.             ECHO OFF
  177.             A:RE Starting the batch job.
  178.             A:RE Please stand by...
  179.             PIP B:=A:XYZ.*
  180.             ECHO Remove disk B: and save.
  181.             A:RE Job now completed.
  182.             A:RE ON
  183.  
  184.  
  185.     2.  (NOTE:  This tip requires time for the batch job to set itself up.
  186.         For small batch jobs, this added time might not outweigh the time
  187.         saved.  So use this tip judiciously.)
  188.  
  189.         Insure that the $$$.SUB file created is as close to the outside
  190.         of the disk as possible (as near to the directory as possible).
  191.         This minimizes movement of the disk head during the batch run.
  192.  
  193.         To use this tip, do the following:
  194.  
  195.         []  Permanently keep a file called "RESERVED" as the first
  196.             file on the A: disk.  The size of this file in pages is
  197.             equivalent to the number of lines in your longest batch
  198.             job, divided by 2 and rounded up.
  199.  
  200.             Thus, if your longest batch job has 31 lines, RESERVED
  201.             should have 16 pages.
  202.  
  203.             To create RESERVED,  type--     SAVE pages A:RESERVED
  204.             where "pages" is the required number of pages.  For our
  205.             example above, you would type-- SAVE 16 A:RESERVED
  206.  
  207.         []  Optionally:  To the space immediately after RESERVED,
  208.             copy any other programs and data files that will be used
  209.             by your batch job.
  210.  
  211.         []  Include the following lines near the start of each batch
  212.             job that will ECHO multiple lines:
  213.  
  214.             PIP RESERVED=RESERVED
  215.             PIP $$$$$$.SUB=$$$$$$.SUB
  216.  
  217.             The above commands swap $$$.SUB into the preferred disk
  218.             area normally occupied by RESERVED.
  219.  
  220.         []  Include the following lines at the end of the batch
  221.             job:
  222.  
  223.             SAVE pages TEMP.$$$$$$
  224.             PIP $$$$$$.SUB=$$$$$$.SUB
  225.             ERA TEMP.$$$$$$
  226.             PIP RESERVED=RESERVED
  227.  
  228.              where "pages" is determined as above.
  229.  
  230.              These commands move RESERVED back into the preferred
  231.              disk area, reserving it for use by a future $$$.SUB.
  232.  
  233.  
  234.  
  235. F. ECHO1.LBR
  236.  
  237.  
  238. For those interested in the historic origin of ECHO, or in comparing the
  239. original version to the current version, ECHO1.LBR is included in this
  240. library.  To get at its contents, extract ECHO1.LBR from ECHO3.LBR, then
  241. extract the members of ECHO1.LBR. 
  242.  
  243. ECHO2 was a pre-release version of ECHO3.
  244.  
  245.  
  246.  
  247. G. SUPPORT
  248.  
  249.  
  250. If you have any comments or questions about ECHO (or would like a catalog
  251. of our commercial software for CP/M), we would be happy to hear from you.
  252. Our address is--
  253.  
  254.         LOGIC ASSOCIATES
  255.         1433 W. Thome
  256.         Chicago, IL 60660
  257.  
  258. Please mention where you obtained your copy of ECHO.
  259.  
  260.                                     [end]
  261.