ED, CRE: Editing and Creating Files


ED
	Runs the EDIT program (the system editor)

ED out1,out2=in1,in2
	Runs the editor, sets up input and output files with .BAS
	extentions; awaits EDIT commands.

ED filename
	Runs the editor, sets up a .BAK file, and awaits EDIT
	commands.  If no extension is given, .BAS is assumed.

CRE filename
	Sets up the file specified as an output file; deletes current
	file.  If no extension si given, .BAS is assumed.



The EDIT program prompts with an asterisk (*).  To reenter command
level, the user types the EX command.



Arguments to Commands

n	Represents a decimal number (1 to 32767); assumed positive unless
	preceded by a minus (-) character; n = number of characters forward
	or backward (-n), or number of times to execute an operation.

0	Represents text between beginning of current line and Dot (location
	pointer).

@	Represents text between Mark (temporary reference pointer) and Dot.

/	Represents text between Dot and end of text in buffer.



Read and Write Commands

R	Reads from primary input file untile form feed is met or buffer is
	filled or end of file is detected on primary file.

ER	Reads from secondary input file until form feed is met or buffer
	is filled or end of file is detected on secondary file.

nW	Writes n lines to primary output file, starting at Dot.

nEW	Writes n lines to secondary output file, starting at Dot.

nN	Writes buffer contents to primary output file, deletes buffer
	contents, reads next page of primary input file into buffer.
	Repeats until n pages are read or end of file is reached.



Pointer Location Commands

B	Moves Dot to beginning of buffer.

nA or -nA
	Advances or reverses (-) Dot n lines.

0A	Moves Dot to precede first charater in current line.

@A	Moves Dot to Mark's location.

/A	Moves Dot to follow last character in the buffer.

nJ or -nJ
	Advances or reverses (-) Dot n characters. (0,@, and / can be used).

M	Marks the current location of Dot.



Search Commands

nG#xxx#	Searches for nth occurence of xxx.  Delimiter # may be any valid
	character.

nH#xxx#	Searches whole primary input file for nth occurence of xxx.

nEH#xxx#
	Searches whole secondary input file for nth occurence of xxx.

nP#xxx#	Searches whole primary input file for nth occurence of xxx without
	writing any intervening pages.

nEP#xxx#
	Searches whole secondary input file for nth occurence of xxx without
	writing any intervening pages.



Insertion and Deletion Commands

I#xxx#	Inserts xxx at Dot; moves Dot to follow xxx.

I<CR>
   line<CR>
   line<CR>
   line<CR>
<LF>
	Insert the lines at Dot; moves Dot to follow the last line entered.

F	Inserts a form feed before Dot in buffer.

nD	Deletes n characters following Dot. (-n, @, and / can be used).

nK	Deletes n lines starting at Dot. (-n, 0, @, and / can be used).



Listing Command

nL	Lists n lines from Dot. (-n, 0, @, and / can be used).



Save and Unsave Commands

nS	Saves n lines from Dot in save buffer.

U	Copies save buffer's contents into buffer at Dot.



Character and Line Change Commands

nC#xxx# or -nC#xxx#
	Changes n characters after or before (-) Dot to xxx.  Delimiter
	# may be any valid charater.

nX#xxx# or -nX#xxx#
	Exchanges n lines after or before (-) Dot for xxx. (0, @, and / 
	can be used).



File Commands

EO	Moves Dot to beginning of secondary input file.

EF	Closes primary input and output files.



Macro Execution Command

nEM	Executes first line of save buffer as a command string n times.



Exit Command

EX	Writes buffer text to primary output file, transfers rest of
	primary input file to primary output file, closes all files,
	and returns to command level.








