(last updated for version 1.14)


  1. General Purpose
  2. System Requirements
  3. Legal Stuff
  4. The Command Line
  5. The Display
  6. Keystrokes and their meanings
  7. Known Problems and Restrictions
  8. Source Code Samples
  9. Downloading imax

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: 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: 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:

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.
Shows a listing of known bugs, observations, and planned improvements. This is a compact version of the corresponding section of this document.
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 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.)

[Screen Shot]
Some points on the screen shot are marked. Those are:

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:


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 KeysMove one line up/down, one column left/right
Ctrl-CursorLeft/RightMove sideways faster
PageUp/DownMove one screenful of text up/down
Ctrl-PageUp/DownMove to beginning/end of text
Home/EndMove to beginning of line/end of lines
Some vi-style keysTheir 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.
ScrLockLock scrolling


`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


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: 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.
F7Start Search
F3Continue 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? 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 (`') 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).
  1. Download the ARJ-packed archive (75 KB)
    This is a self-extracting archive that can be unpacked by simply typing `imax-x'.
  2. Download the PKZIPped archive (73 KB)
    This can be unpacked by typing `pkunzip imax', provided you are in possession of the PKUNZIP software.
  3. 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. (NEW!)
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.

Finally, there are a few exemplary files from the nearly 300 KB of source code. With syntax highlighting!
In the highly unlikely case that you should really be interested in further details, e-mail me.


imax © 1995 by Thomas Jensen <public(at)>
Page created June 30, 1996, last updated: 11/15/96. All rights reserved.