Category : Word Processors
Archive   : TRS141F.ZIP
Filename : TERSE.DOC

Output of file : TERSE.DOC contained in archive : TRS141F.ZIP
"You can never be too rich, too thin, or
have too much RAM and Disk storage."

Ancient American proverb, ca. 1980
(As quoted by the QEDIT manual.)

| TERSE Version 1.4 |

Tiny ``BRIEF''-like editor by
Joseph (Yossi) Gil.

TERSE is a tiny (only 4096 bytes) but amazingly powerful full-screen
editor for files of up to 64K in length. TERSE runs on all PC compatible
machines. Its command keys are very similar to those of the famous BRIEF
editor (by UnderWare Inc.). TERSE can edit both UNIX and MS-DOS style text
files as well as binary files. No hacker's disk is complete without it.
No disk, be it hard or floppy, is too full to include it.

TERSE is free (but copyrighted) to private users. If you are a private
user who uses TERSE "for pleasure", you are not required to register.
However, if you use TERSE for any commercial application, i.e., in your
company, at work, etc., or make money from selling software or distributing
shareware, you are *required* to register your copy of TERSE. Registration
cost is only $15 and buys you a personalized version, and grant your
institution a site license. Yes, this is correct, the whole site such as
a university with all its PCs, need only register once. For an additional
payment of only $5, you get the source code of TERSE.


o Very small: fits in 4096 bytes = 4 clusters on 5.25"/3.5" floppies.
o Minimal free memory requirements: 137KB.
o Uses current screen size, including the most common 80x25 screen
dimensions but also unusual sizes such as 40x16, 40x25, 40x40,
40x50, 132x25, 132x43, 96x33, 80x30, 80x33, etc.
o Fully DESQview (version 2.0 and above) aware.
o Edit binary files. TERSE is ideal for a quick and dirty job
of editing and patching strings in small programs.
o Supports editing of UNIX style files (lines terminated with '\n').
o Supports both '/' and '\' as directory separator.
o Edit lines of unlimited length (limited only by file size).
o Automatic unlimited horizontal scrolling.
o BRIEF-like keyboard configuration.
o Support for TABS, and configurable tab positions.
o Prevents snow when run on a CGA screen.
o SEARCH, SEARCH again, and TRANSLATE commands.
o Safe: confirm exits when text is not saved.
o Edit files whose name contains spaces and other weird names.
o Extended version (the SLIM editor) of size ~5k with many more
features, including support (via external filters) for word count,
sorting, charcter codes translations, quoting, tab expansion and
unexapnsion, and other complex editing tasks.
o Status line indicating: current column, current line, horizontal
scrolling, total number of lines, file name, modified status,
insert/overwrite status, the current offset in file and total file size
in bytes are dispalyed in the status line. The extended version
also displays the HeX value of the current char.


o PC-DOS/MS-DOS version 2.0 or higher
o 137KB free memory
o 64KB free disk space


This program is written in highly optimized assembly language. The code
is probably the worst spaghetti you have ever seen! This means that the
risk of TERSE having bugs is especially high. The author exterminated
all the bugs he identified, and he did his very best to test the program
thoroughly. However, there might still be other unidentified bugs lurking
there. These bugs by nature are unpredictable. Usage of the program
acknowledges the following disclaimer of warranty: "This program is
supplied as is!" All warranties, expressed or implied, including, without
limitation, the fitness of this program for any purpose, are disclaimed.

Problems, Questions, Suggestions?

Please do not hesitate to communicate all your thoughts and comments.
I answer all my E-mail usually in less than 24 hours. If you do not get
a response within a reasonable time, it is probably because I didn't
get your message, or because I wasn't able to reply. Kindly try sending
again using another route, and include more alternate return paths.


TERSE uses only pure 8088 instructions and assumes the bare minimum
of the underlying operating system. It should run on your good
old original 4Mhz IBM-PC running under DOS 2.0 as well as on a fast
80486 50Mhz machines running DR DOS 6.0 + 4DOS 4.0, or OS/2 in DOS
compatibility mode. More than once during the development, I had a
chance to save a few bytes by using a more advanced instruction, or
by assuming a more advanced operating system version. I managed to
resist this temptation. Other than that every dirty assembly trick I
could think of was used. It is conceivable that some of the tricks
could prevent TERSE from running on some DOS-like environments and
simulators, although I don't know of any concrete example.

UNIX style files

