Dec 162017
Very nice, small ascii editor.
File SLED1.ZIP from The Programmer’s Corner in
Category Word Processors
Very nice, small ascii editor.
File Name File Size Zip Size Zip Type
SLED.COM 17164 11448 deflated
SLED.DOC 23443 8139 deflated
SLHED.COM 16782 11278 deflated
TYPE.ME 1587 862 deflated

Download File SLED1.ZIP Here

Contents of the SLED.DOC file


SLED and SLHED are small, fast text editors for the IBM/PC
(registered TM of International Business Machines Corp.) and close
compatibles. They are designed for program, batch and data file
editing, and simple word processing. They can read and write a
variety of file formats and are useful as file conversion
utilities. Many files can be edited at once, limited only by
available memory.

There are two versions of the editor: SLED, for monochrome and
colour monitors running in text mode, and SLHED, that takes
advantage of the 90 columns and 43 lines of text available using
the graphics mode of the Hercules Graphics adapter (registered TM
of Hercules Computer Technology).

SLED, SLHED and the document you are reading are all copyright
1987 by:

Sam Wilmott
Suite 1503, 2201 Riverside Drive
Ottawa, Ontario, Canada K1H 8K9

You are welcome to use them and pass copies of them along to
others so long as
(1) you always keep SLED, SLHED and this document together,
(2) you don't give anyone copies of the programs or of this
document that have modified in any way, and
(3) you don't charge anyone for copies of the programs or of the
documentation (other than to cover reasonable handling,
packaging and postal costs).

If you find yourself using SLED or SLHED regularly then please
remember that I didn't get them for free. Support the development
of cheap and useful software by sending $15 to the above address.
For $15 I can't afford to send you a leather-bound copy of the
manual or guarantee that there will be a "version 2" of the
editor. You don't need a manual or "quick reference card" close
at hand to use the editors. Both SLED and SLHED have been in use
for over six months by a variety of people and no problems have
been found with the programs. If you send the $15 you will
however be on my list of nice people who should be told about any
problems that are found with the editors or any new version of
them, if there is ever any.

SLED and SLHED Page 2


You run the editor by entering the name of the editor at the DOS
prompt, followed by the files to be edited and the options to be
used. An MS-DOS machine that is not a close copy of an IBM/PC may
require use of the "slow" option. Refer to using /S on the
command line in the "SCREEN COLOURS" section. You will also want
to look at the "OPTIONS" and "SCREEN COLOURS" sections for all the
ways in which the editor can be configured.

To start with, here are three essential commands:

Alt-HDisplay a list of all the commands. You can return to
editing by using the escape key, or enter any command
or text character while still viewing the help page.

Alt-QDiscard from memory all files being edited, terminate the
editor, and return to DOS. See F7 for a less drastic exit.

EscThe escape key will always terminate the current
operation. If you are being prompted for a file name or a
search string, Esc will get you out of it. It is always
safe to press Esc, as it doesn't do anything itself.


HomeMove the cursor to the start of the line.

EndMove the cursor to the end of the line.

PgUpMove the cursor up 22 lines.

PgDnMove the cursor down 22 lines.

DelDelete the character under the cursor, or if at the the
end of a line, join the line with the cursor on it with
the one following.

Delete the character to the left of the cursor, or if at
the start of a line, join the line with the previous one.

TabMove the cursor right to the next tab stop (usually every
8 columns).

Move the cursor left to the previous tab stop.

EnterPut a line break where the cursor is, and put the cursor
at the start of the new line.

Move the cursor one line up in the file.

SLED and SLHED Page 3

Move the cursor one line down in the file.

Move the cursor one character left on the line.

Move the cursor one character right on the line.

Move the cursor to the start of the file.

Move the cursor to the end of the file.

Move the cursor to the top of the screen.

Move the cursor to the bottom of the screen.

Move the cursor to the right edge of the screen. If the
cursor is already at the right edge of the screen, scroll
the whole screen 60 columns right.

Move the cursor to the left edge of the screen. If the
cursor is already at the left edge of the screen, scroll
the whole screen 60 columns left.

Delete the line with the cursor on it.

Duplicate the line with the cursor on it and place the
cursor on the new line.

Alt-JJoin the line with the cursor on it with the following.

Alt-KErase the rest of the line starting at the cursor.

Alt-SSplit the line at the cursor, leaving the cursor in place.

Alt-ZMove the cursor to where it was before the last Ctrl-Home,
Ctrl-End, Alt-B, Alt-T or search.

F6Make the line with the cursor the screen's middle line.

F9Treat the next key typed as text, even if it is an editor
command. Only if the next key is F9, don't treat it as
text, but do nothing.

F10Insert an empty line after the one with the cursor on it
and move the cursor to the start of the new line. This is
equivalent to pressing End and then Enter.

