You can leave comments via the links below or via the YouTube video above. I'd love to hear if I'm not alone in this. I know that I'm in the minority, but I'm sure there must be other people who also like ED. In the table above the following holds true: # Represents the highest value for n ^L CTRL-L - Stands for carriage return sequence ^Z CTRL-Z - Indicates the end of a command's argument Carriage Return - Actually pressing the Return key This is useful to see where CP is on line.Įmpties the temporary default exchange file: X$$$$$$$.LIB, used by the X command Display up to CP on first list and from CP on next line. Move CP to beginning of line and display line Move to end of the last line in the buffer Useful to make room if the buffer is full. Write half of the buffer to the new file. Save entire buffer and load more of the source file, enough to fill half of the buffer. Load enough of the file to fill half the buffer. The above macro could also be written: MFCPM^Z0TT6Z-3DICP/M^Zīelow are some useful command command sequences which may be overlooked when reading the manual for ED. ^Z in the above is CTRL-Z and indicates the end of an argument for a command. Run the following command sequence until an errorįind 'CPM' and leave Character Pointer (CP) after itĭisplay the rest of the line from CP to end I'll break down each command in the sequence below: M If we wanted to we could prepend 'M' with a number to indicate the number of times we want it to run. The 'M' command will run the sequences of commands that follows it until an error is raised, such as end of file. This makes it a good example of the power of ED and the following is a typical macro which searches through the memory buffer and displays any occurrences of the text 'CPM', pauses in case you want to stop the macro and then replaces it with 'CP/M'. An Example MacroĮD has a macro facility which allows you to repeat a sequence of commands as many times as you like. Further down in this article I have highlighted some useful command sequences. I do, however, want to show it being used properly in the video below. I'm not going to give a fuller explanation of how to use ED here because the CP/M 2.2 Operating Manual has a good section on the CP/M Editor. These are altered as you move around the file and memory buffer. When editing a file we append text from it into the memory buffer and save to the temporary output file as we go or at the end.ĮD keeps track of a number of values such as where it is in the source file, the line number in the memory buffer and the character pointer (CP) on the line. Upon executing ED it creates a temporary output file and as you write out from ED it goes to this temporary file. These commands can be combined together and one of the most powerful facilities that ED has is the 'M' Macro command to repeat sequences of commands. To exit data input mode and return to command mode you use ^Z (CTRL-Z). This is much like VI, except that you can only enter text in the non-command mode but not edit it. When we want to enter input mode, we can use the 'I' command. It allows you to do standard operations such as copy and paste, inserting text from other files, searching for and replacing text, etc. Like many early editors, ED is a modal editor which you start in command mode and while in this mode you can view existing text, move between lines and points in the line. It is also good at manipulating large files even when the system is short of memory. One advantage of ED is that it will work both with teleprinters and video terminals without having to be configured for each device. It does have a line limit of 128 characters so for continuous prose I will switch to something like Wordstar, but for editing source code and config files on CP/M, it's my first choice.ĮD came as standard with CP/M and is only 7k for CP/M 2.2 and 10k for CP/M Plus. If I'm editing text that is made up of separate lines, ideally not more than the width of the terminal, I find it excellent. Once you get used to it most editing tasks are pretty quick. It's elegant, easy to learn and only has about 25 commands but these can be combined. It's often derided but I think it's just misunderstood and with a little practise its true value can shine through.
0 Comments
Leave a Reply. |