TERSE edits UNIX style files directly. That is, TERSE uses
both '\n' (aka LF, aka Line-Feed) and a '\r\n' (aka CRLF, aka
Carriage-return + Line-feed) combo for line ends. Hitting ENTER
puts '\r\n' into the file, and Ctrl-ENTER puts '\n'. (Configuration
utilities allow swapping these 2 keys.) Thus, you can transfer UNIX
text files to your PC, edit them on the PC, and then transfer them
back without need for file conversion.

Binary files editing

TERSE can edit binary files as well. To aid in this task, the
status line displays the file size in bytes and the current offset
in bytes in the file. The status line of the SLIM editor displays
the hexadecimal value of the current char. (This feature may be
added in the future, space permitting to TERSE.) A difficulty in
editing binary files is that the following characters: space (ASCII 32),
Null (ASCII 0), and Meta-Del (ASCII 255) all look the same. If you have
an EGA or VGA screen you may want to use the font loaders WITHFONT or
LOADFONT together with the binary editing font and circumvent
this difficulty.

Configuration Utilities

The configuration utilities allow you to: swap the Enter and
Ctrl-Enter keys, change the tab size to 2/4/8/16 (I personally prefer
tabs set every 4 characters), and modify the key assignments (with
some minor restrictions). In addition, you can eliminate the snow
check done automatically on CGA screens, and you get better support
(as described above) for editing binary files on EGA/VGA screens.


The main constraint in adding features to TERSE is that its total
size must be exactly 4096 bytes. All additions are dependent on my
ability to squeeze the current code further. I usually work several
hours, and sometimes days, for each byte squeezed. And this task is
getting harder and harder all the time. (A few versions had a slack
of very few bytes. In these versions, a few dummy bytes were appended
to the program to keep its size 4096 bytes exactly.)

I have several other possible directions for the development of TERSE.
These directions are: ``the TERSE family'' and ``the TERSE library''.
I am looking forward to hearing from _you_, the user, about what you
think of these ideas.

The TERSE library is an object code library which could be invoked
from a C program. The members of the TERSE family are:

LEAN A 3K file viewer. This is basically TERSE without the
editing code. Naturally, LEAN could never compete with the
excellent LIST utility of Vernon D. Buerg, and other
fine tiny file-listers.

SLIM An extended TERSE version (at the 5K level) with some extra
features. Some features for which I have received requests

o Read file into buffer.
o Move to editing another file.
o Go to line.
o Word wrap, margin setting and word-wrap on/off.
o Backward search.
o Edit next file in command line.

TERSE is distributed in two forms: the full distribution and an
abridged version. The full distribution consists of the following
files: (files marked with * are missing in the abridged version.)

T.COM The actual TERSE editor program. No other files are
necessary for proper operation of TERSE.

TERSE.DOC This file. The documentation for the program. It may
be printed by:

PRINTDOC.BAT A batch file for printing the documentation of TERSE.
This file also prints MID-EAST.MBX if you created it.

_DESC.BTM A 4dos batch file for creating file name description
for the above files.

MID-EAST.R13* (rotate 13 encrypted file).

MID-EAST.MBX* Some facts and tips about the Middle East (uncrypted).
This file is _not_ part of the distribution, but it
can be created by

UNROT13.BAT Batch file to (i) create MID-EAST.MBX from MID-EAST.R13
using the ROT13 filter, and (ii) display MID-EAST.MBX
using L.COM.

PRTIP.BAT Batch file to send MID-EAST.MBX to the printer

L.COM* A pre-release of the LEAN file lister.

S.COM* A pre-release of the SLIM editor, an extended version of

H.COM* A pre-release of SLIM built especially for the HP 95lx
palmtop computer. You can use the configuration
utilities to limit the file size to 32KB, thus reducing
the memory requirements. The help screen is minimized to
16x40 chars. The program has special code for detecting
the HP9LX, and if one is detected, only the top left
16x40 part of the virtual screen is used.

TCONFIG.COM* Configuration program for T.COM.

SCONFIG.COM* Configuration program for S.COM.

LCONFIG.COM* Configuration program for L.COM.

HCONFIG.COM* Configuration program for H.COM.

TKEYS.COM* Keyboard configuration program for T.COM.

SKEYS.COM* Keyboard configuration program for S.COM.

SKEYS.COM* Keyboard configuration program for H.COM.

MXIFY.COM* A pre-release of a program which gives TERSE and its
partners an EMACS style. Usage is:

MXIFY T filename

BIGC.COM* A program to set a big cursor (Useful on PALMTOPS.)

LITC.COM* A program to set a little cursor (Useful on PALMTOPS.)

