VT-52 ESCAPE CODE GUIDE ~~~~~~~~~~~~~~~~~~~~~~~ A. Screen positions The following functions control a cursor's position on screen. A Cursor Up, the horizontal position stays same. B Cursor Down. C Cursor Right. D Cursor Left. H Cursor Home, move cursor to the upper left corner of the screen. I Reverse Line Feed, same as A except if the cursor is in the top line, a blank line is inserted and the remainder of the text is scrolled down. L Insert Line, insert a blank line and the remainder of the text is scrolled down and the lowest line is lost. Yrowcolumn, move cursor to any place of the screen. The row and column are calculated in this way, take the row or column number and add 32, then find the character in ASCII decimal. For example, Y+A moves cursor to 11th row 33th column since '+' in ASCII is decimal 43 and 'A' is 65. Note that the upper left corner(home position) is 0,0 and the other corner is 23, 79 in the meduim resolution. j Save cursor, to be restored by the next function k Restore cursor, move cursor to the position the last j is called. B. Erase functions The following functions perform erasing screen functions. E Clear whole screen, and move cursor home (0, 0). J Clear below cursor, from the cursor to the end of the screen and the cursor position unchanged. K Clear to end of line, including the character at the current position but cursor position is not changed. M Delete line, and move the remainder of text up one line. d Clear screen to the cursor, from home position to current position, a complementary of J. l Clear line, same as M except the remainder is not scrolled up. o Clear line from start, from the beginning of the line to current position, a complementary of K. C. Display attributes The following fuctions change display attributes. e Cursor on, turn on the flashing cursor. f Cursor off, turn off the flashing cursor. p Reverse on, the foreground and background colors are changed. For example, the status line on the bottom of Flash! is in reversed video. q Reverse off, return back to normal video. v Wrap on, output beyond the edge of screen will be wrapped. w Wrap off. bColor_number Foreground color, color for character display. In medium resolution, 0-white, 1-red, 2-green, and 3-black. cColor_number Background color. Be careful not to set the foreground color the same as background. Code Function DEC's VT52 Vidtex ----------------------------------------------------------- A Cursor Up * * B Cursor Down * * C Cursor Right * * D Cursor Left * * H Cursor Home * * I Reverse Line Feed * L Insert Line Y row column * * j Save cursor * k Restore cursor * E Clear screen * J Clear below cursor * * K Clear end of line * * M Delete line d Clear screen to the cursor l Clear line o Clear line from start e Cursor on * * f Cursor off * * p Reverse on * q Reverse off * v Wrap on w Wrap off. b color_number Foreground color c color_number Background color