home *** CD-ROM | disk | FTP | other *** search
- AVTCTL.COM
- Copyright (C) 1990, 1991 G. Adam Stanislav
- All Rights Reserved.
-
-
- Description
- ===========
-
- AVTCTL is a program which accesses and controls the inner workings of
- AVATAR.SYS.
-
- Theory of Operation
- ===================
-
- Skip this chapter if you are not interested in technical details.
-
- AVATAR.SYS is a DOS device driver. As such it can receive messages through
- DOS IOCTL call. In addition, AVATAR.SYS can receive the same commands
- using int 2Fh. This latter method is used by AVTCTL.COM.
-
- Before passing the control string to AVATAR.SYS, AVTCTL.COM first checks
- if an Avatar Console is loaded. This is how it is done:
-
- mov ax, 1A00h ; Generic ANSI/AVATAR check
- mov bx, 'AV' ; AVATAR specific
- mov cx, 'AT' ; ditto
- mov dx, 'AR' ; ditto
- int 2Fh ; Generic ANSI/AVATAR
- jc nope ; No ANSI, no AVATAR
- inc al ; If present, AL = FFh
- jnz nope ; not loaded
-
- ; Either ANSI or AVATAR is loaded. See which one
- cmp dx, 16h ; ^V
- jne nope
-
- ; Yes, Avatar loaded
- .....
-
- nope: ; No, Avatar not loaded
- .....
-
- Once AVATAR presence is determined, a control string can be passed to it.
- The control string must be pointed at by DS:SI, its length must be in CX.
- AH = 1Ah, AL = '!', BX = 'AV'. Under these circumstances, int 2Fh will pass
- the control string to AVATAR internal control routine. For example, to
- deactivate, then reactivate Avatar (which resets it), to tell it to intepret
- gray keys when Scroll Lock is depressed, and to turn Tandy mode on, the
- string "dalt" must be sent to Avatar control. This is how to do it:
-
- .data
- string db "dalt"
- strlen equ $-string
-
- .code
- avtctl proc
-
- mov ax, @data
- mov ds, ax
- mov ah, 1Ah
- mov al, '!' ; Or take the shortcut: mov ax, (1A00h or '!')
- mov bx, 'AV'
- mov cx, strlen
- mov dx, offset string
- int 2Fh
-
- ret
-
- avtctl endp
-
- AVTCTL.COM does essentially the same: It passes the command line parameters
- to AVATAR.SYS unchanged.
-
- Usage
- =====
-
- AVTCTL.COM is very simple to use. Just type AVTCTL followed by parameters
- you want to pass to Avatar control routines. For example, to send the same
- controls discussed above, type:
-
- AVTCTL dalt
-
- The commands are case sensitive. Avatar will process them in order
- recevied. Thus, the above example will tell Avatar to disable itself, to
- enable itself again, to interpret gray keys when Scroll Lock is depressed
- and to go to Tandy mode.
-
- Why would you want to disable and then enable Avatar in one step? Because
- it resets the driver to its defaults.
-
- AVATAR.SYS will ignore any commands it does not understand. That allows to
- embed spaces, or even dashes and slashes on the command line, e.g.:
-
- AVCTCL -d /al t
-
- If you just type AVTCTL, the program will display available options.
-
- Parameters
- ==========
-
- The parameters passed may vary from version to version of AVATAR.SYS.
- Currently, however, the following options are available:
-
- a - the activate command. If the drive was deactivated, it is
- activated again;
-
- d - the deactivate command. AVATAR.SYS passes all output to
- whatever console driver was in existence before AVATAR.SYS
- was loaded. Thus, if you place ANSI.SYS in your config.sys
- before AVATAR.SYS, the d and a commands will let you alternate
- between the two drivers;
-
- g - the gray keys are always interpreted. That means that when
- you press gray + or gray -, the DOS readchar() function will
- return a 0 followed by a scan code. This is in compliance
- with Avatar PC keyboard emulation which lets function keys be
- transfered over modem lines (see AVT/0 specs for details);
-
- G - the gray keys are never interpreted. That means that when
- you press gray + or gray -, the DOS readchar() function will
- return a '+' or a '-'. This is the default when enhanced
- keyboard is detected, as this keyboard allows you to emulate
- Avatar PC keyboard gray +/- by pressing Alt-gray+ and Alt_gray-.
-
- l - the gray keys will be interpreted if Scroll Lock is depressed,
- not interpreted otherwise. This is the default if enhanced
- keyboard is not detected. (This is a lowercase 'l', not one).
-
- s - switch to slow mode. By default, AVATAR.SYS writes directly to
- video screen which makes its output lightning fast. But this
- may cause problem with the original IBM CGA. Use this option
- if you see snow on your screen all the time. AVATAR.SYS will
- then do all its output using BIOS calls. This will be much
- slower, so don't use it if you do not have to.
-
- f - switch to fast mode. Will return to direct screen writes turned
- off by the s option.
-
- The following two commands are included only with the commercially
- available version of AVATAR.SYS:
-
- t - turn on Tandy mode. The Tandy 1000 keyboard uses non-standard
- scan codes on its numeric keypad which makes it incompatible
- with certain programs. This option will remap the keyboard to be
- compatible with such programs. Do not use it on any other
- computer!
-
- T - turn Tandy mode off. Tandy 1000 specific programs may expect
- the Tandy 1000 keyboard map. This command will restore it. It
- does nothing on other computers.
-
- The t and T commands are ignored by AVT386.SYS as Tandy 1000 does not use
- the i386 processors.
-
- AVATAR command line
- ===================
-
- It is also possible to pass control parameters on AVATAR.SYS command line.
- They take effect as soon as AVATAR initializes itself. Because MS DOS converts
- such parameters to upper case, we have been forced to make them case
- insensitive (unlike those mentioned above).
-
- To activate any of the command line options, place a switch (a dash or a
- slash) on the command line, immediately followed by an option, e.g.
-
- device = avatar.sys -s /g
-
- This will force Avatar to use the slow screen mode and always to interpret
- the gray keys. Because of the case insensitivity, the same could be achieved
- with
-
- DEVICE = AVATAR.SYS -SG
-
- The available command line options are:
-
- S - use slow screen output mode;
-
- G - always interpret gray keys;
-
- N - never interpret gray keys;
-
- L - interpret gray keys when Scroll Lock is depressed;
-
- X - turn off Num Lock;
-
- T - remap Tandy 1000 keyboard;
-
- D - load AVATAR.SYS and disable it;
-
- The last option ('D') is present only in the commercially available version
- of AVATAR.SYS. It loads AVATAR.SYS but lets whatever previous console driver
- there is to control the console (e.g. ANSI.SYS if loaded before AVATAR.SYS).
- If you did not load ANSI.SYS or any similar driver, the standard DOS console
- will be in charge. AVATAR.SYS will be dormant until enabled with
-
- AVTCTL a
-
- Note that the 'T' option is also coded in version 0.10, but once enabled, it
- cannot be disabled with AVTCTL, nor can it be enabled with AVTCTL if it was
- not chosen on AVATAR.SYS command line. Of course, the commercial version
- allows you to enable and disable it at will.
-
- Personally, I could not live without the 'X' option. AT style machines turn
- on Num Lock when the computer is first booted. I do not like this AT feature
- and have AVATAR.SYS turn it off. This is only a one-time act. The Num Lock
- can still be controlled by pressing the appropriate key. I know there are
- many people who like the default, but if you happen to dislike it as much as
- I do, by all means use the 'X' command.
-
-
- Ordering Information
- ====================
-
- If you would like to use the commercial version of AVATAR.SYS, send $45,
- plus $5.00 shipping and handling to:
-
- Stanislav Publishing
- 322 Mall Blvd., Suite 174
- Monroeville, PA 15416
-
- Please make your checks payable to Adam Stanislav. This offer is good only
- in United States of America. I was told there are some restrictions on
- exporting software. I'll have to find out what they are before going any
- further.
-
- The above price is guaranteed till the end of March 1991 and will be
- reconsidered after. Anyone who has licensed the use of ControlD software
- can receive AVATAR.SYS for $25, plus $5.00 s&h. In any case, Pennsylvanians
- should include state tax.
-
- If you never heard of ControlD: It offers command line interface to DESQview.
- Thus, instead of using DESQview menus, you can enter commands at the command
- line or from batc files. You can also disable and re-enable any menu item,
- as well as password protect any window.
-
- ControlD is available at the same address for $65.00, plus $5.00 s&h. Again,
- please make checks payable to Adam Stanislav.
-
- Or get both, ControlD and AVATAR.SYS at the same time for $90.00 plus $5.00
- s&h.
-
- Because AVATAR.SYS is a DOS console driver, it suffers from the same problem
- as DOS: non-reentrancy. Thus, to run it under DESQview you need DVAVATAR.COM.
- I worked on it at the same time as AVATAR.SYS, but then set it aside to give
- more energy to AVATAR.SYS. Anyone who licensed or licenses ControlD will
- receive DVAVATAR.SYS for FREE as soon as it is available.
-
- Please note that DVAVATAR will only work under DESQview and it will not
- have Avatar Serial Dispatcher in it (having it there would actually defeat
- its purpose). It is still recommended that you license AVATAR.SYS even if
- you expect to use DVAVATAR.COM.
-
- The commercial version of AVATAR comes in two varieties (both included at no
- extra cost): AVATAR.SYS which runs on all PC compatibles, and AVT386.SYS
- which requires and is optimized for '386 machines and better.
-
- Any questions should be sent to the above address. Or you can reach me at
- Fidonet node 1:129/39.0.
-
-
-
-