ESC.COM* A program to send ESCAPE characters. Examples of usage

ESC [7m
ESC 0 > prn

ROT13.COM* A "rotate 13" filter.

LF.COM* Filter. DOS to UNIX text file translation program.
Run 'lf -h' to see a manual page.

CRLF.COM* Filter. UNIX to DOS text file translation program.
Run 'crlf -h' to see a manual page.

CAT.COM* Filter. Concatenate files. Like UNIX cat.

QUOTE.COM* Filter. Quote text by prepending '> ' to lines

WC.COM* Filter. Count lines, words, chars. Like UNIX wc.

UUDECODE.COM* Filter. A program to convert uudecoded files back
to binary. Like UNIX uuedecode

EXPAND.COM* UNIX-like filter. Expand tabs into spaces.
Run 'expand -h' to see a manual page.

UNEXPAND.COM* UNIX-like filter. Compress spaces into tabs
Run 'unexpand -h' to see a manual page.

FOLD.COM* UNIX-like filter. Fold long lines for finite width
output device. Run 'fold -h' to see a manual page.

TT.BAT* Call terse on multiple files/wildecards

TTALIAS.BTM* Demo: make 4DOS aliases for terse

NFMT.ZIP* UNIX fmt-like formatter. NFMT is a simple text
formatter, which is very similar to the BSD program
fmt(1). However NFMT uses a best-fit line breaking
algorithm, by a simple version of "Breaking Paragraphs
into Lines", Donald E. Knuth and Michael F. Plass,
"Software--Practice and Experience" 11 (1981)
1119-1184. Author: Ross Paterson ,
porting to Turbo-C by Yossi Gil .
This archive includes the following files:

NFMT.EXE The NFMT filter

NFMT.DOC UNIX manual page for NFMT.EXE

NFMT.1 UNIX manual page for NFMT.EXE
(nroff -man source)

NFMT.C Main C source file of NFMT.EXE

CONFIG.H Machine dependent parameters for NFMT.C

OPTIONS.H Source for NFMT.EXE command line
options manipulation

SAMPLE.INP Sample input file for NFMT.EXE

SAMPLE.OUT Correct output of NFMT sample.inp

README Readme file for the NFMT distribution

MAKEFILE Makefile for the NFMT distribution

How to obtain TERSE

TERSE is available from Simtel, Garbo, Wustl, their mirrors and from
other fine ftp archive sites. Some of these sites have mail-servers
for those who do not have access to ftp. Some of these sites carry
only the abridged distribution.

In addition, the latest version of TERSE is regularly deposited in /pub/pickup/terse/trsXXX[af].zip /pub/MSDOS_UPLOADS/trsXXX[af].zip

Where XXX denotes the three digit version number. For example,
the full distribution of version 1.41 would be in a file named

If you are experiencing problems downloading these files ( is
picky for no real reason sometimes), or if you don't have FTP access,
please drop me a line and I will e-mail to you whichever distribution
you are interested in. The full distribution is sent out in 4 parts of
about 1000 uuencoded lines each. The abridged distribution (basically
just the TERSE editor and the manual) goes in one part of about 600
uuencoded lines. You can use the UUDECODE.COM program enclosed with
this archive to decode this mail.

License (copying policy)

The following policy is intended to promote free private use and
distribution, and to collect money from those who can afford to pay
for this software. In particular, those institutions which make money
from private users are requested to pass on part of their income to
whoever is responsible for generating it.

PRIVATE USERS: You are free to use, copy and distribute TERSE for
noncommercial private use provided that:

A) No fee is charged for use, copying or distribution.

B) It is not modified in any way.

C) It is distributed as a package. All files in this package must be
included, none should be added, and none should be changed.

Thus if you are a private user, you can *use* TERSE freely, and you
are under no obligation to register. (The only restriction is on its
further distribution.)

Registration (Private users)

If you find TERSE a useful, easy, and nifty editor you may show your
appreciation in one of two ways:

A) Send the author the $15 US dollars registration fee.
TERSE, the configuration utilities and, if you wish, a per-
sonalized version, and the author will do his best to update
them as soon as a new version comes out.

Please, do register if you can afford it, and if you would
like to support financially the production of this high quality

B) Decrypt, print and read the enclosed MID-EAST.R13 file, and
learn some facts about the Middle East and about its role, its
problems, etc.

IMPORTANT: The file is given in "ROT13 form". This means that
although it contains only pure printable ASCII characters, it
has to be decrypted before you can read it. A ROT13 filter is
supplied with TERSE so that you can decrypt it. The easiest way
to decrypt, and then print this file is to:

