WIN_REMV driveno, flag (SMSQ/E & ST/QL Level C-24+) or

WIN_REMV driveno


ST/QL (Level C-20+), SMSQ/E for Atari, QXL / QPC

The advent of changeable hard disk drives caused a lot of problems, since it is just about feasible that you might try to remove the hard disk unit whilst it is being accessed, which can cause serious damage to the drive unit. Although the drives attempt to warn the computer when they are and are not removable, it is next to impossible to ensure that when the drive says it can be removed, it is not actually powering up or down.

The command WIN_REMV tells the system that the drive connected to the specified port is a removable hard disk drive - the door on the unit will then remain firmly locked as long as any files on the hard disk are open.

Note that driveno must be in the range 1…8. SMSQ/E allows the first variant - flag can be omitted which is equivalent to 1 (signifies a removable hard disk). It can also be one of the following values:

  • 0: Clear the removable flag from the drive

  • V: Mark the drive as being a VORTEX drive



denotes win2_ as a removable disk drive.


It is essential that WIN_REMV is used as early as possible - either before the drive is first accessed or as the first line of your boot program if the Emulator is being booted from the hard disk in question.


SMSQ/E manages to detect removable hard disks 100% on SCSI ports. It is also normally successful in detecting removable hard disks connected to ASCI ports unless you configure it to ignore them, therefore this command is only really needed on ASCI drives.


You need v1.43+ of QPC to use removable drives.


Never try to remove a hard disk (removable or otherwise!) whilst it is running.


WIN_STOP will park the head on the drive prior to removal. DMEDIUM_REMOVE can tell you if the given device is a removable hard disk.