Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

MSX BASIC

From Wikipedia, the free encyclopedia
Programming language dialect
MSX BASIC
Paradigmimperative
DeveloperMicrosoft Corporation
First appeared1983; 43 years ago (1983)
Stable release
4.1
OSOptional; Any suitable OS is O.K.
LicenseMS-EULA
Websitewww.microsoft.com
Influenced by
GW-BASIC
Influenced
Vilnius BASIC

MSX BASIC is a dialect of theBASIC programming language. It is an extended version ofMicrosoft'sMBASIC Version 4.5, adding support for graphic, music, and various peripherals attached toMSXmicrocomputers. Generally, MSX BASIC is designed to followGW-BASIC, released the same year forIBM PCs and clones.[1] During the creation of MSX BASIC, effort was made to make the system flexible and expandable.

Distribution

[edit]
MSX BASIC version 3.0

MSX BASIC came bundled in theROM of all MSX computers. At system start-up MSX BASIC is invoked, causing its command prompt to be displayed, unless other software placed inROM takes control (which is the typical case ofgame cartridges and disk interfaces, the latter causing theMSX-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 forBIOS and theBASIC interpreter itself are visible on the lower 32K of theZ80 addressing space. The upper 32K are set toRAM, 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-DOSkernel version).

Development Environment

[edit]

MSX BASIC development environment is very similar to other versions of Microsoft BASIC. It has acommand line-basedIntegrated 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

[edit]

Every new version of the MSX computer was bundled with an updated version of MSX BASIC. All versions arebackward compatible and provide new capabilities to fully explore the new and extended hardware found on the newer MSX computers.

MSX BASIC 1.0

[edit]
  • Bundled withMSX1 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 andinterrupt-driven automaticcollision detection
  • Full support for theGeneral Instruments AY-3-8910Programmable 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

[edit]
  • Bundled withMSX2 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[2] and Sanyo MPC-2300.[3]

MSX BASIC 3.0

[edit]
  • Bundled withMSX2+ 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 commandSET 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

[edit]
  • Bundled with the Panasonic FS-A1STMSX turbo R model
  • Added_PAUSE command to make delays in BASIC independent of the current CPU and clock
  • Added extra commands for thePCM device (_PCMPLAY,_PCMREC)

MSX BASIC 4.1

[edit]

Sample

[edit]
100OPEN"COM5:9600,N,8,1,RS,CS,DS,CD"FORRANDOMAS#1110A$=INKEY$120IFA$<>" "THEN110130PRINT#1,"X0"140INPUT#1,B$150PRINTB$160GOTO110

Extensions of MSX BASIC

[edit]

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

[edit]
  1. ^Tom R. Halfhill (January 1985)."MSX Is Coming - Part II: Inside MSX".Compute!. Retrieved2010-10-31.
  2. ^Sergei Frolov (April 2011)."Yamaha YIS-805 (Soviet Digital Electronics Museum)". Retrieved2011-04-06.
  3. ^Sergei Frolov (April 2011)."Sanyo MPC-2300 (Soviet Digital Electronics Museum)". Retrieved2011-04-06.

External links

[edit]
Dialects of theBASIC programming language (list)
Classic
Microsoft
Texas Instruments
Hewlett-Packard
Locomotive Software
Microcomputers
Minicomputers
Time-sharing computers
Other
Extenders
Procedure-
oriented
Proprietary
Free and
open source
Withobject
extensions
Proprietary
Free and
open source
RAD
designers
Proprietary
Free and
open source
Defunct
Authority control databases: NationalEdit this at Wikidata
Retrieved from "https://en.wikipedia.org/w/index.php?title=MSX_BASIC&oldid=1312626395"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2026 Movatter.jp