Contents of the TXT.DOC file
Programmed by Jim Wilson
Copyright (C) 1991 - Ver 2.4
Txt.Exe is a replacement for the pathetic DOS Type and More commands.
With Txt (short for text) you can view any text or ASCII file on the
screen one page at a time.
TYPE lets you view a text file, but it isn't very useful. If the file
is more than 25 lines long, the data scrolls right off the screen!
Now, if your fast you can hit the CTRL-S or Pause keys and stop the
data before it disappears (if you've got a 386 your going to have to
be REAL fast to catch any data). What happens if you want to see a
line that has already disappeared? You have to start all over again
from the beginning! Now that really stinks.
MORE (which is used in conjunction with Type) allows you to scroll
through a text file one screen at a time, but it really isn't any more
helpful than using Type by itself. After it has written a full screen
of data it displays that useless "-- More --" prompt which doesn't tell
you anything (try hitting an "N" for no and see what happens - More
keeps right on going!). What's worse is that in order for More to work
it needs to build temporary files to store data in. That's no good if
you have a disk that's write protected or one that's full. And to add
insult to injury it's painfully slow, and it can only be used with the
version of DOS it came with (does the error "Incorrect DOS version"
look familiar to you?).
TXT was written to alleviate all of this. It will work with any text
file up to 500 pages long (if your viewing a file bigger than that you
sure won't be using this program!). Theoretically, the maximum file
size is 960,000 bytes (24 lines x 80 characters per line x 500 pages).
Txt allows you to PgUp and PgDn through the file at will. There are no
temporary files, so it works on write protected disks. The screen
writes are MUCH faster because Txt writes directly to video RAM. The
bottom line on the screen lists the keys that Txt uses, so that
worthless "-- More --" prompt is gone for good. Well, by now you're
probably saying "Yea, right, and the program needs a meg of hard drive
space and 640K of RAM to run". Surprise! Txt does all this in about 19K
of RAM and the EXE file is just 6837 bytes long!!
TXT has such small hardware requirements for two reasons; one, because
that's the way I wanted it, and two, because I decided to "sacrifice"
some features. The program uses the PgUp, PgDn, Home, and ESC keys
exclusively. There is no search function, it doesn't use the arrow
keys, you can't view lines wider than 80 characters, and there are no
fancy windows, colors, or command line options to weigh it down. As a
matter of fact, if you don't hit one of the keys that Txt uses, the
program will just beep, it won't do anything else. The 19K of RAM
necessary to load Txt is small enough to use on any computer. The
breakdown goes like this:
10K - Data Buffer. Txt reads 10240 bytes of data from the file
every time it accesses the drive. This cuts down on the
amount of time spent reading the file. You are guaranteed
a minimum of 5 pages of data available at all times.
2K - Pointer Buffer. This is a 500 position (1 for each page)
array of pointers used for faster data access. What this
consists of is a 4 byte address used to identify where
each pages starts relative to the previous page.
7K - Code Space (approximately). This is for the program itself.
19K - Total amount of RAM used by Txt.
These "buffers in RAM" are allocated when the program loads, so don't
worry about needing extra memory as you read deeper and deeper into the
file because 19K is all it will EVER use. The buffers also help to
speed things up a little because almost everything the program does is
done in, or from, RAM. Speed was one thing I didn't want to sacrifice
when I wrote this program.
When a file is viewed you might see a block character appear. This is
the way Txt displays the characters that are un-printable. The ASCII
characters displayed this way are number 7 (bell), 8 (backspace), 10
(line feed), and 13 (carriage return). Character number 9 (tab) is
displayed as a small circle (instead of attempting to "expand" it).
Since tab sizes can vary from file to file this was the best solution.
Txt has one additional advantage over More; it doesn't care what
version of DOS you use so that "Incorrect DOS version" message is a
thing of the past.
WHY A FILE VIEWER?
What about programs like List? That's a great program, there's no
doubt about it. Heck, I even use it; but have you seen it lately? The
COM file is over 20K in size! There are so many options to choose
from that you can easily get confused trying to sort them out. What
about programs like TextView, FileRead, View, and Read? They're all
pretty decent too, but they have a 64K file size limit. That's no
good. I've seen Read.Me files on software disks that are bigger than
My goals for Txt were to make the program small, tight, versatile, and
reasonably fast. I think it is, and I hope you do too.
Example: A:\> Txt filename.ext (Drive letters and paths are supported)
To get a small help screen you can type: A:\> Txt /?
1.0 Initial release to the public. Designed strickly as a replacement
for the DOS More and Type commands. Supported only 2 keys; ESC to
exit and Space Bar for viewing the next page. Written for the
lowest common denominator of hardware (worked in only 4K of RAM!).
1.1 Decided that the lowest common denominator was a little too low.
Increased the buffer size from 80 characters (1 line of data) to
2K (1 page of data). Changed screen writes from 1 line at a time
to 24 lines (1 page) at a time. Added on screen page counter.
1.2 Bug fix to error checking procedure. Bug fix when you displayed
multiple lines with more then 80 characters per line. Changed the
Space Bar to the PgDn key to make things a little easier. Added
the Home key to bring you back to the top of the file.
2.0 Increased data buffer from 2K to 10K for less disk access & faster
viewing of the file. Added the PgUp key to view data from previous
screens. Added the file name to the menu bar.
2.1 Bug fix to monitor checking procedure. Sometimes Txt would
incorrectly set itself for a color monitor when in actuality it
was a monochrome monitor (like a laptop with an LCD display).
Turns cursor off when viewing text and back on again when you
return to DOS.
2.2 Rewrote three internal procedures for greater speed & to decrease
the EXE file size. Added /? help screen.
2.3 Added direct screen writes. Txt always displayed information
relatively fast but now it writes directly to video RAM. Even
PC/XT computers with monochrome monitors offer extremely fast
video performance. Unfortunately, if you have a CGA monitor you
might experience some "snow" when the data is being written to
2.4 Capitalized the file name on the command line. Reset cursor to the
same size it was before Txt was started (Txt turns off the cursor
when your viewing a file). Tweaked the video performance one more
time. Added program name and version number to command line.
THIS PROGRAM IS PUBLIC DOMAIN - YOU CAN DISTRIBUTE IT FREELY AS LONG
AS THE UNALTERED TXT.DOC FILE IS INCLUDED WITH EVERY COPY OF TXT.EXE