xcall MIAMEX, MX_SETOPTIONS, options1 {,options2}
MX_SETPOPTIONS allows you to set OPTIONS flags on the fly. options1 and options2 (Num) may be set to any combination of the flags from the tables shown for MIAMEX 59. Note that these options are the same ones that are defined in miame.ini; see the OPTIONS parameter for the full listing.
Note that when setting options2 values, you cannot avoid also setting the options1 values. So you should always first retrieve the current options with MIAMEX 59, then set or clear the desired flags in the options1 and options2 variables, then use them to update the options in MIAMEX,60. The most recent options1/options2 flags are defined in ashell.def as GOP_xxx and GOP2_xxx.
Example
To set the GOP2_RUNDIR flag and clear the GOP_ABSLOOKUP flag (and then restore the original settings), use code similar to the following:
MAP1 options1,b,4
MAP1 options2,b,4
MAP1 save'options1,b,4
MAP1 save'options2,b,4
xcall MIAMEX, MX_GETOPTIONS, options1, options2 ! retrieve current options
save'options1 = options1 ! save original settings for later restore
save options2 = options2
! NOTE: when setting/clearing flags, use logical operators and/or/not rather
! than +/-; otherwise be careful not to add a flag that is already set
! or subtract one that is already clear!!
options1 = options1 and not GOP_ABSLOOKUP ! clear GOP_ABSLOOKUP flag
options2 = options2 or GOP2_RUNDIR ! set GOP2_RUNDIR flag
xcall MIAMEX, MX_SETOPTIONS, options1, options2 ! update options
! Later, to restore the original options:
xcall MIAMEX, MX_SETOPTIONS, save'options1, save'options2