How to use VTEDIT?

256 views
Skip to first unread message

Warren Young

unread,
Dec 14, 2016, 11:27:15 PM12/14/16
to PiDP-8
I started playing around with VTEDIT from Rick Murphy's advent.rk05 disk pack tonight, but quickly got stuck trying to find any useful documentation.

The most useful thing I've found so far is the brief mention here: http://www.pdp8.net/os/os8/os8_cmd.shtml

From that, I've managed to start VTEDIT on a file:

.MUNG VTEDIT,MYFILE.PA

Is that the best way to start a VTEDIT session?

When I do that, I get this quasi-ANSI X3.64 reply on the terminal:

    =[1;1H[JPEP001.PA(0A(B[1;10H


The only way I can see that doing nothing at all is if the simulator is somehow stripping the ESC character.


I've tried this under both an xterm type app locally and on my hardware terminal, the latter set in VT52, VT220-7 and ANSI.SYS modes.


I am experiencing acute clue deficiency here.

Rick Murphy

unread,
Dec 15, 2016, 6:06:12 AM12/15/16
to Warren Young, PiDP-8
Sigh. This is one of the cases where the PiDP-8 setup choices have side effects.
Since the traditional ASR-33 type terminal does text only and upper case only, the default configuration is set up to case-fold and to drop many special characters. That causes OS/8 to not be able to send the appropriate escape sequences.

Add the following to your simh initialization file:
set tto 7b

That will fix it. And, incidentally, allows things like Adventure to print out mixed case. It looks much nicer that way.

To edit a file with TECO, just use the ".TECO file" command. If you have a date set (yes, you can't set a current date on OS/8), then the CCL will remember the last file edited so you can just type "TECO" to re-edit.

For documentation, well, normally the VTEDIT macro contains a keypad diagram, but that makes the macro too large to work on a PDP-8.
The VTEDIT macro is also derived from an earlier version than the current one, so it's missing several commands that you might find with a search for VTEDIT on the web. However, the basic layout is consistent.
Here's the keypad layout for OS/8:

          +-------+-------+-------+-------+ 
          | "PF1" | "PF2" | "PF3" | "PF4" |
          | Save  | TECO* | Paste |       |        ^D Kill rest of line*
          | Text+*|command| text  |       |
          +-------+-------+-------+-------+ 
 All (*)  |  "7"  |  "8"  |  "9"  |  "-"  |
 commands | Open  | Page* | Mark/ | Search|        ^K Kill line+*
 take opt | line* |       | quote*| arg * |
 arg as:  +-------+-------+-------+-------+
 ESC [-]  |  "4"  |  "5"  |  "6"  |  ","  |
 <digits> | Up    | Delete|Delete/| End of|        ^U Kill start of line
 <key(s)> | Line* | char* |restore| line *|
          +-------+-------+-------+-------+
 All (+)  |  "1"  |  "2"  |  "3"  |"Enter"|
 commands | Top of|Bottom | Start |       |
 operate  | page+*|of page|of line| Search|
 from Dot +-------+-------+-------| arg * | BK SP    Go to end of line*
 to Mark  |      "0"      |  "."  |       | DELETE   Delete previous*
 if Mark  |  Down line*   |Search |       | ESC ESC  Repeat RED-key command*
 is set   |               |again *|       |
          +-------+-------+-------+-------+ 
 To Exit: ^C  [or] ^Z  Return to TECO      
          ESC ^Z       Exit from TECO      
          ESC - ^Z     Kill output, exit    

Other info from the authors of the VT-52 version (note the keypad colors consistent with a -52):

VTEDIT.TEC v00.00               AUTHOR: Herb Jacobs & Mark Bramhall
                                MODIFIERS: Jim Roth & Stan Rabinowitz

                Video Terminal Editor for TECO-8

This macro provides immediate mode support for the VT52 and VT100 video
terminals (updates occur as they are entered).  This macro makes
editing with the VT52 extremely easy and accurate, but will initially
take some editing to get used to.  This macro is very complete and
allows for almost any editing situation.

VTEDIT.TEC resides in q-register I.
It may be loaded by ERVTEDIT.TEC$YHXIHK$$.  Whenever TECO
will accept a command  MI$$  is used to enter VTEDIT.
A user can automatically cause VTEDIT to be loaded into Q-register I
by putting the appropriate commands into his initialization file, TECO.INI.

Any characters typed to VTEDIT are immediately put into the text
buffer at the current position of the text pointer, except for
the single character commands described below.  Because the typed text
is immediately displayed in the text buffer VTEDIT stops terminal
echo.

VTEDIT uses all of the numeric Q-registers.  Because of this, users
must not use Q-registers 0-9 while editing with VTEDIT.
The commands for VTEDIT.TEC are:
(named character commands are not on the keypad)

Keypad      Teco
Character   equivalent  Description

  ->        C           Move text pointer forward 1 character
  <-        R           Move text pointer backward 1 character
  0         L           Move text pointer down 1 line
  1         0J          Move text pointer to begining of text
  2         ZJ          Move text pointer to end of text
  3         0L          Move text pointer to begining of current line
  4         -L          Move text pointer up 1 line
  5         D           Delete 1 character following the text pointer
  6                     Deletes string most recently found via a search,
                        search again, cut, or paste operation
  7                     Insert 1 blank line and position before it;
                        esthetically pleasing for inserting text lines
  8         P           Perform 1 page command
  9                     Read the next input character literally, not
                        as a command
  Delete    -D          Delete 1 previous character
  Backspace L2R         Position the text pointer at the end of the line
  Control-U 0K          Delete the text from the begining of the line
                        to the text pointer
  Control-K K           Delete the text from the text pointer to the
                        end of the line.
  Control-D             Removes the text from the text pointer to the end of
                        the line.
  Control-C             Exit from this macro to normal TECO mode
                        The macro is started again by MI$$
  Control-Z             Same as Control-C
  ENTER                 Accept a new search argument to be used in
                        conjunction with the keypad '.' key. This argument
                        may be edited with DELETE and Control-U and is
                        terminated with the keypad '.' key (or $$) which
                        performs the search.
                        The search string may not end with an altmode,
                        but may have embedded altmodes.
  .                     Search for next occurence of ENTERed argument
                        If search fails, text pointer is moved to top of page
  ^(uparrow)            Move the text pointer up 1 line to the same
                        column
  v(downarrow)          Move the text pointer down 1 line to the same
                        column
  blue key              Save 1 line of text for moving, each successive
                        key strike adds another line to movable portion; the
                        first line saved is from the cursor to the end of line
  grey key              Retrieve saved text (from blue key) at current text
                        pointer position
  red key               Enter extended command mode

Extended command mode allows any TECO command to be executed
directly while remaining in VTEDIT.  The text buffer is not affected
except as the possible result of the executed TECO command.  The TECO
command to be executed is displayed at the top of the VTEDIT screen and
allowed to be edited with the following commands:

Control-U       Abort extended command mode, return to normal
                insert mode. Nothing is executed.
Delete          Delete previous character entered.
Escape Escape   Execute the command just typed and then return
                to normal insert mode.  Commands are executed with
                the text pointer at its last position in normal
                insert mode.  If the command causes an error, VTEDIT
                has to be continued by executing  MI$$ .  Executing
                another macro is O.K. as long as it doesn't destroy
                any of the numeric Q-registers.


A numeric argument (of the form ESC number) may precede the following commands:

Paste, open line, page, quote, up, down, left, right,
up line, down line, delete char, search.

This argument makes the obvious modification to the command.

The "up line" and "down line" keys (keypad keys 4 and 0 respectively)
are much faster than the "up in column" and "down in column" keys
(up-arrow and down-arrow keys).  Consequently, when scanning through
a portion of a file, the "up line" and "down line" functions are
preferred.

Note that TECO maintains a type-ahead buffer. It is possible for
you to type faster than VTEDIT can update the screen.
In such a case, VTEDIT will not lose your type-in, however, it will
stop updating the screen (to save time) until it has finished
processing all the commands that you have typed in.

Getting this onto the pack (as VTEDIT.DC) would be a good idea.
    -Rick


--
You received this message because you are subscribed to the Google Groups "PiDP-8" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pidp-8+unsubscribe@googlegroups.com.
To post to this group, send email to pid...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pidp-8/55f91d89-8f3d-42eb-9a73-5221d4625f49%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Rick Murphy, CISSP-ISSAP, K1MU/4, Annandale VA USA

Warren Young

unread,
Dec 15, 2016, 7:57:37 AM12/15/16
to PiDP-8, tange...@gmail.com
On Thursday, December 15, 2016 at 4:06:12 AM UTC-7, Rick Murphy wrote:

Add the following to your simh initialization file:
set tto 7b

Is the only drawback to that that you then have to put the keyboard into caps lock mode most of the time, else you confuse things like CCL?

I am debating making this the default in the next release of the software, but won't do so if there are other drawbacks.

VTEDIT.TEC resides in q-register I.
It may be loaded by ERVTEDIT.TEC$YHXIHK$$.

Yyyyyeeessss...perfectly obvious. :rolleyes:

I see that your provided TECO.IN file bypasses the need for knowing this. Thank you for that.

Getting this onto the pack (as VTEDIT.DC) would be a good idea.

Done, and checked in. May I also add this tutorial to the software repository as a wiki article?

Rick Murphy

unread,
Dec 15, 2016, 9:57:08 AM12/15/16
to PiDP-8
On Thu, Dec 15, 2016 at 7:57 AM, Warren Young <tange...@gmail.com> wrote:
On Thursday, December 15, 2016 at 4:06:12 AM UTC-7, Rick Murphy wrote:

Add the following to your simh initialization file:
set tto 7b

Is the only drawback to that that you then have to put the keyboard into caps lock mode most of the time, else you confuse things like CCL?
There's a pair of batch files on the disk - UCSYS.BI and LCSYS.BI.
LCSYS.BI patches the keyboard monitor and command decoder to case-wrap input.
 

I am debating making this the default in the next release of the software, but won't do so if there are other drawbacks.

VTEDIT.TEC resides in q-register I.
It may be loaded by ERVTEDIT.TEC$YHXIHK$$.

Yyyyyeeessss...perfectly obvious. :rolleyes:

TECO isn't for the faint of heart. :)
 
I see that your provided TECO.IN file bypasses the need for knowing this. Thank you for that.

Getting this onto the pack (as VTEDIT.DC) would be a good idea.

Done, and checked in. May I also add this tutorial to the software repository as a wiki article?

Yes, it's public information and you're welcome to add it to the wiki.
    -Rick

Warren Young

unread,
Dec 16, 2016, 5:07:54 AM12/16/16
to PiDP-8
On Thursday, December 15, 2016 at 7:57:08 AM UTC-7, Rick Murphy wrote:
LCSYS.BI patches the keyboard monitor and command decoder to case-wrap input.

I've failed to make it do anything useful.

I think I've gotten the batch file to run, two different ways:

    .R BATCH
    *<LCSYS

and

    .SUBMIT <LCSYS

Either way, both keyboard monitor and ADVENT still accept only upper-case commands. 

William Cattey

unread,
Jul 30, 2017, 12:50:02 AM7/30/17
to PiDP-8
Hi Rick. 

Sorry to bother you on this thread so many months later.

Does anyone have that patch in source form?

It looks like it not only upcases, but also does video terminal style rubout processing.

If no source is available, I may disassemble it myself.  (But that means I'll also do a trial compile of the KBM and CM to look at where the patch registers in the old source.)

-Bill

Rick Murphy

unread,
Jul 30, 2017, 8:06:25 AM7/30/17
to William Cattey, PiDP-8
Bill,
There's a few ways I can get this to you.
One, the TECOVT.MA source file. 
Two, a zip file with the entire source set. (VTEDIT.TE changes as well)
Three, the SIMH disk image, which has MACREL installed along with the modified source. (http://www.rickmurphy.net/macrel.rk05)
Four, a diff of the original and new source.
What's your preference?
    -Rick

--
You received this message because you are subscribed to the Google Groups "PiDP-8" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pidp-8+unsubscribe@googlegroups.com.
To post to this group, send email to pid...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Bill Cattey

unread,
Jul 30, 2017, 11:22:19 AM7/30/17
to Rick Murphy, PiDP-8
Hi Rick,

I apologize for not being clearer.  At this time, I'm looking for the source changes to the OS/8 Keyboard Monitor and Command Decoder embodied in the UCSYS.BI and LCSYS.BI batch files.

I presume TECOVT.MA is a MACREL source for a fancy, new version of TECO.

In my researching how best to offer up a clean system image for the PiDP-8, I'm first stepping through the discussions of the lower level stuff.  (I.E. preferred character set, and how we want to put in place
mechanism and documentation to help people "flip the switch" between paper TTY style interaction,
and video terminal interaction.

So I wanted to get a very clear and robust understanding of how those two batch files will be maintained going forward.

I think I will get to TECO and MACREL support in short order.  I've actually found an archive with
DEC distribution dectapes that contain pristine distributions of the OS, the extensions, Fortran IV, and MACREL.

My plan is to create a new master RK05 image that is built from those tapes.
One image will be a runnable binary pack.  Another image will be a source pack.


July 30, 2017 at 8:06 AM
Bill,
There's a few ways I can get this to you.
One, the TECOVT.MA source file. 
Two, a zip file with the entire source set. (VTEDIT.TE changes as well)
Three, the SIMH disk image, which has MACREL installed along with the modified source. (http://www.rickmurphy.net/macrel.rk05)
Four, a diff of the original and new source.
What's your preference?
    -Rick
--
Rick Murphy, CISSP-ISSAP, K1MU/4, Annandale VA USA
July 30, 2017 at 12:50 AM
Hi Rick. 

Sorry to bother you on this thread so many months later.

Does anyone have that patch in source form?

It looks like it not only upcases, but also does video terminal style rubout processing.

If no source is available, I may disassemble it myself.  (But that means I'll also do a trial compile of the KBM and CM to look at where the patch registers in the old source.)

-Bill

On Thursday, December 15, 2016 at 9:57:08 AM UTC-5, Rick Murphy wrote:
--
You received this message because you are subscribed to a topic in the Google Groups "PiDP-8" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pidp-8/0VJuTjRnlas/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pidp-8+un...@googlegroups.com.

Rick Murphy

unread,
Jul 30, 2017, 9:03:30 PM7/30/17
to Bill Cattey, PiDP-8
OK, now I understand.
The "LCSYS.BI" and "UCSYS.BI" are patches to the OS/8 keyboard monitor and command decoder. 
I doubt that any source code for the underlying code was ever written. They're a mod to the existing code, probably based on a read of the OS/8 sources.
They're a hack to allow lowercase input to be folded, and only fix this for the KBM and CD. 
Everything else (any other OS/8 program) is presented with mixed case and has to deal with it. which is why the default for the PiDP-8 SIMH config is to restrict lowercase.
    -Rick

To unsubscribe from this group and all its topics, send an email to pidp-8+unsubscribe@googlegroups.com.

To post to this group, send email to pid...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pidp-8/571433b5-5365-496e-ae73-1225a4ca7658%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "PiDP-8" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pidp-8+unsubscribe@googlegroups.com.
To post to this group, send email to pid...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

clasystems

unread,
Jul 31, 2017, 12:27:53 AM7/31/17
to PiDP-8, bill....@gmail.com


On Sunday, July 30, 2017 at 9:03:30 PM UTC-4, Rick Murphy wrote:
OK, now I understand.
The "LCSYS.BI" and "UCSYS.BI" are patches to the OS/8 keyboard monitor and command decoder. 
I doubt that any source code for the underlying code was ever written. They're a mod to the existing code, probably based on a read of the OS/8 sources.
They're a hack to allow lowercase input to be folded, and only fix this for the KBM and CD. 
Everything else (any other OS/8 program) is presented with mixed case and has to deal with it. which is why the default for the PiDP-8 SIMH config is to restrict lowercase.
    -Rick
Despite all of the massive ruination in OS/278 V2, this was actually implemented in the release.

P/S/8 lacks this problem systemically due to a disciplined approach taken in all conforming programs.  In SIMH, the console is set the other way and the O/S routines fold the code.

cjl 
Reply all
Reply to author
Forward
0 new messages