home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frostbyte's 1980s DOS Shareware Collection
/
floppyshareware.zip
/
floppyshareware
/
USCX
/
STEVEUT.ZIP
/
EDITOR.DOC
< prev
next >
Wrap
Text File
|
1984-05-23
|
12KB
|
258 lines
Editor version V1.1 Informtion for use.
A brief description of the files required:
Volume in drive B is MSB-PASWRK
Directory of B:\
NAME-OF DSK 13 5-16-84 12:10a
MSBEDIT EXE 54784 5-19-84 1:02a
EDIT-MOD PAS 21192 5-19-84 12:46a
DIR LST 0 5-19-84 10:14p
EDT-MAIN PAS 24596 5-19-84
7 File(s) 60416 bytes free
MSBEDIT.EXE is the editor, you may rename this to any file
name you desire to call it. EDIT-MOD.PAS is the source code of
the module it contains approx 600 lines of source code.
EDT-MAIN.PAS is the source code of the main module, also about
600 lines long. This if for some reason you modify it, you
must recompile and link these modules together with the linker.
You must also include CLS.OBJ in the link command or delete the
line " Procedure cls; external; " from the source program so
the linker does not expect to find it. I included mine, as
well as the .ASM source so you can decide.
*** SUMMARY OF EDITOR COMMANDS ***
--------------------------
All editor commands are recognized by their first letter.
Users have the choice of using the first letter, or by typing
the entire command. Commands will NOT be recognized by a
partial command if more than the first letter is used.
Ex: f for find. Commands currently must be typed in
lower case, if you desire, change the table to uppercase and
recompile.
*** COMMANDS WHICH ACT ON THE CURRENT LINE ***
--------------------------------------
B[OTTOM] | Reset the current line pointer to point at the last li
line in the file. The last line is printed. The
message "EMPTY INPUT FILE" is printed if the file is
empty. |
EX: > b
> bottom
F[IND][-]/string[/] | Find the first occurrence of the string in the
edit file, starting the search at the line
following the current line. If the string is
found, the line containing string is printed.
Otherwise, STRING NOT FOUND is printed, and
the pointer is not reset. If the string is
preceded with a -, the search is performed
backward through the file.
Ex: > f/this string/
> f-;strings may be any length;
> find/.
N[EXT][<NUMBER>] | The simplest form (just n), the line following the
current one is printed. If there is a positive
number or negative integer in the command stream
the current line is moved forward or backward that
many, or as many to the end or top of file. If there
is no next line then a message "END OF INPUT FILE" or
"TOP OF INPUT FILE" is printed and the pointer is not
moved. |
EX: > n
> n3
> n-2
[T]OP | Make the first line the current one and print it.
"EMPTY INPUT FILE " is printed if there are no lines
in the buffer. |
EX: > t
> top
*** EDITOR DIRECTIVES ***
-----------------
A[PPEND]/STRING/[<COLUMN NUMBER>]
| Append the string to the end of the current line
(if no column number is specified) and print the
new line. If column number is specified, append
the string to the line starting in that column.
Any characters after the inserted string are lost. |
(assume current line = "MARY HAD A LITTLE")
EX: > a/la/
MARY HAD A LITTLE la
> a/mb/
MARY HAD A LITTLE lamb
> a/./5
MARY.
C[HANGE]/OLD STRING/NEW STRING/
| Change the first occurrance of old string to
new string. If old string is not present in the
line an appropriate message is printed. If the
new string is not specified the old string is
replaced with the null string. Assume that a null
string precedes all lines. |
EX:
Jack be mimble, jack be quick
> c/mi/ni/
Jack be nimble, jack be quick
> c/jack/Jack/
Jack be nimble, Jack be quick
> c//Black/
BlackJack be nimble ....
D[ELETE][<STRING>|<NUMBER>]
| Delete the current line (if optional string or
number is not specified) and reset the current line
pointer to the line following the one deleted.
If the last line is deleted, the message "BOTTOM OF
"FILE" is printed. If d{number} is used, that many
lines is deleted from the current line. By using
d<string> will delete line, and all following lines
until string is found. |
EX: > d { delete only the current line }
> d2 { delete current line and one following }
> d-2 { delete current line and one previous }
> d/it/ {delete current line and all following
until "it" is found }
> ^d! { delete all lines in buffer }
> d! { delete current and all following lines }
I[NSERT] | Enter the insert mode. Lines are inserted after the
current line. The input prompt is the * To exit the
insert mode type a backslash with nothing else on the
line (\). |
EX: > i { message displayed: MODE> INSERT }
* <type new text here><cr>
* \
MODE> COMMAND
> { back to command level }
the last inserted line is the current line, and
is printed.
P[RINT][<STRING> | <NUMBER>]
| Print the current line. If a number is specified
the current line plus that number is displayed.
The current line pointer not moved.
p<string> prints the first line containing string
if found. |
EX: > p
> p2
> p/THIS
> p-/THAT
> ^p! { print whole buffer }
R[EPLACE] | The current line is deleted and the editor enters
insert mode. (See insert command for more
information on insert). The last line entered is
the new current line. It is printed. |
EX: > r
* new line
* newer line
* \
MODE> COMMAND
newer line
>
*** SYSTEM DIRECTIVES ***
-----------------
A[BORT] | Cancel the current edit file. Do NOT update the
external edit file. This command must be spelled
out because of the append command. |
EX:
> abort
S[TOP] | Stop the current session. Write the internal buffer
out the external disk file, named on entry. |
EX:
> s
> stop
*** ENVIRONMENT DIRECTIVES ***
----------------------
H[EADER]<COLUMNS> | This procedure displays a column of numbers
1 .. <columns>; if columns is > 72 then only
72 are displayed. This is useful for finding
which column characters should be aligned in.
this line is never inserted into the file.
V[ERIFY] | The verify flag is toggled on or off. The verify flag
is used by directives such as change or next to display
their results. The verify flag is initialized to on
when the editor is first loaded. |
EX: > v
> verify
Any edit directive can be preceded by plus or minus some
integer. This will add (or subtract) that number to (or from)
the current line pointer before applying the edit directive.
For example:
> +2p : prints the second line past the current line.
> -1i : insertion mode is entered; insertion before the current
line.
The editor places special significance on the following
symbols: ^ = reference to the TOF mark. ! = process as
infinity (maxint). For delete, print and anywhere that a
number may appear.
The editor does not display any line numbers because line
numbers are not an intrinsic part of the file. However, you
may still use line numbers to reference any line. For example:
> 10c/it/is will change it to is on line 10. Delimiters at the
end of a command are optional.
Example: f/this stiring/ is equivelent to f/this string
if both delimiters are used they must be identical, and should
not appear in the string.
To start the editor: at the DOS prompt type: MSBEDIT
<FILENAME>, if you enter MSBEDIT without the file name you will
be prompted by system: "EDFILE:", type the filename to be used
here. This is because DOS needs a default name in case the
program passes a bad one. You will be prompted by the PASCAL
program to enter the filename again. If you use the filename
as a command parm then the system prompt will not appear.
If you plan to do any work to the source code I suggest
that you read and understand what the code is doing before you
modify it. I was unable to leave the comments in it I
orignially planned on because I was running out of free space
on disk and compilations, and .LST files were getting out of
hand with it. Sorry it is so bulky.
I would not recommend it on very large files, say more
that 600 lines unless you have more that 128 bytes of memory.
I have 128Kb and under DOS 2.00 found operation fairly slow
with large files. Especially on find or change commands.
However it works quite nicely on small to medium files. I
believe it is somewhat better that EDLIN at least.