SLED and SLHED Page 4


F2 starts a search. It asks for what is to be found. If you end
your entry with Enter, it is immediately searched for and the
cursor is moved to the first instance found. If you end your
entry with either F1 or F2, you are then prompted for a
replacement. If you end the replacement text with Enter, the
search text is searched for, and if it is found, you are asked to
press F2 to confirm that you want to make the replacement. If the
replacement is ended with F1 or F2 again, all instances of the
search text are replaced by the replacement, from the cursor
position to the end of the file.

Once a search has been started using F2, F1 can be used to repeat
or continue the previous search or search/replace. When you are
asked to press F2 to confirm a replacement, pressing any other key
abandons the search and does what that key would normally do.
In either case, pressing F1 will again resume the search.

If a multiple search/replace seems to be taking a long time, it
can be stopped by pressing Esc. You can then press F1 to resume
the search/replace if you wish.

When you are asked for a search text or a replacement, some keys
perform special functions. Esc abandons the operation; backspace
or the left-cursor key erase the last character entered; and F9
accepts the next key pressed as text, no matter what it is (except
that a second F9 means "cancel the effect of the first F9"). The
previous value of a search text or replacement is remembered, and
can be recovered a character at a time with the right-cursor key,
or in its entirety by the End key. Esc, backspace, left-cursor
and F9 can also be used when entering a file name for loading or
saving, a file name pattern or a DOS command.


Alt-FReformat the text from the line with the cursor on it to
the next line with no text on it. The text is made to fit
into a width that must have previously been set with
Alt-W.Any spaces at the start of a reformatted line are
removed before formatting, so the resulting paragraph has
no indentation.

Alt-WSet the "word-wrap" width. The column that the cursor is
in is the new right margin setting, as used by Alt-F and
when loading files with the F option set. In addition,
typed text will "word-wrap" when it overflows this width.
This allows this editor to be used as a (very) primitive
word processor. If the cursor is in the first column when
Alt-W is pressed, then the right margin is cleared, Alt-F
will not work, "word-wrap" is disabled and files loaded
with the F option revert to being split every 128

SLED and SLHED Page 5


A "marked area" is created by marking the two end points with
Alt-X or Alt-L. When any part of the marked area is displayed on
the screen it will be highlighted.

Alt-XMark the character under the cursor. If there is already
a marked area in the file, extend it to include the
current character.

Alt-LMark the line with the cursor on it. If there is already
a marked area in the file, extend it to include the whole
of the current line.

Alt-TMove cursor to the top of the marked area.

Alt-BMove cursor to the bottom of the marked area.

Alt-CCopy the marked area to the cursor location. The copy
becomes the new marked area, making it easy to delete it
with Alt-D if a mistake has been made.

Alt-MMove the marked area to the cursor location. Like Alt-C,
the copy becomes the new marked area.

Alt-DDelete the marked area. After Alt-D, there will be no
marked area, but the deleted text is remembered, and if
before marking any new area Alt-C or Alt-M area used, they
will recover the deleted text.

Alt-URemove the marks, leaving no marked area.

Alt-IInsert a new column at the cursor on each marked line,
shifting over the text to the right of the cursor. The
editor asks for a character to be entered, which is used
to fill the column.

Alt-=Insert a new column as with Alt-I. The character used to
fill the column is that used by the last Alt-I, or space
if Alt-I has not been used. This command is easier to
remember if you think of it as Alt-+.

Alt--Delete a character at the cursor position on each marked

Alt-O(Alt-letter Oh, as in "Order")Sort the marked area, or
if no marked area, the rest of the file starting at the
line with the cursor on it. The sort field used is all
of a line following the current position of the cursor.

SLED and SLHED Page 6


Files to be edited must fit into the main memory of the computer,
as no spill files are used. When all of memory has been used,
only that part of the last file loaded that does fit in memory
will be available for editing.The only limit on the number of
files that can be edited is available memory. The editor cannot
work with lines longer than 16376 (not counting the terminating
carriage-return or line-feed) and splits longer lines.

F3Load a file for editing. If Enter is pressed in response
to the file name request (no file name) and there is still
some text available from the last Alt-D, then that text
will be loaded.

F4Save the file being edited using the name displayed on the
last line.

F5List the files on the disk. When prompted for a file name
pattern, just pressing return will display the current
directory. The number in the lower right-hand corner is
the amount of free space on the disk in kilo-bytes. The
file listing you are given can be edited, and if given a
name with Alt-N, can even be saved on disk.

F7Finish editing and discard from memory the current file.
You should normally save (F4) files before doing this, if
you've made any changes to the text. If this is the only
file left in memory the editor is terminated and you are
returned to DOS. Use Alt-Q if you are editing more than
one file and are done with all of them.

