ArticleslgStudy

science

MSX BASIC

MSX BASIC is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand MSX BASIC rather than just read about it. In short: 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 MSX microcomputers.

MSX BASIC — main illustration
MSX BASIC — illustration

Key takeaways

  • MSX BASIC belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect MSX BASIC to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of MSX BASIC from memory before moving on to harder problems.

Reference excerpt

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 MSX microcomputers. Generally, MSX BASIC is designed to follow GW-BASIC, released the same year for IBM PCs and clones. 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.

MSX BASIC 1.0 Bundled with MSX1 computers 16 KB in size No native support for floppy disk requiring the Disk BASIC cartridge extension (4 KB overhead) Support for all available screen modes: Screen 0 (text mode 40 × 24 characters) Screen 1 (mixed text mode 32 × 24 characters, sprites and colored custom characters) Screen 2 (high-resolution graphic mode 256 × 192 pixels, 16 colors) Screen 3 (low-resolution graphic mode 64×48 – 4×4 pixel blocks over the screen 2 resolution) Full support for hardware sprites and interrupt-driven automatic collision detection Full support for the General Instruments AY-3-8910 Programmable Sound Generator (PSG) 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.

MSX BASIC 2.0 / 2.1 Bundled with MSX2 computers 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 × 24) Screen 5 (graphic mode 256 × 212/424 pixels, 16 colors out of 512) Screen 6 (graphic mode 512 × 212/424 pixels, 4 colors out of 512) Screen 7 (graphic mode 512 × 212/424 pixels, 16 colors out of 512) Screen 8 (graphic mode 256 × 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 and Sanyo MPC-2300.

MSX BASIC 3.0 Bundled with MSX2+ computers 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 command SET SCROLL for smooth, hardware based scrolling in BASIC Added support for new available screen modes: Screen 10 (graphic mode 256 × 212/424 pixels, 12499 YJK at once + 16 colors out of 512 RGB in ML) Screen 11 (graphic mode 256 × 212/424 pixels, 12499 YJK at once + 16 colors out of 512 RGB) Screen 12 (graphic mode 256 × 212/424 pixels, 19268 YJK at once)

MSX BASIC 4.0 Bundled with the Panasonic FS-A1ST MSX turbo R model Added _PAUSE command to make delays in BASIC independent of the current CPU and clock Added extra commands for the PCM device (_PCMPLAY, _PCMREC)

MSX BASIC 4.1 Bundled with the Panasonic FS-A1GT MSX turbo R model Added MIDI extensions

Sample

Extensions of MSX BASIC 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.

References

External links "MSX.bas – Preservando o legado de programas escritos na linguagem MSX Basic" [Preserving the legacy of programs written in the MSX BASIC language.]. www.basic.msxall.com (in Portuguese). Archived from the original on 2017-07-31. – A website focusing completely on development in MSX BASIC. MSX2 Technical Handbook, Chapter 2: BASIC – Official documentation of MSX-BASIC 2.0, generated manually from a printed copy of MSX2 Technical Handbook.

Worked examples

Example 1 — a first encounter with MSX BASIC

Start with the simplest possible case. Write down what MSX BASIC claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to MSX BASIC before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about MSX BASIC ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of MSX BASIC

In research
MSX BASIC appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses MSX BASIC in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
MSX BASIC is common in secondary-school and first-year university syllabi. It links to neighbouring topics BASIC interpreters, BASIC programming language family, Discontinued Microsoft BASICs, so understanding it makes those chapters shorter.
In everyday life
Look for MSX BASIC outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “MSX BASIC” →

How to study MSX BASIC in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what MSX BASIC means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain MSX BASIC out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is MSX BASIC in simple terms?

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 MSX microcomputers.

Why does MSX BASIC matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study MSX BASIC?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on MSX BASIC.

Tags

  • BASIC interpreters
  • BASIC programming language family
  • Discontinued Microsoft BASICs
  • MSX-DOS
  • Microsoft programming languages
  • Programming languages created in 1984

Keep exploring