home *** CD-ROM | disk | FTP | other *** search
/ CD-ROM Magic 1995 #1 / CDM_5.ISO / shell / graph / ansi / avtctl.arj / AVTCTL.DOC < prev   
Encoding:
Text File  |  1991-01-27  |  9.4 KB  |  262 lines

  1. AVTCTL.COM
  2. Copyright (C) 1990, 1991 G. Adam Stanislav
  3. All Rights Reserved.
  4.  
  5.  
  6.         Description
  7.         ===========
  8.  
  9. AVTCTL is a program which accesses and controls the inner workings of
  10. AVATAR.SYS.
  11.  
  12.         Theory of Operation
  13.         ===================
  14.  
  15. Skip this chapter if you are not interested in technical details.
  16.  
  17. AVATAR.SYS is a DOS device driver. As such it can receive messages through
  18. DOS IOCTL call. In addition, AVATAR.SYS can receive the same commands
  19. using int 2Fh. This latter method is used by AVTCTL.COM.
  20.  
  21. Before passing the control string to AVATAR.SYS, AVTCTL.COM first checks
  22. if an Avatar Console is loaded. This is how it is done:
  23.  
  24.     mov    ax, 1A00h    ; Generic ANSI/AVATAR check
  25.     mov    bx, 'AV'    ; AVATAR specific
  26.     mov    cx, 'AT'    ;     ditto
  27.     mov    dx, 'AR'    ;     ditto
  28.     int    2Fh        ; Generic ANSI/AVATAR
  29.     jc    nope        ; No ANSI, no AVATAR
  30.     inc    al        ; If present, AL = FFh
  31.     jnz    nope        ; not loaded
  32.  
  33.     ; Either ANSI or AVATAR is loaded. See which one
  34.     cmp    dx, 16h        ; ^V
  35.     jne    nope
  36.  
  37.     ; Yes, Avatar loaded
  38.     .....
  39.  
  40. nope:    ; No, Avatar not loaded
  41.     .....
  42.  
  43. Once AVATAR presence is determined, a control string can be passed to it.
  44. The control string must be pointed at by DS:SI, its length must be in CX.
  45. AH = 1Ah, AL = '!', BX = 'AV'. Under these circumstances, int 2Fh will pass
  46. the control string to AVATAR internal control routine. For example, to
  47. deactivate, then reactivate Avatar (which resets it), to tell it to intepret
  48. gray keys when Scroll Lock is depressed, and to turn Tandy mode on, the
  49. string "dalt" must be sent to Avatar control. This is how to do it:
  50.  
  51. .data
  52. string    db    "dalt"
  53. strlen    equ    $-string
  54.  
  55. .code
  56. avtctl    proc
  57.  
  58.     mov    ax, @data
  59.     mov    ds, ax
  60.     mov    ah, 1Ah
  61.     mov    al, '!'        ; Or take the shortcut: mov ax, (1A00h or '!')
  62.     mov    bx, 'AV'
  63.     mov    cx, strlen
  64.     mov    dx, offset string
  65.     int    2Fh
  66.  
  67.     ret
  68.  
  69. avtctl    endp
  70.  
  71. AVTCTL.COM does essentially the same: It passes the command line parameters
  72. to AVATAR.SYS unchanged.
  73.  
  74.         Usage
  75.         =====
  76.  
  77. AVTCTL.COM is very simple to use. Just type AVTCTL followed by parameters
  78. you want to pass to Avatar control routines. For example, to send the same
  79. controls discussed above, type:
  80.  
  81.     AVTCTL dalt
  82.  
  83. The commands are case sensitive. Avatar will process them in order
  84. recevied. Thus, the above example will tell Avatar to disable itself, to
  85. enable itself again, to interpret gray keys when Scroll Lock is depressed
  86. and to go to Tandy mode.
  87.  
  88. Why would you want to disable and then enable Avatar in one step? Because
  89. it resets the driver to its defaults.
  90.  
  91. AVATAR.SYS will ignore any commands it does not understand. That allows to
  92. embed spaces, or even dashes and slashes on the command line, e.g.:
  93.  
  94.     AVCTCL -d /al t
  95.  
  96. If you just type AVTCTL, the program will display available  options.
  97.  
  98.         Parameters
  99.         ==========
  100.  
  101. The parameters passed may vary from version to version of AVATAR.SYS.
  102. Currently, however, the following options are available:
  103.  
  104.     a - the activate command. If the drive was deactivated, it is
  105.         activated again;
  106.  
  107.     d - the deactivate command. AVATAR.SYS passes all output to
  108.         whatever console driver was in existence before AVATAR.SYS
  109.         was loaded. Thus, if you place ANSI.SYS in your config.sys
  110.         before AVATAR.SYS, the d and a commands will let you alternate
  111.         between the two drivers;
  112.  
  113.     g - the gray keys are always interpreted. That means that when
  114.         you press gray + or gray -, the DOS readchar() function will
  115.         return a 0 followed by a scan code. This is in compliance
  116.         with Avatar PC keyboard emulation which lets function keys be
  117.         transfered over modem lines (see AVT/0 specs for details);
  118.  
  119.     G - the gray keys are never interpreted. That means that when
  120.         you press gray + or gray -, the DOS readchar() function will
  121.         return a '+' or a '-'. This is the default when enhanced
  122.         keyboard is detected, as this keyboard allows you to emulate
  123.         Avatar PC keyboard gray +/- by pressing Alt-gray+ and Alt_gray-.
  124.  
  125.     l - the gray keys will be interpreted if Scroll Lock is depressed,
  126.         not interpreted otherwise. This is the default if enhanced
  127.         keyboard is not detected. (This is a lowercase 'l', not one).
  128.  
  129.     s - switch to slow mode. By default, AVATAR.SYS writes directly to
  130.         video screen which makes its output lightning fast. But this
  131.         may cause problem with the original IBM CGA. Use this option
  132.         if you see snow on your screen all the time. AVATAR.SYS will
  133.         then do all its output using BIOS calls. This will be much
  134.         slower, so don't use it if you do not have to.
  135.  
  136.     f - switch to fast mode. Will return to direct screen writes turned
  137.         off by the s option.
  138.  
  139. The following two commands are included only with the commercially
  140. available version of AVATAR.SYS:
  141.  
  142.     t - turn on Tandy mode. The Tandy 1000 keyboard uses non-standard
  143.         scan codes on its numeric keypad which makes it incompatible
  144.         with certain programs. This option will remap the keyboard to be
  145.         compatible with such programs. Do not use it on any other
  146.         computer!
  147.  
  148.     T - turn Tandy mode off. Tandy 1000 specific programs may expect
  149.         the Tandy 1000 keyboard map. This command will restore it. It
  150.         does nothing on other computers.
  151.  
  152. The t and T commands are ignored by AVT386.SYS as Tandy 1000 does not use
  153. the i386 processors.
  154.  
  155.         AVATAR command line
  156.         ===================
  157.  
  158. It is also possible to pass control parameters on AVATAR.SYS command line.
  159. They take effect as soon as AVATAR initializes itself. Because MS DOS converts
  160. such parameters to upper case, we have been forced to make them case
  161. insensitive (unlike those mentioned above).
  162.  
  163. To activate any of the command line options, place a switch (a dash or a
  164. slash) on the command line, immediately followed by an option, e.g.
  165.  
  166.     device = avatar.sys -s /g
  167.  
  168. This will force Avatar to use the slow screen mode and always to interpret
  169. the gray keys. Because of the case insensitivity, the same could be achieved
  170. with
  171.  
  172.     DEVICE = AVATAR.SYS -SG
  173.  
  174. The available command line options are:
  175.  
  176.         S - use slow screen output mode;
  177.  
  178.         G - always interpret gray keys;
  179.  
  180.         N - never interpret gray keys;
  181.  
  182.         L - interpret gray keys when Scroll Lock is depressed;
  183.  
  184.         X - turn off Num Lock;
  185.  
  186.         T - remap Tandy 1000 keyboard;
  187.  
  188.         D - load AVATAR.SYS and disable it;
  189.  
  190. The last option ('D') is present only in the commercially available version
  191. of AVATAR.SYS. It loads AVATAR.SYS but lets whatever previous console driver
  192. there is to control the console (e.g. ANSI.SYS if loaded before AVATAR.SYS).
  193. If you did not load ANSI.SYS or any similar driver, the standard DOS console
  194. will be in charge. AVATAR.SYS will be dormant until enabled with
  195.  
  196.     AVTCTL a
  197.  
  198. Note that the 'T' option is also coded in version 0.10, but once enabled, it
  199. cannot be disabled with AVTCTL, nor can it be enabled with AVTCTL if it was
  200. not chosen on AVATAR.SYS command line. Of course, the commercial version
  201. allows you to enable and disable it at will.
  202.  
  203. Personally, I could not live without the 'X' option. AT style machines turn
  204. on Num Lock when the computer is first booted. I do not like this AT feature
  205. and have AVATAR.SYS turn it off. This is only a one-time act. The Num Lock
  206. can still be controlled by pressing the appropriate key. I know there are
  207. many people who like the default, but if you happen to dislike it as much as
  208. I do, by all means use the 'X' command.
  209.  
  210.  
  211.         Ordering Information
  212.         ====================
  213.  
  214. If you would like to use the commercial version of AVATAR.SYS, send $45,
  215. plus $5.00 shipping and handling to:
  216.  
  217.     Stanislav Publishing
  218.     322 Mall Blvd., Suite 174
  219.     Monroeville, PA 15416
  220.  
  221. Please make your checks payable to Adam Stanislav. This offer is good only
  222. in United States of America. I was told there are some restrictions on
  223. exporting software. I'll have to find out what they are before going any
  224. further.
  225.  
  226. The above price is guaranteed till the end of March 1991 and will be
  227. reconsidered after. Anyone who has licensed the use of ControlD software
  228. can receive AVATAR.SYS for $25, plus $5.00 s&h. In any case, Pennsylvanians
  229. should include state tax.
  230.  
  231. If you never heard of ControlD: It offers command line interface to DESQview.
  232. Thus, instead of using DESQview menus, you can enter commands at the command
  233. line or from batc files. You can also disable and re-enable any menu item,
  234. as well as password protect any window.
  235.  
  236. ControlD is available at the same address for $65.00, plus $5.00 s&h. Again,
  237. please make checks payable to Adam Stanislav.
  238.  
  239. Or get both, ControlD and AVATAR.SYS at the same time for $90.00 plus $5.00
  240. s&h.
  241.  
  242. Because AVATAR.SYS is a DOS console driver, it suffers from the same problem
  243. as DOS: non-reentrancy. Thus, to run it under DESQview you need DVAVATAR.COM.
  244. I worked on it at the same time as AVATAR.SYS, but then set it aside to give
  245. more energy to AVATAR.SYS. Anyone who licensed or licenses ControlD will
  246. receive DVAVATAR.SYS for FREE as soon as it is available.
  247.  
  248. Please note that DVAVATAR will only work under DESQview and it will not
  249. have Avatar Serial Dispatcher in it (having it there would actually defeat
  250. its purpose). It is still recommended that you license AVATAR.SYS even if
  251. you expect to use DVAVATAR.COM.
  252.  
  253. The commercial version of AVATAR comes in two varieties (both included at no
  254. extra cost): AVATAR.SYS which runs on all PC compatibles, and AVT386.SYS
  255. which requires and is optimized for '386 machines and better.
  256.  
  257. Any questions should be sent to the above address. Or you can reach me at
  258. Fidonet node 1:129/39.0.
  259.  
  260.  
  261.  
  262.