﻿# MIAMEX

**xcall MIAMEX, function-id \{,param1, param2, ... paramN\}**

MIAMEX is a collection of utility functions referencing system internals that are gathered together here for efficiency or because they do not fall nicely into other categories. Each of the functions is listed in the following two topics, with links to detailed documentation. Interested programmers should also consult the sample program [MIAMEX.BP in EXLIB:\[908,30\]](https://bitbucket.org/microsabio/exlib/src/master/908030/miamex.bp) which contains examples of the more generally useful functions. Note that functions which are listed in the following tables but do not have additional details are A-Shell internal functions not intended for use by A-Shell programmers.

In all of the MIAMEX specifications, the first parameter is _function-id, _as specified using the variable name (MX\_xxx) defined in [ashell.def](ashell.md). These functions are shown in the following two tables, [MIAMEX Functions by Number](miamexfunctionsbynumber.md) and [MIAMEX Functions by Symbol](miamexfunctionsbyname.md).

Note that good programming techniques require that the MIAMEX _function-id_ be identified by symbol rather than literal number so as to make your code more understandable. Seeing a reference to MX\_FINDFIRST five years from now will be much more informative than seeing MIAMEX 20.

Similarly, many MIAMEX functions reference coded numeric arguments for which the defined symbolic names, if available (typically in ashell.def) would be preferable to the literal numeric value. The most common example are the symbols MXOP\_GET (0) and MXOP\_SET (1) which are used as the _opcode _parameter in many functions.