1) Run the enclosed UNROT13.BAT batch file. Doing so produces
MID-EAST.MBX, a clean version of MID-EAST.R13, then display
the MID-EAST.MBX file with LEAN.

2) To print MID-EAST.MBX, run the enclosed PRTIP.BAT batch file.
Also, if MID-EAST.MBX exists when you run the PRINTDOC.BAT
batch file, it will be printed as well.

This somewhat complicated form of distribution is partly so
that you will feel that you have applied some conscious effort
to read it. Another reason is that those who do not wish to
read this file can easily refrain from doing so.

MID-EAST.R13 is an integral part of the TERSE distribution,
but it is not required for the normal operation of TERSE.
It is supplied so that you can show your support for the quality
and the concept of TERSE, if you cannot afford to register, by
reading it.

Side comment: Being outside of home for some time, I have
learned that many things about the Middle-East are reflected
in a very distorted manner in the media. The file MID-EAST.MBX
is part of a large file which I am compiling which consists of
verifiable facts gathered from various resources about Israel
and the Middle East (political views are filtered out).

MID-EAST.MBX is expected to give you, the reader, a more
informed perspective on events in the Middle East and on the
author's country.

This version of MID-EAST.MBX has facts and papers about the
the Hizbullah.

Occasionally, I change the contents of MID-EAST.R13, to keep it
relevant and interesting. I hope that the quality of TERSE will
encourage you to learn more about the country of its author.
Naturally, you are under no obligation to do so.

NON_PRIVATE USE: Institutions and companies MUST register this package
after an evaluation period of 21 days. Registration of one copy per
company site is sufficient.

NON-PRIVATE DISTRIBUTION (Shareware distributors): You may distribute
this package as long as no more than a nominal fee (up to $10) per
disk is collected per disk.

NON-FEE DISTRIBUTION: Simtel/ Garbo/ other FTP collections: Obviously,
you may store this package and offer it to your users free of any

Author's Address
E-mail: (try addresses in this order) (University of British Columbia, Vancouver,
British Columbia, Canada),
[email protected] (University of Maryland, Maryland, USA)
[email protected] (Technion -- Israel's institute of technology,
Haifa, Israel),
[email protected] (Hebrew University, Jerusalem, Israel),

North America mailing address (until October 1st 1992):
1418 Park Drive, Vancouver, B.C. V6P 2K7, Canada.

Permanent mailing address is:
Joseph Gil,
P.O. Box 3148,

Hebrew mailing address (you cannot read the following unless your
screen adapter can display Hebrew characters):
Œ‰‚ ‰‘…‰
3148 .ƒ.š


TERSE is an exercise of editor writing inspired by TED, the famous
Tiny EDitor (written by Tom Kihlken and published November 1988 in PC
Magazine, Copyright 1988 Ziff Communications Co.). Some features of
TERSE are borrowed from the fine descendants of TED called TEDPLUS
(apparently also written by Tom Kihlken in November 1988) and TED2
(written by James E. Galbraith, 1201 Chase St., Novato CA, 94945, USA).

There is not a single piece of code in TERSE which is the same as in
TED, TEDPLUS or TED2. TERSE represents almost three years of work on
space optimization of the code, and on added functionality. Some of
the newly added features include help screen, unlimited line length,
space optimization of the code, and on added functionality. Some of
the newly added features include the help screen, unlimited line length,
status line, smooth horizontal scrolling, previous and next word,
UNIX files editing, search and replace, safety features and support
for insertion of all 256 characters of the IBM-PC extended ASCII set
(including , , , and ). Some old features include
scrolling, cut, copy, paste, and printing operations.

Some of the documentation for TERSE is based on the documentation
provided with TED2. See the article "The tiniest editor you'll ever
need" by Tom Kihlken, in the November 15, 1988 issue of PC Magazine
for further details concerning TED. TED, TEDPLUS and TED2 are
available from SIMTEL20:


TERSE is not related in any way to TED3.


t [filename]

To invoke TERSE, just type "T" from the DOS command line, optionally
followed by a filename.

TERSE opens and reads a file whose name (and path, if required) is
initially supplied on the command line. If no file name is provided,
TERSE opens a new file. A name may be supplied later during the
editing session using the "Output" command invoked by .
TERSE expects a legal DOS filename, which may include a path name.
TERSE can also edit files whose names contain spaces. These names
are legal, although most DOS commands cannot manipulate them.

