Please enable JavaScript to view this site.

A-Shell Consolidated Reference

Written August 2023

A-Shell includes approximately thirty functions that are implemented as both subroutines and as print tab statements. The print tab statements are of the form AG_xxx, e.g. PRINT TAB(-10,AG_xxx), and the subroutines are either MX_xxx (xcall MIAMEX, MX_xxx) or AUI_xxx (xcall AUI, AUI_xxx).

This dichotomy parallels the fact that applications operate simultaneously in two contexts:  server, where the application runs, and client, where the user interface is.  In a Windows environment, the server and client can be on the same machine; in ATE environments they are separate and may even be different operating system types. The print tab implementations always communicate directly with the client, but depend on the client supporting A-Shell extensions which is either A-Shell/Windows or ATE.  By contrast, the subroutine implementations operate on the server side, but may internally act as wrappers, if appropriate, by forwarding the command to the client via the print tab command and the client's response, if any, back to the application.  

In some cases the determination of whether to forward the command is automatic, such as where the server is Linux and the command only makes sense in a Windows environment, or where the client doesn't support the function. In others, there is a parameter allowing the application to make the choice. In general, the subroutine version is preferable because because of the extra intelligence and flexibility it provides, and because it eliminates the complication of having to use a timed input function to retrieve the client response. The tab functions on the other hand have the advantage with non-A-Shell servers or where there is no subroutine version, and in some cases may eliminate confusion or complexity when you are certain you want the command sent directly to the client.

In addition to the explicit pairs of AG_xxx / MX_xxx statements noted above, there is also MX_AGWRAPPER. This subroutine can be used as a sort of universal MIAMEX wrapper for ATE commands that don't have specifically dedicated ones.

Another related function is AGCMD.LIT, which provides yet another kind of wrapper—let's say a "command prompt wrapper"—for the AG_xxx functions.