Copyright 1988 - 90 Stephen C. Edwards
This software is copyrighted. See the license agreement at the end of
this file for information on rights to use and copy this software.
Note is an easy to use ASCII text editor that should be sufficient for
most applications under DOS. Some of the command set is similar to that
found in other editors, with some cute little extensions tucked away in
Note to handle all the possible functions that might crop up.
If you can program in Pascal, you can really make this into an editor
to suit your own tastes, since the Turbo Pascal source code is included.
Requirements: IBM PC or Compatible
256K RAM or the more the better.
Mono or Color Adapter
Turbo Pascal 4.0 or newer.
Limitations: Maximum line length - 128 characters.
Maximum lines edited - 2730 lines.
Table of Contents
Changing the Status............
Moving the Window..............
Inserting an ASCII Code........
HOW TO USE THIS EDITOR
From the operating system type NOTE [D:][Path]FILE.EXT where FILE
is the name of the file you wish to edit (up to eight characters) and EXT
is the extension. If no file name is given on the command line, the program
will query you for a file name. The drive designation, D:, and path
designation are optional; if they are omitted, the program will search the
currently logged drive and directory. The file name including path
specification can have up to 24 characters.
If a file is found with the name you have given, the program will load
it, and present a screen for editing. If no file with this name is found,
the program will ask you if this is a new file. If you really intend to
create a new file, press "Y", and the program will present you with a blank
screen ready to enter text. On the other hand, you may have misspelled the
name of the file or made some other mistake that prevented the program from
finding your file; if so, press "N" and the program will dump you back into
the operating system so that you can try again.
The maximum file size that can be loaded depends on the amount of free
memory you have in your machine. NOTE allocates space for 128 characters to
each line of text; if your text has a lot of white space and blank lines,
it will be loaded inefficiently. As a rule of thumb, you will need memory
equal to 3 times the length of the file; thus, to edit a 100K file you will
need 300K of free memory. The maximum number of lines that can be edited is
2730. If you try to load a file that is too long for the available memory,
the program will write "insufficient memory" and dump you back into the
operating system. If you try to edit a file whose lines are longer than 128
characters, the program will write "file too fat for this editor" and dump
you back to the operating system. This is usually what happens when you try
to edit a non ASCII file.
The status line at the top of the screen shows the following: the line
and the column numbers, updated after every keystroke, the editing mode
which is either "insert" or "overwrite", the word wrap status, either
"wordwrap" or "nowrap", and the name of the file you are editing. Finally
there is a space on the extreme right which can contain an asterisk. The
asterisk will appear as soon as you have changed something in the file.
The second line of the screen is the ruler line, which shows the width
of the text. If the editor is in the "wordwrap" mode, this line shows left
and right margins indicated by markers. When text is entered in the
wordwrap mode it will be aligned between these two markers. This program
turns on with the left margin set at column 1 and the right margin at
Some explanations: in the "insert" mode, any letter typed is inserted
into the line at the cursor position and the rest of the line is pushed to
the right. In the "overwrite" mode, any letter typed replaces the letter
over the cursor and the rest of the line is unchanged. In "wordwrap" mode
the program automatically moves any word that extends past the right margin
to the beginning of the next line - sort of an automatic carriage return.
In the "nowrap" mode, you have to insert the carriage returns yourself.
Initially, the program comes on in the "insert" and "wordwrap" modes.
The rest of the screen is a window that displays 23 lines of text. A
maximum of 79 characters are displayed on each line. A "<" symbol appears
the 80th column if all the characters up to the end of a line can be
displayed, If there are more than 79 characters in the line so that some
characters on the right do not appear on the screen, a "+" symbol appears
in the 80th column. If there is no symbol in the 80th column, the line is
empty. With wide files (lines longer than 80 characters), the text may be
shifted so that the beginning of the lines do not show on the screen. The
ruler line shows you what part of the text you are looking at.
CHANGING THE STATUS
To toggle between "insert" and "overwrite" press the "Ins" key. Note
the change in the status line as this key is pressed. To change other
status parameters, type ^P ("Cntl" and "P" simultaneously) for "ParaForm".
You will be asked "wordwrap?". Press either "Y" or "N". Pressing "N" turns
off the margin markers and sets the left margin to 1. If you press "Y" you
will queried for the left and right margins. The left margin may not exceed
80 and the right margin must be at least 24 spaces margins at their current
When entering text, the normal position of the cursor is one space past
the end of the current line. A carriage return, , will create a new
line and move the cursor to the beginning of this line; a with the
cursor in the middle of a line of text will create a new line and move all
the text to the right of the cursor to the new line. A backarrow (delete)
with the cursor in the first column will delete the current line and stack
all text to the right of the cursor on top of the previous line. A ^N (hold
down the "N" key and the control key at the same time) will create a new
blank line above the current line.
MOVING THE WINDOW
The screen can be thought of as a window viewing a portion of the text.
To push the window down by one line push ^Z (press control and "z" at the
same time). To push it up by one line press ^W. To push the viewing window
down 22 lines in the text, press the "Pg Dn" key. To push it up by 22
lines, press the "Pg Up" key. To move the cursor all the way to to the
bottom of the file, press the control and "Pg Dn" key at the same time.
Control and "Pg Up" moves the cursor to the top of the file.
To move the cursor, use the cursor arrow keys. If you try to move the
cursor off the screen, the window will shift up, down or sideways so that
the cursor remains visible.
The left and right arrow keys will not move the cursor off the current
line. If the right arrow key takes the cursor past the end of the current
line, entering any character will fill in the intervening space with
blanks. Holding down the left arrow key moves the cursor to the beginning
of the current line where it stops. The up and down keys will not take the
cursor into a region where there is no text.
The "Home" key moves the cursor to the left margin on the current line.
The "End" key moves the cursor to the end of the current line. In the
wordwrap mode, lines ordinarily have a blank space at the end so that
pressing "End" positions the cursor properly to add more words to the line.
The Del key deletes the character over the cursor. The backarrow key
deletes the character to the left of the cursor. To delete an entire
paragraph, move the cursor to the end of the paragraph and hold down the
back arrow key. The paragraph will be gobbled up as you watch.
INSERT AN ASCII CODE
Some characters, such as graphics symbols and Greek letters cannot be
typed from the keyboard; other characters with a decimal order less than 32
will be interpreted as commands if typed. Any character, from 0 to 255 can
be inserted into the text by the sequence A nnn where nnn is the
ASCII number (decimal) of the character.
This feature may be used to write printer codes at the beginning of a
file so as to select the type font and the line spacing that you want the
printer to use when you copy your file to the printer. Be sure to insert a
printer code at the end of the file to restore the printer to its original
Another application of this feature is to print individual words or
phrases in underlined, boldface or italic type font. Consult your printer
manual for the proper sequences to change into and out of these modes.
To make the printer start a new page, type ASCII code 12.
To quit the editor, type ^K (press control and "k" at the same time).
If you have only been reading the file and the file has not been changed,
the program exits to the system immediately. If the file has been changed,
the program will ask you if you wish to save your changes. If you answer
"Y" the program writes "as: ". Here, you have two choices. Enter and
you will overwrite the old file on the disk. If you wish to save the old
file as a backup, you must think up a new name for your altered file.
Entering this new name will cause your altered text to be written as a new
file, leaving your old file on the disk unchanged.
This program does not make a backup copy of the file that you are
editing when starting, but since it works with the contents of the file
entirely in machine memory and the source file closed, your original file
will not be lost if the the power fails, or you hang up the machine and
have to reboot while editing. However, when writing long files it is good
practice to quit and reload from time to time so as to save your changes.
Users who are dissatisfied with the present color scheme may experiment
by typing F to change the text color and B to change the
background. There are 16 possible text colors and 8 possible background
colors, giving 128 possible color combinations - 8 of them, of course,
totally invisible e.g. blue on blue.
The first line of the screen, the status line, uses a rather gaudy
color scheme in order to provide a cue as to when you are in the edit mode;
the gaudy colors disappear when you are answering questions and reappear
when you get back into the edit mode. If you prefer more subdued colors,
type ^D to make the status line use the same colors as the rest of the
This program can be used in conjunction with the Borland Turbo
Lightning spelling checker program, since it has no keystrokes in common
with that program.
This program is written entirely in Turbo Pascal, and uses a direct
write to screen memory for fast screen update. It runs satisfactorily on
several makes of computer, and has been tested on both color and monochrome
video adapters. The fast video routins were taken from FASTWR21.INC by
Brian Foley, with some minor modifications to account for incompatibilities
with Turbo Pascal 4.0 and Hercules Mono Graphics video adapters. This
allows for more reliable video performance and makes the video operations
of the program smoother and more professional in appearence. The program
operation should also be free from snow on most CGA, EGA and monochrome
machines. Some CGA monitors may normally produce snow, so steps have been
taken to prevent the production of snow on said monitors.
The following table is both a list of features and a reference sheet for
the keys to press to use those features.
Alt-B defines the beginning/end of a block of lines. See Alt-E/P/U.
Alt-C clears all lines, ie: wipes the slate clean.
Alt-D deletes the line at the cursor position.
Alt-E erases a block of lines. See Alt-B/P/U
Alt-F finds specified text. Automatically wraps around the end of the
file. If matching text is found, it is displayed highlighted.
Alt-G get the next section.
Alt-I toggles auto-indent, ie: next line starts at the same cursor
position as the preceeding line. Can be overridden with cursor keys.
Alt-K automatically caps the first letter of each word. Good for names
Alt-M set the right margin.
Alt-N to load a new file without saving current file.
Alt-P pastes (copies) a block of lines. See Alt-B/E/U.
Alt-R reforms paragraph from the current line down. End of Paragraph is
when the next line starts with at least 3 blanks unless auto-indent
is on, then End of Paragraph is when the next line does not have
the same margin as the preceeding line.
Alt-U unmarks a block of lines. See Alt-B/E/P.
Alt-W toggles word-wrap on/off.
Alt-X save and exit.
Esc exit without saving.
^-End deletes from the cursor to the end of the line.
Ins toggles Insert mode.
ENTER pressed in the Insert mode splits a line at the cursor position.
Del at end of text joins two lines.
Cursor movement keys:
Up, Down, Left, Right.
Home, End - Move to start or end of text.
Press again - Move to start or end of line.
Ctrl-Left Ctrl-Right - move cursor 1 word left or right.
Upper-ASCII characters can be entered by holding down the Alt key and
entering the ASCII code on the number pad.
This software and associated files are being marketed as shareware.
That means the files are copyrighted, but may be used for an evaluation
period of up to thirty days. If after evaluating the program you do decide
to use it, the license fee is $25, payable to Steve Edwards.
Payment by individuals is optional. Payment by businesses and
government offices, etc, is NOT optional. Individuals may also make a few
copies for friends to try so long as such copying is not done as part of
nor adjunct to any group, association or business.
Any other use or distribution must be specifically licensed by the
author. Unlicensed use or distribution of copyrighted materials is a
violation of Federal law and may be subject to civil and criminal
prosecution and substantial fines.
NOTE: This limited license does not apply to the source code. Read the
source code file for more information.
The author is not responsible for any damages resulting from the use of
this program, including the loss of time or income. Good data processing
procedures dictate that any new software be tested by the the user with
non-critical data. If you do not agree to this warranty, do not use this
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Name: _________________________________ Phone: _______________________
Please send me the latest version of Note...
Registration fee for a single-user license for Note ........ $ 25
TOTAL .................................................. ______
Mail to: Steve Edwards
2516 North 72nd St
Kansas City, KS 66109
Please call or write for multi-user licenses or to license the source
code for commercial use.