# AG\_OPTIONS
> [HTML Version](ag_options.htm)
_Reviewed and revised December 2023_
**tab(-10, AG\_OPTIONS); opcode \{, options1, options2\}; chr(127);** [Tab(-10,x) Syntax Notes](ag_xxx_syntax-notes.htm.md)
AG\_OPTIONS (69) allows you to set or retrieve A-Shell system configuration OPTIONS to/from the ATE client.
This function has both a [subroutine and a print tab implementation](subroutine-print-pairs.htm.md).
**Parameters**
_opcode_
One value from the following table:
| **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. |
_options1, options2_
Option flags (combined into 32-bit values) to set if opcode > 0. See table in [MX\_GETOPTIONS](mx_get_set_options.htm.md)[xs](keyword-types.htm.md)[, MX\_SETOPTIONS](mx_get_set_options.htm.md)[xs](keyword-types.htm.md) for options bit definitions.
**Response**
For _opcode_ > 0, none. Else:
_options1, options2_ CR
where each value represents the combination of the individual bits currently set in each of the options fields. Variables must accommodate at least 32 bits.
**Comments**
The symbols in the examples (e.g. GOP\_EXTFIO) are defined in [ashell.def](ashell_def.htm.md); 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 [ashell.def](ashell_def.htm.md) 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**
• [MX\_GETOPTIONS](mx_get_set_options.htm.md)[xs](keyword-types.htm.md)[, MX\_SETOPTIONS](mx_get_set_options.htm.md)[xs](keyword-types.htm.md)
• [OPTIONS](options_sp.htm.md)[sp](keyword-types.htm.md)