GT.M has three modes: compiler, direct, and auto-start. Invoke these modes by using the mumps command issued with an appropriate argument.
To operate in compiler mode, invoke GT.M by entering the mumps command with a list of file names to compile. GT.M then compiles the specified programs into .o files. UNIX wildcards (* and ?) are acceptable within the file names.
To operate in direct mode, invoke GT.M by entering the mumps command with the -direct argument. GT.M then enters direct mode, where one can enter M commands interactively.
To operate in auto-start mode, invoke GT.M by entering the mumps command with the -run argument. The next argument is taken to be an M entryref, and that routine is automatically executed, bypassing direct mode. Depending on the shell being used, one may need to put the entryref in quotes.
When executing M programs, any called programs are incrementally linked. For example, the command
GTM> d ^TEST
links the object file TEST.o and executes it; if the TEST program calls other M routines, those are automatically compiled and linked.
64-bit editions of GT.M generate objects compatible with native object format that can be loaded in to shared libraries. See the management of routines in shared libraries section. All editions of GT.M compile routines for which they find the source, but no object and dynamically link objects whether stored as files in a directory or objects in a shared library.