home *** CD-ROM | disk | FTP | other *** search
/ 8bitfiles.net/archives / archives.tar / archives / genie-commodore-file-library / C128CPM / ECHO.SFX / echo.doc < prev   
Encoding:
Text File  |  1994-09-04  |  5.4 KB  |  160 lines

  1. ECHO v1.02                                             J. Elliott, October 1993.
  2. ================================================================================
  3.  
  4.   ECHO is used to suppress screen output, usually while running a SUBMIT file.
  5. Syntax is:
  6.  
  7.   ECHO ON
  8.   ECHO OFF
  9.   ECHO { >out:} "message"      (Quotation marks aren't mandatory, but they're
  10.                                 recommended).
  11.   ECHO { >out:} <inpfile.typ
  12.  
  13.  
  14. ECHO ON               turns on screen output.
  15. ECHO OFF              turns it off.
  16. ECHO "message"        turns screen output on, prints the message and turns
  17.                        output off.
  18. ECHO >out: "message"  sends the message to the device out: (the screen is not
  19.                       turned off or on).
  20. ECHO <inpfile         turns the screen on, displays the file inpfile and turns
  21.                       the screen off.
  22. ECHO >out: <inpfile   sends the file to out: (similar to PIP out:=inpfile).
  23.  
  24.   The file 'inpfile' is just a normal text file. If an invalid file-name is
  25. given, then it is assumed to be a message, not a filename, and printed as one.
  26.  
  27.   The message 'message' is formatted as follows:
  28.  
  29. All text characters are printed in lowercase.
  30. The character % precedes a "literal" character, so 'H' -> 'h', but '%H' -> 'H'.
  31. The character ^ precedes a "control" character, so '^[' -> ESCAPE. In a Submit
  32. file, you have to double the arrows (so ^^[ would be used).
  33. The character " is not printed.
  34. To get the character %, use %%. To get ^, use %^. To get ", use %".
  35.  
  36.   Device names for out: are:
  37.  
  38. CON:  Screen. So ECHO >CON: "%HELLO" would produce the message 'Hello'.
  39. LST:  Printer. Thus ECHO >LST: "^[%W1" would turn on double-width print on an
  40.               Epson-compatible printer.
  41. AUX:  Auxiliary device. So ECHO >AUX: <TEXTFILE.001 would send TEXTFILE.001 to
  42.                        the Auxiliary device (eg a serial link).
  43. OUT:  User-defined output. See "Technical notes" below.
  44.  
  45. If an invalid device name is given, then it is assumed to be a message and
  46. printed.
  47.  
  48.   It is recommended that the message is enclosed in quotes, to avoid confusion:
  49.  
  50. ECHO OFF    will turn screen output off, but
  51. ECHO "OFF"  will print 'off'.
  52.  
  53. Similarly, if your message contains the character <, it should be in quotes:
  54.  
  55. ECHO HELLO <INPUT.FIL    will display the contents of INPUT.FIL, but
  56. ECHO "HELLO <INPUT.FIL"  will print 'hello <input.fil'.
  57.  
  58. If your message starts with the characters >, / or - it should also have
  59. quotation marks.
  60.  
  61. Examples:
  62. ---------
  63. 1. A typical PROFILE.SUB produces the following output:
  64.  
  65. CP/M Plus  Amstrad Consumer Electronics Plc
  66.  
  67. v1.4, 61k TPA, 1 disc drive, 112k drive M:
  68.  
  69. A>setdef m:,* [order = (sub,com)]
  70.  
  71. Drive search path:
  72. 1st drive            - M:
  73. 2nd drive            - default
  74.  
  75. Search Order         - SUB,COM
  76.  
  77. A>pip
  78. *m:=basic.com[o]
  79. *m:=dir.com[o]
  80. *m:=erase.com[o]
  81. *m:=paper.com[o]
  82. *m:=pip.com[o]
  83. *m:=rename.com[o]
  84. *m:=setkeys.com[o]
  85. *m:=show.com[o]
  86. *m:=submit.com[o]
  87. *m:=type.com[o]
  88. *
  89. A>
  90.  
  91.   All this screen activity can be annoying. If you begin the PROFILE.SUB with
  92. the command ECHO OFF and end with ECHO ON, you will see:
  93.  
  94. CP/M Plus  Amstrad Consumer Electronics Plc
  95.  
  96. v1.4, 61k TPA, 1 disc drive, 112k drive M:
  97.  
  98. A>echo off
  99.  
  100. A>
  101.  
  102. which looks a lot tidier.
  103.  
  104. 2. If you add to the PROFILE.SUB the line ECHO "^^[P%HELLO, %WORLD^^[Q"
  105.   then the output will look like:
  106.  
  107. CP/M Plus  Amstrad Consumer Electronics Plc
  108.  
  109. v1.4, 61k TPA, 1 disc drive, 112k drive M:
  110.  
  111. A>echo off
  112. Hello, World     (in inverse video)
  113. A>
  114.  
  115. 3. Printer setup: If you create a file called BOLD.SUB containing the line:
  116.  
  117. ECHO >LST: "^^[E"
  118.  
  119. then typing BOLD will put the printer into "bold" mode.
  120. ________________________________________________________________________________
  121.  
  122.   A word of warning: If you change the CP/M temporary file drive (eg with a
  123. SETDEF [TEMPORARY=M:] command) while the ECHO is OFF, then ECHO will become
  124. confused and print the message:
  125.  
  126. WARNING: Temporary file not found, CONOUT:=CRT
  127.  
  128.   The answer is to tell ECHO in advance what the temporary file drive will be.
  129. Do this with the command
  130.  
  131. GENCOM ECHO [SCB=(50,xx)]
  132.  
  133. where xx is:
  134.  
  135. 01 for A:  02 for B:  03 for C:  04 for D:  05 for E:  06 for F:  07 for G:
  136. 08 for H:  09 for I:  0A for J:  0B for K:  0C for L:  0D for M:  0E for N:
  137. 0F for O:  10 for P:.
  138.  
  139. You only need to do the GENCOM once; then ECHO will use the specified drive on
  140. every subsequent occasion.
  141. ________________________________________________________________________________
  142.  
  143. TECHNICAL:  ECHO uses a temporary file in the current temporary file drive to
  144.           store the CONOUT: status while ECHO is OFF. If this file is erased,
  145.           then ECHO ON will connect CONOUT: to device 1 (normally the screen).
  146.  
  147. USER-DEFINED OUTPUT:
  148.  
  149.   At 0133H in the COM file is a 40-byte space for the user output routine. This
  150. should send the character in A to the user output device. All registers may be
  151. altered. The command ECHO >OUT: etc. will then use the user output device. At
  152. present this code consists of a RET.
  153.  
  154. Version 1.02 of ECHO contains the following improvements over v1.01:
  155. 1. Redirectable output ( >out: )
  156. 2. Redirectable input ( <inpfile )
  157. 3. Bug fix. If ECHO OFF!ECHO OFF is typed, the screen can be turned back on with
  158.   ECHO ON (in v1.01, DEVICE CONOUT:=CRT had to be used).
  159. ________________________________________________________________________________
  160.