Please enable JavaScript to view this site.

A-Shell Reference

? tab(-10, AG_OPTIONS);"opcode, options1, options2"; chr(127);

AG_OPTIONS (69) allows you to set or retrieve OPTIONS values from the ATE client.

This function has both a subroutine and a print tab implementation.

Value

Description

0

Get current options. These are returned in the keyboard buffer in the format options1,options2. For example:

? tab(-10,AG_OPTIONS);"0";chr(127);

input "",OPT1,OPT2

1

Set values (using passed options1, and if specified, options2)

2

Set only the option2 value

4

OR (set) individual bits from options1 and options2. This allows you to set one or more bits without having to first retrieve the current settings (in order to avoid changing existing flags). Note that you can specify options1 or option2 = 0 to avoid changing it.

8

Clear individual bits. In this case, any bit that you specify in options1 or options2 will be cleared from the current settings. Again, you can specify 0 to avoid changing one set of flags or the other.

 

Comments

Only opcode zero generates a response. The other opcodes generate no response and should not be followed by an input operations.

The symbols in the examples (e.g. GOP_EXTFIO) are defined in shell.def; note that it is the symbol value (e.g. the value of symbol GOP_SBX_RUNDIR is &h2000 or 8192), not its name, that needs to be transmitted. If you fail to include the shell.def file and compile without the /M option, your symbols will evaluate to 0 and won't work as intended.

Examples

 

Value

Example

1

? tab(-10,AG_OPTIONS);"1,"; options1; chr(127);                ! set options1

? tab(-10,AG_OPTIONS);"1,"; options1; ","; options2; chr(127); ! set options1,options2

2

? tab(-10,AG_OPTIONS);"2,"; options2; chr(127);                ! set options2

4

? tab(-10,AG_OPTIONS);"4,"; GOP_EXTFIO; chr(127);              ! set GOP_EXTFIO flag in options1

? tab(-10,AG_OPTIONS);"4,0,"; GOP2_GUISPCINDENT; chr(127);     ! set GOP2_GUISPCINDENT flag in options2

8

? tab(-10,AG_OPTIONS);"8,"; GOP_EXTFIO; chr(127);              ! clear GOP_EXTFIO flag in options1

? tab(-10,AG_OPTIONS);"8,0"; GOP2_SBX_RUNDIR; chr(127);        ! clear GOP2_SBX_RUNDIR flag in options2

 

See Also