Upon save, the original of the modified file is saved with the
extension .BAK. If an exit is attempted without a save, TERSE prompts
for confirmation. If the file has the Read-Only attribute set, TERSE
opens the file to allow browsing, but does not allow any edit changes.

Basic Editing
A help screen is available upon pressing or . When the help
screen is displayed, pressing any key returns you to the text.

In TERSE, the cursor movement keys (Left, Right, Up, Down, PgUp,
PgDn, etc.) allow you to move around in the text. Text is entered
in insert mode by default. Text can be deleted using the and

Pressing the key will toggle between Insert and Overstrike
mode. The Insert/Overwrite state is displayed by an 'Ins' or 'Ovr'
in the status line.

Text can be deleted using the and keys.

The key restores up to 255 characters deleted by the
key or overwritten while in the Overwrite mode. The key
only restores the last character deleted with the key.

TERSE text buffer is limited to 65535 characters. An attempt to extend
the buffer beyond that results in a short beep.

Lines may be of any length. TERSE recognizes both the UNIX and DOS
conventions for line termination, i.e., both the pair and a
single denote end of line. Off screen characters may be viewed by
moving the cursor toward them. Lines may be broken by pressing
(insert pair) or (insert character) at
any point, in either Insert or Overstrike mode. Lines may be joined
by pressing at the line end or at the beginning.
Pressing deletes the entire line and closes the gap. Pressing
deletes from the cursor position to the end of the present
line. Pressing restores the most recent line deletion.
The line delete buffer remains intact until another line is deleted.
The line delete buffer has room for 255 characters.

A Block is some portion of the text file which has been specifically
delineated for later manipulation. One end of a "block" of text is
defined by hitting key (anchor drop/raise). The other end of
the block is where the cursor is located. Move the cursor with the
cursor control keys to the block end. As you move the cursor, note
that the blocked area is shown in reverse video. The is a
toggle key, so hitting it again raises the anchor dropped at the
block end, and thus cancel the blocking operation.

Pressing the key (keypad grey minus key) removes the block to a
paste buffer; this operation is known as "Cut". The key copies
the block to the paste buffer without removing it from the text; this
operation is known as "Copy". The key copies the text stored in
the paste buffer at any point where the cursor is located; this operation
is known a "Paste". The paste buffer remains intact until another section
is marked and cut or copied. The paste buffer has room for 64K bytes.

When a block is marked, pressing prints the marked text (directly
from the file buffer). After the print, the block remains marked.

Search and Replace
TERSE has a string "Search" and "Next" functions. When the
key is pressed, the prompt "Search for: " appears on the bottom line.
Enter the desired text string and press the key. If the
string is found, it appears blinking in inverse video on the screen.
The blinking inverse video is extinguished when any key is pressed.
If the string is not found in the area following the cursor, a short
beep sounds. To search for the next occurrence of the string,
press . TERSE cannot search backward, and it doesn't recognize
regular expressions.

TERSE also has a "Translate" function which is invoked by pressing
the key. You are prompted for the string to search for,
and then for the replacement string. The "translate" function is
best explained by an example. To change all occurrences of the acronym
"PLO" in your file to the two-word phrase "Terrorist Organization",
you would move to the beginning of the file (Press ) and
then press . TERSE erases the status line (the last screen
line) and displays in its place a prompt:

Search for: _

(The underscore in the above indicates the cursor position). Type in
the word: PLO. The key can be used for erasing the previous
character. The last line should now read:

Search for: PLO_

Hit . (Hitting at this stage ends the translate
operation.) TERSE now prompts you for the replacement string in
the last screen line:

Replace with: _

Type in the phrase: Terrorist Organization. The last screen line
now reads:

Replace with: Terrorist Organization_

Hit . (Again, hitting at this stage ends the
translate operation.) TERSE searches for the first occurrence of
"PLO" in your file, moves the cursor to this point, displays "PLO" in
blinking inverse video, and then prompts you in the last screen line:

Replace with: Terrorist Organization [Yes/No/All]?

Your response could be to hit 'Y' or 'y', which means Yes, make
this replacement; or 'N' or 'n' which means No, do not make this
replacement. In both cases, TERSE continues by moving to the next
occurrence of the string "PLO" and prompts you again. You may also
answer the prompt by hitting , which aborts the translate
operation. If you wish to replace unconditionally all occurrences of
the string "PLO" with "Terrorist Organization" (be warned that
it may take a considerable time for a long file), respond with 'A' or
'a'. TERSE marches through the file and makes these replacements for you.

