home *** CD-ROM | disk | FTP | other *** search
/ The Unsorted BBS Collection / thegreatunsorted.tar / thegreatunsorted / texts / txtfiles_misc / lvi.txt < prev    next >
Text File  |  1991-12-15  |  11KB  |  404 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.       
  7.  
  8.  
  9.  
  10.                               ───────────────────
  11.                                L V I   C O D E S
  12.                               ───────────────────
  13.                                     by Byron
  14.  
  15.  
  16.                Authorized by John C. Bushnell, the designer of LVI
  17.  
  18.  
  19.                     LVI, Copyright 1991 - J. Bushnell Software
  20.                       for all to share,  without restriction
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.                                      Prolog
  72.  
  73.  
  74.  
  75.  
  76.              "
  77.                    LVI stands for 'Last Video Interface'.  LVI is a
  78.               terminal emulation which was designed to replace ANSI
  79.               for over-the-modem application.  LVI at its most basic
  80.               level is, I guess you could say, compressed ANSI.
  81.                    However, LVI goes far beyond ANSI with a host of
  82.               badly needed features for the over-the-modem enviorn-
  83.               ment where you are not automatically privy to being
  84.               able to access the video memory directly, needed for:
  85.               saving the screen, scrolling smaller portions of the
  86.               screen, and other high speed video referencing we
  87.               often take for granted.
  88.  
  89.  
  90.                                        John Bushnell
  91.  
  92.                                             (Lcom and LVI author)
  93.              "
  94.          
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135. Structure Comparison, ANSI / LVI
  136. --------------------------------
  137.  
  138.  
  139.      ANSI:  <27>[numeric;numeric;..;numeric<command>
  140.  
  141.             - in the ansi command structure, data is passed in the form of
  142.               ascii based numbers, seperated by semi-colons.  ex. 176;177;178
  143.               ...and the frame ends upon the first non-number character, which
  144.               is assumed to be the command type.
  145.  
  146.       LVI:  <28><command><n><n>..<n>
  147.  
  148.             - in the LVI command structure, data is passed in the form of
  149.               BINARY ascii equivalents, no seperation needed.  ex. ░▒▓      
  150.               (equivalent of 176;177; and 178.)  Since you can no longer
  151.               assume the command ends with the first non-number (meaning,
  152.               not '0' - '9',) the command comes BEFORE the data in LVI,
  153.               thus making the number of parameters known because each command
  154.               always has the same number of parameters.
  155.  
  156.               Well then, you may ask, what about ANSI commands which could
  157.               or could not have parameters?  Many ANSI commands will allow
  158.               you to just 'leave out' the data with the assumption that it
  159.               is 1.  i.e. <27>[1A  =  <27>[A.     Well:
  160.  
  161.               - In LVI, since you must already know the number of parameters,
  162.                 it goes through one more piece of translation.  If there are
  163.                 ANY parameters, the command is in lower case.  If there are
  164.                 NOT, the command is in upper case.  (this applies only to
  165.                 commands in the 'A'..'Z' region for obvious reasons, but then
  166.                 all ANSI commands are).  Luckily there are no command
  167.                 conflicts by doing this, because THIS way, it is still a cake-
  168.                 walk to convert ANSI format directly to LVI; one of the more
  169.                 beautiful aspects of LVI.
  170.  
  171.  
  172. LVI COLOR:  <29>  c
  173.  
  174.             - to compress color changing even furthur, LVI uses a seperate
  175.               command, #29.  The next character to follow a character #29
  176.               is the new color in the Standard IBM video format.
  177.  
  178.                   c  =  (background * 16) + foreground
  179.  
  180.               0 = black, 1 = blue, 2 = green, 3 = cyan, 4 = red, 5 = magenta
  181.               6 = brown, 7 = grey.           (for bright foregrounds, # + 8)
  182.               
  183.  
  184. LVI COMPRESSION:
  185.  
  186.  
  187.               See in Part 3, the '─' (character #196) command for what is
  188.               known as LVI COMPRESSION; an intrigal part of LVI operation
  189.               which is used to compress sequences of repeating characters.
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.                          PART 1.  TTY-DERIVED COMMANDS
  204.  
  205.  
  206.  
  207.  
  208.  
  209.  
  210.               LVI supports all standard TTY commands, i.e. the bell,
  211.               backspace, carraige return, linefeed, etc.
  212.  
  213.  
  214.  
  215.  
  216.  
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.                      PART 2.  ANSI-DERIVED LVI COMMANDS
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.               LVI supports ALL ANSI COMMANDS in their LVI equivalent
  232.               format.         
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.                      PART 3.  COMMAND SET UNIQUE TO LVI
  268.  
  269.  
  270.  
  271.  
  272.  
  273.  
  274. Command Structure:    <character #28><command><data><data>..<data>
  275.  
  276. <cmd><data>            Description
  277. ───────────────────────────────────────────────────────────────────────────────
  278. 28+
  279.  
  280.                       (#28) Writes ""  (full command is: ) 
  281.                       (#29) Writes ""  (full command is: )
  282.    #0<char>            (#0) Writes <char>, bypassing TTY , ANSI , and LVI
  283.                        translation. ex: bell character, backspace character,
  284.                        carraige return character, line feed character,
  285.                        escape character, etc.  anything.
  286.  
  287.  
  288.     s<slot>            Saves the cursor position into <slot> (number 0 - 7)
  289.     u<slot>            Restores the cursor position in <slot> (number 0 - 7)
  290.  
  291.  
  292.     =<length>          Colorizes whatever is on the screen for <length>
  293.                        characters from the cursor to the right, with the
  294.                        current color, and moves cursor to the end of the
  295.                        color segment drawn.  This does not affect the   
  296.                        characters beneath.
  297.  
  298.  
  299.     ░                  (#176) Colorizes the whole window with the current color
  300.                        and does not move the cursor.  This does not affect the
  301.                        characters beneath.
  302.                        (note that this command does NOT home the cursor, where
  303.                        as the fill-character command (below) does.)
  304.     █<char>            (#219) Fills the window with <char> and current color,
  305.                        and homes the cursor.
  306.                        (note that this command homes the cursor, where as the
  307.                        fill-color command (above) does not.)
  308.  
  309.  
  310.     ─<char><repeat>    (#196) Draws <char> <repeat> times, to the right
  311.                        This command is refered to as LVI COMPRESSION and should
  312.                        be implemented when ever several( > 4) of the same
  313.                        characters come in a row to be processed.  The biggest
  314.                        speed increases are achieved when this is implemented
  315.                        to its fullest.
  316.                        The maximum number <repeat> can be garunteed is 254.
  317.     │<char><repeat>    (#179) Draws <char> <repeat> times, downward
  318.                        The maximum number <repeat> can be garunteed is 254.
  319.  
  320.  
  321.     ■<length><macro>   (#254) Defines a <macro> of length <length>
  322.                        The only LVI commands you cannot use within the macro
  323.                        are the macroing commands.  Not, prudent.
  324.                        The maximum size the macro can be is 250.
  325.     *                  Stamps the macro, interpreting any commands in it.
  326.  
  327.  
  328.     |<length><string>  Writes <string> of length <length>  downward.   <string>
  329.                        isn't interpreted and  displayed  until  all  characters
  330.                        have arrived.  (The "=" <colorize-right-of-curs command>
  331.                        will colorize downwards if embedded in this command.)
  332.                        In effect, at any time in the display of the <string>
  333.                        the cursor would normally move to the right, it now
  334.                        moves down.  This command exists mainly for speeding up
  335.                        scroll left and scroll right operations which need to
  336.                        fill in new data in a vertical line.
  337.  
  338.  
  339.     W                  Resets the current window to be the maximum window size.
  340.     w<x1><y1><x2><y2>  Sets window coordinates
  341.                             <x1>, <y1>:  the coordinates of the top left corner
  342.                             <x2>, <y2>:  the coordinates of  the  bottom  right
  343.                                          corner
  344.  
  345.  
  346.     <                  Scrolls the window to the left once
  347.     {<scroll>          Scrolls the window to the left <scroll> times
  348.     >                  Scrolls the window to the right once
  349.     }<scroll>          Scrolls the window to the right <scroll> times
  350.                       (#30) Scrolls the window upward once
  351.     <scroll>          (#24) Scrolls the window upward <scroll> times
  352.                       (#31) Scrolls the window downward once
  353.     <scroll>          (#25) Scrolls the window downward <scroll> times
  354.  
  355.  
  356.     ∞<slot>            (#236) Saves the window contents into <slot>
  357.                        number 0  -  2.
  358.     φ<slot>            (#237) Restores the window contents from <slot>
  359.                        number 0  -  2, and clears that slot.
  360.     ε<slot>            (#238) Restores the window contents from <slot>
  361.                        number 0  -  2, without clearing that slot.
  362.  
  363.  
  364.  
  365.     V                  Returns Video Configuration in the format:
  366.  
  367.  
  368.                        #28v<scrcols><scrlins><wincols><winlins><flags>
  369.                             .. and <num><extended><extended> if available.
  370.  
  371.                             notice the return command 'v' is lower case.
  372.  
  373.                             <scrcols>:  number of columns in the screen
  374.                             <scrlins>:  number of lines in the screen
  375.                             <wincols>:  number of columns in the current window
  376.                             <winlins>:  number of lines in the current window
  377.                               <flags>:  bit 0 - color?  (0 / 1) 0 = no, 1 = yes
  378.                                         bit 1 - no  =  8 backgrounds, and blinking
  379.                                                 yes = 16 backgrounds, no blinking
  380.                                           .
  381.                                           .     <reserved>
  382.                                           . 
  383.                                         bit 7 - more data available? (0 / 1)
  384.  
  385.                            <extended>:  to be able to expand in the future,
  386.                                         if bit 7 of the flags variable is
  387.                                         on, then extended data is present. It
  388.                                         is started with the <num>ber of extra
  389.                                         pieces of data, and then that data.
  390.                                         (contents to be defined later)
  391.  
  392.  
  393.  
  394.  
  395.  
  396. .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    .    
  397.  
  398. Questions can be refered to John Bushnell on an elec. BBS at (714) 492-3804.
  399.           through 1993 only please;  be nice to your phone company.  :)
  400.  
  401.  
  402. [end] lvi.doc  -  12/91,  compiled by 'Byron'
  403.  
  404.