MSX BASIC is a dialect of the BASIC programming language. It is an extended version of Microsoft's MBASIC Version 4.5, adding support for graphic, music, and various peripherals attached to MSXmicrocomputers. Generally, MSX BASIC is designed to follow GW-BASIC, released the same year for IBM PCs and clones.[1] During the creation of MSX BASIC, effort was made to make the system flexible and expandable.
Distribution
MSX BASIC came bundled in the ROM of all MSX computers. At system start-up MSX BASIC is invoked, causing its command prompt to be displayed, unless other software placed in ROM takes control (which is the typical case of game cartridges and disk interfaces, the latter causing the MSX-DOS prompt to be shown if there is a disk present which contains the DOS system files).
When MSX BASIC is invoked, the ROM code for BIOS and the BASIC interpreter itself are visible on the lower 32K of the Z80 addressing space. The upper 32K are set to RAM, of which about 23K to 28K are available for BASIC code and data (the exact amount depends on the presence of disk controller and on the MSX-DOS kernel version).
Development Environment
MSX BASIC development environment is very similar to other versions of Microsoft BASIC. It has a command line-based Integrated Development Environment (IDE) system; all program lines must be numbered, all non-numbered lines are considered to be commands in direct mode (i.e., to be executed immediately). The user interface is entirely command-line-based.
Versions of MSX BASIC
Every new version of the MSX computer was bundled with an updated version of MSX BASIC. All versions are backward compatible and provide new capabilities to fully explore the new and extended hardware found on the newer MSX computers.
Note that the Brazilian MSX "clones" by Sharp and Gradiente show other versions of MSX BASIC (on the Sharps even called HOT-BASIC), but they're basically just unlicensed MSX BASIC 1.0.
32 KB in size (First 16 KB directly available, second 16 KB in other slot and has to be paged in/out for usage)
Added support for new available screen modes, including graphic modes with 212 progressive or 424 interlaced lines:
Updated Screen 0 (text mode 80 x 24)
Screen 5 (graphic mode 256 x 212/424 pixels, 16 colors out of 512)
Screen 6 (graphic mode 512 x 212/424 pixels, 4 colors out of 512)
Screen 7 (graphic mode 512 x 212/424 pixels, 16 colors out of 512)
Screen 8 (graphic mode 256 x 212/424 pixels, 256 colors, no palette)
Added support for multicolored sprites (16 colors)
Added support for hardware accelerated graphics functions (copy, fill, blitting, etc.)
Added support for using the lower 32K RAM of the computer (not directly visible because the BIOS and BASIC interpreter ROMs take over the addressing space) as a limited RAM disk (only certain types of files could be saved). MSX BASIC 2.1 supports using the memory mapper (if available on the machine) to expand this RAM disk to almost 90 KB.
MSX BASIC 2.1 exists on computers like the Philips MSX2 machines (except for the VG 8230), the Yamaha YIS-805[2] and Sanyo MPC-2300.[3]
Since MSX BASIC was meant to be expandable from inception, it was possible to write add-on modules quite easily. Support for specific hardware was commonly added by means of expansion cartridges, which also served as the interface to the hardware in question. MSX Disk-BASIC is an example, bundled in the cartridge that provides the hardware interface to the disk drives, it adds commands to access the floppy disk drives.