home *** CD-ROM | disk | FTP | other *** search
- ECHO v1.02 J. Elliott, October 1993.
- ================================================================================
-
- ECHO is used to suppress screen output, usually while running a SUBMIT file.
- Syntax is:
-
- ECHO ON
- ECHO OFF
- ECHO { >out:} "message" (Quotation marks aren't mandatory, but they're
- recommended).
- ECHO { >out:} <inpfile.typ
-
-
- ECHO ON turns on screen output.
- ECHO OFF turns it off.
- ECHO "message" turns screen output on, prints the message and turns
- output off.
- ECHO >out: "message" sends the message to the device out: (the screen is not
- turned off or on).
- ECHO <inpfile turns the screen on, displays the file inpfile and turns
- the screen off.
- ECHO >out: <inpfile sends the file to out: (similar to PIP out:=inpfile).
-
- The file 'inpfile' is just a normal text file. If an invalid file-name is
- given, then it is assumed to be a message, not a filename, and printed as one.
-
- The message 'message' is formatted as follows:
-
- All text characters are printed in lowercase.
- The character % precedes a "literal" character, so 'H' -> 'h', but '%H' -> 'H'.
- The character ^ precedes a "control" character, so '^[' -> ESCAPE. In a Submit
- file, you have to double the arrows (so ^^[ would be used).
- The character " is not printed.
- To get the character %, use %%. To get ^, use %^. To get ", use %".
-
- Device names for out: are:
-
- CON: Screen. So ECHO >CON: "%HELLO" would produce the message 'Hello'.
- LST: Printer. Thus ECHO >LST: "^[%W1" would turn on double-width print on an
- Epson-compatible printer.
- AUX: Auxiliary device. So ECHO >AUX: <TEXTFILE.001 would send TEXTFILE.001 to
- the Auxiliary device (eg a serial link).
- OUT: User-defined output. See "Technical notes" below.
-
- If an invalid device name is given, then it is assumed to be a message and
- printed.
-
- It is recommended that the message is enclosed in quotes, to avoid confusion:
-
- ECHO OFF will turn screen output off, but
- ECHO "OFF" will print 'off'.
-
- Similarly, if your message contains the character <, it should be in quotes:
-
- ECHO HELLO <INPUT.FIL will display the contents of INPUT.FIL, but
- ECHO "HELLO <INPUT.FIL" will print 'hello <input.fil'.
-
- If your message starts with the characters >, / or - it should also have
- quotation marks.
-
- Examples:
- ---------
- 1. A typical PROFILE.SUB produces the following output:
-
- CP/M Plus Amstrad Consumer Electronics Plc
-
- v1.4, 61k TPA, 1 disc drive, 112k drive M:
-
- A>setdef m:,* [order = (sub,com)]
-
- Drive search path:
- 1st drive - M:
- 2nd drive - default
-
- Search Order - SUB,COM
-
- A>pip
- *m:=basic.com[o]
- *m:=dir.com[o]
- *m:=erase.com[o]
- *m:=paper.com[o]
- *m:=pip.com[o]
- *m:=rename.com[o]
- *m:=setkeys.com[o]
- *m:=show.com[o]
- *m:=submit.com[o]
- *m:=type.com[o]
- *
- A>
-
- All this screen activity can be annoying. If you begin the PROFILE.SUB with
- the command ECHO OFF and end with ECHO ON, you will see:
-
- CP/M Plus Amstrad Consumer Electronics Plc
-
- v1.4, 61k TPA, 1 disc drive, 112k drive M:
-
- A>echo off
-
- A>
-
- which looks a lot tidier.
-
- 2. If you add to the PROFILE.SUB the line ECHO "^^[P%HELLO, %WORLD^^[Q"
- then the output will look like:
-
- CP/M Plus Amstrad Consumer Electronics Plc
-
- v1.4, 61k TPA, 1 disc drive, 112k drive M:
-
- A>echo off
- Hello, World (in inverse video)
- A>
-
- 3. Printer setup: If you create a file called BOLD.SUB containing the line:
-
- ECHO >LST: "^^[E"
-
- then typing BOLD will put the printer into "bold" mode.
- ________________________________________________________________________________
-
- A word of warning: If you change the CP/M temporary file drive (eg with a
- SETDEF [TEMPORARY=M:] command) while the ECHO is OFF, then ECHO will become
- confused and print the message:
-
- WARNING: Temporary file not found, CONOUT:=CRT
-
- The answer is to tell ECHO in advance what the temporary file drive will be.
- Do this with the command
-
- GENCOM ECHO [SCB=(50,xx)]
-
- where xx is:
-
- 01 for A: 02 for B: 03 for C: 04 for D: 05 for E: 06 for F: 07 for G:
- 08 for H: 09 for I: 0A for J: 0B for K: 0C for L: 0D for M: 0E for N:
- 0F for O: 10 for P:.
-
- You only need to do the GENCOM once; then ECHO will use the specified drive on
- every subsequent occasion.
- ________________________________________________________________________________
-
- TECHNICAL: ECHO uses a temporary file in the current temporary file drive to
- store the CONOUT: status while ECHO is OFF. If this file is erased,
- then ECHO ON will connect CONOUT: to device 1 (normally the screen).
-
- USER-DEFINED OUTPUT:
-
- At 0133H in the COM file is a 40-byte space for the user output routine. This
- should send the character in A to the user output device. All registers may be
- altered. The command ECHO >OUT: etc. will then use the user output device. At
- present this code consists of a RET.
-
- Version 1.02 of ECHO contains the following improvements over v1.01:
- 1. Redirectable output ( >out: )
- 2. Redirectable input ( <inpfile )
- 3. Bug fix. If ECHO OFF!ECHO OFF is typed, the screen can be turned back on with
- ECHO ON (in v1.01, DEVICE CONOUT:=CRT had to be used).
- ________________________________________________________________________________
-