Editing Functions
IAC SB DET MOVE CURSOR <x><y> IAC SE subcommand code: 5
where <x> is an 8-bit byte containing a positive binary integer representing the character position of the cursor, <y> is an 8-bit byte containing a positive binary integer representing the line position of the cursor.
This subcommand moves the cursor to the absolute screen address (x,y) with the following boundary conditions:
if x>M-1, set x=M-1 and send an ERROR subcommand
if y>N-1, set y=N-1 and send an ERROR subcommand
This describes a finite plane topology on the screen.
IAC SB DET SKIP TO LINE <y> IAC SE subcommand code: 6
where <y> is a positive 8-bit binary number.
This subcommand moves the cursor to the absolute screen line y. x remains constant. For values of y>N-1
y = y mod N.
IAC SB DET SKIP TO CHAR <x> IAC SE subcommand code: 7
where <x> is a positive 8-bit binary number.
This subcommand moves the cursor to the absolute character position x. y remains constant, unless x>M-1 in which case:
x' = (x mod M)
y' = (y+(x DIV N))
where x' and y' are the new values of the cursor.
These last two subcommands define a toroidal topology on the screen.
IAC SB DET UP IAC SE subcommand code: 8
IAC SB DET DOWN IAC SE subcommand code: 9
IAC SB DET LEFT IAC SE subcommand code: 10
IAC SB DET RIGHT IAC SE subcommand code: 11
These subcommands are provided as a convenience for some terminals. The commands UP, DOWN, LEFT, and RIGHT are defined as
UP: (x,y)=(x, y-1 mod N)
DOWN: (x,y)=(x, y+1 mod N)
LEFT: (x,y)=(x-1, y); if x=0 then x-1 = 0
RIGHT: (x,y)=(x+1 mod M, y) and y = y+1 if x+1>M-1
Note: DOWN, LEFT, and RIGHT cannot always be replaced by the ASCII codes for linefeed, backspace, and space respectively. The latter are format effectors while the former are cursor controls.
IAC SB DET HOME IAC SE subcommand code: 12
This subcommand positions the cursor to (0,0). This is equivalent to a MOVE CURSOR 0,0 or the sequence SKIP TO LINE 0, SKIP TO CHAR 0. This subcommand is provided for convenience, since most terminals have it as a separate control.
IAC SB DET LINE INSERT IAC SE subcommand code: 13
This subcommand inserts a line of spaces between lines y (the current line, determined by the position of the cursor) and line y-1. Lines y through N-2 move down one line, i.e. line y becomes line y+1; y+1 becomes y+2, ...; N-2 becomes N-1. Line N-1 is lost off the bottom of the screen. The position of the cursor remains unchanged.
IAC SB DET LINE DELETE IAC SE subcommand code: 14
This subcommand deletes line y where y is the current line position of the cursor. Lines y+1 through N-1 move up one line, i.e. line y+1 becomes line y; y+2 becomes y+1; ...; N-1 becomes N-2. The N-1st line position is set to all spaces. The cursor position remains unchanged.
IAC SB DET CHAR INSERT IAC SE subcommand code: 15
This subcommand inserts the next character in the data stream between the xth and x-1st characters, where x is the current character position of the cursor. The xth through M-2nd characters on the line are shifted one character positon to the right. The new character is inserted at the vacated xth position. The M-1st character is lost. The position of the cursor remains unchanged.
IAC SB DET CHAR DELETE IAC SE subcommand code: 16
This subcommand deletes the character on the screen at the x-th position. The x-th character is removed and the characters x+1 through M-1 are shifted one character position to the left to become the x-th through M-2nd characters. The M-1st character position is left empty. (For most terminals it will be set to a NUL or space.) The cursor position remains unchanged.
IAC SB DET READ CURSOR IAC SE subcommand code: 17
This subcommand requests the receiver to send the present position of the cursor to the sender.
IAC SB DET CURSOR POSITION <x><y> IAC SE
subcommand code: 18
where <x> and <y> are positive 8-bit binary integers.
This subcommand is sent by a Telnet implementation in response to a READ CURSOR subcommand to convey the coordinates of the cursor to the other side. Note: x is less than M and y is less than N.
IAC SB DET REVERSE TAB IAC SE subcommand code: 19
This subcommand causes the cursor to move to the previous tab position. If none exists on the present line, the cursor moves to the previous line and so on until a tab is found or the address (0,0) is encountered. When field protection is in effect the cursor moves to the beginning of the preceding unprotected field.