Contents |
Effect
Activates the Kanji driver and switches the screen mode to one of the 4 KANJI text modes. A MSX2+ or higher is normally required, but you can also use a MSX2 with cartridges adding Kanji BASIC and a Kanji-ROM.
Note: When this instruction is executed at first time, all variables and status of instructions FOR...NEXT, GOSUB...RETURN are reset because the Kanji driver is installed.
Syntax
CALL KANJI<KanjiMode>
Parameter
<KanjiMode> can vary between 0 and 3. Do not put a space between KANJI and the kanji mode! When the parameter is not specified, the Kanji mode 0 is chosen.
Kanji mode | Characters / Kanji size | Columns | Colors | Remarks |
---|---|---|---|---|
0 | 8 x 16 / 16 x 16 | 26-64 | 16 of 512 RGB | Characters from Kanji-ROM are displayed as is |
1 | 6 x 16 / 12 x 16 | 26-80 | 16 of 512 RGB | Characters are reduced to be displayed except with Kanji-ROM from Panasonic that has 12 bit font |
2 | 8 x 16 / 16 x 16 | 26-64 | 16 of 512 RGB | Same as Kanji mode 0 but in screen mode interlaced |
3 | 6 x 16 / 12 x 16 | 26-80 | 16 of 512 RGB | Same as Kanji mode 1 but in screen mode interlaced |
Displayable characters and used graphic screen mode depend from the value entered with the instruction WIDTH. Used screen mode is screen 5 or 7. The screen mode switches when the value passes from one half to the other (<33 or <41 = screen 5, >32 or >40 = screen 7).
Note: Default/Initial width depends on the last text mode used (SCREEN 0 or SCREEN 1). In Kanji mode, you can restore the initial width with SCREEN 0 or SCREEN 1 instruction.
Example
CALL KANJI2
Particularities
- CALL KANJI uses a small part of the free memory and disables the following commands : CLS, COLOR=, SCREEN 9
- CHR$() is limited to the characters 33 to 128, 161 to 223, 253 and 254 in Kanji modes, and the character displayed for CHR$(128), CHR$(253) and CHR$(254) is not correct in Kanji modes 0 and 2 (? bug in Kanji BASIC)
- COLOR works slightly differently in Kanji mode
- WIDTH does not accept values lower than 26 in Kanji mode
- To clear the screen in Kanji mode, you need to use CALL CLS
- To alter the palette in Kanji mode, you need to use CALL PALETTE
- To go back to the 'standard' SCREEN 0 or SCREEN 1 and deactivate Kanji mode, you need to use CALL ANK
- If you use version 4 of Hangul BASIC in ROM format, are in Kanji mode and want to use SCREEN 9, first make a reboot with CALL REBOOT
- With exception of SCREEN 9, all the 'standard' SCREEN (0 to 8, 10 to 12) can be used while the Kanji mode remains enabled
- To fix the screen position in Kanji mode 2 and 3, you need to use VDP(10)=VDP(10)AND127
Related to
CALL ANK, CALL CLS, CALL PALETTE, CALL REBOOT, CHR$(), CLS, COLOR=, Hangul BASIC, SCREEN, WIDTH