Command mbc
Compile an MBC-16 BASIC source file on the MK90.
Synopsis
mbc source.basOrdinary invocation: foreground child, PID 3; the shell waits. Not an allowed pipe producer.
Parameters
| Parameter | Meaning |
|---|---|
source.bas | Regular source file with case-insensitive .bas suffix, on a volume where the output can be created. |
Description
Performs two passes: first validates and measures bytecode and records line targets; then emits the executable. The output path replaces the source suffix with lowercase .mbx in the same directory.
A successful run clears the text console and reports the output pathname and length followed by B OK. The output is MBX1 bytecode, executed by the native runtime, not PDP-11 machine code.
The source is read in blocks; it need not fit the editor buffer. There are at most 64 non-empty source lines. Compilation uses the shared console buffers as workspace and yields between source lines. The display is not a live progress indicator.
The previous executable is preserved on a failed compile or failed publication. Use the language reference for the exact integer dialect.
Examples
cp /mnt/smp0/demo.bas /mnt/smp1/demo.bas
cd /mnt/smp1
mbc demo.bas
./demo.mbxLimits and side effects
- Not a complete implementation of the original MK90 BASIC. No real numbers, string variables, arrays or general Linux executable output. No compiler options, separate output-path argument, pipe use or background compilation. Compilation does not poll SU+C.
Status and diagnostics
Success is status 0. Relevant status codes: 1, 2, 3, 4, 5, 6, 7, 8, 9, 14, 15, 32, 33, 34. See the diagnostic reference.
See also
exec · edit · cp · Shell syntax