03.03.2013 Views

DIGITAL RESEARCH(r) CP/M Plus TM (CP/M Version 3) Operating ...

DIGITAL RESEARCH(r) CP/M Plus TM (CP/M Version 3) Operating ...

DIGITAL RESEARCH(r) CP/M Plus TM (CP/M Version 3) Operating ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

6.6 Advanced ED Commands <strong>CP</strong>/M 3 User's Guide<br />

To execute an H command, ED first finalizes the new file, transferring all lines<br />

remaining 'in the buffer and the source file to the new file. Then ED closes the new<br />

file, erases any BAK file that has the same file specification as the original source file,<br />

and renames the original source file filename.BAK. ED then renames the new file,<br />

which has had the filetype $$$, with the original file specification. Finally, ED opens<br />

the newly renamed file as the new source file for a new edit, and opens a new $$$<br />

file. When ED returns the * prompt, the <strong>CP</strong> is at the beginning of an empty memory<br />

buffer.<br />

If you want to send the edited material to a file other than the original file, use the<br />

following command:<br />

A>ED filespec differentfilespeo<br />

If you then restart the edit with the H command, ED renames the file differentfilename.$$$<br />

to differentfilename.BAK and creates a new file of differentfilespec when<br />

you finish editing.<br />

The 0 (Original) Command<br />

An 0 command abandons changes made since the beginning of the edit and allows<br />

you to return to the original source file and begin reediting without ending the ED<br />

session. The 0 command takes the form:<br />

0<br />

followed by a carriage return. When you enter an 0 command, ED confirms that<br />

you want to abandon your changes by asking<br />

0 (Y/N)?<br />

You must respond with either a Y or an N; if you press any other key, ED repeats<br />

the question. When you enter Y, ED erases the temporary file and the contents of the<br />

memory buffer. When the * prompt returns, the character pointer is pointing to the<br />

beginning of an empty memory buffer, just as it is when you start ED.<br />

6-28

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!