408 lines
12 KiB
Plaintext
408 lines
12 KiB
Plaintext
![]() |
PD-Edit Users Guide
|
|||
|
|
|||
|
By Rosemary Robertson-Smith
|
|||
|
|
|||
|
|
|||
|
|
|||
|
I DISCLAIMER
|
|||
|
|
|||
|
Copyright (c) 1989 Rosemary Robertson-Smith
|
|||
|
|
|||
|
PD-Edit is Shareware. You may distribute it freely, but to use
|
|||
|
it legally after a 10-day evaluation period you must send $15
|
|||
|
to:
|
|||
|
|
|||
|
Rosemary Robertson-Smith
|
|||
|
Ramtrack Software
|
|||
|
72 Bowers St.
|
|||
|
Nashua NH 03060
|
|||
|
|
|||
|
(603) 889-6521
|
|||
|
|
|||
|
In return, you will receive the latest copy of PD-Edit and a
|
|||
|
registration number entitling you to technical support from the
|
|||
|
author. You will also receive the next update free. Your
|
|||
|
honesty will enable Ramtrack Software to continue distributing
|
|||
|
quality Shareware products. All comments are welcome.
|
|||
|
|
|||
|
Please include a brief description of your system when you
|
|||
|
register.
|
|||
|
|
|||
|
PD-Edit v1.0
|
|||
|
|
|||
|
|
|||
|
|
|||
|
II INTRODUCTION
|
|||
|
|
|||
|
PD-Edit is a simple screen editor, designed for use by
|
|||
|
programmers and other users who don't want to deal with the
|
|||
|
overhead of word processors. It is command key driven and
|
|||
|
avoids modes of operation whenever possible.
|
|||
|
|
|||
|
|
|||
|
|
|||
|
III GETTING STARTED
|
|||
|
|
|||
|
PD-Edit is a binary program designed to run under the
|
|||
|
BASIC.SYSTEM program or any other ProDOS system program that can
|
|||
|
start a BIN program. Upon startup, it immediately requests a
|
|||
|
file-name to edit. If no filename is entered, the program will
|
|||
|
exit.
|
|||
|
|
|||
|
When running, you may type in characters just as you would any
|
|||
|
word processor. You are only limited by the memory limitations
|
|||
|
of the ProDOS operating system.
|
|||
|
|
|||
|
The binary version of PD-Edit is called PDEDIT.BIN and the
|
|||
|
Aztec-C Shell version is call PDEDIT.PRG. You may rename the
|
|||
|
programs to the names of your choice.
|
|||
|
|
|||
|
|
|||
|
PD-Edit Page 2
|
|||
|
|
|||
|
|
|||
|
IV COMMAND KEYS
|
|||
|
|
|||
|
Command keys are editing commands that invoke editor features.
|
|||
|
The following describes each key:
|
|||
|
|
|||
|
Left-Arrow
|
|||
|
|
|||
|
Move left one character.
|
|||
|
|
|||
|
Right-Arrow
|
|||
|
|
|||
|
Move right one character.
|
|||
|
|
|||
|
Up-Arrow
|
|||
|
|
|||
|
Move up one line.
|
|||
|
|
|||
|
Down-Arrow
|
|||
|
|
|||
|
Move down one line.
|
|||
|
|
|||
|
Delete
|
|||
|
|
|||
|
Delete previous character.
|
|||
|
|
|||
|
Tab
|
|||
|
|
|||
|
Insert spaces to next tab stop. Tab stops are user
|
|||
|
adjustable, but default to 4 character intervals.
|
|||
|
|
|||
|
Control-E
|
|||
|
|
|||
|
Toggle edit mode. The two modes are insert and
|
|||
|
overstrike. The current mode is always displayed in the
|
|||
|
status line.
|
|||
|
|
|||
|
Control-T
|
|||
|
|
|||
|
File statistics. Displays the current line number and
|
|||
|
total number of lines, including the start and end
|
|||
|
markers.
|
|||
|
|
|||
|
Control-Z
|
|||
|
|
|||
|
Clears buffer.
|
|||
|
|
|||
|
Escape
|
|||
|
|
|||
|
Execute special command. Special commands are:
|
|||
|
|
|||
|
READ [file-name]
|
|||
|
|
|||
|
WRITE [file-name]
|
|||
|
|
|||
|
EXIT
|
|||
|
|
|||
|
QUIT
|
|||
|
|
|||
|
TABS [Width from 1 to 32]
|
|||
|
|
|||
|
|
|||
|
PD-Edit Page 3
|
|||
|
|
|||
|
|
|||
|
Return
|
|||
|
|
|||
|
Start a new line.
|
|||
|
|
|||
|
Open-Apple-Left
|
|||
|
|
|||
|
Move left one tab-width.
|
|||
|
|
|||
|
Open-Apple-Right
|
|||
|
|
|||
|
Move right one tab-width.
|
|||
|
|
|||
|
Open-Apple-Up
|
|||
|
|
|||
|
Move up 16 lines.
|
|||
|
|
|||
|
Open-Apple-Down
|
|||
|
|
|||
|
Move down 16 lines.
|
|||
|
|
|||
|
Open-Apple-Return
|
|||
|
|
|||
|
Move to beginning of next line.
|
|||
|
|
|||
|
Open-Apple-A
|
|||
|
|
|||
|
Insert a special character. It requests a ASCII code to
|
|||
|
insert at the current position. The special character
|
|||
|
will be represented by the checkerboard character.
|
|||
|
|
|||
|
Open-Apple-B
|
|||
|
|
|||
|
Move to bottom of buffer.
|
|||
|
|
|||
|
Open-Apple-C
|
|||
|
|
|||
|
Cut selected area. PD-Edit attempts to write the
|
|||
|
selected area to the file /RAM/PASTE.EDIT; however, if
|
|||
|
you do not have sufficient space in the /RAM directory,
|
|||
|
the file will be written to the current directory. This
|
|||
|
implies that the cut lines can be repasted in another
|
|||
|
editing session.
|
|||
|
|
|||
|
Open-Apple-D
|
|||
|
|
|||
|
Delete current line.
|
|||
|
|
|||
|
Open-Apple-E
|
|||
|
|
|||
|
Move to end of line.
|
|||
|
|
|||
|
Open-Apple-F
|
|||
|
|
|||
|
Find text. The search is case sensitive.
|
|||
|
|
|||
|
Open-Apple-G
|
|||
|
|
|||
|
Goto a line number. Line numbering begins with the
|
|||
|
[Start of Buffer] marker.
|
|||
|
|
|||
|
|
|||
|
PD-Edit Page 4
|
|||
|
|
|||
|
|
|||
|
Open-Apple-I
|
|||
|
|
|||
|
Insert a new line after the current line.
|
|||
|
|
|||
|
Open-Apple-K
|
|||
|
|
|||
|
Start selecting lines for cut. Only whole lines may be
|
|||
|
cut and pasted.
|
|||
|
|
|||
|
Open-Apple-L
|
|||
|
|
|||
|
Toggle macro mode. When macro mode is started, the
|
|||
|
status line will display the word LEARN. Until the
|
|||
|
Open-Apple-L command is pressed again, all keystrokes
|
|||
|
are recorded.
|
|||
|
|
|||
|
Open-Apple-M
|
|||
|
|
|||
|
Execute the macro that was most recently recorded by the
|
|||
|
Open-Apple-L command.
|
|||
|
|
|||
|
Open-Apple-N
|
|||
|
|
|||
|
Find next occurance of search string that was entered
|
|||
|
using Open-Apple-F.
|
|||
|
|
|||
|
Open-Apple-P
|
|||
|
|
|||
|
Paste previously cut lines.
|
|||
|
|
|||
|
Open-Apple-R
|
|||
|
|
|||
|
Set a repeat count. A repeat count will cause the next
|
|||
|
command to be repeated the specified number of times.
|
|||
|
|
|||
|
Open-Apple-S
|
|||
|
|
|||
|
Substitute for text. It will request a search string
|
|||
|
and then a replacement string. You have the option of
|
|||
|
replacing none, the high-lighted characters, or all
|
|||
|
occurances of the search string. You may type in any
|
|||
|
printable or non-printable character for the search.
|
|||
|
|
|||
|
Open-Apple-T
|
|||
|
|
|||
|
Move to the top of buffer.
|
|||
|
|
|||
|
Open-Apple-U
|
|||
|
|
|||
|
Undelete a line. Undelete only recalls the last deleted
|
|||
|
line. Two deletes in a row will only permit the undo of
|
|||
|
the most recent delete.
|
|||
|
|
|||
|
Open-Apple-W
|
|||
|
|
|||
|
Move the cursor forward to the first character after the
|
|||
|
next white-space. If there are no white-space
|
|||
|
characters on the line, the cursor will be placed at the
|
|||
|
first non-white-space character in the next line.
|
|||
|
|
|||
|
|
|||
|
PD-Edit Page 5
|
|||
|
|
|||
|
|
|||
|
Open-Apple-X
|
|||
|
|
|||
|
Delete current character.
|
|||
|
|
|||
|
Open-Apple-Z
|
|||
|
|
|||
|
Refresh screen, placing the current line near the middle
|
|||
|
of the screen.
|
|||
|
|
|||
|
|
|||
|
|
|||
|
V REQUESTING MORE INFORMATION
|
|||
|
|
|||
|
For certain commands, you will be prompted for more information.
|
|||
|
The routine that requests the input has the following edit
|
|||
|
features and restrictions:
|
|||
|
|
|||
|
o Control-Z will clear the current input buffer.
|
|||
|
|
|||
|
o Delete will erase the previous character.
|
|||
|
|
|||
|
o Escape will cancel the input and return to the editing
|
|||
|
window.
|
|||
|
|
|||
|
o Cursor key movement is not supported.
|
|||
|
|
|||
|
o A beep will sound when you reach the maximum number of
|
|||
|
characters or you attempt to insert an invalid
|
|||
|
character.
|
|||
|
|
|||
|
o To insert non-printing characters such as a TAB or
|
|||
|
FORMFEED, you must hold the Open-Apple key down while
|
|||
|
pressing the desired key.
|
|||
|
|
|||
|
o If the input has a default value, the cursor will be
|
|||
|
placed after the last character in the default.
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
VI EDITING TIPS
|
|||
|
|
|||
|
If your line exceeds 80 characters, an exclamation mark will
|
|||
|
appear at the end of the line. This indicates that there are
|
|||
|
hidden characters. You can still use all the cursor movement
|
|||
|
and search commands; however, while accessing characters past
|
|||
|
the 80th column in a line will keep the cursor at physical
|
|||
|
column 80.
|
|||
|
|
|||
|
If you move the cursor down to a line that is actually shorter
|
|||
|
than the previous line. The cursor will not be placed at the
|
|||
|
end of the line; instead, it will maintain its horizontal
|
|||
|
position. If you do not insert any characters, the original
|
|||
|
end-of-line will not change; however, if you do insert a
|
|||
|
character, PD-Edit will fill the line with spaces until the
|
|||
|
end-of-line is at the current cursor position.
|
|||
|
|
|||
|
Tabs insert spaces and not the ASCII tab character. This costs
|
|||
|
more memory; however, it makes your text files compatible across
|
|||
|
|
|||
|
|
|||
|
PD-Edit Page 6
|
|||
|
|
|||
|
|
|||
|
many platforms.
|
|||
|
|
|||
|
|
|||
|
|
|||
|
VII RUNNING PD-EDIT FROM THE BASIC SYSTEM PROGRAM
|
|||
|
|
|||
|
The following EXEC file should be created to properly run
|
|||
|
PD-Edit from Apple BASIC:
|
|||
|
|
|||
|
BRUN EDIT -BASIC.SYSTEM
|
|||
|
|
|||
|
The reason for reloading BASIC after running the PD-Edit is that
|
|||
|
some global information is overwritten by the editor. This will
|
|||
|
prevent proper BASIC operation.
|
|||
|
|
|||
|
|
|||
|
|
|||
|
VIII EDITING AN APPLE BASIC PROGRAM
|
|||
|
|
|||
|
To edit an Apple BASIC program, you must first convert the
|
|||
|
program to a text file by placing the following lines at the
|
|||
|
beginning of the BASIC program:
|
|||
|
|
|||
|
1 PRINT CHR$(4);"OPEN PROGRAM.BAS"
|
|||
|
2 PRINT CHR$(4);"WRITE PROGRAM.BAS"
|
|||
|
3 LIST
|
|||
|
4 PRINT CHR$(4);"CLOSE PROGRAM.BAS"
|
|||
|
|
|||
|
This will cause a listing of the current program to be placed in
|
|||
|
the file "PROGRAM.BAS", which can then be edited by PD-Edit.
|
|||
|
|
|||
|
To convert the text program back to BASIC, issue the following
|
|||
|
command:
|
|||
|
|
|||
|
EXEC PROGRAM.BAS
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
IX PROGRAM TAMPERING
|
|||
|
|
|||
|
If you suspect program tampering, or you just want to reassure
|
|||
|
the integrity of the editor code, there is a checksum program
|
|||
|
that can be run. Execute the following procedure:
|
|||
|
|
|||
|
1. Get into Apple BASIC
|
|||
|
|
|||
|
2. BRUN CHECKSUM
|
|||
|
|
|||
|
3. It will then prompt you for the editor file name. You
|
|||
|
must provide the complete ProDOS path.
|
|||
|
|
|||
|
4. The program will print out 3 numbers.
|
|||
|
|
|||
|
5. Call the author and request a program checksum
|
|||
|
validation. You must provide the numbers printed out by
|
|||
|
CHECKSUM and the PD-Editor version number. The author
|
|||
|
will confirm whether the program has been modified by an
|
|||
|
unauthorized user.
|
|||
|
|
|||
|
|
|||
|
PD-Edit Page 7
|
|||
|
|
|||
|
|
|||
|
X TECHNICAL INFORMATION
|
|||
|
|
|||
|
PD-Edit has approximately a 17,000 character limit on the size
|
|||
|
of a file. If you attempt to load a file that is larger than
|
|||
|
this limit, PD-Edit will truncate it. The 17,000 value may vary
|
|||
|
due to file attributes. A line in a file requires 9 bytes for
|
|||
|
overhead, so the amount of memory available to the editor is
|
|||
|
directly proportional to the number of lines in the file and
|
|||
|
each line length.
|
|||
|
|
|||
|
The maximum line size is 250 characters.
|
|||
|
|
|||
|
The maximum file-name length is 64 characters.
|
|||
|
|
|||
|
The maximum repeat-count is 5000.
|
|||
|
|
|||
|
The maximum search/replace string is 32 characters.
|
|||
|
|
|||
|
The maximum tab width is 32 spaces.
|
|||
|
|
|||
|
The maximum length of the macro buffer is 255 characters.
|
|||
|
|
|||
|
PD-Edit is written using the C language and 6502 assembler.
|
|||
|
|