Below is a list of all standard MSX-BASIC instructions, that are not linked to a localisation (Arabic, Japanese, Korean), the presence or addition of a device such as a disk drive or a RS-232C interface, or the usage of a program that adds specific new instructions.
These instructions are classified according to their purpose. For a general overview of all instructions in alphabetical order (with exception for most reserved words), see this page : MSX-BASIC Instructions.
Generally, all instructions corresponding to a MSX generation will also work on the higher generations, but there are some exceptions, for example the instructions related to the data recorder will not work on a MSX Turbo R.
Although the instructions added by MSX-BASIC 4.0 (MSX Turbo R) begin with CALL, they are included in the standard MSX-BASIC instructions, even though they have a syntax typical of an extension.
For all the instructions that are not part of the standard MSX-BASIC instructions, first check this page: MSX-BASIC Extensions.
A few instructions are standard instructions while being at the same time linked to a specific MSX-BASIC extension. The most obvious case is COPY added by the Disk BASIC extension and also present on all MSX2 (and later) computers as a graphical instruction.
Arithmetic operators
Instruction | Generation | Updates | Related extensions / Remarks |
---|---|---|---|
- | MSX1 | Subtraction | |
+ | MSX1 | Addition | |
/ | MSX1 | Division | |
\ or ¥ or ₩ | MSX1 | Division without a digit after the decimal point in result ¥ is used on Japanese MSX instead of \ ₩ is used on Korean MSX instead of \ | |
* | MSX1 | Multiplication | |
^ | MSX1 | Root squared | |
MOD | MSX1 | Rest resulting of a division |
Call/Return, Jump and Loop
Instruction | Generation | Updates | Related extensions / Remarks |
---|---|---|---|
FOR...NEXT | MSX1 | ||
GOSUB | MSX1 | ||
GOTO | MSX1 | ||
RETURN | MSX1 |
Clock & Timing
Instruction | Generation | Updates | Related extensions / Remarks |
---|---|---|---|
CALL PAUSE | MSX Turbo R | Short version: _PAUSE | |
INTERVAL | MSX1 | ||
GET DATE | MSX2 | Related to Real Time Clock (RTC) | |
GET TIME | MSX2 | Related to Real Time Clock (RTC) | |
ON INTERVAL GOSUB | MSX1 | ||
SET DATE | MSX2 | Related to Real Time Clock (RTC) | |
SET TIME | MSX2 | Related to Real Time Clock (RTC) | |
TIME | MSX1 |
Conditions
Instruction | Generation | Updates | Related extensions / Remarks |
---|---|---|---|
< | MSX1 | Checks if the first argument is less than the second. Returns -1 or 0 if true or false. | |
> | MSX1 | Checks if the first argument is greater than the second. Returns -1 or 0 if true or false. | |
= | MSX1 | Checks if the first argument is equal to the second. Returns -1 or 0 if true or false. | |
>= or => | MSX1 | Checks if the first argument is greater than the second or equal. Returns -1 or 0 if true or false. | |
<= or =< | MSX1 | Checks if the first argument is less than the second or equal. Returns -1 or 0 if true or false. | |
<> or >< | MSX1 | Checks if the first argument is diffent than the second. Returns -1 or 0 if true or false. | |
NOT | MSX1 | ||
IF...GOTO...ELSE | MSX1 | ||
IF...THEN...ELSE | MSX1 | ||
ON...GOSUB | MSX1 | ||
ON...GOTO | MSX1 |
Conversion Functions
Instruction | Generation | Updates | Related extensions / Remarks |
---|---|---|---|
ASC() | MSX1 | ||
BIN$() | MSX1 | ||
CDBL() | MSX1 | ||
CHR$() | MSX1 | ||
CINT() | MSX1 | ||
CSNG() | MSX1 | ||
HEX$() | MSX1 | ||
OCT$() | MSX1 | ||
STR$() | MSX1 | ||
VAL() | MSX1 |
Data Storage
Instruction | Generation | Updates | Related extensions / Remarks |
---|---|---|---|
BLOAD | MSX1 | Disk BASIC | |
BSAVE | MSX1 | Disk BASIC | |
CLOAD | MSX1 | ||
CLOAD? | MSX1 | ||
CLOSE | MSX1 | Disk BASIC, QuickDisk BASIC, MemoryDisk BASIC, RS-232C BASIC | |
CSAVE | MSX1 | ||
EOF() | MSX1 | Data input function | |
LOAD | MSX1 | Disk BASIC, MemoryDisk BASIC, RS-232C BASIC | |
MAXFILES | MSX1 | ||
MERGE | MSX1 | Disk BASIC, MemoryDisk BASIC, RS-232C BASIC | |
MOTOR | MSX1 | ||
OPEN | MSX1 | Disk BASIC, QuickDisk BASIC, MemoryDisk BASIC, RS-232C BASIC | |
RUN | MSX1 | Disk BASIC, MemoryDisk BASIC | |
SAVE | MSX1 | Disk BASIC, MemoryDisk BASIC, RS-232C BASIC | |
VARPTR() | MSX1 | Data input function |
Note: The Data Recorder support has been removed from the MSX Turbo R.
Display
Instruction | Generation | Updates | Related extensions / Remarks |
---|---|---|---|
BASE | MSX1 | MSX2, MSX2+ | Instruction for VDP experts |
CIRCLE | MSX1 | ||
CLS | MSX1 | Delta BASIC | |
COLOR | MSX1 | MSX2, MSX2+ | Kanji BASIC, Hangul BASIC |
COLOR= | MSX2 | ||
COPY | MSX2 | It is the standard MSX2 instruction It must not be confused with the COPY instruction added by the Disk BASIC | |
COPY SCREEN | MSX2 | Optional, can be used only on machines with an internal or external digitizer | |
CSRLIN | MSX1 | ||
DRAW | MSX1 | ||
LINE | MSX1 | MSX2 | |
LOCATE | MSX1 | Delta BASIC | |
LPOS() | MSX1 | Data input function | |
OPEN | MSX1 | ||
PAINT | MSX1 | ||
POINT | MSX1 | Data input function | |
POS() | MSX1 | Data input function | |
PRESET | MSX1 | MSX2 | |
PRINT or ? | MSX1 | ||
PSET | MSX1 | MSX2 | |
PUT KANJI | MSX2 | Related to Kanji BASIC | |
SCREEN | MSX1 | MSX2, MSX2+ | Hangul BASIC, Kanji BASIC |
SET ADJUST | MSX2 | Related to Real Time Clock (RTC) | |
SET PAGE | MSX2 | ||
SET SCROLL | MSX2+ | ||
SET VIDEO | MSX2 | Optional, can be used only on machines with an internal or external digitizer | |
SPC() | MSX1 | ||
TAB() | MSX1 | ||
VDP() | MSX1 | MSX2, MSX2+ | Instruction for VDP experts |
VPEEK() | MSX1 | MSX2 | Data input function |
VPOKE | MSX1 | MSX2 | |
WIDTH | MSX1 | MSX2 | Hangul BASIC, Kanji BASIC |
Error Treatment
Instruction | Generation | Updates | Related extensions / Remarks |
---|---|---|---|
ERL | MSX1 | ||
ERR | MSX1 | Disk BASIC, Delta BASIC | |
ERROR | MSX1 | Disk BASIC, Delta BASIC | |
ON ERROR GOTO | MSX1 |
Input/Output Bus
Instruction | Generation | Updates | Related extensions / Remarks |
---|---|---|---|
INP() | MSX1 | Data input function | |
OUT | MSX1 | Data output function | |
WAIT | MSX1 | Data input function |
Keyboard and/or Controllers
Instruction | Generation | Updates | Related extensions / Remarks |
---|---|---|---|
CALL ADJUST | MSX2 | Short version: _ADJUST Only on MSX2 computers manufactured by Daewoo Maybe also available with the Sanyo MPC-X Graphic Expander Unit and the Sanyo MPC-27 computer Enables the V9938 light-pen interface | |
INKEY$ | MSX1 | Data input function | |
INPUT | MSX1 | ||
INPUT$() | MSX1 | Data input function | |
KEY | MSX1 | ||
KEY() | MSX1 | ||
LINE INPUT | MSX1 | ||
OPEN | MSX1 | ||
ON KEY GOSUB | MSX1 | ||
ON STOP GOSUB | MSX1 | ||
ON STRIG GOSUB | MSX1 | ||
PAD() | MSX1 | MSX2 | Data input function, Light Pen support removed on MSX Turbo R |
PDL() | MSX1 | Data input function, Paddle controllers support removed on MSX Turbo R, these devices are unused on MSXPLAYer. | |
STICK() | MSX1 | Data input function | |
STRIG() | MSX1 | Data input function |
Logical operators
Instruction | Generation | Updates | Related extensions / Remarks |
---|---|---|---|
AND | MSX1 | ||
EQV | MSX1 | ||
IMP | MSX1 | ||
NOT | MSX1 | ||
OR | MSX1 | ||
XOR | MSX1 |
Mathematical functions
Instruction | Generation | Updates | Related extensions / Remarks |
---|---|---|---|
ABS() | MSX1 | ||
CDBL() | MSX1 | ||
CINT() | MSX1 | ||
CSNG() | MSX1 | ||
EXP() | MSX1 | ||
FN | MSX1 | ||
FIX() | MSX1 | ||
INT() | MSX1 | ||
LOG() | MSX1 | ||
RND() | MSX1 | ||
SGN() | MSX1 | ||
SQR() | MSX1 |
New Basic Instructions/Machine Language Functions
Instruction | Generation | Updates | Related extensions / Remarks |
---|---|---|---|
CALL or _ | MSX1 | Instruction for machine language experts | |
DEF USR | MSX1 | ||
USR() | MSX1 | Data input function |
Printer
Instruction | Generation | Updates | Related extensions / Remarks |
---|---|---|---|
LLIST | MSX1 | ||
LPRINT | MSX1 | ||
OPEN | MSX1 |
Programming
Instruction | Generation | Updates | Related extensions / Remarks |
---|---|---|---|
: | MSX1 | Separator between two instructions | |
AUTO | MSX1 | ||
CONT | MSX1 | ||
DELETE | MSX1 | ||
ELSE | MSX1 | ||
END | MSX1 | ||
FRE() | MSX1 | ||
LIST | MSX1 | ||
NEW | MSX1 | ||
REM or ' | MSX1 | ||
RENUM | MSX1 | ||
RESUME | MSX1 | ||
STOP | MSX1 | ||
TROFF | MSX1 | ||
TRON | MSX1 |
Prompt
Instruction | Generation | Updates | Related extensions / Remarks |
---|---|---|---|
SET BEEP | MSX2 | Related to Real Time Clock (RTC) | |
SET PASSWORD | MSX2 | Related to Real Time Clock (RTC) | |
SET PROMPT | MSX2 | Related to Real Time Clock (RTC) | |
SET SCREEN | MSX2 | Related to Real Time Clock (RTC) | |
SET TITLE | MSX2 | Related to Real Time Clock (RTC) |
RAM Access
Instruction | Generation | Updates | Related extensions / Remarks |
---|---|---|---|
PEEK() | MSX1 | Data input function | |
POKE | MSX1 | ||
VARPTR() | MSX1 | Data input function |
Sound and Music
Instruction | Generation | Updates | Related extensions / Remarks |
---|---|---|---|
BEEP | MSX1 | MSX2 | |
CALL PCMPLAY | MSX Turbo R | Short version: _PCMPLAY | |
CALL PCMREC | MSX Turbo R | Short version: _PCMREC | |
PLAY | MSX1 | MSX-AUDIO BASIC, MSX-MUSIC BASIC | |
PLAY() | MSX1 | ||
SOUND | MSX1 | Instruction for PSG experts |
Sprites
Instruction | Generation | Updates | Related extensions / Remarks |
---|---|---|---|
COLOR SPRITE() | MSX2 | ||
COLOR SPRITE$() | MSX2 | ||
ON SPRITE GOSUB | MSX1 | ||
PUT SPRITE | MSX1 | MSX2 | |
SPRITE | MSX1 | ||
SPRITE$() | MSX1 |
String Handling
Instruction | Generation | Updates | Related extensions / Remarks |
---|---|---|---|
INSTR() | MSX1 | ||
LEN() | MSX1 | ||
LEFT$() | MSX1 | ||
MID$() | MSX1 | ||
RIGHT$() | MSX1 | ||
SPACE$() | MSX1 | ||
STRING$() | MSX1 |
Trigonometric Functions
Instruction | Generation | Updates | Related extensions / Remarks |
---|---|---|---|
ATN() | MSX1 | ||
COS() | MSX1 | ||
SIN() | MSX1 | ||
TAN() | MSX1 |
Variables Setting
Instruction | Generation | Updates | Related extensions / Remarks |
---|---|---|---|
= | MSX1 | Defines a variable - see LET | |
CLEAR | MSX1 | ||
DATA | MSX1 | ||
DEFDBL | MSX1 | ||
DEF FN | MSX1 | ||
DEFINT | MSX1 | ||
DEFSNG | MSX1 | ||
DEFSTR | MSX1 | ||
DIM | MSX1 | ||
ERASE | MSX1 | ||
LET | MSX1 | Optional instruction, can be omitted | |
READ | MSX1 | ||
RESTORE | MSX1 | ||
RUN | MSX1 | Disk BASIC, MemoryDisk BASIC | |
SWAP | MSX1 |
Reserved Words
Most of these reserved words are used in Disk BASIC.
Instruction | Generation | Updates | Related extensions / Remarks |
---|---|---|---|
ATTR$() | MSX1 | Without diversion, returns "Illegal function call" | |
CMD | MSX1 | Without diversion, returns "Illegal function call" | |
COPY | MSX1, MSX2 | Returns "Illegal function call" on diskless MSX1 | |
CVD() | MSX1 | Used in Disk BASIC, returns "Illegal function call" otherwise. | |
CVI() | MSX1 | Used in Disk BASIC, returns "Illegal function call" otherwise. | |
CVS() | MSX1 | Used in Disk BASIC, returns "Illegal function call" otherwise. | |
DSKF() | MSX1 | Used in Disk BASIC, returns "Illegal function call" otherwise. | |
DSKO$ | MSX1 | Used in Disk BASIC, returns "Illegal function call" otherwise. | |
FIELD | MSX1 | Used in Disk BASIC, returns "Illegal function call" otherwise. | |
FILES | MSX1 | Used in Disk BASIC, returns "Illegal function call" otherwise. | |
FPOS() | MSX1 | Without diversion, returns "Internal error". | |
GET | MSX1 | Instruction works, but is useless on diskless MSX1 | |
IPL | MSX1 | Without diversion, returns "Illegal function call" | |
KILL | MSX1 | Used in Disk BASIC, returns "Illegal function call" otherwise. | |
LOC() | MSX1 | Used in Disk BASIC, returns "Illegal function call" otherwise. | |
LOF() | MSX1 | Used in Disk BASIC, returns "Illegal function call" otherwise. | |
LSET | MSX1 | Used in Disk BASIC, returns "Illegal function call" otherwise. | |
MKD$() | MSX1 | Used in Disk BASIC, returns "Illegal function call" otherwise. | |
MKI$() | MSX1 | Used in Disk BASIC, returns "Illegal function call" otherwise. | |
MKS$() | MSX1 | Used in Disk BASIC, returns "Illegal function call" otherwise. | |
NAME | MSX1 | Used in Disk BASIC, returns "Illegal function call" otherwise. | |
PUT | MSX1 | Instruction works, but is useless on diskless MSX1 (except when combined with SPRITE) | |
RSET | MSX1 | Used in Disk BASIC, returns "Illegal function call" otherwise. | |
SET | MSX1 | Returns "Illegal function call" on MSX1 |
Pages in category "MSX-BASIC Instructions"
The following 175 pages are in this category, out of 175 total.