On Wed, Sep 2, 2020 at 5:47 AM tom ehlert <t...@drivesnapshot.de> wrote:
>
> UNIX System V certainly was connected to serial terminals (Televideo,
> VT100, ...)
>
> and it had the VI visual editor with definitively cursor movement
> across the screen, even when the terminal had no cursor keys.

I was a system administrator for setups like that.  (At one shop, I
had 90 dumb terminals connecting to a SysV, and later a Solaris,
machine.)

The vi editor relied on the TERM variable being properly set in the
login profile.  (And vi is a "moded" editor.  In Insert mode, things
you type are inserted into the file you are editing.  In command mode,
keys on the keyboard become commands. H, J, K, and L move the cursor
left, down, up, and right respectively.  So you can use vi on machines
that don't have arrow keys.)

Unix used a database called termcap (short for terminal capabilities)
to tell how to communicate with the terminal.  The $TERM variable got
set to an entry in the local termcap file.  An ANSI termcap entry
looked like this.  It was provided with a DOS port of the Unix Larn
D&D style game (and required the ANSI.SYS driver to be loaded.) \E is
the escape character (ASCII 27).  A command sequences begin with
escape left bracket

#
# Monochrome IBMPC.
#    This is a termcap for the NANSI.SYS device driver.
#    It is the same as the ANSI termcap, except NANSI supports
#    line insert (al) and delete (dl) while ANSI does not.
#
ibmpc-mono:\                   Name of termcap entry
    :co#80:\                       Number of screen columns
    :li#24:\                         Number of screen rows
    :ho=\E[H:\                    Home the cursor
    :cl=\E[;H\E[2J:\            Clear line
    :bs:\                            Terminal has backspace key
    :cm=\E[%i%2;%2H:\    Cursor motion
    :up=\E[A:\                   Up arrow
    :xd=\E[B:\                   Down arrow
    :nd=\E[C:\                   Right arrow (non-destructive space)
    :bc=\E[D:\                   Left arrow
    :ce=\E[K:\                   Clear entry
    :cd=\E[J:\                    Clear display
    :ti=\E[m:\                    Terminal mode init
    :te=\E[m:\                   Terminal mode end init
    :so=\E[1m:\                 Standout mode (usually boldface)
    :se=\E[m:\                   End standout
    :us=\E[4m:\                 Underline mode
    :ue=\E[m:\                   End underline
    :al=\E[L:\                     Add line
    :dl=\E[M:                     Delete line

This is a simple example.  More complex ones existed.  But there were
limits in how complex - terminal definitions had to fit into a 1K
buffer in memory.

Terminals fell into two broad categories - ASCII and ANSI.  Earlier
terminals were ASCII terminals, and the typical example was the DEC
VT52 or the Wyse 50.  The VT100 was the typical ANSI terminal.  The
principal difference was ANSI terminals using ANSI escape sequences
for terminal commands, which were a subset of the ANSI 3.64
specification.  The latter made life easier for admins.  The Wyse 50
ASCII terminal, for example, had a backspace key and a left arrow key.
*Both* sent ^H when sent, with no way to determine which of those keys
was pressed when the system got a ^H from the terminal.

> cursor movement is not tied to memory-mapped devices, and even old DOS
> Software (MS Word and friends) were derivative of CP/M software where
> they also have to live with serial terminals. they (for the most part)
> used only BIOS functions for screen control.

And CP/M had a configurable BIOS you could customize to best support
your hardware, because there was wide variation in what vendors
offered.

Likewise, early PC clones took a bit to get IBM PC BIOS emulation
correct.  Earlier versions of the VDE editor mentioned here could be
configured to use the BIOS for cursor movement if the particular brand
of machine wasn't fully PC compatible and didn't support the expected
control sequences.  Using BIOS calls was slower and more expensive
than direct addressing, so all breathed sighs of relief when it
stopped being needed.
______
Dennis


_______________________________________________
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user

Reply via email to