home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS - Coast to Coast / simteldosarchivecoasttocoast2.iso / fido / ftsc_all.z43 / FSC-0037.TXT < prev    next >
Text File  |  1989-12-03  |  10KB  |  244 lines

  1. FSC-0037
  2. Updates: FSC-0025
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.                                                 Pittsburgh, PA
  10.                                                 1 May 1989
  11.  
  12.  
  13.  
  14.                           A   V   A   T   A   R
  15.  
  16.         Advanced Video Attribute Terminal Assembler and Recreator
  17.  
  18.                            George A. Stanislav
  19.  
  20.                             Fidonet 1:129/39.0
  21.  
  22.  
  23.  
  24.  
  25.  
  26.          Information
  27.  
  28.             This FSC is being distributed to members of the FidoNet
  29.             community in order to solicit their reactions to the
  30.             proposals contained in it.  While the issues discussed may
  31.             not be directly relevant to FidoNet standards,  they may be
  32.             interesting to implementers.  Distribution of this document
  33.             is unlimited.
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.    Revised on 25 November 1989
  46.  
  47.  
  48.  
  49.                                Definitions
  50.  
  51.  
  52. Avatar, level 0 - The Avatar protocol as presented at Fidocon '88 and
  53.         described in AVATAR0.C, dated 23 August 1989, plus extensions
  54.         defined in this document.
  55.  
  56. AVT/0   -  An abbreviation for Avatar, level 0, suggested by Joaquim
  57.         Homrighausen.
  58.  
  59. Current attribute - Video attribute defined by the last ^V^A, ^V^L, ^V^M or ^L
  60.         AVT/0 command whichever happened last. In AVT/0, ^L sets the value
  61.         of current attribute to 3, ^V^L, ^V^M and ^V^A to an explicit value.
  62.         In addition, ^V^B turns blink on.
  63.  
  64.  
  65.  
  66.                             Extending AVT/0
  67.  
  68.  
  69. It has become clear some of the Avatar commands originally reserved for
  70. AVT/1 would be very useful in AVT/0. I was hesitant to add them for one
  71. simple reason: Any addition on level 0 will break all existing Avatar
  72. emulating software.
  73.  
  74. However, at present there are only three programs I know of that have
  75. implemented Avatar emulation: My own TinyTerm, Joaquim Homrighausen's
  76. FrontDoor and Jason Galanter's Jterm.
  77.  
  78. Both Joaquim and Jason have assured me they would put the new commands in
  79. their programs, thus nothing will be broken. With that assurance in mind,
  80. I feel confident no chaos will result from adding these new commands.
  81.  
  82.  
  83.                 New Commands (brief definitions)
  84.  
  85.         <^V><^I>  -  Turn insert mode ON. It stays on until any other AVT/0
  86.                      command except <^Y> and <^V><^Y> is encountered after
  87.                      which it is turned off;
  88.  
  89.         <^V><^J><numlines><upper><left><lower><right> - scroll area up;
  90.  
  91.         <^V><^K><numlines><upper><left><lower><right> - scroll area down;
  92.  
  93.         <^V><^L><attr><lines><columns>  - clear area, set attribute;
  94.  
  95.         <^V><^M><attr><char><lines><columns>  - initialize area, set attribute;
  96.  
  97.         <^V><^N>        -  delete character, scroll rest of line left;
  98.  
  99.         <^V><^Y><numchars><char>[...]<count>  -  repeat pattern.
  100.  
  101.  
  102.  
  103.                       Detailed Description
  104.  
  105.  
  106. Insert mode: Insert mode controls the way characters are printed on the
  107.         screen. Insert mode is always assumed OFF unless explicitly set ON
  108.         by the ^V^I command after which it stays on until another AVT/0
  109.         command except for ^Y or ^V^Y is encountered. Then it reverses back
  110.         to off.
  111.  
  112.         Whenever insert mode is OFF, characters are printed on the screen
  113.         like this:
  114.  
  115.         1. Print character at current cursor position using current attribute,
  116.            overwriting whatever was previously displayed at current cursor
  117.            position;
  118.  
  119.         2. Move cursor to next position, usually one character to the right.
  120.            At end of the line, move the cursor to next line (possibly
  121.            scrolling the display or current window if in AVT/1).
  122.  
  123.         Whenever insert mode is ON, characters are printed on the screen
  124.         as follows:
  125.  
  126.         1. Starting at current cursor position and going all the way to the
  127.            second last character on current line, scroll the text one
  128.            character to the right;
  129.  
  130.         2. Discard the character previously at the end of the line, do NOT
  131.            move it at the beginning of the next line;
  132.  
  133.         3. Print character at current cursor position using current attribute;
  134.  
  135.         4. Move cursor to next position, precisely as in par. 2 of insert
  136.            mode off.
  137.  
  138. If ^Y or ^V^Y are encountered, the string of characters they compress is
  139. first expanded, then treated as an ordinary stream of characters printed
  140. according to the above rules.
  141.  
  142. Any other AVT/0 command turns insert mode back off. Please note that in
  143. either case the cursor is moved to its next position in an identical manner.
  144. The mere fact the cursor is moved to next line, or even scrolls the screen
  145. a line up, does NOT turn insert mode off. Only an AVT/0 except as mentioned
  146. above can change insert mode on or off.
  147.  
  148. If control characters are a part of the text stream, they are interpreted
  149. indentically in insert mode on and off as follows:
  150.  
  151.         Carriage return  -  move cursor at the beginning of the same line;
  152.  
  153.         Line feed        -  move cursor one line down (scroll screen or
  154.                             window [in AVT/1] if necessary), do not change
  155.                             cursor column;
  156.         Back space       -  move cursor one position to the left. Do NOT
  157.                             overwrite the character at that position.
  158.                             Do nothing if already at the leftmost position;
  159.  
  160.         Tab              -  move cursor to next tab position without
  161.                             overwriting anything. Tab positions are
  162.                             multiples of 8. Do nothing if already at the
  163.                             rightmost position.
  164.  
  165. A space is treated as a character, not as a control character.
  166.  
  167.  
  168. Scrolling an area (^V^J and ^V^K): The area defined by its upper, left, lower
  169.         and right coordinates is scrolled up <^V^J) or down (^V^K) by
  170.         <numlines> lines filling the gap with blank spaces using current
  171.         attribute. If the value of <numlines> is zero or exceeds the actual
  172.         number of lines within the scrolled area, the area is filled with
  173.         blanks using current attribute.
  174.  
  175.         These two commands do NOT change the position of the cursor, nor
  176.         do they define the scrolled area as the default window.
  177.  
  178.         The coordinates are relative to the upper left corner of the screen
  179.         (or current window in AVT/1). The coordinates of upper left corner
  180.         are 1,1. If a coordinate contains 0, it is to be changed to 1.
  181.  
  182. Initializing an area (^V^M): This command contains several steps:
  183.  
  184.         1. Set current attribute to <attr>;
  185.  
  186.         2. Starting at current cursor position (inclusively), ending
  187.            at current cursor position plus number of <lines> and <columns>,
  188.            print <char> at all position inside the defined area. Do not
  189.            move the cursor. If the number of columns or lines exceeds whatever
  190.            is available to the right and below current cursor position,
  191.            truncate the dimensions to fit within the limits of the screen
  192.            (or current window in AVT/1).
  193.  
  194. Clearing an area (^V^L): This is a shortcut version of the ^V^M command.
  195.         The character to be used to initialize the area of the screen is
  196.         assumed to be a blank space. In other words, it sets current
  197.         attribute and clears an area of the screen starting at current
  198.         cursor position (which remains unchanged).
  199.  
  200. Please note that the usual 7-bit restriction applies to ^V^L  That means
  201. that the attribute byte should be anded with 7f hex before applying. If
  202. blinking is desired, ^V^B should be used next.
  203.  
  204. On the other hand, requiring to ignore the high bit in ^V^M would make it
  205. impossible to fill the area of the screen with a blinking pattern (something
  206. I have seen used very creatively by Chris Gaal of PittNet). Therefore, if
  207. bit 7 of attr is set in ^V^M, current attribute is set to <attr> AND 7f hex
  208. and blink is turned on before filling the area with a character.
  209. Deleting a character (^V^N): Starting at the column one character to the right
  210.         of current cursor position all the way to end of the line, scroll
  211.         the text one character position to the left. This effectively
  212.         deletes the character at current cursor position. Print a blank space
  213.         using current attribute at the rightmost end of the line to fill the
  214.         gap. Do not change current cursor position. If the cursor is at the
  215.         end of the line, simply overwrite the last character with a blank
  216.         space using current attribute.
  217.  
  218. Repeat pattern: This is an extension of the ^Y command which allows a group
  219.         of characters to form a repetititious pattern. <numchars> determines
  220.         the number of characters in the pattern, <count> the number of times
  221.         the pattern is to be printed out. The pattern may contain AVT/0 codes.
  222.  
  223. For example, <^V><^Y><#3>ABC<#4> expands to "ABCABCABCABC".
  224.  
  225.  
  226.                         Scrolling Philosophy
  227.  
  228.  
  229. An important philosophical question has not been answered yet: When scrolling
  230. the contents of an area (in the scrolling commands ^V^J and ^V^J, in insert
  231. mode ON and in deleting characters ^V^N) should only the text be scrolled
  232. and the attribute of the scrolled areas remain where they are or should the
  233. attributes move as well.
  234.  
  235. A case can be made for either approach. Obviously, the gaps created by
  236. scrolling are filled with current attribute, therefore, it seems more logical
  237. to scroll the attributes along with the text (else there would be no need
  238. to fill the gaps). Thus we follow a consistent principle of video attributes
  239. belonging to a character (be it a blank, a digit, or a true character), not
  240. to a location. Whenever a character is scrolled to a different location, it
  241. takes its attribute along.
  242.  
  243.  
  244.