basic - Basmark QuickBASIC compiler


basic [ option ] ...  file ... 


Basic is the Basmark QuickBASIC compiler from Basmark Corporation. 

Basic accepts several types of arguments:

An argument whose name ends with ‘.b’ is taken to be a BASIC source program; it is compiled, and the object program is left on the file whose name is that of the source with ‘.o’ substituted for ‘.b’.  The ‘.o’ file is normally deleted, however, if the BASIC program is compiled and loaded all at one go. 

The first file is taken as the main module where execution begins.  If the file is a BASIC source program, a startoff is included in the object program. 

The following options are interpreted by basic.  See ld(1) for load-time options. 

Print compiler version number and messages identifying compiler passes as they occur. 

Suppress the loading phase of the compilation, and force an object file to be produced. 

Compile the named BASIC program, and leave the assembler-language output on the corresponding file suffixed ‘.s’. 

-o output
Name the final output file output.  If this option is used the file ‘a.out’ will be left undisturbed. 

Merge all upper-case alphabetic characters into their lower-case counterparts, except upper-case characters appearing in DATA statements and in literal strings.  This option must be used if the BASIC source file is entirely in upper-case; otherwise, the BASIC reserved words will fail to be recognized. 

Do not generate code to support chaining at run-time.  No module compiled with this option may participate in chaining.  This flag can be used to save space in the object module. 

Maintain information at run-time about line counts instead of line numbers for tracing and error recovery.  A line count is the number of physical lines in the source file (including lines for include files) starting with one.  This is useful in producing diagnostics for programs with few line numbers.  This flag is overridden by the -L flag. 

Do not generate code to maintain information at run-time about line numbers for tracing and error recovery.  This flag can be used to save space in the object module and to decrease execution time. 

Do not generate code to check for out-of-bounds subscripts at run-time.  This flag can be used to decrease execution time. 

Store arrays in row-major order.  Normally, they are stored in column-major order. 

Secondary location for include files.  Filenames given by the $INCLUDE meta-command which do not begin with / are searched for first in the current directory and then in the dir directory. 

No main module.  Do not generate a main module startoff for any file.  This flag facilitates separate compilation. 

Other arguments are taken to be loader option arguments.  The environment variables BASHOME and BASTEMP are used to override default assignments for the directory where the compiler passes are located and the directory used for temporary files, respectively.  The defaults for these directories are /usr/lib/basic and /tmp. 


      file.b      input file
file.oobject file
a.outloaded output
bas1first pass of compiler
bas2second pass of compiler
libbasic.arun-time library
/lib/crt0.oruntime startoff


The Basmark QuickBASIC Programmer’s Manual


The diagnostics produced by basic itself are intended to be self-explanatory.  Occasional messages may be produced by the assembler or loader. 

from The Basmark QuickBASIC Programmer’s Manual by Lawrence Leinweber