imax
(last updated for version 1.14)
1. General
Although this section bears such a military title, it has no hostile content
whatsoever. ;-) On the contrary, its purpose is to answer two fundamental
questions about the program: 'What does imax do?' and
'Why did the author write it?'. We'll get to that in a second.
First, let me tell you why the program's name is imax:
You will certainly be familiar with emacs, the most monstrous text
editor this side of the solar system. Pronounced German, imax sounds
exactly like emacs. This is not a coincidence. If the sole purpose of the
emacs editor was to let its users quietly and quickly edit their text and
then quit, it wouldn't need to be 5% its size. However, the system is hopelessly
overloaded with features nobody ever uses, maybe not even knows. This is partly true
for the imax text viewer, too. You could view a text file with much
less fancy stuff, but the effects overload makes it an experience!
There is no connection with the IMAX movie theater system.
Furthermore, note the way imax is written. You could pronounce it
`i to the power of max' or just `maximum power'. This is not a
coincidence, either. Still, in order to make reading this text easier for you, I will
simply say `imax' instead of imax from now on.
What does imax do?
Essentially, imax is a text file viewer for DOS text mode. You might use it to take a
look at files like your autoexec.bat (imax c:\autoexec.bat), a C++
source (imax imax.cpp), or software documentations (imax readme).
This is not an ability that can't be found with other programs as well.
BUT imax offers more:
- Handling of text files of (nearly) unlimited size
- Soft Scrolling in both vertical and horizontal(!) direction, while
- Displaying a non-moving status line
- Automatic Text Animation with adjustable speed (so the text scrolls slowly, while
you are reading it).
- Intelligent file name recognition
- ... and lots of additional features, special FX, and more!
For a more detailed description, just keep on reading ...
Why did the author write it?
While the basic functionality of the program is not really a new idea (in fact, text
files needed a way to be displayed since, well, when they invented computer
screens), I have
never seen a file viewer that offered so many features. As far as I know, the above
mentioned capabilities can only be found in imax. In addition to that, IMHO every
real computer scientist should write a file viewer at least once in his life. And
since I had just become interested in VGA hardware programming, I took the chance
to combine the VGA experimenting with writing my own file viewer (the second one, in
fact). As it turned out, the memory management for the viewer proved much more
difficult than the VGA hacking. And that is definitely not because assembler is so
much easier than object oriented programming. :-)
2. System Requirements
The system requirements are relatively modest. This won't surprise you, because only
few of the modern computers still run DOS. Fortunately, imax also works within a
Windows 3.1 or Windows 95 DOS box. Here's what you need:
- An i486-DX33 processor or faster (that's a 486 with 33 MHz)
- A VGA card that is 100% compatible with the common IBM standard. Although
most video cards are compatible, there have been problems with some. You'll
just have to try it out.
- MS or PC-DOS 3.3 or higher. I have not been able to test it with
a version lower than 5.0, though.
Of course, the program does not check your system configuration. It's just that you'll
notice your system is too slow when the text flickers when scrolling. Personally, I am
running the above configuration with a VESA local bus, which allows for much faster
data transfer to the graphics adapter. According to my own experience, the
above configuration is pretty much the lowest possible one.
3. Legal Stuff
I will spare you the usual drivel, but there are a few things I want to mention:
- The program is freeware. This means I won't charge you
for it, but all rights are reserved. When you decide to use it, please
send an e-mail or something, so I can keep track of where imax spreads.
You must not modify the program. Feel free to give it to your friends.
You must not charge other people for it.
- Although the author has been most careful to avoid them, there are still
some bugs left. If you discover any, please report them to the author.
- There is no warranty whatsoever. The author is not responsible for any
damage or loss of data resulting from the use of the program, even when
it was caused by an obvious programming error.
You are using imax entirely at your own risk.
4. The Command Line
The imax command line looks like this:
imax [{<filespec>|-help|-bugs|-keys}] [{<option>}*]
In plain English, this means you can either call imax without any parameters at all
or with a file name as the first parameter. If called without parameters, imax
will display a title screen with some general information. It is possible to
specify -help, -bugs, or -keys as the only parameter.
If called with a filename, the following parameters may be of the following options:
- -wordwrap (also -ww)
- Lines that exceed the number of characters per line (usually 80) are broken so
that those parts of the line that don't fit appear on the next line. imax tries
not to break words in the process. This usually makes sense for text files with
very long lines.
- -colwrap (also -wc)
- This works exactly like -wordwrap, but doesn't care about words. Lines
are always broken exactly at the end of the screen. This definitely makes sense
when viewing binary files.
If you specify one of the following options, you don't need to give a filename:
- -help (also -? and -h)
- Show a listing of supported command line parameters. The result is basically
the same as this section, but more brief and compact.
- -bugs
- Shows a listing of known bugs, observations, and planned improvements. This is a
compact version of the corresponding section of this document.
- -keys
- Shows a table listing every keystroke supported in the viewer, a compact version
of the corresponding section of this document.
Calling `imax -?' will give you the list of command line options currently
supported by your version of imax. Should part of the list scroll out of your view,
call it up again using `imax -? | more', which will let you view everything
page by page.
`Intelligent' File Name Recognition
Since starting up imax and accessing the information contained in the file to be
viewed is supposed to go very quickly, `intelligent' file name recognition was
included. This is a system that allows you to abbreviate the file name parameter.
Basically, you can now specify a file by simply
- giving a standard DOS filespec, e.g. `*.txt', which will give you the
first matching file in the current directory
- typing the first few characters of the file name, which will give you the first
file whose name starts with the given string, or
- type any combination of characters, which will give you the first file that matches
your input reasonably well.
Of course, if you type `xxyyzz' and there is no file containing any of these
letters, there's nothing imax can do. But especially the last possibility is useful
when the directory contains lots of files that all start the same way, but differ in
a number, e.g. `foobar01.txt, foobar02.txt, foobar03.txt,
...'. In order to get `foobar02.txt', all you'd have to do is type
`imax 2'. Typing `imax .' will give you the first file in the
directory. This does speed things up a lot.
5. The Display
Imax's display is basically divided into two areas. A moving one, far bigger and
-here- with black background, and a non-moving one, namely the status bar at the
bottom of the screen. The screenshot below shows imax on an 80x25 screen with 24 lines
of text and one line the status bar.
(By the way, the `screen shot' was pretty hard to manufacture! Because imax does
a lot of (temporary) changes to the VGA registers, no program I could find was able
to actually just save a screen shot. What you see here is the result of
extensive `cut-and-paste' with a graphics program. The result looks authentic, though.
;-) For the same reason, I had to reprogram the DOS hard copy routine,
so you can still simply press `Print Screen' to print a hard copy.)
Some points on the screen shot are marked. Those are:
- The Reference Line: The reference line is the line that the
`current line' refers to. Since there is no visible mark (yet), it might be
worth knowing that the reference line is the fourth line counted from the top.
- The Status Bar: The status bar displays all the information
you need in order to navigate through your document. It features the
- file name - stripped of its path -
- the current line - according to the `reference line' -
- the current column - usually zero, when you didn't
move to the right -
- and the `busy' indicator. Usually, the `busy' indicator
is just a colon. But when you are searching a large document and the
program is `busy', i.e. it won't take input from you, this will be
indicated by a turning bar in the same place. Wait until it becomes the
colon again before you enter any further commands.
The last thing about the display are the form feed lines. Some authors
of ASCII files will put form feed characters (FF, ASCII code 12) into the text in
order to separate pages from each other. When printed by simply sending the data to
the printer, like when using `type filename.asc > prn', those characters
will cause the printer to start a new sheet of paper. imax visualizes this effect by
transforming the form feed character into a white line saying `next page'.
Tabulator characters are expanded to up to eight spaces, in other
words: The tab width is eight. A white arrow pointing right is displayed instead of
the first space of each tab, thus indicating existence and position of the tab.
Generally, white text means you are looking at a control character, i.e. a
character with ASCII code less than 32. A zero, which would normally be invisible, is
represented by a white at-sign (@). Anyway, text files normally don't contain
control characters.
UNIX files, i.e. files that don't contain CRLF, but only LF as line feeds,
are recognized automatically and displayed correctly.
The program is already designed to support user-definable color sets. Once I
get an interface done, you will be able to say how you want imax to present
itself. It is also basically possible to change the design of the form feed lines
or the tab width, but again, an interface is missing. Don't wait for a
new version though, it might take a long time ...
6. Keystrokes and their meanings
As for the keystrokes, I won't mention all of them here, because
often, there are several possible ways to invoke a command, and dumping all of that
on you right now would not clarify things. If you desire a complete listing of every
possible key command supported by the viewer, call up imax using `imax -keys'.
Should part of the list scroll out of your view (which it almost certainly will), call
it up again using `imax -keys | more', which will let you view everything page
by page.
Also, you can print your own `reference card' by typing `imax -keys > prn'.
The `greater than' sign means that output is redirected to a file/device. In this
case, output is redirected to the printer.
Anyway, the key commands serve one of the following purposes:
Help
The most important keyboard commands are listed in the online help page which is
called up by pressing F1. This is not surprising, since this feature is
quite common among programs for DOS and certain graphical user interfaces by a
company based in Redmond, WA.
General Movement
You can move around in your text file using the cursor keys. The text will scroll
smoothly (usually with three or four steps per character) in the desired direction.
If the entire text file fits on one screen, i.e. the entire file is visible at once,
vertical scrolling is inhibited. Holding down Ctrl while using the left or
right cursor key will speed up horizontal movement.
For the problem of covering greater `distances' faster there are the common solutions:
`PgUp' and `PgDown' for moving one screen (`page') up or down. An
`overlap' of one line will be left visible, so that on an 80x25 screen, `PgUp'
would bring you up 23 lines. Holding down Ctrl while pressing `PgUp'
or `PgDown' will move to the first line of text in the file and the last line
of text respectively.
In addition to that, `Home' will move to column number 0, i.e. the beginning
of each line. `End' does the reverse, i.e. moves to the end of the line.
In reality, that means the end of the longest line on screen will be made visible. So
if you're to the right of the longest line, pressing `End' will actually make
you move to the left. This does make sense, just try it out.
In order to accommodate those people, who use UNIX as their primary operating
system and have thus become used to vi-style key commands, some vi style keys are
supported as well (h,j,k,l, etc.).
Cursor Keys | Move one line up/down, one column left/right |
Ctrl-CursorLeft/Right | Move sideways faster |
PageUp/Down | Move one screenful of text up/down |
Ctrl-PageUp/Down | Move to beginning/end of text |
Home/End | Move to beginning of line/end of lines |
Some vi-style keys | Their corresponding meanings |
Scroll Lock
Activating the `Scroll Lock' key on your keyboard will lock scrolling. Hmm.
Surprise. The reason is this: Not every command scrolls as smoothly or as much as
it could. For instance, pressing `PgDown' will simply `jump' one page down,
which is very fast, but does not look so impressive. With `Scroll Lock'
active, it would scroll down one page smoothly instead of jumping.
My personal opinion is that you don't need that particular feature very
much, because imax animates anyway whenever reasonably possible.
Animation
`Animation' is a feature that no normal text viewer can have! Why not? Well, let me
explain it to you first: What animation means, in this context, is the smooth and
automatic scrolling of the text in a desired direction, while you are reading
it! For a `normal' viewing program, a feature like that would mean line-wise
scrolling, which can only be called `jumping', really. You would never be able to
keep track of your position in the text. imax, however, scrolls one pixel at a
time, if necessary!
You can turn animation on (and off) by pressing `Gray *'. The
`Gray +' and `Gray -' keys let you adjust the scroll speed. The
speed is measured in pixels per screen refresh. The default is one, i.e. one pixel per
refresh. Pressing `Gray +' once will increase the speed to two pixels per
refresh, then three, and so on. `Gray -' will decrease the speed.
Once you get below one, the speed will be measured in refreshes per step (a very
logical consequence, if you give it a moment of thought). So, when you press
`Gray -' when the current speed is one, imax will now wait for two
refreshes, before moving another pixel. This way, scrolling can be slowed down
significantly, so as to really make it possible to read a thus far unknown text.
I am going to implement a set of fixed speeds in one of the upcoming releases, so
you could choose a fixed speed by pressing 0..9, but that's not possible yet.
Gray * | Toggle Animation On/Off |
Gray + | Go faster |
Gray - | Go slower |
Gray / | Switch Direction |
Searching
Pressing `F7' will call up the search dialog. Simply enter the search term
and press 'return'.
You will be given the opportunity to specify a couple of options by pressing
`Alt' and one of the highlighted letters:
- (c) Case Sensitivity. When on, your input must match exactly,
otherwise, upper/lowercase differences will be ignored.
- (w) Whole Words Only. When on, your input must be an entire word,
i.e. in the text, it must be flanked by white spaces (tab, space, or line feed).
- (a) Animation. When off, imax will simply jump to the new location.
Otherwise, imax will scroll there (very quickly). Turning this on makes sense when
you want to get a feeling for how far the jump really was, or when you don't want
to lose mentally your position in the text. Plus, it's cooler. ;-)
- (r) Regular Expression. When on, your input is interpreted as
a regular expression. This means the following characters have special meanings:
- `^' denotes the beginning of a line (only allowed as first character)
- `$' denotes the end of a line (only allowed as last character)
- `.' denotes any character
- `\', when put right before a special character, anulls that character's
special function.
I am aware that regular expressions are supposed to be more powerful. Full support
will be implemented in a future release.
- (s) Search method. Select one of the following methods:
- Global Forward: Start search at the beginning of the text, proceeding
`downwards' (i.e. to higher line numbers)
- Global Backward: Start search at the end of the text, proceeding `upwards',
i.e. to lower line numbers
- Forward: Start search at the current line, proceeding downwards
- Backward: Start search at the current line, proceeding upwards
The input line features full editing capabilities, and even has a history add-on!
You can toggle insert/overstrike mode by pressing `Ins'. A thicker cursor
indicates overstrike mode. The up and down arrows let you browse the history, so
you can call up the input of a previous search. In addition to that, there are the
usual key commands like `Home' (jump to first char), `End` (to last),
`Ctrl-Left/Right' for word-wise jumps, etc.
F7 | Start Search |
F3 | Continue Search (Search Again) |
7. Known Problems and Restrictions
Okay. Well. Ummm... Yea. Bugs. Yes. I mean, no! But then ... well. Hmm.
Oh, never mind.
The thing is, I know there are a few bugs in the current version. I have listed
them below, so you know what to expect. Since I am somehow always doing something
or other about imax, some bugs get fixed, and others appear. Still, I just don't
have the drive to eliminate all minor imperfections before going on to the next
feature. The program works fine the way it is, and I am using it myself all the
time.
The only secure source of information regarding the real current state
of the program is the author's `Project Notes' window. Occasionally, it would
be copied into the imax source, so you can call it up using `imax -bugs |
more'. That is pretty much your most reliable source of
information. If you care about that at all.
So you see that since this file here is changed quite rarely, the following list does
not necessarily reflect the actual state of development. However, it gives you an
idea of what kind of malfunctions you can look forward to. ;-)
The current version has never actually crashed on me, and in addition to
that, imax is physically incapable of damaging your files. So, why bother?
- A file containing 32 KB of pure line feeds is not read completely. - Only about
one third of it are `displayed'.
- When started from the Norton Commander, the text color is sometimes changed from
gray to white afterwards.
- Regular Expressions that must match an enitre line (like `^foobar$') are
not found. Case insensitivity fails with German Umlaute. I am going to find
a new regexp package anyway.
- With very asymmetrical files (like 300 blank lines followed by one extremely long
one) word wrap may be incomplete.
- ... and similar things that rarely happen.
Still, if you discover a bug that I don't seem to have noticed yet, please tell me
about it!
8. Downloading imax
If you still want the program, even after reading the previous
section, go ahead. It will be worth your while. I have here three different
versions of the archive. One is ARJ-packed, one is PKZIPped, and the third one
is gzipped. Archive one (`imax-x.exe') and two (`imax.zip')
include an ASCII version of this document in DOS format, plus this file in
HTML, and of course, the software. Archive three (`imax.exe.gz')
includes only the program and is UNIX gzipped. This is so, because it's the
fastest way for me to upload the software. Archive three is therefore always
the newest, with minor improvements over archives one and two (just
minor improvements, because when I manage a major improvement,
I'll also take the time to update the other two archives).
- Download the ARJ-packed archive (75 KB)
This is a self-extracting archive that can be unpacked by simply typing
`imax-x'.
- Download the PKZIPped archive (73 KB)
This can be unpacked by typing `pkunzip imax', provided you are in
possession of the PKUNZIP software.
- Download the gzipped archive (~48 KB, w/o doc!)
This can be uncompressed by typing `gunzip imax.exe.gz', provided
you are on a UNIX system. ()
If requested, I might also add an option to have imax sent to you by e-mail.
This file is always the newest version of the documentation, and the program
from the third archive is always the newest version of the software. I tell you
this just in case you end up with two versions, and don't know which one to
delete.
Enjoy!
imax © 1995 by Thomas Jensen
<public(at)thomasjensen.com>
Page created June 30, 1996, last updated: 11/15/96. All rights reserved.
Location: https://thomasjensen.com/software/imax/