F8Flip to another one of the files being edited.The files
can be thought of as being in a circle. F8 takes you
around the circle.

Alt-NChange the name of the file being edited. The new name
will be the one used when you save (F4) the file.

Alt-YRun a DOS command without exiting the editor. You can
either enter the DOS command when asked for it, or if you
just press Enter, you will be dropped into DOS and will
need to use the DOS EXIT command to return to the editor.
Note: The editor doesn't free memory that it has used
back to DOS, so if you have been editing some large files,
there may not be enough memory to run a DOS command.

SLED and SLHED Page 7


InsSet "Insert" mode, in which typed text "pushes-over"
existing text.If this mode is already set then this key
returns you to the normal mode in which entered text
overwrites existing text. When in "Insert" mode, "Ins" is
displayed on the last line of the screen.

Alt-ASet "auto-indent" mode. In this mode, whenever the cursor
is moved to a newly created blank line, the cursor is put
under the first non-blank character on the previous line.
This allows indented text to be easily entered. If you're
already in auto-indent mode, Alt-A will turn it off.

Alt-GDisplay the time on the last line, or if already
displayed, hide it.

Alt-EThe horizontal scroll step (used by Ctrl-Right-cursor or
Ctrl-Left-cursor) and the vertical scroll step (used by
PgUp and PgDn) are reset to the horizontal and vertical
distance from the top left-hand corner of the screen to
the current position of the cursor. This allows the usual
scrolling values of 22 lines and 60 columns to be changed.

Alt-PDisplay all the option settings and allow them to be
changed. The number in the lower right-hand corner is the
amount of memory still available in kilo-bytes.
kilo-bytes. See the "OPTIONS" section for how to set the
options and how to save them on disk.

Alt-RDisplay the colour, attributes or texture of each area on
the screen, and allow them to be changed. See the "SCREEN
COLOURS" section for more information.

Alt-VDisplay line ends. This makes it easy to see how long
text lines are, especially those ending in spaces. If
the line ends are already displayed, Alt-V will hide them.


These pairs of keys are equivalent:

Shift-F1 and Alt-X Shift-F6 and Alt-M
Shift-F2 and Alt-L Shift-F7 and Alt-D
Shift-F3 and Alt-T Shift-F8 and Alt-U
Shift-F4 and Alt-B Shift-F9 and Alt-N
Shift-F5 and Alt-C Shift-F10 and Ctrl-Enter
F11 and Alt-A F12 and Alt-Q
Shift-F11 and Alt-Y Shift-F12 and Alt-P

Ctrl- and Alt-Fn-key do the same thing as Shift-Fn-key. F11 and
F12 only work on a Tandy 2000 (TM of Tandy Corporation).

SLED and SLHED Page 8


Whenever you are at the MS-DOS command prompt, you can run the
editor by entering its name, followed by the names of the files
you wish to edit and the options you wish to set for this editing
session. For example, if the editor is ED.COM, and you want to
edit files ABC.TXT and PQR.TXT with the "P" and "B" options, enter

Each of the options described in the "OPTIONS" section below is
represented by a letter, and mentioning it on the command line
reverses the value it would have had by default. In addition, one
of the "S", "M" or "F" options from the "SCREEN COLOURS" section
can be used. Each option can be placed anywhere on the command
line after the program name so long as it is preceded by a slash.

The files named on the command line are loaded in the order they
appear on the command line, and the last file named is the first
displayed. If no file names are given, the Help Page is Page is

