CALL LOCKDRV
This page was last modified 21:23, 10 November 2021 by Mars2000you.

Contents

Effect

Enables/disables the locking of a specified drive.

When a drive is locked, Nextor will never check the media change status for the drive; instead, the inserted media is assumed to never change. This is useful when a removable device such as a multimedia card is used as the main storage device, as it prevents the kernel to waste time executing media verification code.

However, be careful since data corruption may happen if the media is changed while it is locked. Any disk error which is aborted will automatically unlock the involved drive.

All drives can be locked, even those belonging to MSX-DOS drivers (including floppy disk drives). It can be done only manually, Nextor will never automatically lock a drive.

This instruction is available only when Nextor is used in MSX-DOS 2 mode. It is not available in MSX-DOS 1 mode, in which the concept of "drive lock" does not exist.

Syntax

CALL LOCKDRV(<Drive>,<Number>)

Parameters

When used without any parameter, this instruction will display some info about itself.

<Drive> can be

  • a string between quotes with the drive letter followed by a colon (for example "A:")
  • a number, being 1 to 8 for drives A: to H:, or 0 for the current drive

<Number> can vary between 0 and 255. When omitted, the current status of the specified drive will be displayed.

  • 0 = to unlock the specified drive
  • any other number = to lock the specified drive

Examples

CALL LOCKDRV("A:",5)
_LOCKDRV(1,0)

Related to

CALL MAPDRV, CALL MAPDRVL

Compatibility

Disk BASIC only when using Nextor OS in MSX-DOS 2 mode