Please enable JavaScript to view this site.

Updated August 2018; see History

COMPIL srcfile {switches}

COMPIL and its aliases COMPLP and OCMPIL each process an ASB source file, creating a compiled RUN file which can be executed by RUN.LIT. The line above shows the syntax for all three variations. For example:

COMPIL MYPROG.BAS /X:2/LF/M/C:APP_VER=9

Parameters and Switches

srcfile

specifies the program source file (with an assumed extension of .BAS or .BP). If omitted, COMPIL will display the internal compiler version number.

switches

COMPIL has an extensive list of switches. Refer to the link above for a listing and links to extended descriptions if needed.

Comments

The three LIT commands are just wrappers which process parameters and then call the internal compiler module embedded inside the A-Shell executable (via MX_COMPIL). In fact, they are all the same, but they act slightly differently—mostly in terms of default switches—based on looking at their own name at runtime.

OCMPIL, which is equivalent to COMPIL with /13 switch, is designed to emulate the AlphaBASIC 1.3 compiler of the same name.
COMPIL emulates the AlphaBASIC 1.4 compiler.
COMPLP is equivalent to COMPIL/X:1 and is designed to emulate the BASICplus compiler of the same name.

Note that the OCMPIL nearly always produces the exact same output (RUN file) as the AMOS equivalent, and thus is the best choice when cross-platform compatibility is important. On the other hand, it lacks several features, such as support for ISAM-A, structure loops, SWITCH, user-defined functions and procedures, etc., and thus is the worst choice when developing for the A-Shell platform exclusively.

In addition to the three LIT wrappers, there are two standalone (native executable) implementations of the compiler, which do not depend in any way on the presence of A-Shell:

compil.exe  (Windows)

compil      (Unix)

For the standalone implementations, the switches are the same, but the syntax is slightly different. The switches must precede srcfile, use the lead-in character "-" (rather than "/"), and are case sensitive (must be lower case). For example:

c:\compil.exe -a -b -m -x:2 prog.bas)

There is also another front-end, RECOMX in EXLIB:[908,73], which compiles all of the BAS and BP source files in the current account. The source code of RECOMX is provided so that the switch settings can be customized for individual developers.

See A-Shell Extensions for additional details of the compiler and related language features, and Compiler Edit History for information on changes to the compiler.

History

2019 March, A-Shell 6.5.1657, COMPIL.LIT 1.1(136):  add /F1 switch.

2018 August, A-Shell 6.5.1639, COMPIL.LIT 1.1(135):  add /NOTRC switch.

2017 July, A-Shell 6.5.1610, COMPIL.LIT 1.1(134):  makes the scroll bar visible if the environment supports it (A-Shell/Windows and ATE version 6.5.1610 or later) and the output of the command causes the screen to scroll.

2016 May, COMPIL.LIT(132):  /PX extends pre-pass to eliminated unused functions

2016 October, COMPIL.LIT(133):  Add support for /IGOO

2015 September, COMPIL.LIT(131):  /XTAGS generates CTAGS output

2015 August, COMPIL.LIT (130):  /CTAGS generates a list of includes

Created with Help+Manual 9 and styled with Premium Pack Version 5 © by EC Software