Because many programming language compilers and communications
programs can invoke a user-specified editor, two other types of
entries can be placed on the command line. It's expected that
these entries will be generated by the program calling the editor
rather than by the user. One or two numbers, each preceded by a
slash, represent the initial line and column position of the
cursor in the last file loaded. A double quote (") after a slash
causes the rest of the command line to be used as a message at the
bottom of the first screen of text displayed. So for example, the
following command would load ABC.TXT, place the cursor on line 53
and in column 9, and start out by displaying "This is the spot".
ED ABC.TXT /53/9/"This is the spot


Each option is represented by a letter as described in the
previous section. As well as appearing on the command line, the
values of all these options can be viewed and changed using Alt-P.

After pressing Alt-P and changing some of the settings, you can
press F4 to save the current set-up on disk. Pressing F4 creates
a new editor, to be used in place of the old one, with the options
as you have set them. When asked for a new name for the editor,
enter it without an extension, as ".COM" is added to the name.

The new editor not only incorporates the option settings of the
current session, but also scrolling steps set by Alt-E, the margin
setting (Alt-W), the filling character (Alt-I), screen colours,
line-end and non-text filling characters, the border colour and
the screen writing speed (Alt-R). These become the default values
of the new editor. Using the new editor with options on the
command line will reverse the values of these new defaults.

SLED and SLHED Page 9

The meanings of the option letters are as follows:

AAuto-indent mode. See Alt-A.
BTreat Ctrl-Z as text when loading a file. Normally Ctrl-Z
is used to mark the end a file.
CAdd a carriage-return character to the end of each line of
text saved by F4. DOS files usually have both a
carriage-return and a line-feed at the end of each line.
CP/M files just have a carriage-return and Unix files just
have a line-feed. You can edit non-text files by leaving
off both.
GDisplay clock.See Alt-G.
HWhen loading a file, ignore the high-order bit of each
character. This option is useful for reading the files
created by some word processors that leave formatting
information in their files, but shouldn't be used with
most DOS text files.
IInsert mode. See Ins key.
KDisplay the status of the Caps Lock and NumLock keys. If
this option is set, the part of the last line of the
screen that normally displays "Ins" when the Insert key is
toggled on, instead displays one character for each of the
Insert key (blank if off, "I" if on), the Caps Lock key
("a" if off, "A" if on), and the Num Lock key (blank if
off, "#" if on).
LAdd a line-feed character to the end of each line of text
saved by F4.
PSet tab stops every 4 columns instead of the usual 8.
QDon't compress spaces to tabs inside 'single quotes' or
"double quotes" even if the T option is set on.
RRestore the screen when leaving the editor. This option
must be in effect when the editor is started (by default
or using /R) or no screen will be saved to be restored.
As the "slow" option (/S) implies a low level of PC
compatibility, it must also imply that the usual methods
of screen saving don't work, and so when it is in effect,
the "R" option is interpreted to mean that the user wishes
to retain the screen colours used by the editor when the
program terminates.
TUse tabs to compress spaces out of files saved by F4.
Tabs are placed in lines on the assumption that there is a
tab stop every 8 columns, no matter what the P option is
set to.
VDisplay line ends. See Alt-V.
WTreat every character read when loading a file as text.
This includes carriage-returns, line-feeds, tabs and
Ctrl-Zs. The text is broken after each 128 characters
unless a margin has been set by Alt-W, in which case it is
used as the width. This option should only be used to
load binary files.
XRemove trailing spaces on each line saved by F4.
ZAdd a Ctrl-Z to the end of a file saved by F4.This
option should usually be set for DOS and CP/M, but not for
Unix. It shouldn't be set when editing non-text files.

SLED and SLHED Page 10


Pressing Alt-R displays a menu with eight different sets of
colours. The hexadecimal number of each foreground (F) and
background (B) colour as well as that of the border (X) is shown.
Different colours are available on different types of monitors.

You select one of eight display fields by pressing a digit from 1
to 8 or with the up-cursor and down-cursor keys. The digit in
front of the currently selected field is highlighted so you can
see what you are doing. Once a field has been selected, its
colour (or on monochrome monitors, its attributes) can be changed.

The F and B keys cycle through the available foreground and
background colours. A background colour from 8 to "F" causes the
text to blink.The X key cycles through the border colours. If
the border isn't to be set then a dash replaces the colour number.
Setting the border has no effect on a monochrome TTL monitor.

For a monochrome TTL monitor only the following combinations of
foreground (F) and background (B) are distinct and useable:
7 0 is normal text, F 0 is bright text,
1 0 is underlined text, 9 0 is underlined bright text, and
0 7 is reversed text.
For a blinking field, set the background to 8 instead of 0, or F
instead of 7.

There are three different ways for the editor to write text to the
screen. You choose one by repeatedly pressing "S" when in the
Alt-R menu or by using /S, /M or /F on the command line:
- "slow" video speed (/S) uses the machine's ROM BIOS to write
all characters. It will work on many MS-DOS machines with
display adapters incompatible with those on a standard PC.
- "med." (medium) video speed (/M) writes directly to the
screen but synchronizes with screen refreshing to avoid
the appearance of "snow" on the IBM Color Graphics Adapter.
- "fast" video speed (/F) writes directly, not synchronized.

If you have a Composite monitor attached to a Color Graphics
Adapter, press M you to select whether it will be fed a colour or
monochrome signal. This option has no effect on an RGB colour
monitor or on a monochrome TTL monitor.

For the editor that runs in graphics mode on a Hercules Graphics
adapter or compatible, there are the six possible combinations of
solid(W), black(B) and shaded(G) text.The X key (instead of F
and B) cycles through these six distinct textures.

For all types of monitors, pressing the letter T while field 2
(visible line ends) or 5 (non-text filler) is selected allows you
to change the character used as a visible line end or that used to
fill the parts of the screen that are empty of text respectively.

You should have both marked and unmarked text on the screen when
Alt-R is invoked with visible line ends displayed, so that the
effect of changing the colours of these fields can be seen.

 December 16, 2017  Add comments

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>