Category:Kanji BASIC
This page was last modified 17:50, 30 May 2023 by Mars2000you. Based on work by Gdx.



Kanji BASIC extension comes with the Kanji Driver. These extended instructions can be found in the Kanji Driver ROM. Most of these instructions are actually useful only on Japanese machines that have a Kanji-ROM (128kB if JIS1, 256kB if JIS1+JIS2).

Kanji BASIC is available on

Instructions (general info)

Kanji BASIC comes with 14 new instructions. The MSX-BASIC instruction PUT KANJI, available on all MSX2 and higher computers, can be seen as a related Kanji BASIC instruction.


  • CALL can be replaced by the character underscore (_). A space is not required after this character. See CALL for more info.
  • This BASIC extension is optional on MSX2 as it requires one of the cartridges mentioned above. The 14 new instructions become officially part of the standard since MSX2+.

Instructions (ordered per category)

Conversion Functions

Instruction Function
CALL AKCNV Converts 1-byte characters (Hankaku) into 2-byte characters (Zenkaku)
Does not work with hiragana
CALL JIS Returns the JIS code of the 1st character in a string when it is a 2-byte (Zenkaku) character
CALL KACNV Converts 2-byte characters (Zenkaku) into 1-byte characters (Hankaku)
Does not work with kanji
CALL KNJ Returns a Japanese 2-byte (Zenkaku) character corresponding to a JIS code or a Shift-JIS code
CALL SJIS Returns the SJIS code of the first character in a string when it is a 2-byte (Zenkaku) character


Instruction Function
CALL ANK Deactivates Kanji mode and goes back to the previously used text mode
CALL CLS Clears the screen in any screen mode
CALL KANJI Activates the Kanji driver and switches the screen mode to a KANJI text mode
CALL PALETTE Alters MSX color palette
PUT KANJI Displays kanji on graphic screen (only screen modes 5 to 8 and 10 to 12)
This instruction comes from MSX-BASIC v2.0. It is ignored if no Kanji-ROM is installed

String Handling

Instruction Function
CALL KEXT Returns a string with half-width (Hankaku) or full-width (Zenkaku) characters removed
from a string or variable
CALL KINSTR Returns position of first occurrence of a substring in a string, this from a specified position
CALL KLEN Returns the length of a string, including all non-printable characters
CALL KMID Returns a string corresponding to a number of characters from an original string,
this from a specified position
CALL KTYPE Checks the character type (Hankaku or Zenkaku) of a character in a specified position of a string

Instructions (alphabetical order)

Instruction Type
CALL AKCNV Conversion Functions
CALL ANK Display
CALL CLS Display
CALL JIS Conversion Functions
CALL KACNV Conversion Functions
CALL KEXT String Handling
CALL KINSTR String Handling
CALL KLEN String Handling
CALL KMID String Handling
CALL KNJ Conversion Functions
CALL KTYPE String Handling
CALL SJIS Conversion Functions
PUT KANJI * Display

(*) This instruction comes from MSX-BASIC v2.0. It is ignored if no Kanji-ROM is installed.

Pages in category "Kanji BASIC"

The following 15 pages are in this category, out of 15 total.


C cont.

C cont.