This page was last modified 15:39, 8 November 2021 by Mars2000you. Based on work by Rderooy.



Creates a RAMDISK that will get the drive letter H: and optionally displays its actual size.

Only works with

  • version 2 of Disk BASIC, as provided by the MSX-DOS 2 cartridge or the MSX Turbo R machines
  • version 3 of Disk BASIC, as provided by the Nextor operating system version 2.0 and higher

Unlike the in-memory disk created by MemoryDisk BASIC, the RAMDISK created by CALL RAMDISK uses the regular Disk BASIC instructions to manipulate files.


  • Only one RAMDISK can be created. You will get an error message if you try to create a RAMDISK when it already exists.
  • If you use CALL SYSTEM after creation of the RAMDISK, it will remain available in the MSX-DOS 2 / Nextor environment - see the RAMDISK command.
  • Delta BASIC is compatible with this RAMDISK, but drive H: needs to be created before installing Delta BASIC and it will not be acesssible with the DFILES, LDFILES and SETDRIVE instructions.


CALL RAMDISK (<Size>,<Variable>)

The last parameter is optional. Parameters can not end with a comma alone.


<Size> is a number to specify in kilobytes the size of the RAMDISK you want to create. This number will be rounded up to the nearest multiple of 16kB since the RAMDISK is always a multiple of 16kB.

If the number is 0 the RAMDISK will be deleted.

<Variable> is an optional numeric variable. When specified, it will return the actual size of the created RAMDISK. This size can be different from the entered size, as the system needs to use some RAM for FAT or directories and the size of the memory mapper is taken in account to determine the actual size.

Memory mapper MSX2 / MSX2+ MSX Turbo R
128 kB 32 kB Impossible
256 kB 160 kB 96 kB
512 kB 416 kB 352 kB
1024 kB 928 kB 864 kB
2048 kB 1888 kB 1888 kB
4096 kB 4064 kB 4064 kB


10 CALL RAMDISK (128,S)  'Creates a 128kB RAMDISK when the memory mapper is 512kB
10 CALL RAMDISK (3000,S)  'Creates a 3000kB RAMDISK when the memory mapper is 2048kB
CALL RAMDISK (64)  'Creates a RAMDISK when it already exists
RAM disk already exists


Disk BASIC 2.0 or higher / MSX-DOS 2 mode of Nextor OS