ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ L V I C O D E S ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ by Byron Authorized by John C. Bushnell, the designer of LVI LVI, Copyright 1991 - J. Bushnell Software for all to share, without restriction Prolog " LVI stands for 'Last Video Interface'. LVI is a terminal emulation which was designed to replace ANSI for over-the-modem application. LVI at its most basic level is, I guess you could say, compressed ANSI. However, LVI goes far beyond ANSI with a host of badly needed features for the over-the-modem enviorn- ment where you are not automatically privy to being able to access the video memory directly, needed for: saving the screen, scrolling smaller portions of the screen, and other high speed video referencing we often take for granted. John Bushnell (Lcom and LVI author) " Structure Comparison, ANSI / LVI -------------------------------- ANSI: <27>[numeric;numeric;..;numeric - in the ansi command structure, data is passed in the form of ascii based numbers, seperated by semi-colons. ex. 176;177;178 ...and the frame ends upon the first non-number character, which is assumed to be the command type. LVI: <28>.. - in the LVI command structure, data is passed in the form of BINARY ascii equivalents, no seperation needed. ex. °±² (equivalent of 176;177; and 178.) Since you can no longer assume the command ends with the first non-number (meaning, not '0' - '9',) the command comes BEFORE the data in LVI, thus making the number of parameters known because each command always has the same number of parameters. Well then, you may ask, what about ANSI commands which could or could not have parameters? Many ANSI commands will allow you to just 'leave out' the data with the assumption that it is 1. i.e. <27>[1A = <27>[A. Well: - In LVI, since you must already know the number of parameters, it goes through one more piece of translation. If there are ANY parameters, the command is in lower case. If there are NOT, the command is in upper case. (this applies only to commands in the 'A'..'Z' region for obvious reasons, but then all ANSI commands are). Luckily there are no command conflicts by doing this, because THIS way, it is still a cake- walk to convert ANSI format directly to LVI; one of the more beautiful aspects of LVI. LVI COLOR: <29> c - to compress color changing even furthur, LVI uses a seperate command, #29. The next character to follow a character #29 is the new color in the Standard IBM video format. c = (background * 16) + foreground 0 = black, 1 = blue, 2 = green, 3 = cyan, 4 = red, 5 = magenta 6 = brown, 7 = grey. (for bright foregrounds, # + 8) LVI COMPRESSION: See in Part 3, the 'Ä' (character #196) command for what is known as LVI COMPRESSION; an intrigal part of LVI operation which is used to compress sequences of repeating characters. PART 1. TTY-DERIVED COMMANDS LVI supports all standard TTY commands, i.e. the bell, backspace, carraige return, linefeed, etc. PART 2. ANSI-DERIVED LVI COMMANDS LVI supports ALL ANSI COMMANDS in their LVI equivalent format. PART 3. COMMAND SET UNIQUE TO LVI Command Structure: .. Description ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ 28+  (#28) Writes "" (full command is: )  (#29) Writes "" (full command is: ) #0 (#0) Writes , bypassing TTY , ANSI , and LVI translation. ex: bell character, backspace character, carraige return character, line feed character, escape character, etc. anything. s Saves the cursor position into (number 0 - 7) u Restores the cursor position in (number 0 - 7) = Colorizes whatever is on the screen for characters from the cursor to the right, with the current color, and moves cursor to the end of the color segment drawn. This does not affect the characters beneath. ° (#176) Colorizes the whole window with the current color and does not move the cursor. This does not affect the characters beneath. (note that this command does NOT home the cursor, where as the fill-character command (below) does.) Û (#219) Fills the window with and current color, and homes the cursor. (note that this command homes the cursor, where as the fill-color command (above) does not.) Ä (#196) Draws times, to the right This command is refered to as LVI COMPRESSION and should be implemented when ever several( > 4) of the same characters come in a row to be processed. The biggest speed increases are achieved when this is implemented to its fullest. The maximum number can be garunteed is 254. ³ (#179) Draws times, downward The maximum number can be garunteed is 254. þ (#254) Defines a of length The only LVI commands you cannot use within the macro are the macroing commands. Not, prudent. The maximum size the macro can be is 250. * Stamps the macro, interpreting any commands in it. | Writes of length downward. isn't interpreted and displayed until all characters have arrived. (The "=" will colorize downwards if embedded in this command.) In effect, at any time in the display of the the cursor would normally move to the right, it now moves down. This command exists mainly for speeding up scroll left and scroll right operations which need to fill in new data in a vertical line. W Resets the current window to be the maximum window size. w Sets window coordinates , : the coordinates of the top left corner , : the coordinates of the bottom right corner < Scrolls the window to the left once { Scrolls the window to the left times > Scrolls the window to the right once } Scrolls the window to the right times  (#30) Scrolls the window upward once  (#24) Scrolls the window upward times  (#31) Scrolls the window downward once  (#25) Scrolls the window downward times ì (#236) Saves the window contents into number 0 - 2. í (#237) Restores the window contents from number 0 - 2, and clears that slot. î (#238) Restores the window contents from number 0 - 2, without clearing that slot. V Returns Video Configuration in the format: #28v .. and if available. notice the return command 'v' is lower case. : number of columns in the screen : number of lines in the screen : number of columns in the current window : number of lines in the current window : bit 0 - color? (0 / 1) 0 = no, 1 = yes bit 1 - no = 8 backgrounds, and blinking yes = 16 backgrounds, no blinking . . . bit 7 - more data available? (0 / 1) : to be able to expand in the future, if bit 7 of the flags variable is on, then extended data is present. It is started with the ber of extra pieces of data, and then that data. (contents to be defined later) . . . . . . . . . . . . . . . . Questions can be refered to John Bushnell on an elec. BBS at (714) 492-3804. through 1993 only please; be nice to your phone company. :) [end] lvi.doc - 12/91, compiled by 'Byron'