COMPIL

Rewritten November 2018

compil {-switches} file

Example:

compil -x:2 -m -a source.bas

The native OS compil executable is equivalent to the COMPIL.LIT program, except that it runs directly from the OS level rather than from within the A-Shell environment. Under Windows, compil.exe is a standard Windows application, opening a window and outputting to it during the compilation, and then closing it again. Under UNIX, the compil executable is executed within the shell environment, outputting to stdout. All of the switches and other behavior for the native executable and LIT versions are the same, except for the following subtleties:

•   In the native executable version, the switches must each be preceded by a dash, rather than a slash as in the LIT version, and they must all precede the source file name, rather than follow it as in the LIT version. This is consistent with the normal conventions for switches in UNIX and Windows command lines.

•   In the native executable version, the switches are case sensitive and must be given in lower case. They are case insensitive in the LIT version.

•   Rather than offer three named variations (compil, ocmpil, complp) as with the LIT version, there is only one native executable version: compil. You must use the -13 switch to get the equivalent of OCMPIL, or the -x:1 switch to get the equivalent of COMPLP.

•   The default amount of memory available for the native executable version is 2MB, whereas in the LIT version it is based on the job's memory partition. Use the -w:#### switch to increase it.

•   The UNIX version of compil outputs to stdout, allowing it to be redirected to a file. The Windows version outputs by default to the windows, but there is a switch, -so, to output to stdout instead. In either case, it is generally more convenient to use the -b (background) switch, which outputs errors to a .lst file.

Switches

The following table lists switches which apply only to the native compil executable. See COMPIL.LIT for the full list of switches.

Switch

Description

-about

Display 'about' information

-ini inispec

Used to specify the miame.ini file containing the DEVICE and ERSATZ definitions needed in order for the compiler to recognize AMOS-style ++INCLUDE specs.

-l

(lower case el) Causes the compiler to set the local working directory to match the source file (which will also determine the default location for the output files)

-so

(Windows only)  Redirects the window output to stdout.

-w:####

Specify the amount of working memory to reserve (in K, e.g. -w:4000 is 4000K or about 4M)

-wait

Wait for the user to hit a key before closing the window after the compilation.

-z

(Windows only)  Hides the compiler window (analogous to the A-Shell command line switch -z)

-zt

(Windows only)  Same as -z but process may appear on the task bar

 

Comments

Here's an example of launching the compiler under Windows PowerShell:

> Start-Process c:\vm\apn\compil.exe -ArgumentList "-ini c:\vm\miame\miame.ini -w:4000 -x:2 -m -b -l -px -lf c:\vm\miame\dsk0\150277\myprog.bp" -WindowStyle Hidden

Because the native executable version of the compiler is not commonly used, it is not included in the typical distribution packages but is available on request—although the Windows version is included with APN. Contact MicroSabio for more information.

See Also

•   COMPIL.LIT

History

2018 October, A-Shell 6.5.1650:  Add switches -z and -zt.