[Info-vax] escape sequences, cursor positioning

JF Mezei jfmezei.spamnot at vaxination.ca
Sun Jan 11 15:41:13 EST 2009


David J Dachtera wrote:

> So, JF - you still use A1 right? If you bring up such a form, then
> switch your terminal (program) to display controls rather than interpret
> them, what do you see? 

Damned you with your challenges !

DECTERM doesn't do display control characters. And couldn'T find my
hardware jumper between 2 serial ports, so had to build a new one that
connects 2 serial ports together. I have a data logger.

OK, first one:

This is a field that is 9999.99  right aligned, it is bold and reverse
video.


L: what I typed.  R: what the computer sent to terminal.

Here is the sequence:
I typed 5 in previous field. First R: shows the echo of the 5, followed
by cursor positioning to the next field (autoskip).

You can see that for each character, it moves cursor to line 8 column
34, and writes the actual full field. In the first case, 2 blanks
followed by 1.00 and then moves cursor to position over the "1". (first
digit before the decimal) I then enter the 2 and it redraws the field.
However, it doesn't reset the display attributes.


R:57:01:35-   8 5•[8;37H
                31533334
                5BB8B378

L:57:04:17-   1 1
                3
                1

R:57:04:24-  20 •[8;34H  1.00•[8;37H
                15333342232331533334
                BB8B348001E00BB8B378

L:57:04:54-   1 2
                3
                2

R:57:04:61-  20 •[8;34H 12.00•[8;37H
                15333342332331533334
                BB8B348012E00BB8B378

L:57:06:40-   1 .
                2
                E

R:57:06:47-   7 •[8;38H
                1533334
                BB8B388

L:57:07:02-   1 3
                3
                3

R:57:07:09-  27 •[8;34H 12.30•[8;38H•[8;39H
                153333423323315333341533334
                BB8B348012E30BB8B388BB8B398

L:57:07:85-   1 4
                3
                4

R:57:07:94-  35 •[8;34H 12.34•[8;39H•[8;40H•[10;37H
                15333342332331533334153333415333334
                BB8B348012E34BB8B398BB8B408BB10B378

L:57:09:91-   3 •[B
                154
                BB2

The final line is my using the arrow key to move to next field.


Now, looking at the original screen display for something at line 8
column 34:

•[8;32H•[;1;7m  •[8;34H  0.00•[9;2H etc

So, it moves to column 32, sets attribute to bold (1) and reverse video
(8) writes 2 spaces, then moves to 8;34, and writes the field contents
(2 spaces followed by 0.00 and then moves on to the next field.

So it appears that during entry, you can rewrite the contents at that
location of the screen and the video attributes are preserved.




Moving to a text field now: (reverse video, bold).

It positions the cursor, and sets the video attributes:

•[19H•[;1;7m

And then echoes the text characters that I type without escape sequences.

When I press the DELETE key, it sends a x08 followed by a space followed
by a 0x08. (x08 is a backspace, <ctrl-H>


HOWEVER:

If, on a text field, I press the left arrow, ( CSI D), it goes into a
mode where for each key I press, it redraws the entire field., but
doesn't set video attributes.

Same for when I switch to character insert mode. It redraws the whole
field for every character I type.








More information about the Info-vax mailing list