Search and Search - Replace are by default case insensitive.
This means that the search catches all of the following strings:
plo, PLO, pLo, etc. Pressing changes both Search and
Search - Replace to be case sensitive. Pressing again
returns you to the case insensitive Search and Search - Replace.
Note that a short message appears in the status line whenever case
sensitivity is toggled. This message is erased, and the normal
status line reappears, when you go on with your work.

Character Set and Binary file editing
Any of the characters in the IBM extended ASCII set can be entered
and manipulated by TERSE. To enter control characters (ASCII 00-31
and 127), use , , ... , , , ,
, , and . A more general
method is to press the Alt key and, without releasing it, type a
character ASCII decimal value on the numeric keypad. The PC-BIOS
does not support entry of the character (00h) in this fashion.
Instead, you may enter the character by hitting the key.

The ASCII Backspace (BS) code can be entered as , and the
key deletes the character to the left of the cursor.
Similarly, ASCII Carriage-Return (CR) and Line-Feed (LF) character
codes can be entered directly as and . TERSE
interprets the character as an end-of-line. An is considered
an ordinary text character except when it is immediately preceded by
a , in which case it is considered part of the end-of-line marker.
If are entered together, or ever become adjacent, they cannot
be separated. The key inserts an end-of-line marker (CR)(LF).

TERSE does not use the CP/M style End-of-file marker, , to
indicate the last character in a text file. If a character
appears in the file, it is shown as is.

The Screen
TERSE configures itself to the display adapter in use, and supports
text modes other than the standard 80 columns by 25 rows, e.g., EGA
43 lines and CGA 40 columns mode. and scroll the file
by the number of rows displayed. TERSE does not work properly if the
screen is initially in a graphics mode.

TERSE does not alter screen attributes or colors. Inverse video is used
in the status line and to indicate a MARKed block. TERSE uses blinking
inverse video to indicate that the search string has been found.
It automatically handles "de-snow" on a CGA display.

Because TERSE makes BIOS calls and writes directly to the screen
buffer, it would probably not work properly on MS-DOS computers that
are not sufficiently IBM-PC compatible.

The Status Line
At the bottom of the editing screen is the Status Line. The Status
Line constantly displays information regarding the file you are
currently editing. The Status Line is shown below with a description
of the information displayed.

:F1 Help | Line 137 Col 25 =282 +0 @893 #10324 Ins letter.doc* :
: : : : : : : : : File modified
: : : : : : : : : since last
: : The current : : : : : : written
: : cursor column : : : : : :
: : number : : : : : The name of file
: : : : : : : you are editing
: The current : : : : :
: cursor line : : : : +Insert mode is ON
: number : : : :
: : : : +File length in characters
A reminder that : : :
Help screen is : : +Current offset in file
available upon : :
pressing the : +The number of columns scrolled off
key : to the left of the screen
+The total number of lines in the file

³F1 Help | Line 137 Col 25 =282 +0 @893 #10324 Ins letter.doc* ³
³ ³ ³ ³ ³ ³ ³ ³ ³ File modified
³ ³ ³ ³ ³ ³ ³ ³ ³ since last
³ ³ The current ³ ³ ³ ³ ³ ³ written
³ ³ cursor column ³ ³ ³ ³ ³ ³
³ ³ number ³ ³ ³ ³ ³ The name of file
³ ³ ³ ³ ³ ³ ³ you are editing
³ The current ³ ³ ³ ³ ³
³ cursor line ³ ³ ³ ³ ÀInsert mode is ON
³ number ³ ³ ³ ³
³ ³ ³ ³ ÀFile length in characters
A reminder that ³ ³ ³
Help screen is ³ ³ ÀCurrent offset in file
available upon ³ ³
pressing the ³ ÀThe number of columns scrolled off to
key ³ to the left of the screen
ÀThe total number of lines in the file

The following is a description of all TERSE commands and their key
binding. To get a help screen with keyboard usage summary, hit or

Cursor movements
Moves cursor left one column
Moves cursor right one column
Moves cursor to the beginning of the next word.
Moves cursor to the beginning of previous word.
Moves cursor to start of line
Moves cursor to end of line
Moves cursor up one row
Moves cursor down one row
Moves text window up one page
Moves text window down one page
Moves cursor to top of file
Moves cursor to bottom of file

