There is a new jpl program. It is similar to the old one but allows for more stored up buffers (about 16). The editor capability is the same except that direct editing of any buffers is also possible. It works like this. Each line typed must be terminated by some control character. In most programs these characters are the return, escape, and control-z characters. This program expands this to these 3 plus most of the other control characters. Below is the list of new control characters. a b c d e f h j k l n p t v w x y Two meanings are given to terminating a line with one of the control characters depending on whether anything appears along with them. If nothing appears with these characters then this is called a zero length line (we don't count the terminator). There are also 2 modes of operation. These are known as command and edit mode. This means that what you type in command mode means something entirely different in edit mode. First lets discuss command mode. Typing a command followed by the return means execute that command (nothing new here). Typing a command following by a control x (x is one of the above control characters) means store the command in buffer x. Typing a control character alone on a line means execute the stored command. it will echo the command as though you typed it in directly. Entering a return on a line by itself means enter edit mode. Each command entered normally (followed by the return) is also saved in buffer a. Thus there is always at least the one buffer `a' defined. The others are defined as you store things in them. You may always re-execute the last thing you typed by typing a control-a alone on a line. If you have a few buffers defined and you want a reminder of whats stored in them, type a control-f alone on a line. Note that the control-a buffer will have a * in column 1 indicating that all normal commands are also stored here as well as being executed. You may change the buffer from the `a' buffer to one of the others by entering an escape alone on a line. This will rotate among the buffers (echoing each in turn). Then the control-f (for facts) will place the * along side the new buffer you stopped at. This is also the default buffer to be edited when entering edit mode. If you don't remember what control chars are available for use as buffers but you have typed in a long line you want to save somewhere, you can end it with a control ? which will find the first available buffer and pretend that was the control character you typed (it will tell you what buffer you got). Then you can type the control character to execute it. The rules for what is the first available buffer is to search starting at buffer a until a buffer that is undefined or empty (the control-z is how you empty a buffer). However, it will never select the current buffer even if it is empty. Now lets look at edit mode. Entered by a return on a line by itself, it will echo the line known as the current buffer. This has the * next to it if you display all your buffers with the control-f command in command mode. Editing is done exactly as in the old jpl program. That is: to substitute `from' -> `to' from_to to append text to the end of line text to insert text at front on line _text to delete some text text_ Note the use of the `_' character (next to the `)' on telerays); it is the editing character. Note also, it it is not present, then append is assumed. Multiple edits are permitted. To execute the new line, type . If no edits are performed, the command is simply re-executed as is. The following items are new: Entering any edit command followed by a control character (instead of the usual return character) causes the named buffer to be edited instead of the current buffer. Entering a control character alone on the line causes the current buffer to be coppied into the named buffer (wiping out any previous contents of course). Entering an escape (alone on a line) leaves edit mode without doing anything special when back in command mode. However, entering a return alone on a line leaves edit mode and executes the new current buffer. So, if you only want to edit a buffer, leave via the escape character. Typing a control-z is similar to escape, but it also clears the current buffer. Note that control-c can be a buffer, but you have to be careful with it. Since it is also the interupt (when running a program) you cannot put it into the typeahead buffer in the terminal driver. Also, you could think you were attempting to interupt a program and accidently execute your c-buffer instead. Take care if you want to use buffer c. If you want to both store and execute a buffer, simply type the command followed by the control character twice. If you type in a line and realize that is is incorrect, terminate it with control-a (if thats the current buffer) and then you can go into edit mode to complete it. A few bugs exist (which will not be fixed). If you enter a non-printing character or a tab followed by the rubout (delete) the backup may not be correct. Enter a control-r to redisplay the line. Command mode char a,b,c,.... cr escape ^f ^z ^? -------|-----------------------|-------|-------|-------|-------|-------|-------| length | Get, display, execute |Into |rotate |display|clear |prints | | | named buffer. |edit |to new |all |current|help | | 0 | |mode current|buffers|buffer |file | | ----|-----------------------|-------|-------|-------|-------|-------|-------| | Store text into |execute| | | |store | | >0 | named buffer. |line & | | | |in 1st | | | |save. | | | |avail | | -------|-----------------------|-------|-------|-------|-------|-------|-------| Edit mode char a,b,c,.... cr escape ^f ^z ^? -------|-----------------------|-------|-------|-------|-------|-------|-------| length | Store current into |done |done | |done no| | | 0 | named buffer. |edit & |edit no| |execute| | | | |execute|execute| |clear | | | ----|-----------------------|-------|-------|-------|-------|-------|-------| | Edit directly the |edit |edit | | | | | >0 | named buffer. |current|current| | | | | | |buffer |buffer | | | | | -------|-----------------------|-------|-------|-------|-------|-------|-------| Summary of control code meanings in JPL (new version).