MBASIC

MBASIC, like its predecessor family of 8-bit interpreters Microsoft BASIC, were heavily inspired by Digital Equipment Corporation PDP-10's BASIC-PLUS.

Programs could be listed on the screen for editing, or saved to disk in either a compressed binary format or as plain ASCII text.

Program text, variables, disk buffers and the CP/M operating system itself all had to share the 64 kilobyte address space of the 8080 processor.

Typically when first starting MBASIC there would be less than 32 kB memory available for programs and data, even on a machine equipped with a full 64 kilobytes of RAM.

Comment lines, prefixed with the REM keyword or an apostrophe, could be placed in the program text but took up valuable memory space, which discouraged BASIC users from fully documenting their code.

MBASIC supported the following data types: String operators included substring selection, concatenation, assignment, and testing for equality.

Unlike some other BASIC implementations of the time, MBASIC did not provide support for matrix operations, complex numbers, or a decimal (BCD) data type for financial calculations.

The built-in mathematics functions (sine, cosine, tangent, natural log, exponential, square root) only gave single precision results.

MBASIC version 5 allowed identifiers up to 40 characters long, which permitted programmers to give variables readable names.

No discussion of BASICs on the 8-bit computers of the late '70s and early '80s would be complete without mentioning the importance of the PEEK and POKE functions for directly reading and writing to memory.

For example, a CP/M programmer might use a POKE function to allow BASIC to switch the console device to the serial port, if the system BIOS supported this.

These were typically placed in a reserved area of memory, or POKEd into string constants, as a series of machine codes (opcodes).

All the functions of CP/M MBASIC were available in the IBM PC disk-based BASICA or GWBASIC which made migration of programs from CP/M systems to PC-compatibles possible.

Skilled users could write routines in MBASIC to automate tasks that in modern-day systems would be performed by powerful application program commands or scripting languages.

MBasic 5.21 running on a Z80 CP/M system displayed on a monochrome monitor typical for that time