C. Writing Termcap Descriptions : Eleven Basic Commands : Cursor Motion Command : Example 1: rti100, a Fictitious Terminal
 
Share this page                  
Example 1: rti100, a Fictitious Terminal
The cursor motion string listed in the user's guide for the rti100 (a fictitious terminal) is ESC|x;y, where x and y are two‑digit integers specifying the column and the row, respectively. The rti100 is an example of a terminal that uses a (0,0) origin, so x and y must be one less than the whole number that represents the position on the screen. Thus, to move the cursor to column 8 row 17 on the rti100, you would enter ESC|07;16. The termcap entry is:
cm=\E|%2;%2
The \E maps to ESC and %2 is the place marker that maps to a decimal integer of two places.