home *** CD-ROM | disk | FTP | other *** search
- ┌────────────────────────────┐
- │ VIEW.EXE │
- ╞════════════════════════════╡
- │ Programmed by Jim Wilson │
- │Copyright(C) 90-92 * Ver 2.1│
- └────────────────────────────┘
-
-
-
- Stop, hold the presses! Major story breaking - View has been
- rewritten! Yep, it's true. This little file viewer has had almost a
- complete rewrite, all for the sake of speed and increased
- functionality. I've added lots of features and enhanced it's value
- tremendously (at least I think so). For example; there is no longer a
- 64K file size limit - you can load files that are equal in size to
- your available RAM (minus what View itself needs, of course) or 10,
- 000 lines, whichever comes first. There is no longer an 80 character
- per line restriction - you can read lines up to 250 characters wide.
- Loading files from disk is also about 200% faster! For those of you
- still using versions 1.0, 1.1, and 1.1a you might not notice the
- changes immediately because the program appears the same - but you
- will, trust me.
-
-
- If all this sounds kind of dramatic for such a little program then
- maybe I let my enthusiasm get the best of me. You see, I've spent a
- great deal of time enhancing View, so read on and find out what I'm
- talking about.
-
-
-
- ┌──────────────────────┐
- │ GENERAL INFORMATION │
- └──────────────────────┘
-
- View is a text and ASCII file viewer. You can use View to read just
- about any BAT, DOC, TXT, or Read.Me type of file. It allows you to
- read a file with up to 10,000 lines, or as many as will fit into
- your RAM. Each line can contain up to 250 characters. What's so
- special about that? I'm glad you asked!
-
-
- There are a million text file viewers floating around. Hell, you may
- have even written one yourself. I've written three or four different,
- but somewhat specialized, viewers over the years. If you have spent
- more than 2 seconds with any ShareWare or Public Domain software you
- know that the manual is usually a DOC file included on the diskette,
- just like this one. There is almost always a Read.Me file with last
- minute changes that didn't make the manual on time (most commercial
- software even contains one). Some of these files can grow quite large
- (I saw a ShareWare programmer's editor that had a DOC file that was
- 357K - too big to be loaded by the editor it came with!).
-
-
- Your only available choices for reading files of this type have been
- either a file viewer that could only read one 64K block of text at a
- time (one memory segment, which View use to be), one that tried to
- read the entire file into RAM (which meant you usually had a viewer
- with a big EXE file or one that took a lot of RAM itself), your word
- processor (what a lousy choice that is), or your text editor. If your
- file was real big most viewers or word processors would not be able
- to load the entire thing so they wouldn't load ANY of it. If your
- lucky the text editor you use is able to "unload" the text that can't
- fit in memory onto your hard drive like the one I use - Bingo.
-
-
- Now, just because you have about 550K of available RAM doesn't mean
- that your viewer or editor could load a file that big - it needs
- space to work in too. Enter View. With View you can read any ASCII
- text file, even ones that are over 450K! And if the file is too large
- for RAM View doesn't just say "sorry pal, it's too big for me so I'm
- going to exit to DOS" (which a lot of programs do!), it will display
- what it could read.
-
-
- In short, Views combination of speed, features, and small size make
- it the ideal choice for almost anybody. Because the EXE file is only
- 9,459 bytes you can carry it anywhere. And since all the major
- movement commands are present (Arrows, PgUp, PgDn, Home, End, etc..)
- you're not sacrificing features for portability or speed. This
- program has been carefully crafted to use as little of your precious
- RAM as possible, so there's more available for your file.
-
-
-
- ┌──────────────────────┐
- │ PROGRAM INFORMATION │
- └──────────────────────┘
-
- View uses only about 59K of RAM for itself. This means that you can
- use it on virtually any PC. (If you don't have that much RAM
- available your in the wrong business!) Essentially what this means is
- that all the remaining conventional (base) memory in your system can
- be used for file storage. For example; if, after having loaded all
- your device drivers and TSR's you have 560K of RAM free (as reported
- by chkdsk or some similar program), then you would be able to load
- and read any ASCII text file up to about 500K (or 10,000 lines)!
- Not too bad from an EXE file of only 9,459 bytes!
-
-
- View starts by verifying that the file you want to read exists. If it
- does View then verifies that the file actually contains data (some
- programs will attempt to read a file with 0 bytes of data). View then
- checks to see that you have at least 75K of free RAM. If everything
- is good up to this point View then loads itself into memory. Once
- loaded, it proceeds to set up 10,000 5 byte pointers for the data
- structure (each one will contain a line number and the string length
- for the data it is about to read). After the pointers have been set
- up View then starts reading until it reaches the end of the file,
- runs out of RAM, or until it has read 10,000 lines (this limit will
- be explained later).
-
-
- Once the file has been loaded you can use the up, down, left, right,
- ctrl-left and ctrl-right arrows, along with the PgUp, PgDn, Home, and
- End keys to move around. If you hit a wrong key or if you hit a
- "limit", like hitting PgDn when your on the last page already the
- program gives a very gentle beep (not the annoying kind!).
-
-
- I've spent a considerable amount of time fine tuning the RAM
- requirements for View. With all the tweaking that was done I probably
- gave View the ability to read a file that was 25K - 30K bigger then
- when I first wrote the new memory scheme. That may not seem like a
- lot in todays world of multi-megabyte systems, but when you only have
- 640K of RAM for DOS all of the sudden 30K seems like a lot. Even with
- that I was able to give the program a few extra features like a
- status line at the bottom of the screen which contains the name of
- the file you're viewing, the current line number, the last line
- number in the file, and the right column position. I've also
- incorporated direct video writes (which required a procedure to
- determine what type of monitor you have), pretty good error checking,
- a goto line number feature, and even a brightness control for laptops
- or PC's with crappy contrast (does your present file viewer have a
- brightness control as a feature?).
-
-
-
- ┌────────────┐
- │ RAM USAGE │
- └────────────┘
-
- OK, enough of the propaganda, now let's get serious. The RAM that
- View uses is broken down as follows:
-
- 50K - 10,000 5 byte data pointers.
- 4K - Error checking and all status information
- 5K - Video writes, keyboard routines, associated "housekeeping"
- =====
- 59K - Total RAM used by View.Exe (approximately)
-
- Not too bad, huh? The EXE file is only 9, 459 bytes, which is 541
- bytes less then my maximum target of 10, 000. It will work with ANY
- type of monitor, be it monochrome, CGA, EGA, VGA, LCD, Gas Plasma, or
- whatever you happen to have. As a matter of fact, the procedure which
- determines what type of monitor you have is so accurate that you will
- probably never have to use the /M command line option, which is
- discussed a little later in this document. The video writes and the
- keyboard handler were written in assembler for the fastest possible
- performance on any computer.
-
-
-
- ┌────────────────┐
- │ KEYBOARD USAGE │
- └────────────────┘
-
- The keys that View uses are all pretty self-explanatory (hell, if you
- made it this far in the documentation you figured out how to use most
- of them already). Here's a listing of them, anyway.
-
- LeftArrow - Moves the data on the screen 5 columns to the left
- RightArrow - Moves the data on the screen 5 columns to the right
- UpArrow - Moves back to the previous line of data
- DownArrow - Moves down to the next line of data
- PgUp - Moves back to the previous 24 lines of data (1 page)
- PgDn - Moves down to the next 24 lines of data (1 page)
- Home - Goes to the first line of the file
- End - Goes to the last line of the file
- CtrlLeft - Moves the data 40 columns to the left
- CtrlRight - Moves the data 40 columns to the right
- B or b - Toggle: turns the brightness of the data up or down
- G or g - Goto a specific line number
- ESC - Exits View
-
-
- NOTE: When using the 'G'oto function the line number you specified
- will be placed directly above the status line. If you select a number
- less then 24 then View will display the first page of data from the
- file. If you specify an invalid line number then View will just beep.
- If you decide that the number you entered is not correct you can hit
- the BACKSPACE key to erase it. If you decide against using this
- function at all you can hit the ESC key to cancel.
-
-
- Another bit of information that might make you understand the status
- line a little better; the Col:## is the right most column currently
- being viewed while the Line:## is the last line displayed on the
- screen. This makes the numbers you see always the extremes - the last
- line and the last column of that particular screen.
-
-
-
- ┌─────────────────┐
- │ PROGRAM OPTIONS │
- └─────────────────┘
-
- View supports only three command line options, which are:
-
- /? or /H - A small help screen
- /M - Forced monochrome mode
- Filename.Ext - Name of the file to view
-
- Options can be entered in any order and you can use either upper or
- lower case letters, but you must leave a space between each option
- selected. All unrecognized commands are ignored. One option causes an
- immediate response - /? (or /H). This instructs View to print the
- help screen and then return to DOS. This option will be acted upon
- REGARDLESS of where it's placed on the command line. If you don't
- specify a file name you will get the help screen to remind you what
- to do. The definition of the available options is:
-
- /? or /H - Use this option to get a help screen that looks similar to
- the one above. If no file name is given on the command line
- then View will print this Help screen as a reminder.
-
- /M - By default View displays white text on a blue background. On
- most systems this doesn't present a problem. However, on
- certain laptops, portables, and monochrome EGA or VGA
- monitors this can be difficult to read. Use this option to
- instruct View to display white characters on a black
- background. The 'B'rightness command will recognize your
- selected color choice and will work accordingly.
-
- Filename - The name of the file you would like to view. Drive letters
- and paths are fully supported.
-
-
-
- ┌─────────────────┐
- │ VERSION HISTORY │
- └─────────────────┘
-
- 1.0 - Initial release to the general public. Only used by myself
- 6/91 prior to that.
-
-
- 1.1 - Added the /I option to ignore blank lines. Added the /S option
- 8/91 to check the file size in lines. Fixed a bug with the error
- checking routine. Fixed a bug when you had a file with less than
- 24 lines (1 full page) of text. Fixed a bug with the monitor
- checking procedure.
-
-
- 1.1a- Fixed a bug with file names that started with a number, like
- 10/91 4DOS.DOC. View mistook that for a 'start at line number'
- command (similar to the /##### option).
-
-
- 2.0 - Major rewrite! Removed the /##### (start at line number), /I
- 3/92 (ignore blank lines), and the /S (show size of file) options
- because they are no longer necessary - they existed strictly to
- make the 64K file size limit a little more bearable. Added
- support for the left and right arrow keys, the 'B'rightness and
- the 'G'oto line number functions as well as being able to load
- files up to the maximum size of your free RAM. All this and the
- EXE file is only 1.1K larger!
-
-
- 2.1 - Added the ctrl_left and ctrl_right arrow keys to scroll the
- 5/92 screen 40 columns to the left/right, respectively. Fixed a
- memory allocation error where View was loading 1 line less then
- it said it was if your file was either 10,000 lines long or it
- used up all the RAM in your system before the end of the file.
- Added some color to the display, for those of us with color
- monitors. Fixed a bug with the 'G'oto command if the user
- entered a number larger then the total number of lines in the
- file. Performed some general "housekeeping" on the source code
- for the sake of speed and/or size. All this and the EXE file is
- now 148 bytes smaller than version 2.0! Yeah I know, 148 bytes
- ain't much - but how many times have you seen a program updated
- with new features and bug fixes that actually got smaller in
- size?
-
-
- 2.1a- Fixed a keyboard handler problem where the keyboard would
- 5/92 respond sluggishly, if at all, when the file you loaded took
- all available RAM and you had the TSR SuperKey loaded.
-
-
- ┌──────────────────┐
- │ FINAL RAMBLINGS │
- └──────────────────┘
-
- Some last words of wisdom (or at least as close as I can come).
-
-
- As with all Public Domain programs I take no responsibility for View.
- If it blows up in your face then it's your fault, not mine. It if
- melts your hard drive, then so be it. If it makes you wish you were a
- Vulcan (for all you Star Trek fans) then "live long and prosper".
- Actually, I get pretty fed up with the legal crappola that's
- necessary in todays world. Of course my program won't blow up in your
- face or melt your hard drive - I'm being sarcastic and ridiculing the
- legal establishment! I use View every day and I have yet to see a
- Vulcan (prior to consuming larger quantities of Becks, that is).
-
-
- View has a "big" brother called ReadIt. Yes, that's right - if you
- like View but want something a little more powerful I can certainly
- help you out. You see, View is kinda like my "test bed" for new
- ideas. It's also something I happen to give away for free because I'm
- a nice guy! ReadIt is my ShareWare program, the one you have to pay
- for. Both View and ReadIt share the same basic "engine" (file access,
- error handling, keyboard reading, and video writes). ReadIt, however,
- includes online help, text search (case sensitive or not), a file
- information window, monochrome or color palette selection, user
- selectable TAB expansion, and the ability to print any part of the
- file with automatic or manual form feeding and line widths up to 250
- characters. This is all wrapped up in an interface featuring popup
- windows with shadows and an EXE file size of only about 16K! If this
- sounds good to you then send just $10.00 dollars to me at the address
- at the end of this DOC file, along with a letter containing your name
- and address, and I'll rush a copy of ReadIt out to you.
-
-
- You've probably noticed that I have given View a 10,000 line limit.
- This file size limit is because I'm trying to get you to buy ReadIt,
- which has limit of almost 16,000 lines - that's more then 50%
- greater then View! Why does ReadIt have such a limit at all? Well,
- it's not because of me really - it's Borland. For some reason they
- set a limit on the size of a data structure you can create when your
- allocating RAM from the heap. I don't know if Turbo C suffers from
- the same restriction as Turbo Pascal, which View and ReadIt were
- written in. If it were up to me I would have ReadIt use all available
- RAM, regardless of the number of lines.
-
-
- If you happen to be one of the few unfortunate souls who still have a
- CGA monitor you had better be prepared for a "blizzard" of snow. View
- writes directly to video RAM and I didn't program any routines to
- perform the necessary synchronization for the video retrace signal.
- On all other types of monitors there will be no problems.
-
-
- View works exclusively in read only mode. What exactly does that
- mean? Well, it means you can read ANY file, regardless of its
- attributes (hidden, system, readonly) or its type (DOC, TXT, HLP,
- etc). View doesn't create any temporary files for data storage nor
- does it alter the original so you can use it without concern.
-
-
- From time to time you might see some strange symbols appear on the
- screen. This is the way View prints the TAB (ASCII code 009),
- FORMFEED (ASCII code 012), and a few other "difficult" characters.
- View doesn't have routine to expand TAB's into spaces. Very few files
- are saved with TAB's anyway, so this shouldn't be a problem. If it is,
- then get a hold of ReadIt which does have TAB expansion as an
- option.
-
-
- The three areas I've concentrated on the most when writing View were
- file reading, video writes, and memory allocation. These three
- functions were tweaked and tweaked till they screamed. Consequently,
- they are the areas that work the fastest and consume the least amount
- of memory (as it should be).
-
-
-
- ┌──────────────┐
- │ WHAT'S NEXT? │
- └──────────────┘
-
- What's next for View? Well, I'm not really sure. My main objective is
- to keep the program small and fast - that design goal will never
- change. However, I'm not going to ignore a good suggestion for an
- enhancement if you've got one. Want a neat new feature added? Then
- drop me a line at the address below and I'll check into it. Some of
- the things I'm contemplating are: a search or find function, a
- "bookmark" or place holder to mark a spot in the file so you can
- easily jump back to it later, and maybe the the ability to use EMS or
- XMS memory for data storage.
-
-
-
- ┌──────────────┐
- │ REGISTRATION │
- └──────────────┘
-
- Why is this part of View.Doc last? Because it's the least important,
- that's why! I don't believe in a lot of legal rhetoric.
-
-
- VIEW IS A PUBLIC DOMAIN PROGRAM. YOU ARE FREE TO USE IT FOR YOUR OWN
- *PERSONAL* USE. YOU ARE ENCOURAGED TO GIVE IT AWAY TO ANYONE AND
- EVERYONE WHO WANTS IT (except as noted below).
-
-
- The only real restrictions I impose are:
-
- 1. Whomever you give this program to, whether you copy it onto a
- diskette, a hard drive, or you upload it to a BBS, *MUST* be given
- the complete set of files (at this writing they are View.Exe and
- View.Doc).
-
- 2. None of the files (View.Exe or View.Doc) may be altered in any
- fashion and must remain in their ORIGINAL form. NO EXCEPTIONS!
-
- 3. You CANNOT, under ANY circumstance, use this program in a
- commercial, retail, promotional, or other similar fashion without
- the expressed written consent of the author.
-
- 4. You CANNOT, under ANY circumstance, use this program to make a
- profit. This includes distributing it with your own software,
- selling it, "renting" it, or any other such arrangement that you
- obtain reimbursement for.
-
- If you do desire to distribute View with your ShareWare catalog, your
- commercial software, or for any other non-personal endeavor, please
- write to me at the address below. I would be more then happy to
- license View to just about anybody. Remember, it's entirely free for
- personal use!
-
-
- If you would like to be kept abreast of any new developments
- concerning View then send me a buck (one thin dollar!) and I'll add
- your name to the mailing list. Make sure you tell me what version
- your using. If you would like me to automatically send you the next
- version then send me five bucks. Even if you don't send a buck (you
- cheap skate) feel free to drop me a note and let me know what you
- think about View, especially if you've found a bug (God forbid!).
-
-
-
- ╓────────────────────────╖
- ║ Jim Wilson ║
- ║ 9 Miller Ave ║
- ║ Washington, NJ 07882 ║
- ╙────────────────────────╜