Basic editing operations
Any keyboard char Insert/Overwrite character into file
Insert tab character
Start new line, add pair to file.
Delete character to left of cursor
Delete character under cursor (to right)
Undo recent operation/Overwritten
Toggle between Insert/Overwrite mode (Ins/Ovr)
Delete to end of line
Delete current line
Restore deleted line (up to 255 characters)

Block Operations
drop/raise Anchor. Block is between anchor and
Copy block to clipboard buffer
Delete block to clipboard buffer
Paste from clipboard buffer
Print block.

Search for string
Toggle search case sensitivity.
Find next occurrence of string
Search and Translate

File Operations
Quit edit: no-save exit (asks for confirmation)
eXit and save: same as Quit if file name is unknown
Change output file name. Supply name if not given.
Write the current buffer into its file (if
filename known)
(in SLIM only) Read a file to buffer.

Scroll window horizontally to the left
Scroll window horizontally to the right
Scroll window up
Scroll window down

Insert/Overwrite toggle.
Push to dos.
F1 Display the help screen.
Display the help screen.

Entering Special Characters
Enter the [NUL] character
Enter the [SOH] character
... All ctrl characters can be inserted this way
... Special control characters are described below
Enter the [ETX] character (DOS abort disabled)
... ...
Enter the [BS] character
Enter the [TAB] character
Enter the [LF] character
... ...
Enter the [CR] character
... ...
Enter the [SUB] character (No CP/M style EOF)
Enter the [ESC] character
Enter the [ESC] character
Enter the [FS] character
Enter the [GS] character
Enter the [RS] character
Enter the [US] character
Enter the [DEL] character


Many features can be easily added to SLIM by virtue of the "pump block
thru buffer (bound to the key) command. Word counting, date
and time stamping, formatting, sorting, column summation, character
sets conversions are just a few examples. Sophisticated users should
probably get copy of a DOS port of the famous UNIX 'sed' and 'awk',
and harness their power to enhance SLIM. The effects of the extenal
filter can be undone by using "exchange marked block with paste buffer"
(bound to the key).

o Horizontal scrolling does not move the cursor position, so by
pressing and you can scroll to the right
or to the left but only to the extent which leaves
the current cursor position visible. For example when the
cursor is in the left most column, no horizontal scrolling
is possible. There are no plans for modifying this behavior
as the author feels that it is very reasonable. Strong user
pressure may change this.

o only restores the last character erased by
. (Future plan is to push deleted characters (by
, and overwritten characters) to a stack.
The stack will have limited depth, and as characters
are pushed in, old characters stored deeply in the stack
disappear. The will pop characters from the stack
and insert/append them.)

o Editing can get extremely slow if lines are excessively long.
Lines longer than 20,000 characters cause a noticeable
delay after every editing operation on these lines.

Version History

New in version 1.41
1) The following UNIX like filters were introduced: uudecode, fold, expand,
and unexpand. [Some of these filters include software developed by the
University of California, Berkeley and its contributors.] The cat
filter recognizes wild cards now.

2) The "pump block thru external filter command" was improved:
SLIM displays an error message if this command is attempted
when no block was marked. It beeps if an external filter cannot
be executed. The standard error of a fiter is also inserted into
the buffer. Eliminated a bug related to passing command
line arguments to filter on non-4dos systems.

3) Several bugs in the configuration utilities were fixed. An
option for setting a default right margin (for word wrap)
was introduced.

4) Corrected a bugs which garbled line numbering after
a translate command which had LF characters in the
replaced string or in the new string. (18 bytes squeezed in)

5) Incorportated user comments into the documentation.

Version 1.4
1) The source code of TERSE is now made available to the public for a
very modest registration fee of $20: $15 for the basic registration,
and an additional $5 for the source code.

2) The pre-release of SLIM was greatly enhanced. SLIM can do every
thing TERSE can, and has the following additional features:

o "read file into buffer" command
o "switch to another file" command ,
o "go to line number" command ,
o "set right margin" command ,
o "swap cursor and mark" command ,
o "pump block thru external filter" command ,
o "exchange marked block with paste buffer" command , and
o display of the hexadecimal value of the current char in the
status line.

The current char display uses a special notation for the TAB, EOF
and CR characters as well as for the CRLF combination.

My favourite new command is "pump block thru external filter"
( key), which can be undone (and then redone) by the
"exchange block with paste buffer" command ( key).
Think of the possibilities: formatting, spelling, word counting,
sorting, sed and awk, DOS and 4DOS commands etc.

