PHEcho -- extended echo
--- Freeware ---
[page last modified 5/5/2005]
phecho.com is a tiny program to echo characters to the console. And I mean tiny ... it's under 512 bytes, so it will use only a sector on your boot floppy.
The intended use is for DOS boot disks, but it can also be useful at the command line to generate a specific pattern of bytes to be redirected to a file.
What's a bit different about phecho is it can be run either from the DOS command line or from a "device=" line in config.sys. It installs no driver; merely displays the commanded bytes. This can be handy to announce stages during boot, or to (for instance) set the display attribute right after loading ansi.sys.
Unlike echo, phecho does not add a carriage return and linefeed at the end of a line. If you want that, append \d\a.
A problem with the config.sys execution method is that DOS destroys the case of the text before ever passing it to phecho. Because of this, by default, all text will be forced to lowercase, no matter what the case is on the source config.sys line. To compensate for this an exclamation (!) has extra meaning in config.sys (see below).
If you are interested in how phecho works, the source is provided in the supplied zip file.
Here is the help given from the current version:
Echoes argument to console, ver 1.0. Paul Houle (paulhoule.com). Runs as command or in config.sys via "device=". mappings: \ + \:\ Q:= G:> L:< I:| n:^ M:& hex(1 or 2):ASCII char config.sys only: ! + ?:uppercase ?
The "mappings" are how escape sequences are transformed. Escape sequences begin with a backslash. '\\' maps to a single '\', '\Q' maps to an "=", etc. Especially useful is '\xx' maps to the hexadecimal ASCII char xx; e.g. '\1b' is an ASCII ESC character. A single hex digit is sufficient if the character that follows is not hex. E.G. 'line one\d\aline two' is acceptable, but if 'line two' was 'bottom line' you'd need to use 'line one\d\0abottom line'.
Undefined '\x' sequences are discarded (and cause no output). For instance, the sequence '\.' simply disappears. This can be useful placed at the beginning of a line of text, if leading whitespace needs to be generated, since all whitespace in front of the text is normally discarded.
'!' paired with a letter produces a capitalized letter, eg. '!a' is 'A', but only in config.sys. When executing from the command line '!' has no special meaning.
Click here to download phecho.zip
You are visitor 12882 Go to Home Page