MODE
This page was last modified 13:23, 1 June 2020 by Gdx. Based on work by Mars2000you.

Contents

Effect

Changes the number of characters per line on the screen in text mode.

Can also change the number of lines per screen since COMMAND2.COM 2.40.

The screen will be cleared and the cursor moved to the top left corner in the process.

Syntaxes

  • MODE <Width> <Lines>
  • MODE <Width>,<Lines>

The last parameter is optional. If you use the second syntax, do not put a comma if no parameters are behind.

Parameters

<Width> is a number between 1 and 80 to specify the number of characters per line you want to have in text mode. The highest value depends on the screen mode currently used and the type of MSX used.

In most cases, MSX-DOS 1 / MSX-DOS 2 / Nextor will start in screen 0 or 1, but the screen mode can optionally be set with SCREEN or CALL KANJI in MSX-BASIC before switching to the DOS environment.

SCREEN MSX type Columns
0 MSX1 (*) 1-40
MSX2 and higher (*) 1-80
1 MSX1 and higher 1-32
9 Korean MSX2 1-80
KANJI0 Japanese MSX2+ and higher 26-64
KANJI1 Japanese MSX2+ and higher 26-80
KANJI2 Japanese MSX2+ and higher 26-64
KANJI3 Japanese MSX2+ and higher 26-80


(*) Special case: the Yamaha CX5MII and CX5MII/128 are MSX1 computers with an additional ROM allowing to use the 80 column text mode.

In most cases:

  • If you use a number that is lower than 33 with the MODE command, the computer will switch to screen 1
  • If you use a number that is higher than 32 with the MODE command, the computer will switch to screen 0

Exception: No switch to another screen If you use this command in a Kanji screen mode on MSX2+ or Turbo R, but the width

  • will be automatically fixed to 26 if the entered number is lower than 26
  • will be automatically limited to 64 in Kanji modes 0 and 2 if the entered number is higher than 64

<Lines> is a number between 1 and 26 to specify the number of lines per screen. This parameter is available only since COMMAND2.COM 2.40.

Notes:

  • only 24 lines are visible on the screen when you use screen 0, 1, 9, kanji mode 2 or 3
  • only 13 lines are visible on the screen when you use kanji mode 0 or 1
  • MSX-DOS 2 does not automatically change the screen mode to display the other lines.

Width default values

The default values according the MSX when launching MSX-DOS from MSX-BASIC if you don't have used WIDTH in MSX-BASIC before going to the DOS environment.

SCREEN Machines Default width
0 Ascii One Chip MSX (improved) 80
Ascii One Chip MSX (original) 40
Brazilian Ciel and Sharp machines 39
Most Brazilian Gradiente machines 40
Most European machines 37
Japanese, Korean and Russian machines 39
1 All machines 29
9 Korean MSX2 computers 80 (even if WIDTH used before)
Korean MSX2 consoles 29 (takes the width of previous text mode)
KANJI0 Japanese MSX2+ and higher 29 (takes the width of previous text mode until the limit possible)
KANJI1 Japanese MSX2+ and higher 39 (takes the width of previous text mode until the limit possible)
KANJI2 Japanese MSX2+ and higher 29 (takes the width of previous text mode until the limit possible)
KANJI3 Japanese MSX2+ and higher 39 (takes the width of previous text mode until the limit possible)


Examples

Under MSX-DOS 1 and higher

A>MODE 80

Under MSX-DOS 2 with COMMAND2.COM 2.40 and higher

A>MODE 40 15

Related to

COLOR, DIR, KMODE, TYPE

Compatibility

MSX-DOS 1 with COMMAND.COM, MSX-DOS 2 / Nextor with COMMAND2.COM v2.20 and higher