3) Whenever TERSE prompts you for an input it also offers your
previous input to the same prompt as a default response string. For
example, upon pressing , TERSE displays the prompt "Search
for: " in the status line, and offers your previous response
to the prompt "Search for: ". You can use this previous response
unchanged (hit ) or you can delete characters from it (use the
key) or you can add characters to it (hit any arrow key,
and start adding characters. If you immediately start typing a new
entry, the default string is deleted and replaced by what you type.
Hitting the key deletes all of the currently entered
response. The configuration utilities allow changing to any
other control letter. (13 bytes squeezed in.)

4) Several external filters are now included in the unabridged
distribution. These utilities are intended to be used in conjunction
with the "pump block thru external filter" command of SLIM. These
filters include among others: 'cat', 'wc', 'lf', 'crlf', 'quote' and
'nfmt'. With the exception of 'nfmt', the registration of TERSE
includes registration of all of these programs. Ross Paterson,
the author of NFMT, recently posted the sources
in the alt.sources usenet newsgroup. Porting to the PC and some
packaging was done by myself.

5) Several useful utilities are now included in the unabridged
distribution. These utilities include among others the following
programs: 'esc', 'lptstat', 'bigc', 'litc'. The registration of TERSE
includes registration of all of these utilities.

6) A pre-release of TERSE for the HP 95lx palmtop (named is
now included in the unabridged distribution. This program, together
with the option in the configuration utilities to set the file size
replaces WEE. The key binding of H.COM is slightly different than
that of TERSE and SLIM, to support the keyboard of the HP 95lx.

7) The font loader and the fonts used for editing binary files are
now included in the unabridged distribution.

8) The configuration utilities have been enhanced. Among other
things, more control of the status line attributes was added and
more options of automatic horizontal scroll. Thanks to Mike Bessy
(from JP Soft- ware) <[email protected]> and to Terry Chan
for suggesting some of these changes.

9) The distribution of TERSE now includes a batch file to assist
in invoking the editor on several files. An .BTM file for setting
appropriate aliases in 4DOS is included as well.

10) Many of the documentation and configuration utilities
typos have been corrected. Special thanks to Joan Abarbanel
for her careful proofreading of a previous
version of this file. Terry Chan did a
great job of pointing out to me errors and typos in the configuration
utilities as well as in the documentation. [Note that I still take
the credit and blame for all remaining errors which have not yet been
found and corrected.]

11) The following scenario used to create a file of length 0:

T newfile

This bug has been fixed. Thanks to the many kind users who brought
this bug to my attention. (4 bytes of code added.)

12) TERSE recognizes and parses correctly file names which include
dots in them (e.g., ..\..\file.dat). Previously, such files would
not be saved. (20 bytes code squeezed in.)

13) TERSE can now read files of size 65,535 exactly. Previously,
files of this size could be created by TERSE, but not read by it.
(4 bytes code squeezed in.)

14) Eliminated several bugs related to the display of the help screen,
including the mis-alignment when ANSI console driver was present,
eliminated. (12 bytes gained.)

15) Eliminated a bug which could have caused TERSE to hang after
pushing to DOS version 2.x. (4 bytes code squeezed in.)

16) Terse now beeps whenever a save file attempt fails. Previously, the
only indication of such an error was that the "Write successful"
message didn't appear. (2 bytes code squeezed in.)

17) Next/Previous line now recognize all of the following characters
as word separators: space, tab, vertical tab, carriage return, line
feed, and form feed.

Version 1.3
1) Simplified and unified the configuration utilities.

2) Added a pre-release of LEAN, WEE and SLIM.

3) Included some of the configuration utilities in the shareware
distribution. The font loaders required for binary file editing
are still part of the registration package.

4) Fixed a bug, introduced in version 1.2, that prevented the display
of the status line.

Version 1.2
1) Code size was shrunk by another 9 (!) bytes.

2) The restriction on distribution by fee shareware distributors has
been removed.

3) After a successful print (Alt-P), the marked block is unmarked.

4) Pre-Release versions of SLIM, LEAN, WEE and TERSE for HP 95 LX
palmtop computer are available upon request.

Version 1.1
1) A bug in the snow prevention routine which caused TERSE to hang
on some CGA systems has been corrected. TERSE should run now with
no problems on all adapters. Many thanks to Andrea Omodeo (E-mail
address: ) for identifying the bug
and for suggesting the correction.

2) After considerable work, the 27 bytes code fragment required for
DESQview awareness was squeezed in. TERSE can now run in a DESQview
window, and it is fully DESQview aware.

  3 Responses to “Category : Word Processors
Archive   : TRS141F.ZIP
Filename : TERSE.DOC

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: