Skip to content

MBASIC CLI Help

Command-line interface for MBASIC-2025. Type HELP <topic> for specific help or HELP SEARCH <keyword> to search all content.

🎮 Games Library

Browse and run classic BASIC games:

📘 CLI Interface

The CLI provides a classic MBASIC command-line interface with direct mode and program mode.

Common Commands: - LIST - Show program - RUN - Execute program - LOAD "file.bas" - Load program - SAVE "file.bas" - Save program - NEW - Clear program - AUTO - Auto line numbering - RENUM - Renumber lines - SYSTEM - Exit MBASIC

Debugging: - Use the Tk or Curses UI for full debugging support (breakpoints, stepping, stack viewing) - CLI supports basic program execution and direct mode testing

📗 MBASIC Interpreter

About the BASIC interpreter:

📙 MBASIC Compilers

Compile BASIC programs to native executables or JavaScript:

  • Compiler Guide - TWO complete compilers:
  • Z80/8080 Compiler - Generate .COM files for CP/M systems (100% complete!)
  • JavaScript Compiler - Generate JavaScript for browsers and Node.js (100% complete!)

📕 BASIC-80 Language Reference

Complete BASIC language documentation:


Using CLI Help

Show main help:

HELP

Get help on specific topic:

HELP PRINT
HELP FOR
HELP architecture

Search all help:

HELP SEARCH loop
HELP SEARCH file

Quick Start

Run MBASIC in CLI mode:

mbasic --ui cli

Note: MBASIC supports multiple interfaces (CLI, Curses, Tk, Web). See Features for details on all available UIs.

Load and run a program:

Ok
LOAD "MYPROGRAM.BAS"
RUN

Direct mode (no line numbers):

Ok
PRINT "Hello, World!"
Hello, World!
Ok

Program mode (with line numbers):

Ok
10 PRINT "Hello"
20 PRINT "World"
30 END
RUN
Hello
World
Ok


Beyond the Interpreter

The CLI runs programs in interpreter mode. MBASIC-2025 also includes TWO complete compilers:

MBASIC Compilers → - Generate native CP/M executables OR JavaScript: - Z80/8080 Compiler - Native .COM files for CP/M systems (100% complete!) - JavaScript Compiler - JavaScript for browsers and Node.js (100% complete!)


Type HELP <topic> for more information on any topic listed above.