Please enable JavaScript to view this site.

A-Shell Reference

Reviewed and revised December 2023

tab(-10, AG_OPTIONS); opcode {, options1, options2}; chr(127);     Tab(-10,x) Syntax Notes

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.

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_SETOPTIONS 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; 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 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

OPTIONS in System Parameters