Reviewed and revised May 2024
xcall MIAMEX, MX_COMPIL, filename, switches {,defbuf, vcpattern, status, memreq}
MX_COMPIL (MIAMEX 15) is used to implement the A-Shell command programs COMPIL.LIT, OCMPIL.LIT, PRE.LIT and OPRE.LIT, by calling into the ASB compiler embedded within the A-Shell executable; see Comments. See the documentation on COMPIL for more information about the switches and variations of COMPIL.
Parameters
filename (String) [in]
is the DevPPN file specification or host pathname of the program to be compiled. The compiler itself will default the extension to BAS if necessary.
defbuf (String) [in]
contains one or more "define sym = value" statements (corresponding to /C:sym=value command line switches). Each statement must be terminated with chr(10). String values must be quoted. For example, the defbuf equivalent of the command line:
compil prog/x:2/c:MODE=1/c:PLATFORM$=Win
would be:
defbuf = "define MODE = 1" + chr(10) + "PLATFORM$ = ""Win"""+ chr(10)
vcpattern (String) [in]
contains the pattern specified in /VC:pattern; see Version Copy
status (Integer) [out]
returns 0 if the compile succeeds, else failure.
memreq (Num) [in]
number of bytes (not kilo or mega) requested. Is used to request an amount of memory for the compiler that is larger than the current memory partition. Request only has an effect if it exceeds the amount of memory currently allocated and available to the job.
switches (Bitmap 48 bits) [in]
is a bitmap of switch values as listed below:
Symbol |
Value |
Corresponding COMPIL.LIT switch or variation |
---|---|---|
COMPIL_A |
&h00000001 |
/A, use 24-bit instead of 16-bit transfer addresses |
COMPIL_M |
&h00000002 |
/M, treat first instance of unmapped variable as an error |
COMPIL_O |
&h00000004 |
/O, omit line numbers from compiled program |
COMPIL_13 |
&h00000008 |
Act as OCMPIL instead of COMPIL |
COMPIL_S |
&h00000010 |
/S, silent output – omit ++include lines |
COMPIL_N |
&h00000020 |
/N, omit phase two compilation statistics |
COMPIL_X1 |
&h00000040 |
/X:1, act as COMPLP – BASICplus mode |
COMPIL_D |
&h00000080 |
/D, limited d/BASIC support |
COMPIL_X2 |
&h00000100 |
/X:2, A-Shell extensions |
COMPIL_V1 |
&h00000200 |
/V:1, BASIC 1.4a compatibility |
COMPIL_T |
&h00000400 |
/T, Trace – output source while compiling |
COMPIL_I |
&h00000800 |
/I, assume old ISAM in ambiguous OPEN statements |
COMPIL_AV |
&h00001000 |
/AV, handle >65K variable space |
COMPIL_B |
&h00002000 |
/B, output errors to prog.lst |
COMPIL_MX |
&h00004000 |
/MX, like /M but complain for every occurrence of each unmapped variable |
COMPIL_X3 |
&h00008000 |
/X:3 SBX compile |
COMPIL_DBG |
&h00010000 |
/DEBUG |
COMPIL_RC |
&h00020000 |
/RC |
COMPIL_G |
&h00040000 |
/G |
COMPIL_LSM |
&h00040000 |
/LSM |
COMPIL_LF |
&h00080000 |
/LF |
COMPIL_CI |
&h00100000 |
/CI |
COMPIL_C |
&h00200000 |
/C:sym = value |
COMPIL_IEEE |
&h00400000 |
/IEEE |
COMPIL_VC |
&h00800000 |
/VC:pattern |
COMPIL_LI |
&h01000000 |
/LI |
COMPIL_P |
&h02000000 |
/P |
COMPIL_CTAGS |
&h08000000 |
CTAGS |
COMPIL_XTAGS |
&h10000000 |
/XTAGS |
COMPIL_PX |
&h20000000 |
/PX |
COMPIL_IGOO |
&h40000000 |
/IGOO |
COMPIL_L |
&h80000000 |
(-l applies only to compil.exe) |
COMPIL_NOTRC |
&h100000000 |
/NOTRC |
COMPIL_F1 |
&h200000000 |
/F1 |
Definition File: ashinc:compil.def |
Comments
The compiler is also available as a standalone executable (see Compiler), mostly to facilitate integration with external program editors such as APN.LIT.
History
2024 February, A-Shell 7.0.1756: Add memreq parameter.
2014 January, A-Shell 6.1.1371: Add support for /P.